Qidian213 / deep_sort_yolov3

Real-time Multi-person tracker using YOLO v3 and deep_sort with tensorflow
GNU General Public License v3.0
1.66k stars 592 forks source link

UnboundLocalError: local variable 'track' referenced before assignment #168

Open khush12 opened 4 years ago

khush12 commented 4 years ago

while running, i am facing this issue: Traceback (most recent call last): File "/content/deep_sort_yolov3/demo.py", line 170, in main(YOLO()) File "/content/deep_sort_yolov3/demo.py", line 158, in main if len(pts[track.track_id]) != None: UnboundLocalError: local variable 'track' referenced before assignment

aizuon commented 4 years ago

same here

edit: this is most probably because the hardcoded default path to input source doesnt exist. you should be able pass --input 0 for webcam, but weirdly that doesnt work either, i'd recommend changing source to cv2.VideoCapture(0), it works for me

world2025 commented 4 years ago

do you solve it ? i met the problem too

strangevaleera commented 3 years ago

me too