
You can refer to the Building AI Pipelines for more general information about each element of an AI pipeline
Run example on device
Download Required Files
| File | Download | Save as |
|---|---|---|
| ResNeXt101 W8A8 model | Qualcomm AI Hub — ResNeXt101 | resnet101-w8a8.tflite |
| Classification labels | imagenet.txt | imagenet.txt |
| Sample video | Input video | ai_demo_sample.mp4 |
If any downloaded file is a
.zip archive, extract it on your host machine before copying:
unzip filename.zipCopy files to device
Create the required directories and transfer the downloaded files to your device.
Expected output
The result of the video classification is visually overlaid in the top-left corner of the frame.
Stream Splitting via tee
One of the powerful features of GStreamer is the ability to split a video or audio stream into multiple branches, allowing the same stream to be processed or consumed in different ways simultaneously. In this example, we are using thetee element to split the original video stream. One branch runs through the AI processing pipeline to generate classifications, and at the end it is recombined with the original video stream so that the detected label can be displayed on top of the original image. Note that each branch connected to a tee runs on its own thread, so you often need queue elements after each branch to avoid blocking.
