Doorbell ML Applicationο
Descriptionο
These applications are designed for doorbell systems, leveraging on-device machine learning to detect the presence of a person within the cameraβs field of view. Upon detection, the system captures and processes images to provide visual context such as high-resolution stills or a sequence of preroll images leading up to the event. This use case combines features from multiple SDK sample applications, including jpeg_preroll and image_stitching, to deliver a comprehensive visual snapshot that enhances detection reliability and situational awareness.
Use Case Specific Detailsο
Adapting Pipeline for Custom Object Detection Modelsο
This person detection pipeline can be adapted to work with custom object detection models. However, certain validation steps and potential modifications are required to ensure compatibility.
Prerequisites for Model Compatibilityο
Before adapting this pipeline for another object detection model, you must verify the following:
1. Model Format Requirementsο
Your object detection model should be in
.tfliteformatThe model should produce similar output tensor structure (bounding boxes, confidence scores)
2. Vela Compiler Compatibility Checkο
Step 1: Analyze Original Model
Load your
object_detection_model.tflitefile in NetronDocument the output tensors:
Tensor names
Tensor identifiers/indexes
Quantization parameters (scale and offset values)
Tensor dimensions
Step 2: Compile with Vela
Pass your model through the Vela compiler to generate
model_vela.binormodel_vela.tfliteAnalyze the Vela-compiled model in Netron using the same steps as above
Step 3: Compare Outputs Compare the following between original and Vela-compiled models:
Output tensor indexes/identifiers: Verify if they remain in the same order
Quantization parameters: Check if scale and offset values are preserved
Tensor dimensions: Ensure dimensions match your expected output format
Pipeline Adaptation Processο
Case 1: No Changes Requiredο
If the Vela compilation preserves:
β Output tensor indexes in the same order
β Same quantization scale and offset values
Result: You can proceed with the existing pipeline without modifications.
Case 2: Modifications Requiredο
If the Vela compilation changes:
β Output tensor index order
β Quantization parameters
Required Actions: Modify the pipeline code as described below.
Code Modificationsο
If your modelβs output tensor indexes change after Vela compilation, you need to update the tensor parameter assignments in uc_person_detection.c:
Location: detection_post_process functionο
Original Code:
g_box1_params = &g_all_tens_params[0];
g_box2_params = &g_all_tens_params[1];
g_cls_params = &g_all_tens_params[2];
Modified Code: Update the array indexes according to your Vela-compiled modelβs output tensor identifiers:
// Example: If your model_vela output has different tensor order
g_box1_params = &g_all_tens_params[X]; // Replace X with actual index from Netron
g_box2_params = &g_all_tens_params[Y]; // Replace Y with actual index from Netron
g_cls_params = &g_all_tens_params[Z]; // Replace Z with actual index from Netron
Running the Application using VS Code Extensionο
Windows note: Ensure the USB drivers are installed for streaming. See the Zadig steps in
SR110 Build and Flash with VS Code.
In VS Code, open Video Streamer from the Synaptics sidebar.

For logging output, click SERIAL MONITOR and connect to the DAP logger port on J14.
To make it easier to identify, ensure only J14 is plugged in (not J13).
The logger port is not guaranteed to be consistent across OSes. As a starting point:
Windows: try the lower-numbered J14 COM port first.
Linux/macOS: try the higher-numbered J14 port first.
If you do not see logs after a reset, switch to the other J14 port.
Doorbell application automatically connects to Video Streamer upon reset.
On person detection, the video streamer opens with the captured frame and preroll context images.