This project implements a secure face recognition system using SimHash a variant of Locality Sensitive Hashing (LSH). The architecture is designed to preprocess face images, generate hashed templates using SimHash, calculate similarity scores using Hamming distance, and evaluate system performance with visualizations like ROC curves and histograms.
The project is modularized into the following components:
- Classes: Contains classes for essential operations:
zip_extractor.py: Extracts zip files.feature_extractor.py: Extracts features of face images.random_vector_generator.py: Generates random vectors.hasher.py: Implements SimHash for hashing.similarity_calculator.py: Calculates similarity using Hamming distance.score_matrix_generator.py: Generates the score matrix.visualizer.py: Generates histograms and ROC curves for evaluation.
- Dataset: Contains datasets as zip files.
- Files: Stores files generated during preprocessing, hashing, and score matrix generation.
- Output: Contains the ROC curve and histogram generated during evaluation.
- Old: Contains legacy files for previous SimHash implementations.
- main.py: Main function that integrates and executes the pipeline.
- README.md: Project documentation.
- .gitignore: Specifies files to be ignored by Git.
-
Install Python:
- Ensure Python 3.8 or above is installed on your system. You can download it here.
-
Clone the Repository:
git clone https://github.com/your-username/BioAuth-with-LSH.git cd BioAuth-with-LSH -
Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
- Ensure Python is installed on your system.
- Prepare Dataset: Create a folder Dataset and place your dataset as zip files under the Dataset/ folder.
- Run the main script:
python main.py
- Access the outputs:
- Processed files in Files/.
- Visualizations in Output/.
Contributions are welcome! To contribute:
- Fork this repository.
- Create a branch for your feature:
git checkout -b feature-name
- Commit and push your changes:
git commit -m "Add feature description" git push origin feature-name - Open a pull request.
This project is licensed under the MIT License.
For questions or feedback, reach out to Samyoga Bhattarai at [[email protected]].