Zhongdao / Towards-Realtime-MOT

Joint Detection and Embedding for fast multi-object tracking
MIT License
2.37k stars 539 forks source link

Storage has wrong size: expected 0 got 1024 #219

Open nhanbka opened 3 years ago

nhanbka commented 3 years ago

Hi, I got a problem with loading the models. I cloned and installed all the things listed in the README.md files. However, when I try to run the demo file:

python demo.py --input-video ./videos/MOT16-03.mp4 --weights ./models/jde.1088x608.uncertainty.pt --output-format video --output-root ./results

It cannot run and raise these error

python demo.py --input-video ./videos/MOT16-03.mp4 --weights ./models/jde.1088x608.uncertainty.pt --output-format video --output-root ./results
Namespace(cfg='cfg/yolov3_1088x608.cfg', conf_thres=0.5, input_video='./videos/MOT16-03.mp4', iou_thres=0.5, min_box_area=200, nms_thres=0.4, output_format='video', output_root='./results', track_buffer=30, weights='./models/jde.1088x608.uncertainty.pt')

2021-03-04 17:00:23 [INFO]: Starting tracking...
Lenth of the video: 1500 frames
2021-03-04 17:00:23 [INFO]: storage has wrong size: expected 0 got 1024
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100

I found that it happened at load function

self.model.load_state_dict(torch.load(opt.weights, map_location='cpu')['model'], strict=False)

More concretely, it happend at

torch.load(opt.weights, map_location='cpu')['model']

I try with both python3.6 and python3.7 and it stills the same.

So, what happened with the model files? Please help! Thank you