Borda / keras-yolo3

A Keras implementation of YOLOv3 (Tensorflow backend) a successor of qqwweee/keras-yolo3
MIT License
31 stars 10 forks source link

buffer is too small while converting Yolo weights #6

Closed Borda closed 5 years ago

Borda commented 5 years ago

download the original model https://pjreddie.com/media/files/yolo.weights and run conversion via

python convert_weights.py --config_path ../model_data/yolo.cfg --weights_path ../model_data/yolo.weights --output_path ../model_data/yolo.h5

crashes with folowing error message:

 73%|██████████████████████████▎                    | 79/108 [02:16<01:38,  3.41s/it]
Traceback (most recent call last):
  File "convert_weights.py", line 297, in <module>
    _main(**arg_params)
  File "convert_weights.py", line 267, in _main
    weights_file, count, weight_decay, out_index)
  File "convert_weights.py", line 168, in parse_section
    weight_decay)
  File "convert_weights.py", line 116, in parse_convolutional
    buffer=weights_file.read(weights_size * 4))
TypeError: buffer is too small for requested array
Borda commented 5 years ago

to run conversion without GPU use CUDA_VISIBLE_DEVICES=-1 python ...

Borda commented 5 years ago

similar to:

Borda commented 5 years ago

double-check that you are working with the last version of YOLO v3 model (created after March 25 2018, yolov3.weights and/or yolov3-tiny.weights)