Closed devipramita closed 4 years ago
Hello! @devipramita
which command did you use?
python convert_weights_pb.py --class_names cfg/coco.names --weights_file yolov4-tiny.weights --data_format NHWC --tiny
I think you may miss “--tiny"
Hello! @TNTWEN
I also meet same situation. I have trained a yolov4-tiny by myself dataset(image size is 608*608).But when I use the "convert_weights_pb.py" to convert. I got this error on reshaping array.
Traceback (most recent call last):
File "D:/summer/code_article/code/OpenVINO-YOLOV4/convert_weights_pb.py", line 52, in
I have write " tf.app.flags.DEFINE_bool('tiny', True, 'Use tiny version of YOLOv4')" in convert_weights_pb.py
Hello!@lijunnankman https://github.com/TNTWEN/OpenVINO-YOLOV4/blob/534cca38d1e3bf95dce98daa216a57f62a2f83ce/convert_weights_pb.py#L24-L25 You also need to set --size 608
yes, I also set.Can we keep touch in mail?My mail is :894855066@qq.com.Thanks a lot.
I meet this error too, but after I change the file cfg/coco.names, it works for me
Hi,
I'm trying to convert darknet weights into pb model, but I got this error on reshaping array.
I tried yolov4-tiny.weights and coco.names
Traceback (most recent call last): File "convert_weights_pb.py", line 52, in
tf.app.run()
File "C:\Users\Asus\Anaconda3\envs\env-openvino\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\Asus\Anaconda3\envs\env-openvino\lib\site-packages\absl\app.py", line 300, in run _run_main(main, args)
File "C:\Users\Asus\Anaconda3\envs\env-openvino\lib\site-packages\absl\app.py", line 251, in _run_main sys.exit(main(argv))
File "convert_weights_pb.py", line 42, in main
load_ops = load_weights(tf.global_variables(scope='detector'), FLAGS.weights_file)
File "D:\ds\prosa\OpenVINO-YOLOV4\utils.py", line 117, in load_weights
(shape[3], shape[2], shape[0], shape[1]))
ValueError: cannot reshape array of size 554878 into shape (256,256,3,3)
I also got same error on reshaping array, when converting 1 class darknet weights model into pb model.
Would you help me what's going wrong? Thanks