yehengchen / Object-Detection-and-Tracking

Object Detection and Multi-Object Tracking
MIT License
1.85k stars 753 forks source link

I want to use webcam as input. #76

Open DongwonGim opened 4 years ago

DongwonGim commented 4 years ago

Hi, I wanna use webcam as input of this model. With reference to OpenCV documentation(https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html), I put '0' at input, but it doesn't work.

This is error code [Finish] Traceback (most recent call last): File "main.py", line 197, in main(YOLO()) File "main.py", line 184, in main if len(pts[track.track_id]) != None: UnboundLocalError: local variable 'track' referenced before assignment