<?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中的主题 OpenCV vs GStreamer Pipeline for SSD-MobileNetV2 Inference on i.MX8MP (BSP 5.15.52) using VX Delegat</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2128962#M239026</link>
    <description>&lt;P&gt;Hello NXP Community,&lt;/P&gt;&lt;P&gt;I'm working on an object detection pipeline on the i.MX8MP platform, using NXP Linux BSP 5.15.52, with a quantized SSD-MobileNetV2 model and 480p video input. I’ve integrated the VX Delegate (libvx_delegate.so) into a TFLite runtime pipeline.&lt;/P&gt;&lt;P&gt;1. Current Setup:&lt;BR /&gt;Using OpenCV + TFLite with VX Delegate:&lt;/P&gt;&lt;P&gt;python&lt;BR /&gt;cap = cv2.VideoCapture(args.video)&lt;BR /&gt;if not cap.isOpened():&lt;BR /&gt;print(f"Failed to open video: {args.video}")&lt;BR /&gt;sys.exit(1)&lt;/P&gt;&lt;P&gt;interpreter = Interpreter(&lt;BR /&gt;model_path=args.model,&lt;BR /&gt;experimental_delegates=[load_delegate(DELEGATE_PATH)]&lt;BR /&gt;)&lt;BR /&gt;interpreter.allocate_tensors()&lt;BR /&gt;This works, but I observe lower FPS than expected.&lt;/P&gt;&lt;P&gt;2. Questions:&lt;BR /&gt;Performance:&lt;BR /&gt;Would building a full GStreamer-based pipeline (instead of OpenCV VideoCapture) improve real-time inference FPS when using TFLite + VX Delegate on i.MX8MP?&lt;/P&gt;&lt;P&gt;Model Quality (eIQ Toolkit vs TensorFlow CLI):&lt;BR /&gt;I noticed that models created using the eIQ Toolkit show lower performance (accuracy/latency) compared to models converted via TensorFlow command-line tools.&lt;BR /&gt;Is this expected? Are there differences in quantization strategy, postprocessing, or layer support between the two?&lt;/P&gt;&lt;P&gt;NXP Model Zoo:&lt;BR /&gt;Are there recommended pipelines or examples from the NXP Model Zoo for mobilenet_ssd_v2 that are optimized for VX Delegate on i.MX8MP BSP 5.15.52?&lt;/P&gt;&lt;P&gt;Any guidance, benchmarks, or sample pipelines (especially using GStreamer + TFLite + VX Delegate on i.MX8MP) would be highly appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jul 2025 03:52:32 GMT</pubDate>
    <dc:creator>ashwanipal01</dc:creator>
    <dc:date>2025-07-07T03:52:32Z</dc:date>
    <item>
      <title>OpenCV vs GStreamer Pipeline for SSD-MobileNetV2 Inference on i.MX8MP (BSP 5.15.52) using VX Delegat</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2128962#M239026</link>
      <description>&lt;P&gt;Hello NXP Community,&lt;/P&gt;&lt;P&gt;I'm working on an object detection pipeline on the i.MX8MP platform, using NXP Linux BSP 5.15.52, with a quantized SSD-MobileNetV2 model and 480p video input. I’ve integrated the VX Delegate (libvx_delegate.so) into a TFLite runtime pipeline.&lt;/P&gt;&lt;P&gt;1. Current Setup:&lt;BR /&gt;Using OpenCV + TFLite with VX Delegate:&lt;/P&gt;&lt;P&gt;python&lt;BR /&gt;cap = cv2.VideoCapture(args.video)&lt;BR /&gt;if not cap.isOpened():&lt;BR /&gt;print(f"Failed to open video: {args.video}")&lt;BR /&gt;sys.exit(1)&lt;/P&gt;&lt;P&gt;interpreter = Interpreter(&lt;BR /&gt;model_path=args.model,&lt;BR /&gt;experimental_delegates=[load_delegate(DELEGATE_PATH)]&lt;BR /&gt;)&lt;BR /&gt;interpreter.allocate_tensors()&lt;BR /&gt;This works, but I observe lower FPS than expected.&lt;/P&gt;&lt;P&gt;2. Questions:&lt;BR /&gt;Performance:&lt;BR /&gt;Would building a full GStreamer-based pipeline (instead of OpenCV VideoCapture) improve real-time inference FPS when using TFLite + VX Delegate on i.MX8MP?&lt;/P&gt;&lt;P&gt;Model Quality (eIQ Toolkit vs TensorFlow CLI):&lt;BR /&gt;I noticed that models created using the eIQ Toolkit show lower performance (accuracy/latency) compared to models converted via TensorFlow command-line tools.&lt;BR /&gt;Is this expected? Are there differences in quantization strategy, postprocessing, or layer support between the two?&lt;/P&gt;&lt;P&gt;NXP Model Zoo:&lt;BR /&gt;Are there recommended pipelines or examples from the NXP Model Zoo for mobilenet_ssd_v2 that are optimized for VX Delegate on i.MX8MP BSP 5.15.52?&lt;/P&gt;&lt;P&gt;Any guidance, benchmarks, or sample pipelines (especially using GStreamer + TFLite + VX Delegate on i.MX8MP) would be highly appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 03:52:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2128962#M239026</guid>
      <dc:creator>ashwanipal01</dc:creator>
      <dc:date>2025-07-07T03:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: OpenCV vs GStreamer Pipeline for SSD-MobileNetV2 Inference on i.MX8MP (BSP 5.15.52) using VX Del</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2129055#M239030</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251378"&gt;@ashwanipal01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;For the object detection in video, please refer&amp;nbsp;8 Vision Pipeline with NNStreamer in&amp;nbsp;i.MX Machine Learning User's Guide&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/user-guide/UG10166.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/user-guide/UG10166.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 06:43:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2129055#M239030</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2025-07-07T06:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: OpenCV vs GStreamer Pipeline for SSD-MobileNetV2 Inference on i.MX8MP (BSP 5.15.52) using VX Del</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2130148#M239085</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/151788"&gt;@Zhiming_Liu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We followed the &lt;A href="http://&amp;nbsp;https://github.com/nnstreamer/nnstreamer-example/blob/main/native/example_object_detection_tensorflow_lite/nnstreamer_example_object_detection_tflite.py&amp;nbsp;" target="_self"&gt;nnstreamer-example&lt;/A&gt;&amp;nbsp;for the pipeline. Modified the pipeline according to the requirement.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;       self.pipeline = Gst.parse_launch(
            'filesrc location=/home/weston/nnstre/detect_example.mp4 ! decodebin ! '
            'videoconvert ! videoscale ! video/x-raw,width=640,height=480,format=RGBA ! tee name=t '  # tee to split for inference and display

            # ➤ Inference Branch
            't. ! queue max-size-buffers=20 leaky=downstream ! '
            'imxvideoconvert_g2d ! video/x-raw,format=RGBA,width=640,height=480 ! '
            'videoscale ! video/x-raw,width=300,height=300,format=RGBA ! '
            'videoconvert ! video/x-raw,format=RGB ! '
            'tensor_converter ! '
            'tensor_transform mode=arithmetic option=typecast:float32,add:-127.5,div:127.5 ! '
            'identity silent=false ! '
            'tensor_filter framework=tensorflow-lite model=' + self.tflite_model + ' '
                'custom=Delegate:External,ExtDelegateLib:libvx_delegate.so name=detection_filter ! '
            'tensor_decoder mode=bounding_boxes option1=mobilenet-ssd '
                'option2=' + self.tflite_label + ' '
                'option3=' + self.tflite_box_prior + ' '
                'option4=640:480 option5=300:300 ! '
            'imxvideoconvert_g2d ! mix. '

            # ➤ Display Branch
            't. ! queue max-size-buffers=20 leaky=downstream ! '
            'imxvideoconvert_g2d ! video/x-raw,format=RGBA,width=640,height=480 ! '
            'imxcompositor_g2d name=mix sink_0::zorder=2 sink_1::zorder=1 latency=40000000 min-upstream-latency=40000000 ! '
            'fpsdisplaysink name=img_tensor text-overlay=true video-sink=waylandsink sync=true'
        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;attaching the log file and output video.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;we are getting the fps of 25 but the output video is not sync as input video and feels like stuck or freeze.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 12:31:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2130148#M239085</guid>
      <dc:creator>ashwanipal01</dc:creator>
      <dc:date>2025-07-08T12:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: OpenCV vs GStreamer Pipeline for SSD-MobileNetV2 Inference on i.MX8MP (BSP 5.15.52) using VX Del</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2130470#M239095</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251378"&gt;@ashwanipal01&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you refer the pipieline setting here? Don't use video scale.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nxp-imx-support/nxp-demo-experience-demos-list/tree/lf-6.12.3_1.0.0/scripts/machine_learning/nnstreamer/detection" target="_blank"&gt;https://github.com/nxp-imx-support/nxp-demo-experience-demos-list/tree/lf-6.12.3_1.0.0/scripts/machine_learning/nnstreamer/detection&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;gst-launch-1.0 v4l2src name=cam_src device=/dev/video3 num-buffers=-1 ! \
  video/x-raw,width=640,height=480,framerate=30/1 ! tee name=t 
    t. ! queue name=thread-nn max-size-buffers=2 leaky=2 ! \
      imxvideoconvert_g2d ! video/x-raw,width=300,height=300,format=RGBA ! \
      videoconvert ! video/x-raw,format=RGB ! tensor_converter ! \
      tensor_filter latency=1 framework=tensorflow-lite \
      model=/opt/gopoint-apps/downloads/ssdlite_mobilenet_v2_coco_quant_uint8_float32_no_postprocess.tflite \
      custom=Delegate:External,ExtDelegateLib:libvx_delegate.so name=detection_filter ! \
      tensor_decoder mode=bounding_boxes option1=mobilenet-ssd \
      option2=/opt/gopoint-apps/downloads/coco_labels_list.txt \
      option3=/opt/gopoint-apps/downloads/box_priors.txt option4=640:480 option5=300:300 ! \
      imxvideoconvert_g2d ! mix. \
    t. ! queue name=thread-img max-size-buffers=2 leaky=2 ! \
      imxcompositor_g2d name=mix sink_0::zorder=2 sink_1::zorder=1 latency=20000000 min-upstream-latency=20000000 ! \
      cairooverlay name=perf ! \
      fpsdisplaysink name=img_tensor text-overlay=false video-sink=waylandsink sync=false&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 01:49:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenCV-vs-GStreamer-Pipeline-for-SSD-MobileNetV2-Inference-on-i/m-p/2130470#M239095</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2025-07-09T01:49:02Z</dc:date>
    </item>
  </channel>
</rss>

