Skip to content

tekinengin/face-clustering-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Based Face Clustering

This is a framework to detect unique faces in videos.

Built with Dlib's libraries. It is possible to use different face detection and recognition algorithms.

Architecture

Input --> Preprocessing --> FaceDetection --> FaceLandmarks --> Face Alignment (Affine) --> Feature Encoder --> Clustering --> UniqueIDs

Pre-Trained Models

Installation

  • git clone https://github.com/tekinengin/face-clustering-video.git
  • curl http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 > pre-trained/shape_predictor_68_face_landmarks.dat.bz2 && bzip2 -d pre-trained/shape_predictor_68_face_landmarks.dat.bz2

Parameters

  • --video : Source Path
  • --ctype : Face Detector(FD) Type 1: HaarCasCade, 2: HoG, 3: CNN
  • --cpath : Pre-Trained FD Model Weights if any
  • --ppath : Pre-Trained Feature Landmark Detector (Default Dlib-68-Points)
  • --ncpu : Number of CPUs for multi-threading
  • --cthreshold : Threshold for face confidence
  • --resizeratio : Resize the Input with 1/resizeratio
  • --pfps : Processing Fps, Example: skip videoFps / pfps frames (Default: Video Fps)
  • -d : Display Option only for --ncpus 1
  • -r : Saving Detected Faces and Clusters
  • -e : Eye Detection Option
  • -align : Face Alignment

Examples

  • Clustering with Alignment (Affine) python main.py --ctype 2 --ncpu 4 --video="src/sampleVideo.mp4" --pfps 0.33 -r -align

aligned

  • Clustering without Alignment :python main.py --ctype 2 --ncpu 4 --video="src/sampleVideo.mp4" --pfps 0.33 -r

nonaligned

About

Video Based Face Clustering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages