# Object detection and display with Neural Processing SDK

Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd.html](https://docs.qualcomm.com/doc/80-70022-50/topic/single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd.html)

The use cases implement a yolox.dlc object detection model with
        Qualcomm Neural Processing SDK to identify an object from a camera stream. The use case is
        to overlay or compose the bounding boxes over the detected objects, and the display the
        results.

Download [YOLOX](https://aihub.qualcomm.com/iot/models/yolox?searchTerm=yolox%29) Qualcomm AI runtime w8a8 precision model
            from AI hub. The YOLOX model uses the YOLOv8 postprocessing module.

## Use qtivoverlay plugin to apply bounding box overlay

Run the use case on the target
                device:

    gst-launch-1.0 -e \
    qtiqmmfsrc name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! tee name=split \
    split. ! queue ! qtimetamux name=metamux ! queue ! qtivoverlay ! queue ! waylandsink fullscreen=true sync=false \
    split. ! queue ! qtimlvconverter ! queue ! qtimlsnpe delegate=dsp model=/etc/models/yolox-yolo-x-w8a8.dlc layers="</Mul_5, /Concat_15, /Cast_1>" ! queue ! \
    qtimlpostprocess settings="{\"confidence\": 70.0}" results=5 module=yolov8 labels=/etc/labels/yolox.json ! text/x-raw ! queue ! metamux.Copy to clipboard

To stop the use case, use CTRL + C.

The following figure shows the flow of the use case execution:

- Identify an object in a scene from a video stream coming through camera
                    source.
- Overlay the bounding boxes over the detected objects using overlaylib.
- Display the results on a local display.

Figure : Pipeline for bounding box overlay
                
                <!--?xml version="1.0" encoding="UTF-8"?-->
<svg xmlns="http://www.w3.org/2000/svg" width="940" height="349.974597930908203" viewbox="0 0 940 349.974597930908203">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".5" y=".499774932861328" width="939" height="348.974609375" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M932,1c3.859741210939319,0,7,3.140233993530273,7,7v333.974597930908203c0,3.8597412109375-3.140258789060681,7-7,7H8c-3.859771728515625,0-7-3.1402587890625-7-7V8c0-3.859766006469727,3.140228271484375-7,7-7h924M932,0H8C3.581771850585938,0,0,3.581764221191406,0,8v333.974597930908203c0,4.418212890625,3.581771850585938,8,8,8h924c4.418334960939319,0,8-3.581787109375,8-8V8c0-4.418235778808594-3.581665039060681-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <g>
      <g>
        <text transform="translate(740.49212646484375 326.066074371337891)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
        <rect x="720.24113211824988" y="313.974597930908203" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
      </g>
      <g>
        <text transform="translate(839.07391357421875 326.066074371337891)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
        <rect x="818.82291353110304" y="313.974597930908203" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
      </g>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <g>
        <g>
          <rect x="20" y="20.000005443602277" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(73.429725646972656 48.506705760955811)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">camsrc</tspan></text>
        </g>
        <g>
          <line x1="180" y1="45.000003814697266" x2="199.976654052734375" y2="45.000003814697266" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="198.955352783203125 48.490436553955078 205 45.000003814697266 198.955352783203125 41.509574890136719 198.955352783203125 48.490436553955078"></polygon>
        </g>
        <g>
          <line x1="285" y1="68.974582672119141" x2="285" y2="88.951221466064453" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="281.50958251953125 87.929927825927734 285 93.974582672119141 288.49041748046875 87.929927825927734 281.50958251953125 87.929927825927734"></polygon>
        </g>
        <g>
          <rect x="205" y="20.000005443602277" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(273.910198211669922 48.506705760955811)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">tee</tspan></text>
        </g>
        <g>
          <rect x="205" y="93.974581043215949" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(229.527484893798828 123.650539398193359)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtimlvconverter</tspan></text>
        </g>
        <g>
          <line x1="285" y1="143.974582672119141" x2="285" y2="163.951221466064453" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="281.50958251953125 162.929920196533203 285 168.974582672119141 288.49041748046875 162.929920196533203 281.50958251953125 162.929920196533203"></polygon>
        </g>
        <g>
          <rect x="205" y="168.974581043215949" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(249.679828643798828 198.650547027587891)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtimlsnpe</tspan></text>
        </g>
        <g>
          <line x1="285" y1="218.974582672119141" x2="285" y2="238.951221466064453" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="281.50958251953125 237.929920196533203 285 243.974567413330078 288.49041748046875 237.929920196533203 281.50958251953125 237.929920196533203"></polygon>
        </g>
        <g>
          <rect x="205" y="243.974581043215949" width="160" height="49.999999999998181" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(222.722797393798828 273.650547027587891)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtimlpostprocess</tspan></text>
        </g>
        <g>
          <line x1="365" y1="45.000003814697266" x2="384.97662353515625" y2="45.000003814697266" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="383.955322265625 48.490436553955078 390 45.000003814697266 383.955322265625 41.509574890136719 383.955322265625 48.490436553955078"></polygon>
        </g>
        <g>
          <rect x="390" y="20.000005443602277" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(427.296905517578125 48.506705760955811)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtimetamux</tspan></text>
        </g>
        <g>
          <line x1="550" y1="45.000003814697266" x2="569.97662353515625" y2="45.000003814697266" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="568.955322265625 48.490436553955078 575 45.000003814697266 568.955322265625 41.509574890136719 568.955322265625 48.490436553955078"></polygon>
        </g>
        <g>
          <rect x="575" y="20.000005443602277" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(620.437530517578125 48.506705760955811)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtioverlay</tspan></text>
        </g>
        <g>
          <line x1="735" y1="45.000003814697266" x2="754.97662353515625" y2="45.000003814697266" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="753.955322265625 48.490436553955078 760 45.000003814697266 753.955322265625 41.509574890136719 753.955322265625 48.490436553955078"></polygon>
        </g>
        <g>
          <rect x="760" y="20.000005443602277" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(796.09771728515625 48.506705760955811)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
        </g>
      </g>
      <g>
        <polyline points="365 271.338306427001953 470 271.338306427001953 470 74.922946929931641" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
        <polygon points="473.49041748046875 75.944240570068359 470 69.899585723876953 466.50958251953125 75.944240570068359 473.49041748046875 75.944240570068359"></polygon>
      </g>
    </g>
  </g>
</svg>

The following table provides the sequential processing stages of the pipeline
                execution:

| Process | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70022-50/topic/qtiqmmfsrc.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_l2f_zgm_vbc"><br>                                    <li class="li">Collects the video stream (source) and creates two copies of<br>                                        the source:<ul class="ul" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_m2f_zgm_vbc"><br>                                            <li class="li">One stream is sent to qtimetamux plugin to retain<br>                                                the video stream.</li><br><br>                                            <li class="li">The other stream is sent to an ML inferencing<br>                                                pipeline.</li><br><br>                                        </ul><br></li><br><br>                                </ol> |
| **Preprocessing** | **Preprocessing** |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlvconverter.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_xsf_q5l_vbc"><br>                                    <li class="li">Receives the video stream on its sink pad.</li><br><br>                                    <li class="li">Performs preprocessing:<ul class="ul" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ul_ff2_twl_vbc"><br>                                            <li class="li">Color conversion</li><br><br>                                            <li class="li">Scaling down/up</li><br><br>                                            <li class="li">Normalization on the stream data when the model<br>                                                expects the floating point values as input</li><br><br>                                        </ul><br></li><br><br>                                    <li class="li">Converts the video stream to a tensor stream on its source<br>                                            pad.<p class="p">The object detection model uses this tensor<br>                                            stream for inferencing.</p><br></li><br><br>                                </ol> |
| **Inferencing** | **Inferencing** |
| [qtimlsnpe](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlsnpe.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_ufn_2lm_vbc"><br>                                    <li class="li">Loads the object detection model.</li><br><br>                                    <li class="li">Modifies the graph for the chosen delegate.</li><br><br>                                    <li class="li">Receives the tensor stream on its sinkpad.</li><br><br>                                    <li class="li">Runs the inference and produces a tensor stream with the<br>                                        object detection results on its source pad.</li><br><br>                                </ol> |
| **Postprocessing** | **Postprocessing** |
| qtimlpostprocess | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_amf_5dv_vbc"><br>                                    <li class="li"> Receives the inference tensors from the object detection<br>                                        model.</li><br><br>                                    <li class="li">Converts the inference tensors on its sinkpad into formats<br>                                        like video or text that the multimedia plugins can process<br>                                        later.</li><br><br>                                    <li class="li">Applies the threshold to the chosen number of results.</li><br><br>                                    <li class="li">Loads the corresponding modules for detection models. <p class="p">In<br>                                            this use case, qtimlpostprocess does the<br>                                            following:</p><ol class="ol" type="a" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_jcd_wnk_5bc"><br>                                            <li class="li">Loads YOLOv8 submodule.</li><br><br>                                            <li class="li">Produces results as structures of text.</li><br><br>                                            <li class="li">Sends them to the sinkpad of qtimetamux.</li><br><br>                                        </ol><br></li><br><br>                                </ol> |
| [qtimetamux](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimetamux.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_ll3_x5l_vbc"><br>                                    <li class="li">Receives video stream and text stream with bounding box<br>                                        results corresponding to the video stream on its<br>                                        sinkpads.</li><br><br>                                    <li class="li">Produces GST buffers with contents of the video stream from<br>                                        its sink pad.</li><br><br>                                    <li class="li">Adds the bounding boxes as<br>                                            <code class="ph codeph">GstVideoRegionOfInterest</code> from data<br>                                        sinkpad to GST buffers meta (meta muxing) on its source<br>                                        pad.</li><br><br>                                </ol> |
| [qtivoverlay](https://docs.qualcomm.com/doc/80-70022-50/topic/qtioverlay.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_wst_y5l_vbc"><br>                                    <li class="li">Receives the multiplexed stream.</li><br><br>                                    <li class="li">Overlays the bounding boxes on the VideoFrame using CL. </li><br><br>                                    <li class="li">Produces GST buffers with overlays in its source pad.</li><br><br>                                </ol> |
| **Output** | **Output** |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70022-50/topic/waylandsink.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_dyv_1lm_vbc"><br>                                    <li class="li">Receives the video stream on its sinkpad.</li><br><br>                                    <li class="li">Submits the video stream to Weston.</li><br><br>                                    <li class="li">Weston renders the video stream and bounding boxes generated<br>                                        for the objects in that scene on a local display<br>                                        device.</li><br><br>                                </ol> |

## Use qtivcomposer to mix original frame with bounding box mask

Run the use case on the target
                device:

    gst-launch-1.0 -e --gst-debug=2 \
    qtiqmmfsrc name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! tee name=split \
    split. ! queue ! qtivcomposer name=mixer sink_1::dimensions="<1920,1080>" ! queue ! waylandsink fullscreen=true sync=false \
    split. ! queue ! qtimlvconverter ! queue ! qtimlsnpe delegate=dsp model=/etc/models/yolox-yolo-x-w8a8.dlc layers="</Mul_5, /Concat_15, /Cast_1>" ! queue ! \
    qtimlpostprocess settings="{\"confidence\": 70.0}" results=5 module=yolov8 labels=/etc/labels/yolox.json ! video/x-raw,width=640,height=360 ! queue ! mixer.Copy to clipboard

To stop the use case, use CTRL + C.

The following figure shows the flow of the use case execution:

1. Identifies object scenes in the scene from a video stream, which is coming
                    through a camera source.
2. Composes the following using qtivcomposer:
    1. Bounding boxes over objects detected.
    2. Original video stream.
3. Display the results.

Figure : Pipeline for bounding box mask with qtivcomposer
                
                <!--?xml version="1.0" encoding="UTF-8"?-->
<svg xmlns="http://www.w3.org/2000/svg" width="755" height="349.974590301513672" viewbox="0 0 755 349.974590301513672">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".5" y=".499797821044922" width="754" height="348.974609375" rx="7.499999999999944" ry="7.499999999999944" style="fill: #fafafa;"></rect>
      <path d="M747,1c3.85980224609375,0,7,3.140201568603516,7,7v333.974590301513672c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.85980224609375,0-7-3.14019775390625-7-7V8c0-3.859798431396484,3.14019775390625-7,7-7h739M747,0H8C3.581695556640625,0,0,3.581701278686523,0,8v333.974590301513672c0,4.418304443359375,3.581695556640625,8,8,8h739c4.41827392578125,0,8-3.581695556640625,8-8V8c0-4.418298721313477-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <g>
      <g>
        <text transform="translate(564.35125732421875 326.066082000732422)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
        <rect x="544.100277402054417" y="313.974590301513672" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
      </g>
      <g>
        <text transform="translate(662.933074951171875 326.066082000732422)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
        <rect x="642.682058814907577" y="313.974590301513672" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
      </g>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <g>
        <rect x="20" y="20.000014873722648" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(73.429729461669922 48.506718635559082)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">camsrc</tspan></text>
      </g>
      <g>
        <line x1="180" y1="45.000011444091797" x2="199.976654052734375" y2="45.000011444091797" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="198.955352783203125 48.490444183349609 205 45.000011444091797 198.955352783203125 41.50958251953125 198.955352783203125 48.490444183349609"></polygon>
      </g>
      <g>
        <line x1="285" y1="68.974590301513672" x2="285" y2="88.951229095458984" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="281.50958251953125 87.929935455322266 285 93.974590301513672 288.49041748046875 87.929935455322266 281.50958251953125 87.929935455322266"></polygon>
      </g>
      <g>
        <rect x="205" y="20.000014873722648" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(273.910202026367188 48.506718635559082)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">tee</tspan></text>
      </g>
      <g>
        <rect x="205" y="93.97459047333632" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
        <text transform="translate(229.527496337890625 123.650547027587891)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtimlvconverter</tspan></text>
      </g>
      <g>
        <line x1="285" y1="143.974590301513672" x2="285" y2="163.951229095458984" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="281.50958251953125 162.929943084716797 285 168.974590301513672 288.49041748046875 162.929943084716797 281.50958251953125 162.929943084716797"></polygon>
      </g>
      <g>
        <rect x="205" y="168.97459047333632" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
        <text transform="translate(249.679840087890625 198.650554656982422)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtimlsnpe</tspan></text>
      </g>
      <g>
        <line x1="285" y1="218.974590301513672" x2="285" y2="238.951244354248047" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="281.50958251953125 237.929943084716797 285 243.974590301513672 288.49041748046875 237.929943084716797 281.50958251953125 237.929943084716797"></polygon>
      </g>
      <g>
        <rect x="205" y="243.97459047333632" width="160" height="49.999999999999091" rx="4" ry="4" style="fill: #2a2aea;"></rect>
        <text transform="translate(222.722808837890625 273.650554656982422)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtimlpostprocess</tspan></text>
      </g>
      <g>
        <line x1="365" y1="45.000011444091797" x2="384.97662353515625" y2="45.000011444091797" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="383.955322265625 48.490444183349609 390 45.000011444091797 383.955322265625 41.50958251953125 383.955322265625 48.490444183349609"></polygon>
      </g>
      <g>
        <rect x="390" y="20.000014873722648" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
        <text transform="translate(421.140655517578125 48.506718635559082)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtivcomposer</tspan></text>
      </g>
      <g>
        <line x1="550" y1="45.000011444091797" x2="569.97662353515625" y2="45.000011444091797" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="568.955322265625 48.490444183349609 575 45.000011444091797 568.955322265625 41.50958251953125 568.955322265625 48.490444183349609"></polygon>
      </g>
      <g>
        <rect x="575" y="20.000014873722648" width="160" height="50" rx="4.000000000000019" ry="4.000000000000019" style="fill: #007884;"></rect>
        <text transform="translate(611.09771728515625 48.506718635559082)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
      </g>
    </g>
    <g>
      <polyline points="365 268.974590301513672 470 268.974590301513672 470 75.847972869873047" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
      <polygon points="473.49041748046875 76.869258880615234 470 70.824611663818359 466.50958251953125 76.869258880615234 473.49041748046875 76.869258880615234"></polygon>
    </g>
  </g>
</svg>

The following table provides the sequential processing stages of the pipeline
                execution:

| Process | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70022-50/topic/qtiqmmfsrc.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_z2v_xlm_vbc"><br>                                    <li class="li">Collects the video stream (source) and creates two copies of<br>                                        the source:<ol class="ol" type="a" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_afv_xlm_vbc"><br>                                            <li class="li">One stream is sent to qtivcomposer plugin to retain<br>                                                the video stream.</li><br><br>                                            <li class="li">The other stream is sent to an ML inferencing<br>                                                pipeline.</li><br><br>                                        </ol><br></li><br><br>                                </ol> |
| **Preprocessing** | **Preprocessing** |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlvconverter.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_bfv_xlm_vbc"><br>                                    <li class="li">Receives the video stream on its sink pad.</li><br><br>                                    <li class="li">Performs preprocessing:<ul class="ul" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ul_cfv_xlm_vbc"><br>                                            <li class="li">Color conversion.</li><br><br>                                            <li class="li">Scaling down/up.</li><br><br>                                            <li class="li">Normalization on the stream data when the model<br>                                                expects the floating point values as input.</li><br><br>                                        </ul><br></li><br><br>                                    <li class="li">Converts the video stream to a tensor stream on its source<br>                                            pad.<p class="p">The object detection model uses this tensor<br>                                            stream for inferencing.</p><br></li><br><br>                                </ol> |
| **Inferencing** | **Inferencing** |
| [qtimlsnpe](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlsnpe.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_dfv_xlm_vbc"><br>                                    <li class="li">Loads the object detection model.</li><br><br>                                    <li class="li">Modifies the graph for the chosen delegate.</li><br><br>                                    <li class="li">Receives the tensor stream on its sinkpad.</li><br><br>                                    <li class="li">Runs the inference and produces a tensor stream with the<br>                                        object detection results on its source pad.</li><br><br>                                </ol> |
| **Postprocessing** | **Postprocessing** |
| qtimlpostprocess | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_efv_xlm_vbc"><br>                                    <li class="li"> Receives the inference tensors from the objection detection<br>                                        model. </li><br><br>                                    <li class="li">Converts the inference tensors on its sinkpad into formats<br>                                        like video or text that the multimedia plugins can process<br>                                        later.</li><br><br>                                    <li class="li">Applies the threshold to the chosen number of results. </li><br><br>                                    <li class="li">Loads the corresponding modules for detection models. <p class="p">In<br>                                            this use case, qtimlpostprocess does the following:<br>                                            </p><ol class="ol" type="a" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_ffv_xlm_vbc"><br>                                            <li class="li">Loads the YOLOv8 submodule. </li><br><br>                                            <li class="li">Produces video frames with only bounding boxes that<br>                                                can be overlaid on objects.</li><br><br>                                            <li class="li">Sends them to the sinkpad of qtivcomposer.</li><br><br>                                        </ol><br></li><br><br>                                </ol> |
| [qtivcomposer](https://docs.qualcomm.com/doc/80-70022-50/topic/qtivcomposer.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_uf1_k2v_vbc"><br>                                    <li class="li">Receives the original video stream and video stream with<br>                                        bounding boxes on its sinkpads.</li><br><br>                                    <li class="li">On its sourcepads, produces content that's composed of the<br>                                        video streams processed from its sinkpads.</li><br><br>                                </ol> |
| **Output** | **Output** |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70022-50/topic/waylandsink.html) | <ol class="ol" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_ifv_xlm_vbc"><br>                                    <li class="li">Receives the video stream on its sinkpad.</li><br><br>                                    <li class="li">Submits the video stream to Weston. </li><br><br>                                    <li class="li">Weston displays the following on a local display device:<ol class="ol" type="a" id="single-camera-stream-with-object-detection-and-display-with-mobilenet-v2-ssd__ol_nv1_xzm_vbc"><br>                                            <li class="li">The video stream is captured from the camera.</li><br><br>                                            <li class="li">The bounding boxes are drawn over the allowed number<br>                                                of objects identified in that scene.</li><br><br>                                        </ol><br></li><br><br>                                </ol> |

## Known issue

The current model in AI hub isn't giving the expected output. The issue will be fixed
                in a future release.

**Parent Topic:** [Qualcomm Neural Processing SDK use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/qualcomm-neural-processing-sdk-use-cases.html)

Last Published: Feb 20, 2026

[Previous Topic
Image classification and encode with Neural Processing SDK](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/single-camera-stream-with-image-classification-and-encode-with-mobilenet-v1.md) [Next Topic
Object detection and encode with Neural Processing SDK](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/single-camera-stream-with-object-detection-and-encode-with-mobilenet-v2-ssd.md)