|
Download README.md from Idiap/HeadTracking: direct link, hf CLI and curl.
- Browser
- Download file 3.87 kB
-
https://huggingface.co/Idiap/HeadTracking/resolve/main/README.md
- Command line
-
hf download hf://Idiap/HeadTracking/README.md
-
curl -L -o README.md https://huggingface.co/Idiap/HeadTracking/resolve/main/README.md
3.87 kB
| license: cc-by-nc-4.0 | |
| base_model: | |
| - Ultralytics/YOLO11 | |
| tags: | |
| - computer vision | |
| - head detection | |
| - object detection | |
| - multi-object tracking | |
| # HeadTracking (YOLO11m head detector + BoT-SORT tracker) | |
| HeadTracking detects and tracks human heads in the wild in images and videos. The detector is a YOLO11m model fine-tuned on a merge of seven public head-annotation datasets (~43k images, ~1M heads). It detects whole heads (not only faces), which is useful for downstream tasks such as head pose estimation and gaze tracking in challenging scenarios. A BoT-SORT tracker configuration is provided to link detections into head tracks across video frames. | |
| * `yolo11m_merged.torchscript`: head detector weights (TorchScript) | |
| * `botsort_custom.yaml`: BoT-SORT tracker configuration for Ultralytics | |
| ## Overview | |
| * **Training**: HeadTracking was trained on the following datasets: | |
| * [Human Head Detection (CCTV)](https://universe.roboflow.com/trisha-then/head-detection-cctv): ~1.9k images. | |
| * [CrowdHuman](https://www.crowdhuman.org/): ~19k images. | |
| * [Fudan-ShanghaiTech](https://github.com/sweetyy83/Lstn_fdst_dataset): ~1.1k images. | |
| * [Human Head Detection OpenVM + C270](https://www.kaggle.com/datasets/hoangxuanviet/human-head-detection-openvm-c270): ~1.8k images. | |
| * [S-Head](https://www.kaggle.com/datasets/hoangxuanviet/data-s-head): ~2.7k images. | |
| * [SCUT-HEAD](https://github.com/HCIILAB/SCUT-HEAD-Dataset-Release): ~3.8k images. | |
| * [VSCrowd](https://huggingface.co/datasets/HopLeeTop/VSCrowd): ~12.6k images. | |
| * **Backbone**: | |
| * HeadTracking is based on [YOLO11m (Ultralytics)](https://github.com/ultralytics/ultralytics) | |
| * Tracker: BoT-SORT | |
| * **Parameters**: ~20 million | |
| * **Task**: Head detection in images and multi-head tracking in videos. | |
| * **Framework**: PyTorch (TorchScript) / Ultralytics | |
| * **Output structure**: Per frame, per detected head: | |
| * `xyxy` (4,): bounding box [x1, y1, x2, y2] in pixels | |
| * `conf` (1,): detection confidence | |
| * `id` (1,): track ID (tracking only) | |
| ## Model performance | |
| mAP50 on the test split of each dataset: | |
| | Model | CCTV | CrowdHuman | Fudan-ShanghaiTech | OpenVM | S-Head | SCUT Head | VSCrowd | | |
| |---|---|---|---|---|---|---|---| | |
| | yolov5m_crowdhuman (reference) | 0.589 | 0.713 | 0.864 | 0.485 | 0.429 | 0.709 | 0.035 | | |
| | **yolo11m_merged (released)** | **0.990** | **0.748** | **0.921** | **0.983** | **0.987** | **0.962** | **0.172** | | |
| ## Running Code | |
| Minimal code to instantiate the model and perform inference: | |
| ``` | |
| import cv2 | |
| from ultralytics import YOLO | |
| model = YOLO("yolo11m_merged.torchscript", task="detect") | |
| cap = cv2.VideoCapture("my_video.mp4") | |
| while True: | |
| success, frame = cap.read() | |
| if not success: | |
| break | |
| results = model.track( | |
| frame, | |
| tracker="botsort_custom.yaml", | |
| persist=True, # keep track IDs across frames | |
| conf=0.5, | |
| iou=0.5, | |
| classes=[0], # head class | |
| verbose=False, | |
| ) | |
| boxes = results[0].boxes | |
| if boxes.id is not None: | |
| head_ids = boxes.id.int().tolist() # track ID per head | |
| head_bboxes = boxes.xyxy.tolist() # [x1, y1, x2, y2] in pixels | |
| confs = boxes.conf.tolist() # detection confidence | |
| cap.release() | |
| ``` | |
| ## License | |
| HeadTracking is released under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/deed.en) | |
| ## Copyright | |
| (c) 2025 Idiap Research Institute | |
| ## Citation | |
| If you find our work useful, please cite the following publication: | |
| ```bibtex | |
| @techreport{dewaha2025headdetection, | |
| title = {Towards Better Head Detection: A Comparative Analysis of YOLO and DETR Architectures with Dataset Scaling}, | |
| author = {de Waha, Gilles and Tafasca, Samy and Odobez, Jean-Marc}, | |
| institution = {Idiap Research Institute / EPFL}, | |
| type = {Project report}, | |
| year = {2025}, | |
| month = jan | |
| } | |
| ``` |