An Amazing Collection of 10K Randomized Visa and Master Card Images with Random Names and Card Types.
Explore the docs Β»
View Demo
Β·
Report Bug
Β·
Request Feature
Table of Contents
There are many usecases for a dataset with Credit Card Images, from multiple payment handlers like Visa or Mastercard, therefore I decided to go ahead and create this dataset from scratch. Here's why:
- Train Object Classification Models in Various Scenarios where you need to know the type of Card.
- Create Algorithms to Extract Key Information from the Card.
- Cards are Randomized in Platinum, Gold and Standard Catagories for Diversity π
There has been a severe lack of a good ready to use dataset in terms of debit/credit cards, so therefore, you can see below the various snapshots of the extracted results.
To get started all you need to go ahead and do is clone the existing github repository, the folders are marked as Visa and MasterCard respectively for ease where you will find 5004 images precisely for each of the Catagory.
git clone https://github.com/OttomanZ/SuperCardSet.git
To go ahead and start generating your own dataset you need to first install the dependencies of the program, to do that you need to have python3
and pip3
installed in your enviorment of choice.
pip install -r requirements.txt
After this the Project Requirements should be installed and we are ready to rock. πΈ
To go ahead and generate the dataset via. the command line you need to go ahead and follow the following syntax, to get help run:
ubuntu@ip-172-31-56-240:~/SuperCardSet$ python generate_data.py -h
usage: generate_data.py [-h] [-a AMMOUNT]
Generates a Dataset of Visa & MasterCard Images with Randomized Names and Card Types.
options:
-h, --help show this help message and exit
-a AMMOUNT, --ammount AMMOUNT
ammount of images to generate
- Running the Command-Line Interface π
python generate_data.py -a 100
This is an example of how you may use the integrated Python Module GenerateDataset
in generate_data.py
To get started ensure that generate_data.py is in the same directory as your python script. π
from generate_data import GenerateDataset
# to automatically generate a dataset of 10 (50/50 Distribution) images from the API.
# stores the images in Visa & MasterCard folders.
generator = GenerateDataset()
generator.generate_dataset(ammount=10)
from generate_data import GenerateDataset
import cv2
# Possible Values 'Visa' or 'MasterCard'
# Possible Values, 'A Name'.
# Result: An Numpy Image Object.
generator = GenerateDataset()
img = generator.generate_img('Visa','John Doe')
cv2.imshow('img',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
Here you can go ahead and see the performance of MobileNet Model trained using tensorflow.keras
over 50 epochs on the following dataset distribution.
[+] Train Generator
Found 9524 images belonging to 2 classes.
[+] Validation Generator
Found 482 images belonging to 2 classes.
- Generating 10K Dataset
- Customized Cards
- Customized Names
- Command Line Interface
- Python API
- Adding Custom Names
- Adding Card Types
- Adding Card Edition
- Custom Card Number Generator
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
Distributed under the MIT License. See LICENSE.txt
for more information.
Muneeb Ahmad - @MuneebAhmad - [email protected]
Project Link: https://github.com/OttomanZ/SuperCardSet
I found this API on a rather wierd old looking website, so I decided to go ahead and create a wrapper around it and create this much needed dataset. Kudos to it's Original Maintainers, and I hope that people do not overdo it, resulting in their website being slowed down. I would suggest highly ratelimiting each request. Be nice and Kind!