(Video from https://vimeo.com/60139361)
This model requires additional module for GSI.
pip3 install scikit-learn==0.19.2
This sample code uses the same model as bytetrack for object detection.
Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.
For the sample video,
$ python3 strong_sort.py
If you want to specify the video image, put the file path after the --video
option.
You can use --savepath
option to specify the name of the output video file to save.
$ python3 strong_sort.py --video VIDEO_PATH --savepath SAVE_FILE_PATH
Two lightweight and plug-and-play algorithms are presented to further refine the tracking results. (StrongSORT++)
Firstly, an appearance-free link model (AFLink) is proposed to associate short tracklets into complete trajectories.
$ python3 strong_sort.py --AFLink
Secondly, Gaussian Smoothed Interpolation (GSI) is proposed to compensate for missing detections.
$ python3 strong_sort.py --GSI
By adding the --model_type
option, you can specify model type which is selected from below. (default is mot17_x)
- mot17_x (800x1440)
- mot17_s (608x1088)
- mot17_tiny (416x416)
- mot20_x (896x1600)
- yolox_s (640x640)
- yolox_tiny (416x416)
The values in parentheses represent the size of the image given to the model.
The models whose names start with "yolox" are pure models from yolox. On the other hand, the models starting with "mot" are fine-tuned models based on the yolox model.
$ python3 strong_sort.py --model_type mot17_x
Pytorch
ONNX opset=11