Skip to content

πŸ“Ή [Video] Real-time multi-face tracking using MTCNN and BoxMot

Notifications You must be signed in to change notification settings

97yong/face-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§‘β€πŸ’» Face Tracking with MTCNN + BoxMot

This project performs multi-face tracking using MTCNN for face detection and BoxMot for tracking.


πŸ“½οΈ Demo

  • Test Video: MOT16-08 from the MOTChallenge benchmark
  • Trackers tested: BoT-SORT, ByteTrack, OCSORT (via BoxMot)

πŸ› οΈ Features

  • βœ… Face detection with MTCNN
  • βœ… Tracker selection: BoT-SORT / ByteTrack / OCSORT
  • βœ… Confidence-based face filtering
  • βœ… Real-time thumbnail gallery for tracked faces
  • βœ… Modular Python codebase

πŸ—‚οΈ Project Structure

face_tracking_project/
β”œβ”€β”€ main.py                    # Entry point
β”œβ”€β”€ arguments.py               # CLI options
β”œβ”€β”€ face_tracking/
β”‚   β”œβ”€β”€ tracking_runner.py     # Main tracking logic
β”‚   β”œβ”€β”€ select_tracker.py      # Tracker selection
β”‚   └── gallery_drawer.py      # Draw face thumbnails

πŸš€ How to Run

  1. Install dependencies
  2. pip install facenet-pytorch boxmot opencv-python
  3. Run the tracker
  4. python main.py \
      --video_path ./assets/source_lab.mp4 \
      --tracker botsort \
      --reid_weights mobilenetv2_x1_4_market1501.pt \
      --output_path output_custom_draw.mp4
    

βš™οΈ CLI Options

ArgumentDescriptionDefault
--video_pathPath to input video./data/MOT16-08-raw.webm
--output_pathPath to save result videooutput_custom_draw.mp4
--trackerTracking model (botsort / bytetrack / ocsort)botsort
--reid_weightsPath to re-ID model (BoT-SORT only)mobilenetv2_x1_4_market1501.pt
--conf_threshMinimum confidence for detection0.7
--max_facesMax face thumbnails in gallery6

🎬 Tracking Demo

πŸ”Ή [Original Video (MOT16-08)]

MOT16-08-raw.webm

πŸ”Έ [Tracking Result (BoT-SORT)]

output_custom_draw.webm

πŸ“Œ References

About

πŸ“Ή [Video] Real-time multi-face tracking using MTCNN and BoxMot

Topics

Resources

Stars

Watchers

Forks

Languages