AI Detection Setup Guide
Table of contents
- Overview
- VTX Configuration
- VRX Configuration
- voxl-tflite-server Setup
- Verifying Operation
- Troubleshooting
Overview
The VTX/VRX system supports real-time AI object detection overlay on the video stream. This feature uses the voxl-tflite-server and voxl-vtx services running on the drone/VTX to detect objects in the camera feed and transmit bounding box data to the voxl-vrx service running on the VRX for rendering on the display or goggles.
How It Works
The AI detection pipeline works as follows:
- Drone/VTX: The
voxl-tflite-serverapplication processes camera frames and generates object detection results (bounding boxes, labels, confidence scores) which are then published to MPA - Transmission: The
voxl-vtxprocess then subscribes to thetflite_datapipe created byvoxl-tflite-serverand transmits the object detection data to the VRX - VRX (Ground Unit): The
voxl-vrxprocess receives the object detection data and renders bounding boxes with optional labels on the video display
Prerequisites
- Drone/VTX/VRX on SDK 1.6.0+
- Compatible TensorFlow Lite model deployed on the drone/VTX
- AI detection enabled in voxl-vtx and voxl-vrx configuration files
VTX Configuration
On the drone/VTX, edit /etc/modalai/voxl-vtx.conf to enable AI detection transmission.
The configuration is done per video profile, edit the following parameters in the profile you want the detection to be on:
{
...
"profiles": [
{
"name": "Object Detection",
"source": "hires_default_misp_encoded", // Should be the encoded version of the camera pipe used for object detection in voxl-tflite-server
...
"ai_detection_enable": true, // Enable/Disable AI detection for this profile
"ai_detection_qty": 5, // The maximum number of object detections to transmit to the VRX
"ai_detection_threshold": 0.75 // The confidence threshold for an object to be considered for transmission
}
]
...
}
Configuration Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
ai_detection_enable | bool | false | Enable transmission of AI detection data for this profile |
ai_detection_qty | int | 2 | Maximum number of detection boxes to transmit |
ai_detection_threshold | float | 0.75 | Minimum confidence threshold for detections (0.0 - 1.0) |
Parameter Notes
- ai_detection_qty: Higher values transmit more detected objects but increase bandwidth usage. Typically 2-5 objects is sufficient.
- ai_detection_threshold: Only detections with confidence greater than this value are transmitted. Range: 0.0 (all detections) to 1.0 (only very confident detections). A value of 0.75 means 75% confidence or higher.
VRX Configuration
On the VRX, edit /etc/modalai/voxl-vrx.conf to enable AI detection rendering:
{
...
"ai_detection_enable": true, // Enable/Disable AI detection
"ai_detection_show_labels": false // Enable/Disable object class labels
...
}
Configuration Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
ai_detection_enable | bool | false | Enable rendering of AI detection boxes on display |
ai_detection_show_labels | bool | false | Show object class labels and confidence scores with boxes |
voxl-tflite-server Setup
The voxl-tflite-server process must be properly configured on the drone/VTX:
- Ensure
voxl-tflite-serveris installed on the drone/VTX. - Configure the service using
voxl-configure-tflite-server-single.- Set the input pipe to match your camera source for the video feed (e.g.,
hires_default_misp_colorifhires_default_misp_encodedis used as video source)
- Set the input pipe to match your camera source for the video feed (e.g.,
- It is recommended to skip a few frames (set
skip_n_framesin/etc/modalai/voxl-tflite-server.confto 2, 3, or 4) to reduce the CPU usage, thevoxl-tflite-serverprocess can be quite CPU intensive. - Set the
allow_multiplefield tofalse. This is necessary so that the MPA pipe enumerates astflite_data, which is what voxl-vtx expects. - Restart and verify the service is running:
systemctl restart voxl-tflite-serverthensystemctl status voxl-tflite-server. - Check that detection data is being published:
voxl-inspect-detections tflite_data.
Refer to the voxl-tflite-server documentation for complete setup instructions.
Verifying Operation
On the VTX (Drone)
Check that tflite data is being generated:
voxl-inspect-detections tflite_data
On the VRX (Ground Unit)
You should see bounding boxes rendered on the video display. If ai_detection_show_labels is enabled, you’ll also see class names.
Troubleshooting
No bounding boxes visible on VRX
- Verify
ai_detection_enable: truein both VTX and VRX config files - Check
voxl-tflite-serveris running on the drone/VTX:systemctl status voxl-tflite-server - Verify objects are being detected:
voxl-inspect-detections tflite_dataon the drone/VTX - Ensure VTX/VRX link is working (video streaming properly)
- Check
ai_detection_thresholdisn’t too high (try lowering the configured threshold)
Poor detection performance
- Lower
ai_detection_thresholdto see more detections (may increase false positives) - Verify TFLite model is appropriate for your use case
Bandwidth concerns
- Reduce
ai_detection_qtyto transmit fewer objects - Increase
ai_detection_thresholdto only send high-confidence detections