Skip to main content

A unified Python library for converting biometric images to secure codes using classical algorithms

Project description

BioCodeLib

A unified Python library for converting biometric images (e.g., fingerprints) to secure, compressed codes using classical algorithms. This library integrates traditional methods for biometric encryption, evaluation, and comparison. It supports preprocessing, feature extraction, and encryption based on methods like BioHashing, IoM Hashing (inspired by RSBE-IoM), and simple XOR encryption.

Features

  • Preprocessing: Image loading, grayscale conversion, normalization, noise removal
  • Feature Extraction: Minutiae extraction for fingerprints, general image features
  • Algorithms: BioHashing, IoM Hashing, XOR encryption
  • Evaluation: Compare algorithms based on runtime, code length, and simulated security (non-invertibility score)
  • Flexible: Automatically adjusts parameters for different feature vector sizes
  • Open-source and extensible. Deep learning models are not included as per priority.

Installation

From PyPI (when published)

pip install biocodelib

From GitHub

pip install git+https://github.com/nimajz/BiocodeLib.git

From source

git clone https://github.com/nimajz/BiocodeLib.git
cd BiocodeLib
pip install -r requirements.txt
pip install .

Quick Start

from biocodelib import preprocess_image, extract_minutiae, compare_algorithms
import numpy as np

# Load and preprocess image
image = preprocess_image('fingerprint.jpg')

# Extract features
features = extract_minutiae(image)

# Compare algorithms and get best one
results, best_algorithm = compare_algorithms(features)
print(f"Best algorithm: {best_algorithm}")

Documentation

For detailed documentation and examples, see the ALGORITHMS_GUIDE_FA.md file.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author

Nima jzzz - nimajaberzadeh@gmail.com

Repository

https://github.com/nimajz/BiocodeLib

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

biocodelib-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biocodelib-0.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file biocodelib-0.1.0.tar.gz.

File metadata

  • Download URL: biocodelib-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for biocodelib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc9f8a85f5148baa804d4be2961202000757ad2b96e2d56547fe0a22343a9da5
MD5 ea9c657824398fd1cf336773336ef468
BLAKE2b-256 0c0e07a64bbe7e88018599f4850cc5b07debfe50902d808f92dccdee6aac3d99

See more details on using hashes here.

File details

Details for the file biocodelib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: biocodelib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for biocodelib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf512126fd3a40958573cc09ed01b7c5ca7e779ad65b956b4ba504ee8541425b
MD5 744ad0dd9f7606d8aefdc07383e80608
BLAKE2b-256 605d027d51509df707638569851cfa23e671ecfe373c355ce381ba11f6cf89eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page