Closed stoneWeb closed 3 years ago
Have you modified the yolov4‘s model structure?
I only modified:
max_batches
steps
[convolutional]
filter=81
[yolo]
classes=22
I didn't change much. Why?
Training parameters at the beginning of .cfg file, [yolo] and [convolutional] before every [yolo] layer could be modified. If you changed other parts, ValueError will occur
Someone had a similar situation before. He mistakenly modified the filter of one more convolution layer.
You could check .cfg file ,make sure .names , .weights , .cfg are all correct.
Or you could try https://github.com/TNTWEN/OpenVINO-YOLO-Automatic-Generation
I tried to download the new yolov4.cfg file and modify it. I passed the training again.
I successfully converted the IR model with convert_weights_pb.py and got the xml and bin file. but I tried to run object_detection_demo_yolov3_async.py and got the following error:
out_blob = out_blob.buffer.reshape(output_shape)
ValueError: cannot reshape array of size 689520 into shape (1,93,52,52)
Thank you so much. My problem is solved. but why does the bounding box get bigger when I convert it to IR?
Different frameworks have different inference methods, and it is normal to have slightly different output results. It may also have something to do with the dataset and the training process. I'm sorry that I didn't encounter the situation you encountered in my test
python convert_weights_pb.py --class_names models/self_make.names --weights_file models/self_make-yolov4_last.weights --data_format NHWC --size 608
My model cannot be converted and has been subject to this error: