CenterTrack supports several demo modes including video files, image folders, and live webcam feeds. You must first download the appropriate models from the Model zoo and place them in CenterNet_ROOT/models/.
Monocular 3D Tracking
To test monocular 3D tracking, use the tracking,ddd task. You must specify --test_focal_length to convert image coordinates to 3D. For the provided nuscenes_mini.mp4 (resolution 800x448), use 633 (half of the typical nuScenes focal length).
python demo.py tracking,ddd --load_model ../models/nuScenes_3Dtracking.pth --dataset nuscenes --pre_hm --track_thresh 0.1 --demo ../videos/nuscenes_mini.mp4 --test_focal_length 633
80-Category Tracking
For standard object detection and tracking:
python demo.py tracking --load_model ../models/coco_tracking.pth --demo /path/to/image/or/folder/or/video
Person/Pose Tracking
To track specifically persons (using a model like mot17_half.pth), add --num_class 1. For pose tracking, use the tracking,multi_pose task:
# Person tracking
python demo.py tracking --load_model ../models/mot17_half.pth --num_class 1 --demo /path/to/image/or/folder/or/video
# Pose tracking
python demo.py tracking,multi_pose --load_model ../models/coco_pose.pth --demo /path/to/image/or/folder/or/video/or/webcam
Webcam Demo
python demo.py tracking --load_model ../models/coco_tracking.pth --demo webcam
Tip: Add --debug 2 to visualize heatmap and offset predictions.
python demo.py tracking,ddd --load_model ../models/nuScenes_3Dtracking.pth --dataset nuscenes --pre_hm --track_thresh 0.1 --demo ../videos/nuscenes_mini.mp4 --test_focal_length 633