theAIGuysCode / yolov3_deepsort

Object tracking implemented with YOLOv3, Deep Sort and Tensorflow.
GNU General Public License v3.0
337 stars 183 forks source link

error object_tracker.py Unable to open file #14

Closed darkking-park closed 4 years ago

darkking-park commented 4 years ago

i have yolov3.weights but run object_tracker.py error ㅠㅠ

Traceback (most recent call last):
  File "object_tracker.py", line 168, in <module>
    app.run(main)
  File "/opt/conda/lib/python3.6/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/opt/conda/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "object_tracker.py", line 59, in main
    yolo.load_weights(FLAGS.weights)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 181, in load_weights
    return super(Model, self).load_weights(filepath, by_name)
  File "/opt/conda/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/network.py", line 1171, in load_weights
    with h5py.File(filepath, 'r') as f:
  File "/opt/conda/lib/python3.6/site-packages/h5py/_hl/files.py", line 394, in __init__
    swmr=swmr)
  File "/opt/conda/lib/python3.6/site-packages/h5py/_hl/files.py", line 170, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 85, in h5py.h5f.open
OSError: Unable to open file (file signature not found)
George3256 commented 3 years ago

I have the same error. Please tell me how you solved it

George3256 commented 3 years ago

I have the same error. Please tell me how you solved it

in my case I forgot to do "Save yolov3 weight as a TensorFlow model".