Skip to main content

No.Model NameDescription
1Depth-AnythingFoundation model for monocular depth estimation on diverse scenes.
1

Download Required Files

FileSave as
Modeldepth_anything_float.tflite
monodepth.jsonmonodepth.json
Input videoai_demo_sample.mp4
If any downloaded file is a .zip archive, extract it on your host machine before copying: unzip filename.zip
2

Copy Files to Device

# Replace $HOME to the appropriate device path before running the commands.
# For QLI:    /root
# For Ubuntu: /home/ubuntu
# Modify this based on your platform and ensure files are copied to the correct location on the device.

ssh <user>@<device-ip> "mkdir -p $HOME/{models,labels,media,media/output}"
scp depth_anything_float.tflite  <user>@<device-ip>:$HOME/models/
scp monodepth.json               <user>@<device-ip>:$HOME/labels/
scp ai_demo_sample.mp4    <user>@<device-ip>:$HOME/media/
3

Connect to device

# Run from your host machine — replace <user> and <device-ip>
ssh <user>@<device-ip>
4

Set Environment Variables

Qualcomm Linux
export MODEL_NAME=depth_anything_float.tflite
export LABELS_NAME=monodepth.json
export SRC_VIDEO_NAME=ai_demo_sample.mp4
5

Run the Pipeline

gst-launch-1.0 -v --gst-debug=2 \
filesrc location=$HOME/media/$SRC_VIDEO_NAME ! qtdemux ! queue ! h264parse ! \
v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! tee name=split \
split. ! queue ! qtivcomposer name=mixer sink_1::alpha=0.5 ! video/x-raw,format=NV12 ! queue ! waylandsink sync=false fullscreen=true \
split. ! queue ! videoscale ! videoconvert ! qtimlvconverter ! queue ! \
qtimltflite delegate=gpu model=$HOME/models/depth_anything_float.tflite ! queue ! \
qtimlpostprocess module=midas-v2 labels=$HOME/labels/monodepth.json ! video/x-raw,width=320,height=180 ! queue ! mixer.
2Depth-Anything-V2Improved foundation depth model with finer detail and accuracy.
1

Download Required Files

FileSave as
Modeldepth_anything_v2_float.tflite
monodepth.jsonmonodepth.json
Input videoai_demo_sample.mp4
If any downloaded file is a .zip archive, extract it on your host machine before copying: unzip filename.zip
2

Copy Files to Device

# Replace $HOME to the appropriate device path before running the commands.
# For QLI:    /root
# For Ubuntu: /home/ubuntu
# Modify this based on your platform and ensure files are copied to the correct location on the device.

ssh <user>@<device-ip> "mkdir -p $HOME/{models,labels,media,media/output}"
scp depth_anything_v2_float.tflite  <user>@<device-ip>:$HOME/models/
scp monodepth.json                  <user>@<device-ip>:$HOME/labels/
scp ai_demo_sample.mp4       <user>@<device-ip>:$HOME/media/
3

Connect to device

# Run from your host machine — replace <user> and <device-ip>
ssh <user>@<device-ip>
4

Set Environment Variables

Qualcomm Linux
export MODEL_NAME=depth_anything_v2_float.tflite
export LABELS_NAME=monodepth.json
export SRC_VIDEO_NAME=ai_demo_sample.mp4
5

Run the Pipeline

gst-launch-1.0 -v --gst-debug=2 \
filesrc location=$HOME/media/$SRC_VIDEO_NAME ! qtdemux ! queue ! h264parse ! \
v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! tee name=split \
split. ! queue ! qtivcomposer name=mixer sink_1::alpha=0.5 ! video/x-raw,format=NV12 ! queue ! waylandsink sync=false fullscreen=true \
split. ! queue ! videoscale ! videoconvert ! qtimlvconverter ! queue ! \
qtimltflite delegate=gpu model=$HOME/models/depth_anything_float.tflite ! queue ! \
qtimlpostprocess module=midas-v2 labels=$HOME/labels/monodepth.json ! video/x-raw,width=320,height=180 ! queue ! mixer.