Upload 5 files
Browse files- .gitattributes +1 -0
- README.md +105 -0
- config/botsort_custom.yaml +18 -0
- config/botsort_custom.yaml.license +5 -0
- yolo11m_merged.torchscript +3 -0
- yolo11m_merged.torchscript.license +5 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
yolo11m_merged.torchscript filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,108 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
| 3 |
+
base_model:
|
| 4 |
+
- Ultralytics/YOLO11
|
| 5 |
+
tags:
|
| 6 |
+
- computer vision
|
| 7 |
+
- head detection
|
| 8 |
+
- object detection
|
| 9 |
+
- multi-object tracking
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# HeadTracking (YOLO11m head detector + BoT-SORT tracker)
|
| 13 |
+
|
| 14 |
+
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.
|
| 15 |
+
* `yolo11m_merged.torchscript`: head detector weights (TorchScript)
|
| 16 |
+
* `botsort_custom.yaml`: BoT-SORT tracker configuration for Ultralytics
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
## Overview
|
| 20 |
+
|
| 21 |
+
* **Training**: HeadTracking was trained on the following datasets:
|
| 22 |
+
* [Human Head Detection (CCTV)](https://universe.roboflow.com/trisha-then/head-detection-cctv): ~1.9k images.
|
| 23 |
+
* [CrowdHuman](https://www.crowdhuman.org/): ~19k images.
|
| 24 |
+
* [Fudan-ShanghaiTech](https://github.com/sweetyy83/Lstn_fdst_dataset): ~1.1k images.
|
| 25 |
+
* [Human Head Detection OpenVM + C270](https://www.kaggle.com/datasets/hoangxuanviet/human-head-detection-openvm-c270): ~1.8k images.
|
| 26 |
+
* [S-Head](https://www.kaggle.com/datasets/hoangxuanviet/data-s-head): ~2.7k images.
|
| 27 |
+
* [SCUT-HEAD](https://github.com/HCIILAB/SCUT-HEAD-Dataset-Release): ~3.8k images.
|
| 28 |
+
* [VSCrowd](https://huggingface.co/datasets/HopLeeTop/VSCrowd): ~12.6k images.
|
| 29 |
+
* **Backbone**:
|
| 30 |
+
* HeadTracking is based on [YOLO11m (Ultralytics)](https://github.com/ultralytics/ultralytics)
|
| 31 |
+
* Tracker: BoT-SORT
|
| 32 |
+
* **Parameters**: ~20 million
|
| 33 |
+
* **Task**: Head detection in images and multi-head tracking in videos.
|
| 34 |
+
* **Framework**: PyTorch (TorchScript) / Ultralytics
|
| 35 |
+
* **Output structure**: Per frame, per detected head:
|
| 36 |
+
* `xyxy` (4,): bounding box [x1, y1, x2, y2] in pixels
|
| 37 |
+
* `conf` (1,): detection confidence
|
| 38 |
+
* `id` (1,): track ID (tracking only)
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
## Model performance
|
| 42 |
+
|
| 43 |
+
mAP50 on the test split of each dataset:
|
| 44 |
+
|
| 45 |
+
| Model | CCTV | CrowdHuman | Fudan-ShanghaiTech | OpenVM | S-Head | SCUT Head | VSCrowd |
|
| 46 |
+
|---|---|---|---|---|---|---|---|
|
| 47 |
+
| yolov5m_crowdhuman (reference) | 0.589 | 0.713 | 0.864 | 0.485 | 0.429 | 0.709 | 0.035 |
|
| 48 |
+
| **yolo11m_merged (released)** | **0.990** | **0.748** | **0.921** | **0.983** | **0.987** | **0.962** | **0.172** |
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
## Running Code
|
| 52 |
+
|
| 53 |
+
Minimal code to instantiate the model and perform inference:
|
| 54 |
+
```
|
| 55 |
+
import cv2
|
| 56 |
+
from ultralytics import YOLO
|
| 57 |
+
|
| 58 |
+
model = YOLO("yolo11m_merged.torchscript", task="detect")
|
| 59 |
+
|
| 60 |
+
cap = cv2.VideoCapture("my_video.mp4")
|
| 61 |
+
while True:
|
| 62 |
+
success, frame = cap.read()
|
| 63 |
+
if not success:
|
| 64 |
+
break
|
| 65 |
+
|
| 66 |
+
results = model.track(
|
| 67 |
+
frame,
|
| 68 |
+
tracker="botsort_custom.yaml",
|
| 69 |
+
persist=True, # keep track IDs across frames
|
| 70 |
+
conf=0.5,
|
| 71 |
+
iou=0.5,
|
| 72 |
+
classes=[0], # head class
|
| 73 |
+
verbose=False,
|
| 74 |
+
)
|
| 75 |
+
|
| 76 |
+
boxes = results[0].boxes
|
| 77 |
+
if boxes.id is not None:
|
| 78 |
+
head_ids = boxes.id.int().tolist() # track ID per head
|
| 79 |
+
head_bboxes = boxes.xyxy.tolist() # [x1, y1, x2, y2] in pixels
|
| 80 |
+
confs = boxes.conf.tolist() # detection confidence
|
| 81 |
+
|
| 82 |
+
cap.release()
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
## License
|
| 87 |
+
|
| 88 |
+
HeadTracking is released under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/deed.en)
|
| 89 |
+
|
| 90 |
+
## Copyright
|
| 91 |
+
|
| 92 |
+
(c) 2025 Idiap Research Institute
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
## Citation
|
| 96 |
+
|
| 97 |
+
If you find our work useful, please cite the following publication:
|
| 98 |
+
|
| 99 |
+
```bibtex
|
| 100 |
+
@techreport{dewaha2025headdetection,
|
| 101 |
+
title = {Towards Better Head Detection: A Comparative Analysis of YOLO and DETR Architectures with Dataset Scaling},
|
| 102 |
+
author = {de Waha, Gilles and Tafasca, Samy and Odobez, Jean-Marc},
|
| 103 |
+
institution = {Idiap Research Institute / EPFL},
|
| 104 |
+
type = {Project report},
|
| 105 |
+
year = {2025},
|
| 106 |
+
month = jan
|
| 107 |
+
}
|
| 108 |
+
```
|
config/botsort_custom.yaml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
| 2 |
+
# Default YOLO tracker settings for BoT-SORT tracker https://github.com/NirAharon/BoT-SORT
|
| 3 |
+
|
| 4 |
+
tracker_type: botsort # tracker type, ['botsort', 'bytetrack']
|
| 5 |
+
track_high_thresh: 0.5 # threshold for the first association (default: 0.5)
|
| 6 |
+
track_low_thresh: 0.1 # threshold for the second association (default: 0.1)
|
| 7 |
+
new_track_thresh: 0.6 # threshold for init new track if the detection does not match any tracks (default: 0.6)
|
| 8 |
+
track_buffer: 300 #30 # buffer (in frames) to calculate the time when to remove tracks (default: 30)
|
| 9 |
+
match_thresh: 0.7 # threshold for matching tracks (default: 0.8)
|
| 10 |
+
fuse_score: True # Whether to fuse confidence scores with the iou distances before matching
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
# BoT-SORT settings
|
| 14 |
+
gmc_method: sparseOptFlow # method of global motion compensation
|
| 15 |
+
# ReID model related thresh (not supported yet)
|
| 16 |
+
proximity_thresh: 0.5 # threshold for proximity matching (default: 0.5)
|
| 17 |
+
appearance_thresh: 0.25 # threshold for appearance matching (default: 0.25)
|
| 18 |
+
with_reid: False # whether to use ReID model (default: False)
|
config/botsort_custom.yaml.license
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
SPDX-FileCopyrightText: 2026 Idiap Research Institute <contact@idiap.ch>
|
| 2 |
+
|
| 3 |
+
SPDX-FileContributor: Pierre Vuillecard <pierre.vuillecard@idiap.ch>
|
| 4 |
+
|
| 5 |
+
SPDX-License-Identifier: CC-BY-NC-4.0
|
yolo11m_merged.torchscript
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2dea3a8c2bab4084d09cb3a475b89f8345a5d2ae310bdc855e597db2f7900b1f
|
| 3 |
+
size 80773062
|
yolo11m_merged.torchscript.license
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
SPDX-FileCopyrightText: 2026 Idiap Research Institute <contact@idiap.ch>
|
| 2 |
+
|
| 3 |
+
SPDX-FileContributor: Pierre Vuillecard <pierre.vuillecard@idiap.ch>
|
| 4 |
+
|
| 5 |
+
SPDX-License-Identifier: CC-BY-NC-4.0
|