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:
  • Backbone:
  • 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

Copyright

(c) 2025 Idiap Research Institute

Citation

If you find our work useful, please cite the following publication:

@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
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Idiap/HeadTracking

Finetuned
(215)
this model