Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
khush12 opened this issue Aug 18, 2020 · 3 comments
Open

Comments

@khush12
Copy link

khush12 commented Aug 18, 2020

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
Copy link

aizuon commented Oct 18, 2020

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

@tkone2018
Copy link

do you solve it ? i met the problem too

@strangevaleera
Copy link

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants