Skip to content

An Amazing 10K Dataset of Master Card & Visa Card Images with Python API & Command Line Interface.

License

Notifications You must be signed in to change notification settings

OttomanZ/SuperCardSet

Repository files navigation

JQuery


Logo

SuperCardSet

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

supercardset

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.

(back to top)

Getting Started 🚗

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

Custom Generation 👍

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. 🎸

  • Command Line Generation

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

Downloading Results

(back to top)

Code Integration 📖

This is an example of how you may use the integrated Python Module GenerateDataset in generate_data.py

Prerequisites

To get started ensure that generate_data.py is in the same directory as your python script. 😄

Adding in Application

  • Custom Generating Dataset

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)
  • Customized Card Generation

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()

Sample Data

Logo Logo

(back to top)

Classification Model Results Open In Colab

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 Distribution

[+] Train Generator
Found 9524 images belonging to 2 classes.
[+] Validation Generator
Found 482 images belonging to 2 classes.

download

lowest

download

Roadmap

  • 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).

(back to top)

Contributing

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!

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Muneeb Ahmad - @MuneebAhmad - muneeb@muneeb.co

Project Link: https://github.com/OttomanZ/SuperCardSet

(back to top)

Acknowledgments

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!

(back to top)

About

An Amazing 10K Dataset of Master Card & Visa Card Images with Python API & Command Line Interface.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages