ByteTrack_ReID
ByteTrack_ReID copied to clipboard
colab notebook does not run
I have come across a couple of errors while trying to run the sample colab notebook.
the first is an error with the requirements installation:
ERROR: Could not find a version that satisfies the requirement onnxruntime==1.8.0 (from versions: 1.15.0, 1.15.1, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.17.0, 1.17.1, 1.17.3, 1.18.0, 1.18.1, 1.19.0, 1.19.2, 1.20.0, 1.20.1, 1.21.0)
ERROR: No matching distribution found for onnxruntime==1.8.0
manually installing onnxruntime resolves the issue.
running the following cell:
# run inference demo (can be slow on colab). The cell output is deflected to the file 'log.txt' for downstream use to display the result but feel free to remove
%cd /content/ByteTrack
!python3 tools/demo_track.py video -f exps/example/mot/yolox_x_mix_det.py -c pretrained/bytetrack_x_mot17.pth.tar --fp16 --fuse --save_result &> log.txt
outputs missing libraries to log.txt. they need to be manually installed:
!pip3 install lap thop loguru
after the library is installed, there is an error with numpy, as numpy.float has been deprecated. thus, ByteTrack/yolox/tracker/matching.py and ByteTrack/yolox/tracker/byte_tracker.py have a few instances of np.float, which need to be replaced with plain float.
after all that was done, i got the following error:
Traceback (most recent call last):
File "/content/ByteTrack/tools/demo_track.py", line 372, in <module>
main(exp, args)
File "/content/ByteTrack/tools/demo_track.py", line 365, in main
imageflow_demo(predictor, vis_folder, current_time, args)
File "/content/ByteTrack/tools/demo_track.py", line 287, in imageflow_demo
ch = cv2.waitKey(1)
^^^^^^^^^^^^^^
cv2.error: OpenCV(4.11.0) /io/opencv/modules/highgui/src/window.cpp:1367: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'
and for this error, i haven't much clue on the solution.