A full-stack facial recognition system built using a Siamese Convolutional Neural Network (CNN) in PyTorch.
The system performs face verification by learning embeddings and comparing similarity scores.
It is served through a FastAPI backend, connected to a Next.js frontend, and fully containerized using Docker Compose for reproducible deployment.
Watch the application in action: View Demo Video
The backend is served via FastAPI and runs inside a Docker container.
cd Backend
docker compose up --buildThis command builds the backend image and starts the inference service at http://127.0.0.1:8000.
- Frontend: Next.js, React, Tailwind CSS
- Backend: FastAPI (Python)
- Machine Learning: XGBoost, Scikit-learn, Pandas, Numpy
- DevOps: Docker, Docker Compose
The system uses a Siamese Neural Network for face verification based on similarity learning.
- Data Collection: Face image pairs for similarity learning
- Preprocessing: Resize, normalization, augmentation
- Model: Siamese CNN for embedding generation
- Distance Metric: Euclidean or Cosine similarity
- Inference: Compare embeddings for match / no-match decision
├── Frontend/ # Next.js application
├── Backend/ # FastAPI, Model logic, and Dockerfile
│ ├── facial_recognition_model.py # Trained Siamese CNN model
│ └── facial_api.py # API endpoints