Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Facial Police a perfect platform for the police authorities to identify the suspects or the criminals through CCTV footages. This provides a thorough facial reconstruction of the image and detection through their databases even from the bluriest image available through footage.

Notifications You must be signed in to change notification settings

avanshh99/ethos-hackathon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FACIAL POLICE: Reconstructing Human Faces from Low-Quality CCTV Footage

Facial Police is an advanced solution designed to reconstruct and enhance human faces from low-quality CCTV or surveillance video footage. Leveraging state-of-the-art AI models, this project significantly improves the quality and clarity of facial images, enabling reliable identification and 3D visualization in both forensic and security applications.

🚀 Key Features

  • Frame Extraction: Efficiently extracts frames from video using OpenCV for downstream facial detection and enhancement.
  • Face Detection: Accurately detects and crops faces from each frame using MTCNN.
  • Preprocessing: Aligns and normalizes faces to ensure consistent orientation and size.
  • Facial Enhancement: Utilizes GAN-based models such as CodeFormer and GFPGAN to restore and enhance facial details.
  • Feature Reconstruction: Deep learning techniques reduce blur and amplify critical facial features for superior clarity.
  • Post-Processing: Integrates enhanced faces back into original frames to preserve temporal continuity.
  • Real-Time Monitoring: Live face detection and recognition via OpenCV2 and the face_recognition library.
  • Vector Database Integration: Detects and flags known suspects using a vector database for face recognition.
  • 3D Face Reconstruction: Generates 3D face meshes using 3DDFA-V3 and RetinaFace for immersive 360-degree visualization.
  • User-Friendly UI: Intuitive platform ("Facial-Police") for uploading footage, reconstructing faces, and analyzing results.

📝 Approach Overview

  1. Frame Extraction:

    • Extract video frames at regular intervals using OpenCV.
  2. Face Detection:

    • Detect faces in each frame with MTCNN and crop for enhancement.
  3. Preprocessing:

    • Align and normalize detected faces for uniformity.
  4. Facial Enhancement (GAN-based):

    • Pass cropped faces through CodeFormer and GFPGAN to improve resolution and restore details.
  5. Feature Reconstruction:

    • Use deep learning to sharpen facial features and reduce blur.
  6. Post-Processing:

    • Merge enhanced faces back into frames, maintaining original video continuity.

📊 Results

The result folder contains comparative outputs from both CodeFormer and GFPGAN models:

Example: Extracted Frame

Extracted Frame

Model Output Samples

Image 1

Comparative Result

Image 2

Comparative Result 2

Image 3

Comparative Result 3

UI Preview

UI 1

UI 2

🔗 Complete Result Sets

🛠️ Technologies Used

  • Python, OpenCV, MTCNN, face_recognition
  • CodeFormer, GFPGAN (GAN-based face restoration)
  • 3DDFA-V3, RetinaFace (3D mesh reconstruction)
  • Streamlit/FastAPI (for UI/UX platform)

🧑‍💻 How to Use

  1. Upload your CCTV footage or video to the platform.
  2. The system automatically extracts frames, detects faces, and enhances them using AI models.
  3. View and analyze the enhanced faces, compare with originals, and utilize 3D reconstruction for further inspection.
  4. Use live monitoring for real-time face recognition and suspect identification.

🤝 Contributions

Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request for discussion.

About

Facial Police a perfect platform for the police authorities to identify the suspects or the criminals through CCTV footages. This provides a thorough facial reconstruction of the image and detection through their databases even from the bluriest image available through footage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 70.3%
  • Jupyter Notebook 29.7%