<?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 Yolov5 tflite deployment on NPU - IMX8MP evk in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1578541#M199685</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have trained yolov5 with VisDrone dataset in PyTorch. To run the model on IMX8MP-evk, it need to be converted to 8-bit(int8/uint8). Used eIQ Portal to quantize and convert to tflite format. Steps in conversion are as follows: best.pt -&amp;gt; best.onxx -&amp;gt; best.tflite (Input:uint8, model(filter:int8/bias:int32), Output: float32, screenshot attached: tflite-model.JPG).&amp;nbsp;Per channel quantization is used.&lt;/P&gt;&lt;P&gt;Benchmarking:&amp;nbsp;./benchmark_model --graph=/path2model/best_uint8_int8_float.tflite --external_delegate_path=/usr/lib/libvx_delegate.so --enable_op_profiling=true --max_delegated_partitions=10000 (screenshot attached: benchmark_1.JPG, benchmark_2.JPG, benchmark_3.JPG)&lt;/P&gt;&lt;P&gt;Object Detection:&lt;BR /&gt;gstreamer pipeline is used to test above quantized model on webcam. Executing the pipeline on CPU/NPU results in error (screenshot attached: error_pipeline.JPG).&lt;/P&gt;&lt;P&gt;Converting to float32_float32_float32.tflite didn't work as well.&lt;BR /&gt;Tensor format should be NCHW for TF-Lite, is the input and output shape correct ?&lt;/P&gt;&lt;P&gt;Need help in creating a working pipeline, C++ code would be best &lt;LI-EMOJI id="lia_grinning-face-with-smiling-eyes" title=":grinning_face_with_smiling_eyes:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2023 11:13:29 GMT</pubDate>
    <dc:creator>abhishek_ml</dc:creator>
    <dc:date>2023-01-06T11:13:29Z</dc:date>
    <item>
      <title>Yolov5 tflite deployment on NPU - IMX8MP evk</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1578541#M199685</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have trained yolov5 with VisDrone dataset in PyTorch. To run the model on IMX8MP-evk, it need to be converted to 8-bit(int8/uint8). Used eIQ Portal to quantize and convert to tflite format. Steps in conversion are as follows: best.pt -&amp;gt; best.onxx -&amp;gt; best.tflite (Input:uint8, model(filter:int8/bias:int32), Output: float32, screenshot attached: tflite-model.JPG).&amp;nbsp;Per channel quantization is used.&lt;/P&gt;&lt;P&gt;Benchmarking:&amp;nbsp;./benchmark_model --graph=/path2model/best_uint8_int8_float.tflite --external_delegate_path=/usr/lib/libvx_delegate.so --enable_op_profiling=true --max_delegated_partitions=10000 (screenshot attached: benchmark_1.JPG, benchmark_2.JPG, benchmark_3.JPG)&lt;/P&gt;&lt;P&gt;Object Detection:&lt;BR /&gt;gstreamer pipeline is used to test above quantized model on webcam. Executing the pipeline on CPU/NPU results in error (screenshot attached: error_pipeline.JPG).&lt;/P&gt;&lt;P&gt;Converting to float32_float32_float32.tflite didn't work as well.&lt;BR /&gt;Tensor format should be NCHW for TF-Lite, is the input and output shape correct ?&lt;/P&gt;&lt;P&gt;Need help in creating a working pipeline, C++ code would be best &lt;LI-EMOJI id="lia_grinning-face-with-smiling-eyes" title=":grinning_face_with_smiling_eyes:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 11:13:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1578541#M199685</guid>
      <dc:creator>abhishek_ml</dc:creator>
      <dc:date>2023-01-06T11:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Yolov5 tflite deployment on NPU - IMX8MP evk</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1580145#M199854</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;The default input model should &lt;SPAN class="markedContent"&gt;&lt;SPAN&gt;be filled in with the sh&lt;/SPAN&gt;&lt;SPAN&gt;ape from the original model, take a look at the eIQ link for more information on quantization.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="markedContent"&gt;&lt;SPAN&gt;&lt;A href="https://community.nxp.com/t5/eIQ-Machine-Learning-Software/tkb-p/eiq@tkb" target="_blank"&gt;https://community.nxp.com/t5/eIQ-Machine-Learning-Software/tkb-p/eiq@tkb&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="markedContent"&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 14:31:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1580145#M199854</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2023-01-10T14:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Yolov5 tflite deployment on NPU - IMX8MP evk</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1580534#M199885</link>
      <description>&lt;P&gt;Thanks, after changing the input shape it works fine.&lt;/P&gt;&lt;P&gt;How can we find performance on NPU or calculate detection time per frame ? Executing gst-launch with [ GST_DEBUG="GST_TRACER:7" GST_TRACERS="framerate"] indicates FPS of 6 to 9 which is for the complete pipeline not per frame. Is that a correct indication or is there a different way to calculate detection time per frame ?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 05:45:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1580534#M199885</guid>
      <dc:creator>abhishek_ml</dc:creator>
      <dc:date>2023-01-11T05:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Yolov5 tflite deployment on NPU - IMX8MP evk</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1668599#M207528</link>
      <description>&lt;P&gt;Did you checked this notes :&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MP-NPU-debug-and-fine-tune-application-note/ta-p/1444775" target="_blank"&gt;i.MX8MP NPU debug and fine tune application note - NXP Community&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Let me know for more details on this topic.&lt;/P&gt;&lt;P&gt;Thanks !!!&lt;/P&gt;&lt;P&gt;sams4&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 18:37:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Yolov5-tflite-deployment-on-NPU-IMX8MP-evk/m-p/1668599#M207528</guid>
      <dc:creator>sams4</dc:creator>
      <dc:date>2023-06-13T18:37:29Z</dc:date>
    </item>
  </channel>
</rss>

