<?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>i.MX ProcessorsのトピックRe: YOLO/MobileNetV2 tflite code GPU accelaration IMX8 Board C++</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/YOLO-MobileNetV2-tflite-code-GPU-accelaration-IMX8-Board-C/m-p/1766015#M216587</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/225987"&gt;@wamiqraza&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I think that we can continue on your other thread.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2023 00:48:01 GMT</pubDate>
    <dc:creator>brian14</dc:creator>
    <dc:date>2023-11-30T00:48:01Z</dc:date>
    <item>
      <title>YOLO/MobileNetV2 tflite code GPU accelaration IMX8 Board C++</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/YOLO-MobileNetV2-tflite-code-GPU-accelaration-IMX8-Board-C/m-p/1764768#M216458</link>
      <description>&lt;P&gt;This ticket is continuation from ticket: &lt;A href="https://community.nxp.com/t5/i-MX-Processors/YOLO-tflite-code-Request-to-run-on-IMX8-Board-C/m-p/1762109/highlight/false#M216209" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/YOLO-tflite-code-Request-to-run-on-IMX8-Board-C/m-p/1762109/highlight/false#M216209&lt;/A&gt;&lt;BR /&gt;--------------------------------------------------------------------------------------------&lt;BR /&gt;I have&amp;nbsp; gone through documentation of NXP and was able to deploy MobileNetV2 pre-trained, MobileNetV2 trained on custom dataset bot int8 quantized and then yolov8 on custom dataset float32 quantized and int8 respectively.&lt;/P&gt;&lt;P&gt;I am using GStreamer pipeline, as its for production project and some details will share here. Due to privacy reason full code I can't disclose in public. Would request for meeting if the team can contact via my email: &lt;A href="mailto:wamiq.raza@kineton.it" target="_blank"&gt;wamiq.raza@kineton.it&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As the product is about to launch and one of the barrier we are facing in detection. For instance model has low FPS and not utilizing GPU.&lt;BR /&gt;&lt;BR /&gt;Below are the terminal print for when loading MobileNetV2 for inference.&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Streams opened successfully!&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: allowed_cache_mode set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: allowed_builtin_code set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: error_during_init set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: error_during_prepare set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: error_during_invoke set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR: Fallback unsupported op 32 to TfLite&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;INFO: Created TensorFlow Lite XNNPACK delegate for CPU.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Below are the terminal print for when loading Yolov8 for inference.&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Streams opened successfully!&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: allowed_cache_mode set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: allowed_builtin_code set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: error_during_init set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: error_during_prepare set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Vx delegate: error_during_invoke set to 0.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;W [HandleLayoutInfer:268]Op 162: default layout inference pass.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Here is the part of code that load the model:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;std::unique_ptr&amp;lt;tflite::Interpreter&amp;gt; interpreter;
// ================== Load model ==================
std::unique_ptr&amp;lt;tflite::FlatBufferModel&amp;gt; model =
tflite::FlatBufferModel::BuildFromFile(modelPath.c_str());

std::cout &amp;lt;&amp;lt; std::endl &amp;lt;&amp;lt; "Model Loaded!" &amp;lt;&amp;lt; std::endl &amp;lt;&amp;lt; std::endl;

TFLITE_MINIMAL_CHECK(model != nullptr);
// ================== Define Interpreter ==================
tflite::ops::builtin::BuiltinOpResolver resolver;
tflite::InterpreterBuilder(*model, resolver)(&amp;amp;interpreter);
TFLITE_MINIMAL_CHECK(interpreter != nullptr);
// ================== Delegating GPU ==================
TfLiteDelegatePtr ptr = CreateTfLiteDelegate();
TFLITE_MINIMAL_CHECK(interpreter-&amp;gt;ModifyGraphWithDelegate(std::move(ptr)) ==
kTfLiteOk);
// ================== Allocate tensor buffers ==================
TFLITE_MINIMAL_CHECK(interpreter-&amp;gt;AllocateTensors() == kTfLiteOk);&lt;/LI-CODE&gt;&lt;P&gt;---------------------------------------------------------------------------------------&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Would like to arrange meeting with deep learning model deployment team and suggestion on above details.&lt;/P&gt;&lt;P&gt;Please let me know if you need additional details of information.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 09:20:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/YOLO-MobileNetV2-tflite-code-GPU-accelaration-IMX8-Board-C/m-p/1764768#M216458</guid>
      <dc:creator>wamiqraza</dc:creator>
      <dc:date>2023-11-28T09:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: YOLO/MobileNetV2 tflite code GPU accelaration IMX8 Board C++</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/YOLO-MobileNetV2-tflite-code-GPU-accelaration-IMX8-Board-C/m-p/1766015#M216587</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/225987"&gt;@wamiqraza&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I think that we can continue on your other thread.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 00:48:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/YOLO-MobileNetV2-tflite-code-GPU-accelaration-IMX8-Board-C/m-p/1766015#M216587</guid>
      <dc:creator>brian14</dc:creator>
      <dc:date>2023-11-30T00:48:01Z</dc:date>
    </item>
  </channel>
</rss>

