Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

error converting yolov3.weight with OpenVINO 2018.4.420

KLim4
Beginner
770 Views

i tried to follow the instructions to generate yolov3 IR in _docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_YOLO_From_Tensorflow.html

ubuntu@ubuntu-Inspiron-15-7568:/opt/intel/computer_vision_sdk/deployment_tools/model_optimizer/tensorflow-yolo-v3$ python3 demo.py --weights_file yolov3.weights --class_names coco.names --input_img dog.jpg --output_img ./out.jpg
Traceback (most recent call last):
  File "demo.py", line 78, in <module>
    tf.app.run()
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "demo.py", line 58, in main
    load_ops = load_weights(tf.global_variables(scope='detector'), FLAGS.weights_file)
  File "/opt/intel/computer_vision_sdk_2018.4.420/deployment_tools/model_optimizer/tensorflow-yolo-v3/yolo_v3.py", line 298, in load_weights
    var_weights = weights[ptr:ptr + num_params].reshape((shape[3], shape[2], shape[0], shape[1]))
ValueError: cannot reshape array of size 338452 into shape (512,256,3,3)

 

the weights_file yolov3.weights is downloaded from the DarkNet website https://pjreddie.com/media/files/yolov3.weights

uname -a
Linux ubuntu-Inspiron-15-7568 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

 

 

 

0 Kudos
1 Reply
nikos1
Valued Contributor I
770 Views

Please check https://software.intel.com/en-us/forums/computer-vision/topic/800049  for some ideas.

0 Kudos
Reply