3

Hello i have followed all the steps to make an inference and successfully run it on the model in this link : https://pjreddie.com/media/files/yolov3.weights but when i tried it on a model i trained with darknet i get this error :

[ INFO ] Creating Inference Engine...
[ INFO ] Loading network files:
    newyolo.xml
    newyolo.bin
[ INFO ] Preparing inputs
[ INFO ] Loading model to the plugin
[ INFO ] Starting inference...
To close the application, press 'CTRL+C' here or switch to the output window and press ESC key
To switch between sync/async modes, press TAB key in the output window
yolo_original.py:280: DeprecationWarning: shape property of IENetLayer is deprecated. Please use shape property of DataPtr instead objects returned by in_data or out_data property to access shape of input or output data on corresponding ports
  out_blob = out_blob.reshape(net.layers[net.layers[layer_name].parents[0]].shape)
[ INFO ] Layer detector/yolo-v3/Conv_14/BiasAdd/YoloRegion parameters: 
[ INFO ]          classes : 10
[ INFO ]          num     : 3
[ INFO ]          coords  : 4
[ INFO ]          anchors : [55.0, 56.0, 42.0, 87.0, 68.0, 81.0]
Traceback (most recent call last):
  File "yolo_original.py", line 363, in <module>
    sys.exit(main() or 0)
  File "yolo_original.py", line 286, in main
    args.prob_threshold)
  File "yolo_original.py", line 153, in parse_yolo_region
    h_scale=orig_im_h, w_scale=orig_im_w))
  File "yolo_original.py", line 99, in scale_bbox
    xmin = int((x - w / 2) * w_scale)
ValueError: cannot convert float NaN to integer

knowing that i have provided the right shape and changed yolo_v3.json to match my model here is the content of my yolo_v3.json:

[
  {
    "id": "TFYOLOV3",
    "match_kind": "general",
    "custom_attributes": {
      "classes": 10,
      "anchors": [18,22,31,33,33,50,55, 56,42,87,68,81,111,98,73,158,156,202],
      "coords": 4,
      "num": 9,
      "masks":[[6, 7, 8], [3, 4, 5], [0, 1, 2]],
      "entry_points": ["detector/yolo-v3/Reshape", "detector/yolo-v3/Reshape_4", "detector/yolo-v3/Reshape_8"]
    }
  }
]

i have tried multiple things to debug this like not providing the jsonfile ....etc

ps : yolo_original.py is the same demo that comes with openvino just renamed, i'm using openvino version 2020.1 transforming NaN to float or skipping values with Nan didn't slove the problem.

  • It is not easy to understand the issue with the given error messages. Can you please follow the steps provided here: [link]https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_YOLO_From_Tensorflow.html. It would be helpful if you could also provide the steps followed, i.e. the command used, etc. – ChileAddict - Intel May 07 '20 at 18:44
  • i have followed every step, it works with models i download from darknet , but not the customly trained ones. – Dia Islam Moumeni May 08 '20 at 11:33
  • I escalated this to our engineering team and they are asking for the commands you are using. Can you post them please? – ChileAddict - Intel May 08 '20 at 15:34
  • 1
    Hello i managed to run with another model ,i had to re-train it with the parameters that came with original cfg file from darknet. – Dia Islam Moumeni May 13 '20 at 13:23

0 Answers0