This project uses image processing and deep learning to detect faces in passengers' photos and compare them against a database of stored photos.
The app loads a deep learning model trained to detect faces in images. When a new passenger photo is input, the model detects any faces and extracts facial embeddings. These embeddings are compared against stored embeddings for known passengers using cosine similarity. If a match is found, the passenger is identified.
-
Ensure you have Python 3 and the requirements installed.
-
Download the pre-trained face detection model from Google Drive and place in the
trainer
folder. -
Run
python app.py
to start the app. -
Input a passenger photo file path when prompted.
-
The app will detect any faces, extract embeddings, compare against known passengers in
passengers.db
and output the identified passenger name if a match is found.
app.py
- Main application logicdetect.py
- Functions for face detection and embeddingdatabase.py
- Passenger database interfacepassengers.db
- SQLite database containing passenger names and facial embeddingstrainer/
- Folder containing pre-trained face detection model files
- Python 3
- OpenCV
- SQLite3
- Tensorflow
- See
requirements.txt
for full requirements
The face detection model is a pre-trained ResNet model from Anthropic. The database stores facial embeddings extracted using this model.
Let me know if you would like me to modify or expand this README!