This is a multiple object tracking project that use Yolov3(opencv ver.) as detector and DeepSort as trackers.
-
Remove the network and reuse the feature maps from Yolov3 with following methods:
1.1 : global average pooling
1.2 : global max pooling
1.3 : Part-based local average pooling
1.4 : Part-based local max pooling
-
Extend the method from only tracking poeple to all the objects that the detector detected.
Videos demo on Cityscapes (record at 1 fps)
- Clone the repository:
git clone https://github.com/world4jason/tracking_by_detection_with_yolo_deep_sort
-
Download pre-generated detections and the CNN checkpoint file from here and the netowrk folder under model_data
-
Download YOLOv3 weights from Yolo Website and put into model_data/yolov3 folder or runs
sh tools/get_yolo.sh
See requirements.txt
Additionally, network feature generation for original Deepsort method requires TensorFlow-1.4.0. or TensorFlow-1.5.0.
python3 demo.py
usage: demo.py [-h] [--conf_threshold CONF_THRESHOLD]
[--nms_threshold NMS_THRESHOLD] [--net_width NET_WIDTH]
[--net_height NET_HEIGHT] [--tracker_type TRACKER_TYPE]
[--split SPLIT] [--tracker_nms_threshold TRACKER_NMS_THRESHOLD]
[--max_cosine_distance MAX_COSINE_DISTANCE]
[--nn_budget NN_BUDGET] [--label_path LABEL_PATH]
[--model_path MODEL_PATH] [--weight_path WEIGHT_PATH]
[--sort_model_path SORT_MODEL_PATH]
[--output_video OUTPUT_VIDEO] [--video_path VIDEO_PATH]
YoloV3 with Variants Sorts
optional arguments:
-h, --help show this help message and exit
--conf_threshold CONF_THRESHOLD
--nms_threshold NMS_THRESHOLD
--net_width NET_WIDTH
--net_height NET_HEIGHT
--tracker_type TRACKER_TYPE
--split SPLIT
--tracker_nms_threshold TRACKER_NMS_THRESHOLD
--max_cosine_distance MAX_COSINE_DISTANCE
--nn_budget NN_BUDGET
--label_path LABEL_PATH
--model_path MODEL_PATH
--weight_path WEIGHT_PATH
--sort_model_path SORT_MODEL_PATH
--output_video OUTPUT_VIDEO
--video_path VIDEO_PATH
world4jason/tracking_by_detection is released under the GPL-3.0.