ZQPei / deep_sort_pytorch

MOT using deepsort and yolov3 with pytorch
MIT License
2.82k stars 726 forks source link

DeepSort class ignoring config files #84

Closed JulianFC closed 4 years ago

JulianFC commented 4 years ago

Hi, in deep_sort/deep_sort.py in line 24 you call the Tracker class with predefined arguments, overriding the ones recieved by the DeepSort class.

14     class DeepSort(object):
15         def __init__(self, model_path, max_dist=0.2, min_confidence=0.3, nms_max_overlap=1.0, max_iou_distance=0.7, max_age=70, n_init=3, nn_budget=100, use_cuda=True):
16            self.min_confidence = min_confidence
17            self.nms_max_overlap = nms_max_overlap
18    
19            self.extractor = Extractor(model_path, use_cuda=use_cuda)
20    
21            max_cosine_distance = max_dist
22            nn_budget = 100
23            metric = NearestNeighborDistanceMetric("cosine", max_cosine_distance, nn_budget)
24            self.tracker = Tracker(metric, max_iou_distance=0.7, max_age=70, n_init=3)

I think line 24 should be

24            self.tracker = Tracker(metric, max_iou_distance=max_iou_distance, max_age=max_age, n_init=n_init)
ZQPei commented 4 years ago

Thanks for pointing out this mistake! Wish you luck.

FabiTheGabi commented 4 years ago

Thank your for your nice project. I think that nn_budget (line 22) ist still used with the predefined value 100. If you just delete this line, evetything should be fine