[post_title_date]

Fingerprint, as a unique feature of each person, can be divided into different types. In this project, we identify real fingerprints pattern and classify them with convolutional neural networks(CNN).
Dataset
The dataset is the original NIST 8-Bit Gray Scale Images of Fingerprint Image Groups(FIGS). It comprises 4000 images that are originally of size 512 x 512. The image size has been reduced to 128 x 128 for computational purposes. The resized dataset can be found here
The dataset is in the format:
- file_name.png
- file_name.txt
For example, f0038_02.png file will have a corresponding f0038_02.txt file
There are 5 different fingerprint patterns namely:
- Arch (A)
- Left Loop (L)
- Right Loop (R)
- Tented Arch (T)
- Whirl (W)
Now that we know how our dataset looks like, we can start our project.
Importing the required libraries
First things first, let us import the required libraries.
https://gist.github.com/91971843b6aa2a88b37e896b7bb9a603
Getting the data
Get the data directly into your notebook and then unzip to save it.
Please note: The dataset will be available only in the runtime. So, if the runtime is restarted, you will have to download and unzip the dataset again.
https://gist.github.com/6fece1cddf6dabc9bebe21a92383fed9
Reading the text file
Now, let us read the text file and save the necessary information to a dataframe.
https://gist.github.com/a3b2ac7d0570ed1579375bee8473fa42
Checking data for class imbalance
For a multi-class classification, it is important for the dataset to be balanced. By balanced, we mean that the number of inputs for each class must be close to each other. In this case, our dataset is perfectly balanced.
Here we can see that the ‘GENDER’ column is not balanced, so we can drop that column.
https://gist.github.com/aa0893dd2e1de1301bc829de98997c90

Mapping the classes to an integer
Since, it is not possible for a neural network to learn using characters. It is important to map each of the class to an integer.
https://gist.github.com/826724da30aa563bb32428dbc736008b
Plotting Images from each class
https://gist.github.com/ea8afeba58da41abd34f715af07d31c8
Data Preparation
Let us prepare data that can be feeded to the model.
https://gist.github.com/a9ad80e0f5d5d31199101a88e4742ce6
Sequential Model
Training a sequential model with 5 convolutional layers and 1 fully-connected layer.
https://gist.github.com/e1f74c03ecf08102b2366526417058ae
Hyperparameters and training
https://gist.github.com/9dba7a34eb6cf16e70105e66d020a1c3
Loss and Accuracy graphs
https://gist.github.com/3abec818437f7d866a841af61d367bc8
Plotting Predictions
Read images and labels from the test set and make predictions on random images with our model.
The images with [CORRECT] depict correctly classified images.
https://gist.github.com/9922309502f7cb6318ab0b59b3e852e2
Conclusions
Hence, we have successfully trained a multi-class classifier with good accuracy to classify the different patterns of fingerprint.
Thanks for reading!
Notebook Link: Here Credit: Shashank Hs
You may also be interested in
- Learning more about Fruits Classification using Deep Learning
- Reading about Mushroom Classification Using Deep Learning
- Also Read: Detecting Car Damage Using Deep Learning
- Finding out about Deep Learning, the technology enabling machines to interpret complex data and mimic human cognition
Become a Contributor: Write for AITS Publication Today! We’ll be happy to publish your latest article on data science, artificial intelligence, machine learning, deep learning, and other technology topics.