yolov4-custom-functions icon indicating copy to clipboard operation
yolov4-custom-functions copied to clipboard

custom.weights and custom-416

Open ghost opened this issue 4 years ago • 6 comments

Hello, please help So python save_model.py --weights ./data/custom.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4

I get error File "C:\Users\va\Documents\Arduino\yolov4-custom-functions-master\core\utils.py", line 143, in load_weights conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0]) ValueError: cannot reshape array of size 4554552 into shape (1024,512,3,3) Where custom.names file?

Please help

ghost avatar Jan 24 '21 14:01 ghost

Ooook :) custom.names contain one row "car" its work fine

ghost avatar Jan 24 '21 14:01 ghost

close the issue if it is solved @iabesadze

shubham-shahh avatar Feb 11 '21 10:02 shubham-shahh

I'm having same issue

python save_model.py --weights ./data/custom.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4

results in

  File "\third_party_repos\yolov4-custom-functions-master\core\utils.py", line 143, in load_weights
    conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0])
ValueError: cannot reshape array of size 4554552 into shape (1024,512,3,3)

GiorgosBetsos avatar Mar 26 '21 10:03 GiorgosBetsos

Ooook :) custom.names contain one row "car" its work fine

@iabesadze Can you please explain how this solves the issue?

GiorgosBetsos avatar Mar 26 '21 10:03 GiorgosBetsos

@GiorgosBetsos Create and fill a text file named custom.names with string car Then, write it's path on line 14 of 'core/config.py' file.

navidnadery avatar Apr 27 '21 09:04 navidnadery

I am doing for the License plate detector same error tried the above solutions but did not work for the script: python save_model.py --weights ./data/custom.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4 Output:- File "/content/yolov4-custom-functions/core/utils.py", line 143, in load_weights conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0]) ValueError: cannot reshape array of size 84123 into shape (512,1024,1,1)

kctiintern21 avatar Feb 02 '22 05:02 kctiintern21