DEV Community

Raj Kumar Rathod
Raj Kumar Rathod

Posted on

Fingerprint based blood group detection

Fingerprint-Based Blood Group Detection Using Machine Learning: A Non-Invasive Approach

Introduction

Blood group identification is an important part of healthcare, especially during emergency situations, blood transfusions, surgeries, and medical treatments. Traditionally, blood grouping is performed using a blood sample and laboratory-based serological testing. Although this method is reliable, it requires a blood sample, laboratory materials, trained personnel, and time.

This project explores a different approach: using fingerprint images and machine learning to predict a person's blood group.

The main idea is to combine fingerprint image processing, Gabor feature extraction, and a Convolutional Neural Network (CNN) to classify blood groups from fingerprint images. The project also includes a web-based interface developed using Django, where users can upload fingerprint images and receive a predicted blood group.

The project report achieved a reported test accuracy of approximately 97% on its dataset, covering eight blood group classes: A+, A−, B+, B−, AB+, AB−, O+, and O−.

Note: This project is a machine-learning research prototype. It is not intended to replace standard clinical blood-group testing or to be used independently for medical decisions.


The Problem

In conventional blood-group detection, a blood sample is collected from the individual and tested using laboratory procedures. This process can require equipment, reagents, trained professionals, and appropriate healthcare facilities.

In emergency or resource-constrained situations, obtaining and testing a blood sample may not always be convenient. The project therefore investigates whether biometric information, specifically fingerprint patterns, can be used as an additional method for predicting blood group.

The existing approach also depends on physical records or previous medical information when someone needs to provide their blood group quickly. If those records are unavailable, the information may need to be obtained again.

This led to the main question behind the project:

Can machine learning identify patterns in fingerprint images that can be used to predict a person's blood group?


Our Proposed Solution

The proposed system uses fingerprint images as input and applies image processing and deep learning techniques to predict the blood group.

The basic workflow is:

Fingerprint Image → Preprocessing → Gabor Feature Extraction → CNN Model → Blood Group Prediction

The system uses fingerprint images obtained using thermal spectroscopic photoplethysmographic (PPG) sensor technology, extracts relevant features using Gabor filters, and then passes the processed information to a CNN classification model.

The system supports eight blood group categories:

  • A+
  • A−
  • B+
  • B−
  • AB+
  • AB−
  • O+
  • O−

How the System Works

1. Fingerprint Image Collection

The first step is obtaining a fingerprint image. The fingerprint contains patterns such as ridges and valleys that can be processed as an image.

The collected image is provided to the machine-learning pipeline for further processing.

2. Image Preprocessing

Before the image is given to the CNN, it is processed to make the important fingerprint patterns more suitable for feature extraction.

Image processing is performed using Python and OpenCV.

3. Gabor Feature Extraction

One of the important parts of the project is Gabor filtering.

Gabor filters are used to identify specific patterns and orientations in an image. In fingerprint processing, these filters can help emphasize ridge structures and other local patterns.

The project implementation uses multiple filter orientations to process the fingerprint image.

4. CNN Classification

After feature extraction, the processed fingerprint image is passed to a Convolutional Neural Network (CNN).

The CNN used in the project contains convolution and pooling layers followed by fully connected layers. The final layer uses a softmax-based classification approach to produce probabilities for the blood-group classes.

The model learns patterns from the training dataset and uses those learned patterns to classify new fingerprint images.


Technology Stack

The project was developed using the following technologies:

Technology Purpose
Python Main programming language
Django Web application framework
OpenCV Image processing
NumPy Numerical operations
Keras / TensorFlow CNN development and training
Scikit-learn Dataset splitting and performance metrics
Gabor Filters Fingerprint feature extraction
HTML Web interface

The project report specifies Python 3.7.2 and a Django-based local web application environment.


Training the Machine Learning Model

The dataset is divided into training and testing portions. The implementation uses an 80:20 train-test split.

During training, the CNN learns from fingerprint images associated with their corresponding blood-group labels.

The model is trained using the Adam optimizer and categorical cross-entropy loss. The implementation also evaluates the model using metrics including:

  • Accuracy
  • Precision
  • Recall
  • F1-score

The training process in the project was configured for up to 40 epochs.


Results

The project reported approximately 97% test accuracy on its dataset.

The application was also tested with fingerprint images representing different blood-group classes. The report documents prediction examples for categories including A−, B−, B+, O+, AB+, A+, and AB−.

These results show that the developed model was able to learn useful patterns from the available fingerprint dataset.

However, an important point is that this result comes from the project's experimental dataset. A larger and more diverse dataset, independent validation, and healthcare-based testing would be required before considering such a system for real-world clinical use.


Web Application

To make the machine-learning model easier to use, a Django web application was developed.

The application contains several modules:

Login

Users can log into the system before accessing the application.

Train ML Algorithm

The administrator or authorized user can train the machine-learning model using the available dataset.

Blood Group Prediction

A fingerprint image can be uploaded to the system. The image is processed and passed to the trained CNN model, which generates the predicted blood group.

Logout

Users can securely exit the application.

The project report documents these modules as part of the implemented web application.


Why This Project Is Interesting

The interesting part of this project is the combination of biometrics, image processing, and machine learning.

Top comments (0)