<?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: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API in Intel® Distribution of OpenVINO™ Toolkit</title>
    <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306770#M24904</link>
    <description>&lt;P&gt;Hey Zulkifli,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much for your response and for engaging with the issue I was experiencing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I managed to get it working in the same way you presented, so thanks so much.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test_efficient_det_api_v2.0.png" style="width: 752px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18796iEE4A818FB2CF08A9/image-dimensions/752x173/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="752" height="173" role="button" title="test_efficient_det_api_v2.0.png" alt="test_efficient_det_api_v2.0.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;I will mark the issue as solved as soon as we solve the problem with the model trained on a custom dataset.&lt;/P&gt;
&lt;P&gt;So to update I trained/exported as saved_model my EfficientDet-D0 trained in Tensorflow (2.3) and&lt;/P&gt;
&lt;P&gt;then used efficient_det_support_api_v2.0.json as the transformations_config, but still got an error&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[ ERROR ] -------------------------------------------------&lt;BR /&gt;[ ERROR ] ----------------- INTERNAL ERROR ----------------&lt;BR /&gt;[ ERROR ] Unexpected exception happened.&lt;BR /&gt;[ ERROR ] Please contact Model Optimizer developers and forward the following information:&lt;BR /&gt;[ ERROR ] Exception occurred during running replacer "ObjectDetectionAPIPreprocessor2Replacement (&amp;lt;class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessor2Replacement'&amp;gt;)": &lt;BR /&gt;[ ERROR ] Traceback (most recent call last):&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 276, in apply_transform&lt;BR /&gt;replacer.find_and_replace_pattern(graph)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/front/tf/replacement.py", line 36, in find_and_replace_pattern&lt;BR /&gt;self.transform_graph(graph, desc._replacement_desc['custom_attributes'])&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/extensions/front/tf/ObjectDetectionAPI.py", line 710, in transform_graph&lt;BR /&gt;assert len(start_nodes) &amp;gt;= 1&lt;BR /&gt;AssertionError&lt;/P&gt;
&lt;P&gt;The above exception was the direct cause of the following exception:&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 394, in main&lt;BR /&gt;ret_code = driver(argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 356, in driver&lt;BR /&gt;ret_res = emit_ir(prepare_ir(argv), argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 252, in prepare_ir&lt;BR /&gt;graph = unified_pipeline(argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/pipeline/unified.py", line 13, in unified_pipeline&lt;BR /&gt;class_registration.apply_replacements(graph, [&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 328, in apply_replacements&lt;BR /&gt;apply_replacements_list(graph, replacers_order)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 314, in apply_replacements_list&lt;BR /&gt;apply_transform(&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/logger.py", line 111, in wrapper&lt;BR /&gt;function(*args, **kwargs)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 302, in apply_transform&lt;BR /&gt;raise Exception('Exception occurred during running replacer "{} ({})": {}'.format(&lt;BR /&gt;Exception: Exception occurred during running replacer "ObjectDetectionAPIPreprocessor2Replacement (&amp;lt;class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessor2Replacement'&amp;gt;)":&lt;/P&gt;
&lt;P&gt;[ ERROR ] ---------------- END OF BUG REPORT --------------&lt;BR /&gt;[ ERROR ] -------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Previously I had trained/fine-tuned/exported my EfficientDet-D0 in saved_model format&lt;/P&gt;
&lt;P&gt;in the Tensorflow Object Detection API 2.x using Tensorflow 2.5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Milos&lt;/P&gt;</description>
    <pubDate>Sat, 14 Aug 2021 20:22:42 GMT</pubDate>
    <dc:creator>macimovic</dc:creator>
    <dc:date>2021-08-14T20:22:42Z</dc:date>
    <item>
      <title>EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1304255#M24836</link>
      <description>&lt;H5&gt;System information (version)&lt;/H5&gt;
&lt;UL&gt;
&lt;LI&gt;OpenVINO=&amp;gt; For conversion OpenVino in Github c8af311 from 2021-06-11 and for inference openvino_2021.2.185&lt;/LI&gt;
&lt;LI&gt;Operating System / Platform =&amp;gt; Windows 10&lt;/LI&gt;
&lt;LI&gt;Compiler =&amp;gt;&lt;/LI&gt;
&lt;LI&gt;Problem classification =&amp;gt; Model Inference&lt;/LI&gt;
&lt;LI&gt;Framework: Tensorflow Object Detection API 2.0&lt;/LI&gt;
&lt;LI&gt;Model name: Efficientdet D0 input resolution 512x512 trained with custom data and exported with Tensorflow object detection API 2.0&lt;/LI&gt;
&lt;LI&gt;Model optimizer conversion file: model-optimizer\extensions\front\tf\efficient_det_support_api_v2.4.json&lt;/LI&gt;
&lt;/UL&gt;
&lt;H5&gt;Detailed description&lt;/H5&gt;
&lt;P&gt;At inference, the result of a retrained TF2 Object Detection API EfficientDet D0 with custom data is only an array of zeros except the first value, which is -1, instead of providing bounding boxes.&lt;/P&gt;
&lt;H5&gt;Steps to reproduce&lt;/H5&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;We trained EfficientDet D0 (&lt;A href="http://download.tensorflow.org/models/object_detection/tf2/20200711/efficientdet_d0_coco17_tpu-32.tar.gz" target="_blank" rel="noopener noreferrer"&gt;model&lt;/A&gt;) from the Tensorflow Object 2.0 Detection API on custom data and&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;exported the model with the exporter for TF2 to a saved_model.pb&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;Then, we converted the EfficientDet D0 with model-optimizer\mo_tf.py (OpenVino in Github c8af311) and used model-optimizer\extensions\front\tf\efficient_det_support_api_v2.4.json.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;We used the following settings: APIFILE=%OPENVINOINSTALLDIR%\model-optimizer\extensions\front\tf\efficient_det_support_api_v2.4.json python %OPENVINOINSTALLDIR%\model-optimizer\mo_tf.py ^ --saved_model_dir="exported-models%MODELNAME%\saved_model" ^ --tensorflow_object_detection_api_pipeline_config=exported-models%MODELNAME%\pipeline.config ^ --transformations_config=%APIFILE% ^ --reverse_input_channels ^ --data_type FP32 ^ --output_dir=exported-models-openvino%MODELNAME%_OV%PRECISION%&lt;/P&gt;
&lt;P&gt;The model was successfully converted. The model optimizer log can be found here:&lt;/P&gt;
&lt;P&gt;Apply to model tf2oda_efficientdet_512x512_pedestrian_D0_LR08 with precision FP32 '&lt;A href="https://githubmemory.com/thephpleague/commonmark/issues/2" target="_blank" rel="noopener noreferrer"&gt;#2&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Model to OpenVino Intermediate Representation '&lt;A href="https://githubmemory.com/thephpleague/commonmark/issues/21" target="_blank" rel="noopener noreferrer"&gt;#21&lt;/A&gt;_SoC_EML\openvino"\model-optimizer\extensions\front\tf\efficient_det_support_api_v2.4.json "Start conversion" Model Optimizer arguments: Common parameters: - Path to the Input Model: None - Path for generated IR: C:\Projekte\21_SoC_EML\scripts-and-guides-samples\oxford_pets_reduced_openvino\exported-models-openvino\tf2oda_efficientdet_512x512_pedestrian_D0_LR08_OVFP32 - IR output name: saved_model - Log level: ERROR - Batch: Not specified, inherited from the model - Input layers: Not specified, inherited from the model - Output layers: Not specified, inherited from the model - Input shapes: Not specified, inherited from the model - Mean values: Not specified - Scale values: Not specified - Scale factor: Not specified - Precision of IR: FP32 - Enable fusing: True - Enable grouped convolutions fusing: True - Move mean values to preprocess section: None - Reverse input channels: True TensorFlow specific parameters: - Input model in text protobuf format: False - Path to model dump for TensorBoard: None - List of shared libraries with TensorFlow custom layers implementation: None - Update the configuration file with input/output node names: None - Use configuration file used to generate the model with Object Detection API: C:\Projekte\21_SoC_EML\scripts-and-guides-samples\oxford_pets_reduced_openvino\exported-models\tf2oda_efficientdet_512x512_pedestrian_D0_LR08\pipeline.config - Use the config file: None [ WARNING ] Failed to import Inference Engine Python API in: PYTHONPATH [ WARNING ] DLL load failed while importing ie_api: Das angegebene Modul wurde nicht gefunden. [ WARNING ] Could not find the Inference Engine Python API. At this moment, the Inference Engine dependency is not required, but will be required in future releases. [ WARNING ] Consider building the Inference Engine Python API from sources or try to install OpenVINO (TM) Toolkit using "install_prerequisites.sh" Model Optimizer version: custom_main_1d892296429f4c47c839bce4eba524edff8eb0d3 2021-06-11 13:57:50.460822: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2021-06-11 13:57:50.478509: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2021-06-11 13:58:23.317335: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set 2021-06-11 14:00:13.380157: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found 2021-06-11 14:00:13.408711: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303) 2021-06-11 14:00:13.435937: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: dp3510 2021-06-11 14:00:13.461395: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: dp3510 2021-06-11 14:00:13.490841: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2021-06-11 14:00:13.575427: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set 2021-06-11 14:02:19.125553: I tensorflow/core/grappler/devices.cc:69] Number of eligible GPUs (core count &amp;gt;= 8, compute capability &amp;gt;= 0.0): 0 2021-06-11 14:02:19.144580: I tensorflow/core/grappler/clusters/single_machine.cc:356] Starting new session 2021-06-11 14:02:19.154771: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set 2021-06-11 14:02:21.336527: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:928] Optimization results for grappler item: graph_to_optimize function_optimizer: Graph size after: 5666 nodes (4965), 13173 edges (12465), time = 405.86ms. function_optimizer: Graph size after: 5666 nodes (0), 13173 edges (0), time = 145.277ms. Optimization results for grappler item: __inference_map_while_Preprocessor_ResizeToRange_cond_false_12678_30252 function_optimizer: function_optimizer did nothing. time = 0.002ms. function_optimizer: function_optimizer did nothing. time = 0ms. Optimization results for grappler item: __inference_map_while_body_12631_30367 function_optimizer: Graph size after: 117 nodes (0), 126 edges (0), time = 2.744ms. function_optimizer: Graph size after: 117 nodes (0), 126 edges (0), time = 2.804ms. Optimization results for grappler item: __inference_map_while_Preprocessor_ResizeToRange_cond_true_12677_15652 function_optimizer: function_optimizer did nothing. time = 0.001ms. function_optimizer: function_optimizer did nothing. time = 0.001ms. Optimization results for grappler item: __inference_map_while_cond_12630_38606 function_optimizer: function_optimizer did nothing. time = 0.001ms. function_optimizer: function_optimizer did nothing. time = 0ms.&lt;/P&gt;
&lt;P&gt;[ WARNING ] Model Optimizer removes pre-processing block of the model which resizes image keeping aspect ratio. The Inference Engine does not support dynamic image size so the Intermediate Representation file is generated with the input image size of a fixed size. Specify the "--input_shape" command line parameter to override the default shape which is equal to (512, 512). The Preprocessor block has been removed. Only nodes performing mean value subtraction and scaling (if applicable) are kept. [ WARNING ] Using fallback to produce IR. [ SUCCESS ] Generated IR version 10 model. [ SUCCESS ] XML file: C:\Projekte\21_SoC_EML\scripts-and-guides-samples\oxford_pets_reduced_openvino\exported-models-openvino\tf2oda_efficientdet_512x512_pedestrian_D0_LR08_OVFP32\saved_model.xml [ SUCCESS ] BIN file: C:\Projekte\21_SoC_EML\scripts-and-guides-samples\oxford_pets_reduced_openvino\exported-models-openvino\tf2oda_efficientdet_512x512_pedestrian_D0_LR08_OVFP32\saved_model.bin [ SUCCESS ] Total execution time: 510.97 seconds. "Conversion finished" The converted model can be found here:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://owncloud.tuwien.ac.at/index.php/s/0zmcqbY3HkhUIrL" target="_blank" rel="noopener noreferrer"&gt;https://owncloud.tuwien.ac.at/index.php/s/0zmcqbY3HkhUIrL&lt;/A&gt;&lt;/P&gt;
&lt;OL start="4"&gt;
&lt;LI&gt;
&lt;P&gt;Then we executed the model first with the benchmark_app.py from OpenVino 2021.2.185, which was successful.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;We executed the model with the python script object_detection_sample_ssd.py&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;The result was an array with Zeros for each image, except the first value.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Loading network and perform on CPU Starting inference for picture: Abyssinian_116.jpg {'DetectionOutput': array([[[[-1., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0.]]]], dtype=float32)}&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 11:18:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1304255#M24836</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-06T11:18:09Z</dc:date>
    </item>
    <item>
      <title>Re:EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306160#M24881</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;Hello Milos Acimovic,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;Thank you for reaching out to us.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;In this &lt;/SPAN&gt;&lt;A href="https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Model-returns-all-zeroes/td-p/1272176" rel="noopener noreferrer" target="_blank" style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;thread&lt;/A&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt; there is a discussion regarding this issue, try to follow the suggestion and see if the solution could resolve your issue. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;Sincerely,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;Calibri Light&amp;quot;, sans-serif;"&gt;Zulkifli&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Aug 2021 07:17:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306160#M24881</guid>
      <dc:creator>Zulkifli_Intel</dc:creator>
      <dc:date>2021-08-12T07:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Re:EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306165#M24882</link>
      <description>&lt;P&gt;Again,&amp;nbsp;&lt;SPAN&gt;We executed the model with the python script object_detection_sample_ssd.py. That is a script available in OpenVINO's demos.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here's a snippet from it to refresh your memory:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;# ---------------------------Step 6. Prepare input---------------------------------------------------------------------&lt;BR /&gt;original_image = cv2.imread(args.input)&lt;BR /&gt;image = original_image.copy()&lt;BR /&gt;_, _, net_h, net_w = net.input_info[input_blob].input_data.shape&lt;/P&gt;
&lt;P&gt;if image.shape[:-1] != (net_h, net_w):&lt;BR /&gt;log.warning(f'Image {args.input} is resized from {image.shape[:-1]} to {(net_h, net_w)}')&lt;BR /&gt;image = cv2.resize(image, (net_w, net_h))&lt;/P&gt;
&lt;P&gt;# Change data layout from HWC to CHW&lt;BR /&gt;image = image.transpose((2, 0, 1))&lt;BR /&gt;# Add N dimension to transform to NCHW&lt;BR /&gt;image = np.expand_dims(image, axis=0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i.e. there is no scaling the image values on the range from (0, 1) like you suggested with the previous thread. So, something else?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 07:29:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306165#M24882</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-12T07:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Re:EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306205#M24886</link>
      <description>&lt;P&gt;Also a VERY important distinction is that I am not using automl/efficientdet repo to train on custom data,&lt;/P&gt;
&lt;P&gt;but Tensorflow Object&amp;nbsp; Detection API 2.x.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 09:55:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306205#M24886</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-12T09:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306212#M24887</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Hello Milos Acimovic,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;We tested your model on object_detection_sample_ssd.py by using our input image and it was executed successfully. Please share with us your image files. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="efficentdetPNG.PNG" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18781i1D7CD420DC689596/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="efficentdetPNG.PNG" alt="efficentdetPNG.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Sincerely,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Zulkifli&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 02:44:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306212#M24887</guid>
      <dc:creator>Zulkifli_Intel</dc:creator>
      <dc:date>2021-08-13T02:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306218#M24888</link>
      <description>&lt;P&gt;Thanks for the reply&lt;/P&gt;
&lt;P&gt;I feel like you didn't understand what the problem is.&lt;/P&gt;
&lt;P&gt;It's not about whether or not it executes successfully, it's about whether or not I am getting any meaningful predictions at all.&lt;/P&gt;
&lt;P&gt;There are no predicted bounding boxes in the output blob.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sharing the image.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:34:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306218#M24888</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-12T10:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306626#M24903</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Hello Milos Acimovic,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;We reproduced your issue, and were able to convert the TensorFlow 2 EfficientDet-D0 model and subsequently executed Object Detection Python Demo and also Object Detection Python Sample SSD using the converted model with OpenVINO 2021.4. Here is the explanation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;The &lt;/SPAN&gt;&lt;A style="font-family: 'Calibri Light', sans-serif;" href="http://download.tensorflow.org/models/object_detection/tf2/20200711/efficientdet_d0_coco17_tpu-32.tar.gz" target="_blank" rel="noopener noreferrer"&gt;EfficientDet-D0&lt;/A&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt; model was downloaded and converted to IR format using the following command:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;python mo_tf.py --saved_model_dir &amp;lt;model_directory&amp;gt;\efficientdet_d0_coco17_tpu-32\saved_model --transformations_config &amp;lt;PATH&amp;gt;\front\tf\efficient_det_support_api_v2.0.json --tensorflow_object_detection_api_pipeline_config &amp;lt;PATH&amp;gt;\efficientdet_d0_coco17_tpu-32\pipeline.config&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&amp;nbsp;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;We used the generated IR files to run the Object Detection Python Demo and Object Detection Python Sample SSD. Both the demo and sample were successfully run, and the bounding boxes were created. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;I share the screenshots here. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eff_demo.PNG" style="width: 564px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18794iE700F89ED9410855/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="eff_demo.PNG" alt="eff_demo.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Object Detection Python Demo&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eff_sample.PNG" style="width: 793px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18795i7495BCABA6F8A341/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="eff_sample.PNG" alt="eff_sample.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Object Detection Python Sample SSD&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;When we tried running both these demos using your custom-trained model, we observed that the bounding boxes were not created. &amp;nbsp;This is probably due to incorrect conversion to IR using Model Optimizer. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Hence, we recommend you use the &lt;/SPAN&gt;&lt;I&gt;efficient_det_support_api_v2.0.json&lt;/I&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt; as the transformations config file with OpenVINO 2021.4 to convert your EfficientDet-D0 model to IR files, using the commands I shared above.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;After that, please give a try to run the Object Detection Python Sample SSD using the newly generated IR files, and please share with us your results. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Sincerely,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'Calibri Light', sans-serif;"&gt;Zulkifli&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 14:42:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306626#M24903</guid>
      <dc:creator>Zulkifli_Intel</dc:creator>
      <dc:date>2021-08-13T14:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306770#M24904</link>
      <description>&lt;P&gt;Hey Zulkifli,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much for your response and for engaging with the issue I was experiencing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I managed to get it working in the same way you presented, so thanks so much.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test_efficient_det_api_v2.0.png" style="width: 752px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18796iEE4A818FB2CF08A9/image-dimensions/752x173/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="752" height="173" role="button" title="test_efficient_det_api_v2.0.png" alt="test_efficient_det_api_v2.0.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;I will mark the issue as solved as soon as we solve the problem with the model trained on a custom dataset.&lt;/P&gt;
&lt;P&gt;So to update I trained/exported as saved_model my EfficientDet-D0 trained in Tensorflow (2.3) and&lt;/P&gt;
&lt;P&gt;then used efficient_det_support_api_v2.0.json as the transformations_config, but still got an error&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[ ERROR ] -------------------------------------------------&lt;BR /&gt;[ ERROR ] ----------------- INTERNAL ERROR ----------------&lt;BR /&gt;[ ERROR ] Unexpected exception happened.&lt;BR /&gt;[ ERROR ] Please contact Model Optimizer developers and forward the following information:&lt;BR /&gt;[ ERROR ] Exception occurred during running replacer "ObjectDetectionAPIPreprocessor2Replacement (&amp;lt;class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessor2Replacement'&amp;gt;)": &lt;BR /&gt;[ ERROR ] Traceback (most recent call last):&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 276, in apply_transform&lt;BR /&gt;replacer.find_and_replace_pattern(graph)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/front/tf/replacement.py", line 36, in find_and_replace_pattern&lt;BR /&gt;self.transform_graph(graph, desc._replacement_desc['custom_attributes'])&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/extensions/front/tf/ObjectDetectionAPI.py", line 710, in transform_graph&lt;BR /&gt;assert len(start_nodes) &amp;gt;= 1&lt;BR /&gt;AssertionError&lt;/P&gt;
&lt;P&gt;The above exception was the direct cause of the following exception:&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 394, in main&lt;BR /&gt;ret_code = driver(argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 356, in driver&lt;BR /&gt;ret_res = emit_ir(prepare_ir(argv), argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 252, in prepare_ir&lt;BR /&gt;graph = unified_pipeline(argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/pipeline/unified.py", line 13, in unified_pipeline&lt;BR /&gt;class_registration.apply_replacements(graph, [&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 328, in apply_replacements&lt;BR /&gt;apply_replacements_list(graph, replacers_order)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 314, in apply_replacements_list&lt;BR /&gt;apply_transform(&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/logger.py", line 111, in wrapper&lt;BR /&gt;function(*args, **kwargs)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 302, in apply_transform&lt;BR /&gt;raise Exception('Exception occurred during running replacer "{} ({})": {}'.format(&lt;BR /&gt;Exception: Exception occurred during running replacer "ObjectDetectionAPIPreprocessor2Replacement (&amp;lt;class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessor2Replacement'&amp;gt;)":&lt;/P&gt;
&lt;P&gt;[ ERROR ] ---------------- END OF BUG REPORT --------------&lt;BR /&gt;[ ERROR ] -------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Previously I had trained/fine-tuned/exported my EfficientDet-D0 in saved_model format&lt;/P&gt;
&lt;P&gt;in the Tensorflow Object Detection API 2.x using Tensorflow 2.5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Milos&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 20:22:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306770#M24904</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-14T20:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306837#M24907</link>
      <description>&lt;P&gt;Hi Zulkifli,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tried converting EfficientDet-D0 trained on custom data using your command and got the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[ ERROR ] -------------------------------------------------&lt;BR /&gt;[ ERROR ] ----------------- INTERNAL ERROR ----------------&lt;BR /&gt;[ ERROR ] Unexpected exception happened.&lt;BR /&gt;[ ERROR ] Please contact Model Optimizer developers and forward the following information:&lt;BR /&gt;[ ERROR ] Exception occurred during running replacer "ObjectDetectionAPIPreprocessor2Replacement (&amp;lt;class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessor2Replacement'&amp;gt;)": &lt;BR /&gt;[ ERROR ] Traceback (most recent call last):&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 276, in apply_transform&lt;BR /&gt;replacer.find_and_replace_pattern(graph)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/front/tf/replacement.py", line 36, in find_and_replace_pattern&lt;BR /&gt;self.transform_graph(graph, desc._replacement_desc['custom_attributes'])&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/extensions/front/tf/ObjectDetectionAPI.py", line 710, in transform_graph&lt;BR /&gt;assert len(start_nodes) &amp;gt;= 1&lt;BR /&gt;AssertionError&lt;/P&gt;
&lt;P&gt;The above exception was the direct cause of the following exception:&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 394, in main&lt;BR /&gt;ret_code = driver(argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 356, in driver&lt;BR /&gt;ret_res = emit_ir(prepare_ir(argv), argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/main.py", line 252, in prepare_ir&lt;BR /&gt;graph = unified_pipeline(argv)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/pipeline/unified.py", line 13, in unified_pipeline&lt;BR /&gt;class_registration.apply_replacements(graph, [&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 328, in apply_replacements&lt;BR /&gt;apply_replacements_list(graph, replacers_order)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 314, in apply_replacements_list&lt;BR /&gt;apply_transform(&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/logger.py", line 111, in wrapper&lt;BR /&gt;function(*args, **kwargs)&lt;BR /&gt;File "/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 302, in apply_transform&lt;BR /&gt;raise Exception('Exception occurred during running replacer "{} ({})": {}'.format(&lt;BR /&gt;Exception: Exception occurred during running replacer "ObjectDetectionAPIPreprocessor2Replacement (&amp;lt;class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessor2Replacement'&amp;gt;)":&lt;/P&gt;
&lt;P&gt;[ ERROR ] ---------------- END OF BUG REPORT --------------&lt;BR /&gt;[ ERROR ] -------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 20:21:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306837#M24907</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-14T20:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306865#M24908</link>
      <description>&lt;P&gt;I do get the same error and debugging documentations on "Graph/Sub-Graph" replacements are quite complicated to follow and use. All the models in Tensorflow2 OD API Model Zoo, are getting convered to OpenVINO IR files. But when we retrain any of the TF2 OD API models on a custom dataset and export it and obtain, a similar "saved_model", converting to OpenVINO IR files, has this issue. I have not been posting the issue in the community here on these issues, but its been there for a long time. I thought the latest OpenVINO version will have something to fix this. Stuck here and thinking about switching to Tensor RT........It is strange to find a "saved_model" from TF2 Model Zoo is getting converted, but not a retrained model and saved/exported to a "saved_model".......Between the original TF2 model to the retrained model (on a custom dataset), I do not change anything (No hyperparameters are touched/changed).......I change only the number of classes, checkpoint files, and path to the labelmap/tfrecord files......And change the number of steps.......&lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 05:16:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306865#M24908</guid>
      <dc:creator>Vicky_Rama</dc:creator>
      <dc:date>2021-08-15T05:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306953#M24909</link>
      <description>&lt;P&gt;Hello Milos Acimovic,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please share with us your custom-trained model. During the conversion, which OpenVINO version did you use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Zulkifli&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 03:51:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1306953#M24909</guid>
      <dc:creator>Zulkifli_Intel</dc:creator>
      <dc:date>2022-02-24T03:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307452#M24942</link>
      <description>&lt;P&gt;Sharing with you an example of a custom-trained model. In it you will find the saved_model, pipeline.config and a sample image. Mind you to get meaningful results the confidence threshold needs to be set lower than 0.5 to something like 0.1 but let's first get some bounding boxes from EfficientDet after optimized on OpenVINO. The OpenVINO version I used was 2021.4.582.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 13:00:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307452#M24942</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-17T13:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307674#M24949</link>
      <description>&lt;P&gt;Hello Macimovic.......I used to have a work around......I am not sure, if it works on this model......Can you share the label file (.pbtxt file)? I can try.....As I posted earlier, I do have similar issues........I am reading "hard" the Intel documentation.......Have a Gut feeling, there is a direct solution to this, in their documentation......There must be more specific arguments, that has to be used to get the MO grasp, before it converts into an IR format.......If it can covert, a "saved_model", from the TF2 Model Zoo, it should work/convert a re-trained and exported as a "'saved_model"......By the way, did you check outside Tensorboard evaluation, if your retrained and saved_model is detecting the target images? I can check that, if you can share the label_map.pbtxt file......&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 04:47:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307674#M24949</guid>
      <dc:creator>Vicky_Rama</dc:creator>
      <dc:date>2021-08-18T04:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307710#M24952</link>
      <description>&lt;P&gt;Here's the label_map.pbtxt if needed. Confirmed that it's detecting, you can check .png, hence, I wrote in the previous message that it's needed to set&amp;nbsp; the confidence(score) threshold low enough somewhere around 0.1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 07:01:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307710#M24952</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-18T07:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307723#M24954</link>
      <description>&lt;P&gt;Hello Milos,&lt;/P&gt;
&lt;P&gt;Generally, I first check for detections/bounding box prediction outside tensorflow training/evaluation processes, after training/evaluating the model on a custom dataset for a pre-determined set of epochs. Then, only I try to convert using OpenVINO, and use the IR files on a Intel ATOM/Myriad Edge device.....I have a Vizi-AI starter kit and I can use it to deploy and check using OpenVINO Inference engine in the device. When I checked for off-line detection using your "saved_model"/ label file and test image, it was not detecting (No bounding boxes, even if I set it to a threshold of 0.1.....I run a small python code and pass a CLI argument.....I will share you those here......&lt;/P&gt;
&lt;P&gt;This is the argument, I use in the CLI to check for detection....&lt;/P&gt;
&lt;P&gt;python detect_objects.py --model_path=/home/kannan/Downloads/fruit_export/saved_model --path_to_labelmap=/home/kannan/Downloads/Fruits_label_map.pbtxt --images_dir=/home/kannan/Downloads/fruit_export/ --threshold 0.1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you test it off-line for Bounding box detections and class predictions?&lt;/P&gt;
&lt;P&gt;Have a few questions when I looked at your pipeline.config file? Your num-classes = 1, but the label_map.pbtxt has 67 classes...&lt;/P&gt;
&lt;P&gt;If you had re-trained the model, your label_map.pbtxt file must show only one class.....&lt;/P&gt;
&lt;P&gt;......Other than that most of the changes that you have done are correct......In Line Number 152 (fine_tune_checkpoint: "/home/agremo/ssd/playground/tf2/models/research/object_detection/test_data/chko/ckpt-0"), does this point to the check point from the TF2 Efficientdet Model Zoo?&lt;/P&gt;
&lt;P&gt;OpenVINO issue crops up, only if we try to convert a "re-trained model"? It could be some changes in the "re-trained saved_model", that is forcing Model Optimizer to exit (showing the exception)......I am also working on the same issue........If Intel can crack this, it becomes a universal solution.....It will help you as well as me.....&lt;/P&gt;
&lt;P&gt;But please check, what I have listed above.......&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 07:49:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307723#M24954</guid>
      <dc:creator>Vicky_Rama</dc:creator>
      <dc:date>2021-08-18T07:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307728#M24955</link>
      <description>&lt;P&gt;Tested offline, all good.&lt;/P&gt;
&lt;P&gt;The mismatch in the number of classes is not important. Just wanted to test fine-tuning process, I didn't care if the object inside the bounding box was classified properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes the fine_tune_checkpoint points to the&amp;nbsp;&lt;I&gt;efficientdet_d0_coco17_tpu-32.&amp;nbsp;&lt;/I&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again I can convert fine using&amp;nbsp;&lt;SPAN&gt;model-optimizer\extensions\front\tf\efficient_det_support_api_v2.4.json&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;but I am not getting any predicted bounding boxes in the output blob.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 08:24:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307728#M24955</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-18T08:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307729#M24956</link>
      <description>&lt;P&gt;Hoping you used the image inside fruit_export.zip and not test.png that I shared later with the label map &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 08:26:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307729#M24956</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-18T08:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307763#M24958</link>
      <description>&lt;P&gt;I used both the images.....The one inside the fruit_export.zip (the file name was&amp;nbsp;image1.jpg).......I could not see any bounding boxes in this image when I run my python code.....Where as it was predicting on&amp;nbsp;test.png, which had the bounding boxes in the images......I could see bounding boxes, over the existing bounding boxes.......If I increase the threshold to 0.15, the bounding boxes vanishes?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am wondering and looking at why it is not predicting on both the images......&lt;/P&gt;
&lt;P&gt;By the way, 3000 steps is too low for the model to learn........Can you increase the number of steps to 10,000 or 20,000? If you have a GPU, with a Batch size of 4 on Efficientdet B0, will not take more than 1 hour for training?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can share the train.tfrecords and test.tfrecord file, I can run it and see how it runs in my GPU.......I have tweaked my system, to run training and testing concurrently.......For every 1000 steps of training, when TF updates the "checkpoint files", I can visualize the training results and their metrics also (coco_detection_metric) also in tensorboard.......I will share you the tensorboard results and also share you the exported files of "saved_model" to you, once the training is finished......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 11:28:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307763#M24958</guid>
      <dc:creator>Vicky_Rama</dc:creator>
      <dc:date>2021-08-18T11:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307770#M24959</link>
      <description>&lt;P&gt;Vicky_Rama thanks for your help, try setting the threshold to 0.05.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dataset is freely available on&amp;nbsp;&lt;A href="https://public.roboflow.com/object-detection/synthetic-fruit/1" target="_blank"&gt;https://public.roboflow.com/object-detection/synthetic-fruit/1&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is more for showcasing my problem, my actual dataset, training time is different and threshold that is good enough is higher than 0.5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is in the end all besides the point and the problem I am having with OpenVINO.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 11:41:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307770#M24959</guid>
      <dc:creator>macimovic</dc:creator>
      <dc:date>2021-08-18T11:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: EfficientDet-D0 trained and exported in Tensorflow 2.0 Object Detection API</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307778#M24960</link>
      <description>&lt;P&gt;Milos......I will check the dataset in Roboflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This query is to Intel......&lt;/P&gt;
&lt;P&gt;(1). Do you advice to freeze the model? Although, TF2 saved_model does not require freezing.....TF2 Model Zoo does not have frozen models, unlike TF1.....We can still freeze the saved_model to a frozen_inference_graph and I remember, OpenVINO converted to the IR format, when I froze the TF2 saved_model....&lt;/P&gt;
&lt;P&gt;Intel.....Your inpurts please......&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 12:00:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/EfficientDet-D0-trained-and-exported-in-Tensorflow-2-0-Object/m-p/1307778#M24960</guid>
      <dc:creator>Vicky_Rama</dc:creator>
      <dc:date>2021-08-18T12:00:21Z</dc:date>
    </item>
  </channel>
</rss>

