FingerFlow
Project description
FingerFlow
FingerFlow is an end-to-end deep learning Python framework for fingerprint minutiae manipulation built on top of Keras - TensorFlow high-level API.
In current stable version 3.0.1 following modules are provided:
- extractor - module responsible for extraction and classification of minutiae points from fingerprints. It is also capable of detecting fingerprint core points.
- matcher - module responsible for matching extracted minutiae feature vectors.
GPU support
FingerFlow supports GPU acceleration on CUDA®-enabled graphic cards.
Software requirements
- Python 3.7 or newer
- CUDA - for TensorFlow GPU acceleration (if missing, CPU will be used for computation)
Installation
Use the package manager pip to install FingerFlow. We reccomend to use it in pip or anaconda enviroment.
Installation in anaconda enviroment:
pip install fingerflow
Modules
Extractor
Module responsible for extraction and classification of fingerprint minutiae points and also for detecting fingerprint core point. Minutiae extraction part is built using MinutiaeNet neural network architecture. Core detection part is built using YOLOv4 object detection neural network architecture.
Extractor contains 3 modules:
- MinutiaeNet - module responsible for extracting minutiae points from fingerprint image. Using MinutiaeNet neural network architecture.
- ClassifyNet - module responsible for classifying extraced minutiae points. Architecture based on FineNet module of MinutiaeNet.
- CoreNet - module responsible for detecting fingerprint core point. YOLOv4 neural network architecture is used.
Neural networks models
- CoarseNet: Googledrive || Dropbox
- FineNet: Googledrive || Dropbox
- ClassifyNet: Googledrive
- CoreNet: Googledrive
API
Extractor
Class which provides all functionality for extraction of minutiae points
fingerflow.extractor.Extractor()
Arguments
coarse_net_path
- used for setting path to pretrained model of submodule CoarseNetfine_net_path
- used for setting path to pretrained model of submodule FineNetclassify_net_path
- used for setting path to pretrained model of submodule ClassifyNetcore_net_path
- used for setting path to pretrained model of submodule CoreNet
Methods
extract_minutiae(image_data)
- used for extracting minutiae points and detecting of fingerprint core from input image data. Method accepts input data in form of 3D matrix (e.g. output of OpenCV imread function). Method returns object with extracted and detected data in following shape:- minutiae - Pandas DataFrame of extracted and classified minutiae points in following form:
- x - x coordinate of minutiae point
- y - y coordinate of minutiae point
- angle - direction of minutiae point rotation
- score - minutiae point extraction confidence
- class - type of minutiae point. In FingerFlow 1.0.0 we support following minutiae classes:
- ending
- bifurcation
- fragment
- enclosure
- crossbar
- other
- core - Pandas DataFrame of deteted fingerprint cores in following form:
- x1 - left coordinate of bounding box
- y1 - top coordinate of bounding box
- x2 - right coordinate of bounding box
- y2 - bottom coordinate of bounding box
- score - core detection confidence
- w - width of bounding box
- h - height of bounding box
Usage
import cv2
import numpy as np
from fingerflow.extractor import Extractor
extractor = Extractor("coarse_net", "fine_net", "classify_net", "core_net")
image = cv2.imread("some_image")
extracted_minutiae = extractor.extract_minutiae(image)
Matcher
Module responsible for matching extracted feature vectors. It is using custom Siamese neural network architecture.
Input size (number of minutiae in feature vector) for matching is not fixed and is determined by precision
constructor argument. Used weights need to be in the correct shape - network needs to be trained with the same precision as passed in the argument.
But in general, the more minutiae points the higher precision. Our custom model is trained on 10, 14, 20, 24, 30 minutie points per input.
Matcher contains 1 module:
- VerifyNet - module responsible for matching feature vectors. Custom Siamese neural network architecture is used.
Neural network models
- VerifyNet 10: Googledrive
- VerifyNet 14: Googledrive
- VerifyNet 20: Googledrive
- VerifyNet 24: Googledrive
- VerifyNet 30: Googledrive
API
Matcher
Class which provides all functionality for matching feature vectors
fingerflow.matcher.Matcher()
Arguments
precision
- input size (number of minutiae in feature vector)verify_net_path
- used for setting path to pretrained model of submodule VerifyNet
Methods`
verify(anchor, sample)
- used for matching feature vectors. Method accepts input data in form of NumPy N-dimensional array, which should be in following shape: (confidence, columns). Its columns should contain the same data asExtractor minutiae output
with one additional column that represents minutia distance to fingerprint core. Method returns float matching confidence in range 0-1.verify_batch(pairs)
- performs pairwise verification in provided list of pairs. Returns list of float matching confidences.plot_model(file_path)
- plot model structure into image file.file_path
should represent path to desired file.
Usage
from fingerflow.matcher import Matcher
matcher = Matcher(30, "verify_net")
prediction = matcher.verify(anchor_feature_vector, sample_feature_vector)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fingerflow-3.0.1.tar.gz
.
File metadata
- Download URL: fingerflow-3.0.1.tar.gz
- Upload date:
- Size: 46.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f73ad527224d3b9f4587254a3bc6154a5411de12488803fb47a11faea1d2e678 |
|
MD5 | 905ebd8ce4ef7ba18a20d4aaac83f2fe |
|
BLAKE2b-256 | a0c9594918a5cf620efd5c6dff19d7426e33fa402d43168a1ef90974e626788f |
File details
Details for the file fingerflow-3.0.1-py3-none-any.whl
.
File metadata
- Download URL: fingerflow-3.0.1-py3-none-any.whl
- Upload date:
- Size: 54.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d256c1351b74b2e746386a3c32c61e92d569a8ba9f79cb9f9e084367000e3c35 |
|
MD5 | e99dc0f52ec5023688b210f4b5db4b71 |
|
BLAKE2b-256 | ac0545d2e06846977483c73a95e9efd52b3878adf83fb57b36fbdecc42a90f5f |