<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Model returns all zeroes in Intel® Distribution of OpenVINO™ Toolkit</title>
    <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Model-returns-all-zeroes/m-p/1272400#M23472</link>
    <description>&lt;P&gt;Problem solved: there is no need to normalize the image by dividing by 255.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Apr 2021 15:18:51 GMT</pubDate>
    <dc:creator>mfoglio</dc:creator>
    <dc:date>2021-04-09T15:18:51Z</dc:date>
    <item>
      <title>Model returns all zeroes</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Model-returns-all-zeroes/m-p/1272176#M23454</link>
      <description>&lt;P&gt;I am trying to use EfficientDet-d0 in OpenVINO. However, my output returns all zeroes.&lt;/P&gt;
&lt;P&gt;Code to load the model:&lt;/P&gt;
&lt;PRE&gt;_ie = IECore()&lt;BR /&gt;model = _ie.read_network(model_xml, model_bin). # path to files&lt;BR /&gt;_input_layer_name, _output_layer_names = next(iter(model.input_info)), sorted(model.outputs)&lt;BR /&gt;&lt;BR /&gt;openvino_config = {'device_name': 'CPU', 'num_requests': 0}&lt;BR /&gt;openvino_config["network"] = model &lt;BR /&gt;_engine = _ie.load_network(**openvino_config)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;How I use the model:&lt;/P&gt;
&lt;PRE&gt;numpy_frame = cv2.resize(numpy_frame, (224, 224)&lt;BR /&gt;numpy_frame = numpy_frame / 255.0&lt;BR /&gt;numpy_frame = numpy_frame.transpose(2, 0, 1)&lt;BR /&gt;results = _engine.infer(inputs={_input_layer_name: numpy_frame})&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;The ouput `results["detections"]` is a matrix of 0.&lt;/P&gt;
&lt;P&gt;I generated the model using:&lt;/P&gt;
&lt;PRE&gt;git clone https://github.com/google/automl&lt;BR /&gt;cd automl/efficientdet&lt;BR /&gt;&lt;BR /&gt;git checkout 96e1fee&lt;BR /&gt;&lt;BR /&gt;python3 -m venv venv&lt;BR /&gt;source venv/bin/activate&lt;BR /&gt;&lt;BR /&gt;curl https://bootstrap.pypa.io/get-pip.py | python -&lt;BR /&gt;&lt;BR /&gt;python3 -m pip install numpy&lt;BR /&gt;python3 -m pip install -r requirements.txt&lt;BR /&gt;python3 -m pip install tensorflow-model-optimization&lt;BR /&gt;python3 -m pip install networkx defusedxml&lt;BR /&gt;python3 -m pip install test-generator==0.1.1&lt;BR /&gt;&lt;BR /&gt;wget https://storage.googleapis.com/cloud-tpu-checkpoints/efficientdet/coco2/efficientdet-d0.tar.gz&lt;BR /&gt;tar zxvf efficientdet-d0.tar.gz&lt;BR /&gt;&lt;BR /&gt;python3 model_inspect.py --runmode=saved_model --model_name=efficientdet-d0 --ckpt_path=efficientdet-d0 --saved_model_dir=savedmodeldir&lt;BR /&gt;&lt;BR /&gt;export MO_ROOT=/opt/intel/openvino_2021.3.394/deployment_tools/model_optimizer/&lt;BR /&gt;export IMAGE_SIZE=512&lt;BR /&gt;&lt;BR /&gt;python3 $MO_ROOT/mo.py \&lt;BR /&gt;--input_shape=[1,512,512,3] \&lt;BR /&gt;--input=image_arrays \&lt;BR /&gt;--reverse_input_channels \&lt;BR /&gt;--input_model savedmodeldir/efficientdet-d0_frozen.pb \&lt;BR /&gt;--transformations_config $MO_ROOT/extensions/front/tf/automl_efficientdet.json \&lt;BR /&gt;--output_dir openvino_model&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 22:55:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Model-returns-all-zeroes/m-p/1272176#M23454</guid>
      <dc:creator>mfoglio</dc:creator>
      <dc:date>2021-04-08T22:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Model returns all zeroes</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Model-returns-all-zeroes/m-p/1272400#M23472</link>
      <description>&lt;P&gt;Problem solved: there is no need to normalize the image by dividing by 255.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 15:18:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Model-returns-all-zeroes/m-p/1272400#M23472</guid>
      <dc:creator>mfoglio</dc:creator>
      <dc:date>2021-04-09T15:18:51Z</dc:date>
    </item>
    <item>
      <title>Re:Model returns all zeroes</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Model-returns-all-zeroes/m-p/1272823#M23482</link>
      <description>&lt;P&gt;Hi mgoglio,&lt;/P&gt;&lt;P&gt;I am glad that you are able to solve that and thanks for sharing the information in this community. This thread will no longer be monitored since this issue has been resolved.&amp;nbsp;If you need any additional information from Intel, please submit a new question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aznie&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Apr 2021 09:35:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Model-returns-all-zeroes/m-p/1272823#M23482</guid>
      <dc:creator>IntelSupport</dc:creator>
      <dc:date>2021-04-12T09:35:30Z</dc:date>
    </item>
  </channel>
</rss>

