# Classify objects using a default model

The *gst-ai-classification* sample application demonstrates the
capability of hardware to perform classification on a video stream.

The pipeline receives the video stream from the camera, file source,
or real-time streaming protocol (RTSP), performs preprocessing,
conducts inference on AI hardware, and displays the results on the
screen.

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1400.000000000000909" height="490.000000000000909" viewbox="0 0 1400.000000000000909 490.000000000000909" aria-label="../_images/gst_ai_classification_pipeline.svg" svgdefaultwidth="75%">
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <rect x=".500122070313409" y=".499856232982893" width="1398.99951171875" height="489" rx="7.499999999999943" ry="7.499999999999943" style="fill: #fafafa;"></rect>
      <path d="M1392.000000000000909.999978303295393c3.85980224609375,0,7,3.140182495117188,7,7v474c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.859832763670966,0-7-3.14019775390625-7-7V7.999978303295393C1,4.14016079841258,4.140167236329034.999978303295393,8,.999978303295393h1384.000000000000909M1392.000000000000909-.000021696704607H8C3.581634521485284-.000021696704607,0,3.581795930248518,0,7.999978303295393v474c0,4.4183349609375,3.581634521485284,8,8,8h1384.000000000000909c4.4183349609375,0,8-3.5816650390625,8-8V7.999978303295393C1400.000000000000909,3.581795930248518,1396.418334960938409-.000021696704607,1392.000000000000909-.000021696704607h0Z" style="fill: #d2d7e1;"></path>
    </g>
  </g>
  <g id="Layer_3" data-name="Layer 3">
    <rect x="1062.373825281522841" y="29.26785694161299" width="104.000028935295632" height="412.353012883119845" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <rect x="517.490621939447919" y="129.747363688965379" width="60.069291909066123" height="311.873510711002382" rx="4" ry="4" style="fill: #007884;"></rect>
    <rect x="72.746007806851594" y="263.846015689913656" width="86" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="158.74599328840759" y1="293.846017121654768" x2="171.389212282548215" y2="293.846017121654768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="170.22200647200134 297.835091828686018 177.130179079423215 293.846017121654768 170.22200647200134 289.856942414623518 170.22200647200134 297.835091828686018"></polygon>
    </g>
    <line x1="60.077045107748745" y1="293.846015689913656" x2="72.746007806851594" y2="293.846015689913656" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <rect x="177.199484296707851" y="263.846015689913656" width="95" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="272.19948449934509" y1="293.846017121654768" x2="284.84267297590759" y2="293.846017121654768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="283.675482424149777 297.835091828686018 290.583655031571652 293.846017121654768 283.675482424149777 289.856942414623518 283.675482424149777 297.835091828686018"></polygon>
    </g>
    <rect x="290.652960786562289" y="263.846015689913656" width="95" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="385.652960451493527" y1="293.846017121654768" x2="398.296154650101926" y2="293.846017121654768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="397.12896219099548 297.835091828686018 404.037138613114621 293.846017121654768 397.12896219099548 289.856942414623518 397.12896219099548 297.835091828686018"></polygon>
    </g>
    <rect x="404.106437276418546" y="263.846015689913656" width="95" height="60" rx="3.999999999999999" ry="3.999999999999999" style="fill: #007884;"></rect>
    <g>
      <line x1="499.106436403641965" y1="293.846017121654768" x2="511.749632509598996" y2="293.846017121654768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="510.582441957841183 297.835091828686018 517.490614565263058 293.846017121654768 510.582441957841183 289.856942414623518 510.582441957841183 297.835091828686018"></polygon>
    </g>
    <g>
      <line x1="577.559912355790402" y1="293.846017121654768" x2="590.203100832353812" y2="293.846017121654768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="589.03591028059509 297.835091828686018 595.944098146806027 293.846017121654768 589.03591028059509 289.856942414623518 589.03591028059509 297.835091828686018"></polygon>
    </g>
    <rect x="596.013390256129242" y="263.846015689913656" width="120.000000000007276" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="716.01338830793884" y1="293.846017121654768" x2="728.65657678450134" y2="293.846017121654768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="727.48940149153259 297.835091828686018 734.397574098954465 293.846017121654768 727.48940149153259 289.856942414623518 727.48940149153259 297.835091828686018"></polygon>
    </g>
    <rect x="734.466866745989137" y="263.846015689913656" width="110.000000000003638" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="844.46687951887634" y1="293.846017121654768" x2="857.11006799543884" y2="293.846017121654768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="855.942862184891965 297.835091828686018 862.85103479231384 293.846017121654768 855.942862184891965 289.856942414623518 855.942862184891965 297.835091828686018"></polygon>
    </g>
    <rect x="862.920343235845394" y="263.846015689913656" width="145.000000000003638" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="1007.92037072981384" y1="293.846017121654768" x2="1056.56355920637634" y2="293.846017121654768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="1055.39632287825134 297.835091828686018 1062.30452600325134 293.846017121654768 1055.39632287825134 289.856942414623518 1055.39632287825134 297.835091828686018"></polygon>
    </g>
    <text transform="translate(92.179138183594659 297.368142365795393)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">rtspsrc </tspan></text>
    <text transform="translate(198.736373901368097 290.537698029857893)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">rtph264 </tspan><tspan x="5.52685546875" y="16.7998046875">depay </tspan></text>
    <text transform="translate(305.084274291993097 297.937600373607893)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">h264parse</tspan></text>
    <text transform="translate(410.624810218811945 297.937417268139143)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">V4l2h264dec</tspan></text>
    <text transform="translate(537.856285095215753 289.775124787670393)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">tee</tspan></text>
    <text transform="translate(607.474807739258722 297.352822541576643)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimlvconverter</tspan></text>
    <text transform="translate(756.674591064454034 281.137490510326643)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimltflite/</tspan><tspan x="-2.73095703125" y="16.7998046875">qtimlsnpe/ </tspan><tspan x="3.55810546875" y="33.60009765625">qtimlqnn </tspan></text>
    <text transform="translate(879.194915771485284 297.937295197826643)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimlpostprocess </tspan></text>
    <text transform="translate(1071.621643066407159 239.535989045482893)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtivcomposer</tspan></text>
    <text transform="translate(1012.683715820313409 287.297524690014143)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">sink_1</tspan></text>
    <g>
      <line x1="577.559912355790402" y1="253.848305940014143" x2="1056.56355920637634" y2="253.848305940014143" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="1055.39632287825134 257.837380647045393 1062.30452600325134 253.848305940014143 1055.39632287825134 249.859261750561018 1055.39632287825134 257.837380647045393"></polygon>
    </g>
    <text transform="translate(1012.683898925782159 249.169167756420393)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">sink_0</tspan></text>
    <g>
      <line x1="577.559912355790402" y1="411.620870823096084" x2="590.203100832353812" y2="411.620870823096084" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="589.03591028059509 415.609945530127334 595.944098146806027 411.620870823096084 589.03591028059509 407.631796116064834 589.03591028059509 415.609945530127334"></polygon>
    </g>
    <rect x="596.013390256129242" y="381.620869391354972" width="120.000000000007276" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="716.01338830793884" y1="411.620870823096084" x2="728.65657678450134" y2="411.620870823096084" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="727.48940149153259 415.609945530127334 734.397574098954465 411.620870823096084 727.48940149153259 407.631796116064834 727.48940149153259 415.609945530127334"></polygon>
    </g>
    <rect x="734.466866745989137" y="381.620869391354972" width="110.000000000003638" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="844.46687951887634" y1="411.620870823096084" x2="857.11006799543884" y2="411.620870823096084" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="855.942862184891965 415.609945530127334 862.85103479231384 411.620870823096084 855.942862184891965 407.631796116064834 855.942862184891965 415.609945530127334"></polygon>
    </g>
    <rect x="862.920343235845394" y="381.620869391354972" width="145.000000000003638" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="1007.92037072981384" y1="411.620870823096084" x2="1056.56355920637634" y2="411.620870823096084" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="1055.39632287825134 415.609945530127334 1062.30452600325134 411.620870823096084 1055.39632287825134 407.631796116064834 1055.39632287825134 415.609945530127334"></polygon>
    </g>
    <text transform="translate(607.474807739258722 415.127663850170393)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimlvconverter</tspan></text>
    <text transform="translate(756.674591064454034 398.912392854076643)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimltflite/</tspan><tspan x="-2.73095703125" y="16.7998046875">qtimlsnpe/ </tspan><tspan x="3.55810546875" y="33.60009765625">qtimlqnn </tspan></text>
    <text transform="translate(879.194915771485284 415.712136506420393)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimlpostprocess </tspan></text>
    <text transform="translate(1012.683715820313409 405.072365998607893)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">sink_1</tspan></text>
    <g>
      <line x1="577.559912355790402" y1="371.623159641455459" x2="1056.56355920637634" y2="371.623159641455459" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="1055.39632287825134 375.612234348486709 1062.30452600325134 371.623159641455459 1055.39632287825134 367.634115452002334 1055.39632287825134 375.612234348486709"></polygon>
    </g>
    <text transform="translate(1012.683898925782159 366.944009065014143)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">sink_0</tspan></text>
    <path d="M45.680681572191133,43.896308287029569h-9l-4.5,5.400000000001455h-5.400000000001455c-1.988224983215332,0-3.599999999998545,1.611775016783213-3.599999999998545,3.599999999998545v16.200000000000728c0,1.988226699828374,1.611775016783213,3.600000000002183,3.599999999998545,3.600000000002183h28.80000000000291c1.988226699828374,0,3.599999999998545-1.611773300173809,3.599999999998545-3.600000000002183v-16.200000000000728c0-1.988224983215332-1.611773300170171-3.599999999998545-3.599999999998545-3.599999999998545h-5.400000000001455l-4.5-5.400000000001455Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    <circle cx="41.180681572191133" cy="58.296308287031025" r="5.400000000001455" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></circle>
    <path d="M47.930681572191133,153.57116198847234h-20.25c-2.485281229017346,0-4.5,2.014718770980835-4.5,4.5v36c0,2.485283374786377,2.014718770982654,4.5,4.5,4.5h27c2.485283374786377,0,4.5-2.014716625213623,4.5-4.5v-29.25l-11.25-11.25Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    <path d="M45.680681572191133,153.57116198847234v9c0,2.485281229019165,2.014718770980835,4.5,4.5,4.5h9" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    <path d="M36.680681572191133,173.82116198847234l11.25,6.75-11.25,6.75v-13.5Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    <path d="M37.58068157219077,290.196015689910382c.001393890381223-.745582866666155.606937980652219-1.348867893218994,1.352521705628533-1.347474002834133.248203468321663.000463485717773.491475105285645.069345188137959.703078651427859.199073982235859l6.595199203491575,4.048200130462646c.635238075255984.390344238281614.833762741087412,1.221743202209836.443418502807617,1.85698127746582-.110953330993652.180562019348145-.262856483459473.332465171813965-.443418502807617.443418502807617l-6.595199203491575,4.05000000000291c-.63563804626574.389691925047373-1.466832733154661.190314102170305-1.856524658203853-.445323944091797-.130368232727051-.212645530700684-.199274826049077-.457250976563955-.199075698852539-.706676673891707v-8.098199272157217Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    <path d="M32.180681572191133,314.046015689914384h18" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    <rect x="23.180681572191133" y="281.646015689912929" width="36" height="25.199999999998909" rx="2" ry="2" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></rect>
    <rect x="72.746007806851594" y="146.07116198847234" width="86" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="158.74599328840759" y1="176.071160554271955" x2="171.389212282548215" y2="176.071160554271955" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="170.22200647200134 180.060220002514143 177.130179079423215 176.071160554271955 170.22200647200134 172.082101106029768 170.22200647200134 180.060220002514143"></polygon>
    </g>
    <line x1="60.077045107748745" y1="176.07116198847234" x2="72.746007806851594" y2="176.07116198847234" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <rect x="177.199484296707851" y="146.07116198847234" width="95" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="272.19948449934509" y1="176.071160554271955" x2="284.84267297590759" y2="176.071160554271955" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="283.675482424149777 180.060220002514143 290.583655031571652 176.071160554271955 283.675482424149777 172.082101106029768 283.675482424149777 180.060220002514143"></polygon>
    </g>
    <rect x="290.652960786562289" y="146.07116198847234" width="95" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="385.652960451493527" y1="176.071160554271955" x2="398.296154650101926" y2="176.071160554271955" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="397.12896219099548 180.060220002514143 404.037138613114621 176.071160554271955 397.12896219099548 172.082101106029768 397.12896219099548 180.060220002514143"></polygon>
    </g>
    <rect x="404.106437276418546" y="146.07116198847234" width="95" height="60" rx="3.999999999999999" ry="3.999999999999999" style="fill: #007884;"></rect>
    <g>
      <line x1="499.106436403641965" y1="176.071160554271955" x2="511.749632509598996" y2="176.071160554271955" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="510.582441957841183 180.060220002514143 517.490614565263058 176.071160554271955 510.582441957841183 172.082101106029768 510.582441957841183 180.060220002514143"></polygon>
    </g>
    <g>
      <line x1="577.559912355790402" y1="176.071160554271955" x2="590.203100832353812" y2="176.071160554271955" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="589.03591028059509 180.060220002514143 595.944098146806027 176.071160554271955 589.03591028059509 172.082101106029768 589.03591028059509 180.060220002514143"></polygon>
    </g>
    <rect x="596.013390256129242" y="146.07116198847234" width="120.000000000007276" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="716.01338830793884" y1="176.071160554271955" x2="728.65657678450134" y2="176.071160554271955" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="727.48940149153259 180.060220002514143 734.397574098954465 176.071160554271955 727.48940149153259 172.082101106029768 727.48940149153259 180.060220002514143"></polygon>
    </g>
    <rect x="734.466866745989137" y="146.07116198847234" width="110.000000000003638" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="844.46687951887634" y1="176.071160554271955" x2="857.11006799543884" y2="176.071160554271955" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="855.942862184891965 180.060220002514143 862.85103479231384 176.071160554271955 855.942862184891965 172.082101106029768 855.942862184891965 180.060220002514143"></polygon>
    </g>
    <rect x="862.920343235845394" y="146.07116198847234" width="145.000000000003638" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="1007.92037072981384" y1="176.071160554271955" x2="1056.56355920637634" y2="176.071160554271955" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="1055.39632287825134 180.060220002514143 1062.30452600325134 176.071160554271955 1055.39632287825134 172.082101106029768 1055.39632287825134 180.060220002514143"></polygon>
    </g>
    <text transform="translate(96.567810058594659 179.593301057201643)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">filesrc</tspan></text>
    <text transform="translate(197.314498901368097 180.162881135326643)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtdemux</tspan></text>
    <text transform="translate(305.084274291993097 180.162759065014143)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">h264parse</tspan></text>
    <text transform="translate(410.624810218811945 180.162575959545393)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">V4l2h264dec</tspan></text>
    <text transform="translate(607.474807739258722 179.577981232982893)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimlvconverter</tspan></text>
    <text transform="translate(756.674591064454034 163.362313508373518)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimltflite/</tspan><tspan x="-2.73095703125" y="16.7998046875">qtimlsnpe/ </tspan><tspan x="3.55810546875" y="33.60009765625">qtimlqnn </tspan></text>
    <text transform="translate(879.194915771485284 180.162453889232893)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimlpostprocess </tspan></text>
    <text transform="translate(1012.683715820313409 169.522683381420393)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">sink_1</tspan></text>
    <g>
      <line x1="577.559912355790402" y1="136.069161652904768" x2="1056.56355920637634" y2="136.069161652904768" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="1055.39632287825134 140.058221101146955 1062.30452600325134 136.069161652904768 1055.39632287825134 132.08010220466258 1055.39632287825134 140.058221101146955"></polygon>
    </g>
    <text transform="translate(1012.683898925782159 131.548592805248518)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">sink_0</tspan></text>
    <rect x="72.746007806851594" y="28.296308287031025" width="86" height="60" rx="3.999999999999999" ry="3.999999999999999" style="fill: #2a2aea;"></rect>
    <line x1="60.077045107748745" y1="58.296308287031025" x2="72.746007806851594" y2="58.296308287031025" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <rect x="596.013390256129242" y="48.296308287031025" width="120.000000000007276" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="716.01338830793884" y1="78.296311616283674" x2="728.65657678450134" y2="78.296311616283674" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="727.48940149153259 82.285371064525862 734.397574098954465 78.296311616283674 727.48940149153259 74.307244538646955 727.48940149153259 82.285371064525862"></polygon>
    </g>
    <rect x="734.466866745989137" y="48.296308287031025" width="110.000000000003638" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="844.46687951887634" y1="78.296311616283674" x2="857.11006799543884" y2="78.296311616283674" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="855.942862184891965 82.285371064525862 862.85103479231384 78.296311616283674 855.942862184891965 74.307244538646955 855.942862184891965 82.285371064525862"></polygon>
    </g>
    <rect x="862.920343235845394" y="48.296308287031025" width="145.000000000003638" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <g>
      <line x1="1007.92037072981384" y1="78.296311616283674" x2="1056.56355920637634" y2="78.296311616283674" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="1055.39632287825134 82.285371064525862 1062.30452600325134 78.296311616283674 1055.39632287825134 74.307244538646955 1055.39632287825134 82.285371064525862"></polygon>
    </g>
    <text transform="translate(79.460876464844659 62.387765168529768)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtiqmmfsrc</tspan></text>
    <text transform="translate(607.474807739258722 82.387368440014143)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimlvconverter</tspan></text>
    <text transform="translate(756.674591064454034 65.587563752514143)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimltflite/</tspan><tspan x="-2.73095703125" y="16.7998046875">qtimlsnpe/ </tspan><tspan x="3.55810546875" y="33.60009765625">qtimlqnn </tspan></text>
    <text transform="translate(879.194915771485284 82.387368440014143)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtimlpostprocess </tspan></text>
    <text transform="translate(1012.683715820313409 74.719430207592268)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">sink_1</tspan></text>
    <g>
      <line x1="158.745971679688409" y1="38.296311616283674" x2="1056.563537597657159" y2="38.296311616283674" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="1055.396362304688409 42.285371064525862 1062.304504394532159 38.296311616283674 1055.396362304688409 34.307244538646955 1055.396362304688409 42.285371064525862"></polygon>
    </g>
    <text transform="translate(1012.683898925782159 33.769662141186018)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">sink_0</tspan></text>
    <g>
      <g>
        <text transform="translate(1185.492370605469659 469.710076569896955)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
        <rect x="1165.241390287798822" y="457.61857353724281" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
      </g>
      <g>
        <text transform="translate(1284.074188232422784 469.710076569896955)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Opensource</tspan></text>
        <rect x="1263.823171700651983" y="457.61857353724281" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
      </g>
    </g>
    <rect x="72.746007806851594" y="381.620869391354972" width="86" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="158.74599328840759" y1="411.620858430248518" x2="171.389212282548215" y2="411.620858430248518" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="170.22200647200134 415.609933137279768 177.130179079423215 411.620858430248518 170.22200647200134 407.631814240795393 170.22200647200134 415.609933137279768"></polygon>
    </g>
    <line x1="60.077045107748745" y1="411.620869391354972" x2="72.746007806851594" y2="411.620869391354972" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <rect x="177.199484296707851" y="381.620869391354972" width="105" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="282.19948449934509" y1="411.620858430248518" x2="511.749632509598996" y2="411.620858430248518" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="510.582441957841183 415.609933137279768 517.490614565263058 411.620858430248518 510.582441957841183 407.631814240795393 510.582441957841183 415.609933137279768"></polygon>
    </g>
    <text transform="translate(93.153259277344659 415.142983674389143)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">v4l2src</tspan></text>
    <text transform="translate(188.940170288086847 415.712380647045393)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">v4l2src_caps</tspan></text>
    <g>
      <circle cx="43.386850250825773" cy="412.170296839370167" r="16.010795201080324" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></circle>
      <circle cx="43.386850250825546" cy="412.170296839370621" r="6.004048200405009" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></circle>
      <path d="M33.380103250150569,436.186489640992477h20.013494001351319" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M43.386850250825773,436.186489640992477v-8.005397600541983" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    </g>
    <g>
      <g>
        <g>
          <line x1="1166.443176269532159" y1="92.247361420971174" x2="1179.086364746094659" y2="92.247361420971174" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="1177.919189453125909 96.236428498607893 1184.827331542969659 92.247361420971174 1177.919189453125909 88.258301972728987 1177.919189453125909 96.236428498607893"></polygon>
        </g>
        <g>
          <rect x="1319.098335482135553" y="75.838434085321751" width="40" height="28.000000000004547" rx="4" ry="4" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></rect>
          <line x1="1331.098335482124639" y1="111.838434085321751" x2="1347.098335482124639" y2="111.838434085321751" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></line>
          <line x1="1339.098335482135553" y1="103.838434085326298" x2="1339.098335482135553" y2="111.838434085321751" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></line>
          <line x1="1304.105218497315036" y1="92.247363417946872" x2="1319.105218497315036" y2="92.247363417946872" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <rect x="1184.896640447474965" y="54.747363417946872" width="120.000000000009095" height="75" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(1204.748779296875909 96.338796853405256)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">waylandsink </tspan></text>
        </g>
      </g>
      <g>
        <g>
          <line x1="1166.373840332032159" y1="235.444375275951643" x2="1179.017028808594659" y2="235.444375275951643" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="1177.849792480469659 239.433419465404768 1184.757995605469659 235.444375275951643 1177.849792480469659 231.455300568920393 1177.849792480469659 239.433419465404768"></polygon>
        </g>
        <g>
          <line x1="1304.105218497315036" y1="235.444363383173368" x2="1320.100172134475542" y2="235.444363383173368" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <rect x="1184.896640447474965" y="197.944363383173368" width="120.000000000009095" height="75" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(1220.908935546875909 239.535821198803205)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">filesink </tspan></text>
          <path d="M1345.848335482135553,212.944363383173368h-20.25c-2.485281229011889,0-4.5,2.014718770980835-4.5,4.5v36c0,2.485283374786377,2.014718770988111,4.5,4.5,4.5h27c2.485283374790015,0,4.5-2.014716625213623,4.5-4.5v-29.25l-11.25-11.25Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
          <path d="M1343.598335482135553,212.944363383173368v9c0,2.485281229019165,2.014718770979016,4.5,4.5,4.5h9" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
          <path d="M1334.598335482135553,233.194363383173368l11.25,6.75-11.25,6.75v-13.5Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
        </g>
      </g>
      <g>
        <g>
          <line x1="1166.373840332032159" y1="378.641366242748518" x2="1179.017028808594659" y2="378.641366242748518" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <polygon points="1177.849792480469659 382.630440949779768 1184.757995605469659 378.641366242748518 1177.849792480469659 374.652291535717268 1177.849792480469659 382.630440949779768"></polygon>
        </g>
        <g>
          <line x1="1304.105218497315036" y1="378.641363348399864" x2="1319.105218497315036" y2="378.641363348399864" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
          <rect x="1184.896640447474965" y="341.141363348399864" width="120.000000000009095" height="75" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(1215.252197265625909 382.732827424389143)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtirtspbin</tspan></text>
          <path d="M1335.098335482135553,371.732434015771105c.001548767089844-.82842540740603.674375534059436-1.49874210357666,1.502801895137964-1.497193336483178.275781631471546.000514984130859.546083450321021.077050209043591.781198501590552.221193313596814l7.327999114990234,4.498000144958496c.705820083619983.4337158203125.926403045650659,1.357492446899414.492687225339978,2.063312530517578-.123281478880017.200624465942383-.292062759399414.369405746459961-.492687225339978.492687225341797l-7.327999114990234,4.500000000001819c-.706264495849609.432991027832031-1.629814147949219.211460113523572-2.062805175779431-.494804382324219-.144853591920764-.236272811889648-.221416473390491-.508056640625-.221195220949085-.785196304323108v-8.997999191285999Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
          <path d="M1329.098335482135553,398.232434015774743h20" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
          <rect x="1319.098335482135553" y="362.232434015774743" width="40" height="27.999999999998181" rx="2" ry="2" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></rect>
        </g>
      </g>
    </g>
    <g>
      <line x1="158.746002197266534" y1="78.296311616283674" x2="590.203109741211847" y2="78.296311616283674" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="589.035919189454034 82.285371064525862 595.944091796876819 78.296311616283674 589.035919189454034 74.307244538646955 589.035919189454034 82.285371064525862"></polygon>
    </g>
  </g>
</svg>

The *gst-ai-classification* application is part of the Qualcomm
Intelligent Multimedia (QIM) SDK and can be
run directly after flashing the device. You need to push the model
and label files to the device to run the application.

## Download model and label files

Note

The following sections use placeholder model names for models downloaded through AI Hub.
Update the model name in the commands with the appropriate model name as downloaded
through AI Hub.

To download the model and label files directly on the device, follow the steps below.

1. [Enable Wi-Fi](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-254/how_to.html#connect-to-the-network)
and [SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-254/how_to.html#use-ssh).

> 
> 
> The device needs an internet connection to download the artifacts required to run sample applications.
> If you have already enabled SSH and connected to the internet with Wi-Fi, skip this step.
2. Sign in to the target device using SSH:

ssh root@<IP address of the target device>
        Copy to clipboard
3. On the target device, obtain the `download_artifacts.sh` script, set executable permissions, and run it with the required arguments to download the model and label files to the device.

curl -L -O https://raw.githubusercontent.com/quic/sample-apps-for-qualcomm-linux/refs/heads/main/qualcomm-linux/scripts/download_artifacts.sh
        Copy to clipboard

chmod +x download_artifacts.sh
        Copy to clipboard

./download_artifacts.sh
        Copy to clipboard
4. The YOLOv8 model isn’t available by default (Optional).

    Download them using the provided script or export them with AI Hub APIs.
If you are using the `gst-ai-multistream-batch-inference` application,
generate a batch model.

Tab Download them with a script
Tab Export them with AI Hub APIs
Tab Generate a batch model

1. Create a [Qualcomm AI Hub account](https://app.aihub.qualcomm.com/account/).
    2. Select the account name &gt; go to **Settings** in the upper right corner &gt; select the API key.
    3. Run the following commands on the Linux host:

curl -L -O https://raw.githubusercontent.com/quic/sample-apps-for-qualcomm-linux/refs/heads/main/scripts/export_model.sh
            Copy to clipboard

chmod +x export_model.sh
            Copy to clipboard

        Replace `<API_KEY>` with the selected key:

./export_model.sh --api-key=<API_KEY>
            Copy to clipboard

        After executing the script, the models will be downloaded to the build directory.
    4. Copy the models to the device in the `/etc/models/` directory.

scp <working-directory>/build/yolov8_det_w8a8/yolov8_det_w8a8.tflite root@<IP address of target device>:/etc/models/
            Copy to clipboard

- [YOLOv8-Detection-Quantized](https://github.com/quic/ai-hub-models/tree/main/qai_hub_models/models/yolov8_det)

The current release (GA 1.6) uses Qualcomm AI Runtime SDK v2.38.

For example, to export the YoloV8 QNN model, run the following command:

> 
> 
> python -m qai_hub_models.models.yolov8_det.export --quantize w8a8 --target-runtime=qnn_context_binary --chipset="qualcomm-qcs6490-proxy" --compile-options="--qairt_version 2.38" --profile-options "--qairt_version 2.38"
>         Copy to clipboard

For example, to export the YoloV8 LiteRT model, run the following command:

> 
> 
> python -m qai_hub_models.models.yolov8_det.export --quantize w8a8 --target-runtime=tflite --chipset="qualcomm-qcs6490-proxy"
>         Copy to clipboard

To change the batch size of the model, update `<N>` in the following export command:

python -m qai_hub_models.models.<Model_Name>.export --quantize w8a8 --batch-size <N> --device "QCS6490 (Proxy)"
        Copy to clipboard
5. If a model isn’t available after downloading with the script, download it from
[IoT-Qualcomm AI Hub](https://aihub.qualcomm.com/iot/models/) and copy it to the target device by running the following command on the host computer:

scp <model filename> root@<IP addr of the target device>:/etc/models
        Copy to clipboard

    For example:

scp inception_v3_quantized.tflite root@<IP addr of the target device>:/etc/models
        Copy to clipboard

Note

If you want to run sample applications from the UART shell, remount the file system
with read/write permission using the following command on the target device:

mount -o remount,rw /usr
        Copy to clipboard

## Run the sample application

Important

The rest of this document assumes the following convention for default file locations:

- `/etc/models/` for all model files
- `/etc/labels/` for all label files
- `/etc/media/` for all video files
- `/etc/configs/` for all configuration files

To run the reference application, run the following commands.

1. The `download_artifacts.sh` script downloads the sample `video.mp4` file to the `/etc/media` directory.
If you wish to use your own video file, push the video file to the `/etc/media` directory using the command
below and update the path in the configuration file.

scp <video file> root@<IP address of target device>:/etc/media/
        Copy to clipboard

    Models for the LiteRT and Qualcomm AI Engine Direct runtimes are available from
[AI Hub](https://aihub.qualcomm.com/iot/models/inception_v3).

scp inception_v3_quantized.tflite root@<IP address of target device>:/etc/models/
        Copy to clipboard

scp inception_v3_quantized.bin root@<IP address of target device>:/etc/models/
        scp inception_v3_quantized.dlc root@<IP address of target device>:/etc/models/
        Copy to clipboard

Note

If necessary, rename the model file to match the name in the .json configuration file.
2. The sample application uses a JSON file to read input parameters. The
following shows the format of the `/etc/configs/config_classification.json`
file.

{
        "file-path": "<input video path>",
        "ml-framework": "<snpe or LiteRT or qnn framework>",
        "model": "<model path>",
        "labels": "<label path>",
        "threshold": <postprocesssing threshold, integer value from 1 to 100>,
        "runtime": "<dsp, gpu, cpu runtime>"
        }
        Copy to clipboard

    **JSON configuration field descriptions**

    The following table lists the configuration parameters available in the JSON file.

    | Field | Description |
    | --- | --- |
    | ml-framework | Use one of the following models:<br><ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">snpe</span></code>: Qualcomm Neural Processing SDK</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">tflite</span></code>: LiteRT</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">qnn</span></code>: Qualcomm AI Engine direct</p></li><br></ul> |
    | runtime | Use one of the following runtimes:<br><ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">cpu</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">gpu</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">dsp</span></code></p></li><br></ul> |
    | output-ip-address | Output server IP address |
    | port | Output server port |
    | USB camera video-format and resolution | Use one of the following video-formats:<br><ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">nv12</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">yuy2</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">mjpeg</span></code></p></li><br></ul><br><br>Use the following resolution parameters:<br><ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">width</span></code>: Input USB camera source resolution width</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">height</span></code>: Input USB camera source resolution width</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">framerate</span></code>: Input USB camera source framerate</p></li><br></ul> |
    | output-file | Name of the output file. The default output file is `output_classification.mp4` |
    | output-type | Use one of the following output-type:<br><ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">waylandsink</span></code>:  To display output on wayland</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">filesink</span></code>: To store output in file</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">rtspsink</span></code>: To stream output on Server</p></li><br></ul> |
    | Input source | Use one of the following input sources:<br><ul><br><li><p><code class="docutils literal notranslate"><span class="pre">camera</span></code>: Primary (0) or secondary (1).</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">file-path</span></code>: The directory path to the video file.</p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">rtsp-ip-port</span></code>: The address of the RTSP stream:</p><br><div class="highlight-default notranslate"><div class="highlight"><pre class="pre codeblock"><code>rtsp://&lt;ip&gt;:&lt;port&gt;/&lt;stream&gt;<br></code><span class="copyclip"><svg xmlns="http://www.w3.org/2000/svg" class="copyclipicon" width="25px" height="25px" viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><title>Copy to clipboard</title><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span></pre></div><br></div><br></li><br></ul> |
3. Enable the Weston service for the display by running the following command:

export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1
        Copy to clipboard
4. Once the JSON file has been populated, run the sample app using the
following command.

gst-ai-classification --config-file=/etc/configs/config_classification.json
        Copy to clipboard

For more information about the fields in the configuration file or how to run the application use the help (`-h`) command.

gst-ai-classification -h
    Copy to clipboard

For example, the following configuration file executes the LiteRT
model on video input using the DSP runtime.

{
    "file-path": "/etc/media/video.mp4",
    "ml-framework": "tflite",
    "model": "/etc/models/inception_v3_quantized.tflite",
    "labels": "/etc/labels/classification.json",
    "threshold": 40,
    "runtime": "dsp"
    }
    Copy to clipboard

## Notes

- To stop the use case, press <kbd class="kbd compound docutils literal notranslate"><kbd class="kbd docutils literal notranslate">CTRL</kbd>+<kbd class="kbd docutils literal notranslate">C</kbd></kbd>.
- To display the available help options, run the following command:

gst-ai-classification -h
        Copy to clipboard
- The GStreamer debug output is controlled by the GST\_DEBUG environment
variable. Set the required level to enable logging. For example, to
log all warnings, run the following command.

export GST_DEBUG=2
        Copy to clipboard

    For more troubleshooting options, see
[Troubleshooting and FAQ](https://docs.qualcomm.com/doc/80-70022-15B/topic/troubleshooting.html).

Last Published: Nov 28, 2025

[Previous Topic
Run Qualcomm IMSDK sample application using EVK](https://docs.qualcomm.com/bundle/publicresource/80-70022-15B/topics/sample-app-evk.md) [Next Topic
Use a custom model with the sample app](https://docs.qualcomm.com/bundle/publicresource/80-70022-15B/topics/customize-reference-app.md)