Skip to content

A computer vision project for automating gate entry at IIIT Delhi using low-light face detection, recognition, and tracking from CCTV footage.

Notifications You must be signed in to change notification settings

shobhitraj1/IIITD-Gate-Entry-Automation

Repository files navigation

IIITD-Gate-Entry-Automation

This repository presents a computer vision system developed to automate student gate entry at IIIT Delhi after 10 PM, designed to handle low-light conditions and real-world surveillance settings. The project integrates face detection, recognition, and temporal tracking from CCTV footage to log student entries seamlessly into an online database. The project was developed for the Computer Vision course at IIIT Delhi in Winter 2025.

System Architecture Pipeline:
pipeline


Application Frontend Dashboard:
pipeline

🛠️ Features:

  • Low-Light Face Detection: DAI detector for robust face bounding box localization under challenging illumination.
  • Face Recognition Backbone: MTCNN for alignment + AdaFace (quality-adaptive margin) for identity prediction.
  • Temporal Consistency via Tracking: ByteTrack to link detections across frames, with majority-vote merging to reduce ID fragmentation & for tracking multiple individuals in video streams.
  • Pipeline Optimizations:
    • Frame skipping + interpolation for faster inference.
    • TorchVision’s optimized NMS for efficiency.
    • Quantized detector (FP16) for reduced GPU memory usage.
  • Frontend Dashboard: React + TypeScript web interface with:
    • Dashboard Panel: Shows entry/exit logs (name, roll no., photo, timestamp).
    • Live Surveillance Panel: Displays real-time CCTV feeds.
  • FastAPI Backend: REST API and WebSocket support for live frame streaming and event logging.
  • Accuracy: Achieved 87.5% recognition accuracy under low-light conditions with near real-time inference.

📋 Installation & Usage:

  • Clone the repository and install the following Python libraries:
pip install fastapi uvicorn opencv-python torch torchvision numpy Pillow sqlite3 scipy python-multipart python-dotenv requests matplotlib scikit-learn
python app.py
  • Start the frontend:
cd frontend
npm install
npm start
  • Process videos:
    • Place your video files in the root directory & edit the vid_name variable in main.py
    • Run:
      python main.py
    • Output videos will be saved with _complete.mp4, _lessdet.mp4, or _merge.mp4 suffixes.

📂 Folder Structure:

  • Dataset not released for privacy.
  • /adaface: AdaFace identity recognition implementation.
  • /bytetrack: ByteTrack multi-object tracker.
  • /frontend: React + TypeScript web dashboard.
  • /weights: Pretrained model weights (to be downloaded).
  • /data, /layers, /networks: Supporting modules, scripts & configs.
  • app.py: FastAPI backend server.
  • dai.py: DAI low-light face detection model.
  • main.py: Complete pipeline, main_lessdet.py, main_merge.py: Batch video processing scripts - complete pipeline, reduced detection, and ID merge.

📊 Results:

  • Face Detection (DAI) under low-light conditions: F1-score = 0.86
  • Face Recognition (AdaFace): Accuracy = 87.5%
  • Pipeline Latency: Optimized from ~2 min to 8.3s for a 7s video (30 fps)

🧑‍🤝‍🧑 Other Contributors:

My IIIT Delhi batchmates Manan Aggarwal & Souparno Ghose also contributed in this project.

🙏 Acknowledgements:

We gratefully acknowledge the open-source repositories that formed the backbone of this project:

📌 Important: Please make sure to follow the guidelines and policies outlined by the institution regarding the use of shared coursework materials. Use this repository responsibly and avoid any violations of academic integrity. Codes are provided for reference purposes only. It's recommended to understand the codes and implement them independently.

About

A computer vision project for automating gate entry at IIIT Delhi using low-light face detection, recognition, and tracking from CCTV footage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published