- B.Tech. Final year project on Face Similarity Detection AI using Siamese Networks.
- The project is built using TensorFlow and Keras.
- The model is trained on the Extracted Faces dataset from the face-recognition-dataset.
- The model uses Triplet Loss to minimize the distance between the anchor and positive images and maximize the distance between the anchor and negative images.
- Model is exported as "H5" and wrapped in a Fast API.
- The API is to be deployed on AWS as a containerized service, using Docker.
- A React Frontend is built to interact with the API.
- backend: Contains the model and API. ( Tech Stack: FastAPI, TensorFlow, Keras, Pillow, AWS )
- frontend: Contains the React Frontend. ( Tech Stack: React, Axios, TailwindCSS )
-
Install the required packages using
pip install -r requirements.txt
. -
Run the API using
uvicorn main:app --reload
. -
Working
-
Sample 1:
![Sample_1](https://private-user-images.githubusercontent.com/86708181/327479528-3394bfe6-043c-4566-8854-357395b5a1bf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxODA3NzYsIm5iZiI6MTcyNDE4MDQ3NiwicGF0aCI6Ii84NjcwODE4MS8zMjc0Nzk1MjgtMzM5NGJmZTYtMDQzYy00NTY2LTg4NTQtMzU3Mzk1YjVhMWJmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDE5MDExNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE2ZWY0Nzc3ZTcyZGVkYTVkNTIwZmYwMTA5ZTA2NmY5MWZkZWNkODA2MDY3ODhhZWQ3ZDBhODI3MWE4ZTdiNmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0aZDrbJHlZamMgsr3UPSWUx4qn75HkDZvgtG4V6hPF0)
- Sample 2:
![Sample_2](https://private-user-images.githubusercontent.com/86708181/327479546-319899be-ab60-49b3-8816-a5316b82c660.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxODA3NzYsIm5iZiI6MTcyNDE4MDQ3NiwicGF0aCI6Ii84NjcwODE4MS8zMjc0Nzk1NDYtMzE5ODk5YmUtYWI2MC00OWIzLTg4MTYtYTUzMTZiODJjNjYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDE5MDExNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQyN2MzYmUzYWE1ZjU5ZGQ3NmMwZDNhOTIzOGYyMzQzZjQ3NDM3YTgzYTdiY2JhY2RlYzNkN2NkN2YwZDdmMmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.tOOeqy0kudcQs3aYW2T4GWGrjiLbIR-UV_eiO-0VyA0)
- Install the required packages using
npm install
. - Run the frontend using
npm start
.
- The model takes 3 input images, (anchor, image-1, image-2) and gives a distance value that indicates which of these 2 images are similar or dissimilar to the anchor image.
- Sample UI for the project:
Prakhar Tandon, Vaibhav Shankhwar, Abhishek Agrahri and Mansi Purwar.
Final B.Tech. Computer Science & Engineering.
Under Guidance of Dr. Vivek Verma, Professor, CSE Dept, HBTU Kanpur.