SPRADP7A February   2025  – March 2025 AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM67A , TDA4AEN-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Building Blocks of an RGB-IR Vision Pipeline
    1. 2.1 CSI Receiver
    2. 2.2 Image Signal Processor
    3. 2.3 Video Processing Unit
    4. 2.4 TI Deep Learning Acceleration
    5. 2.5 GStreamer and TIOVX Frameworks
  6. 3Performance Considerations and Benchmarking Tools
  7. 4Reference Design
    1. 4.1 Camera Module
    2. 4.2 Sensor Driver
    3. 4.3 CSI-2 Rx Driver
    4. 4.4 Image Processing
    5. 4.5 Deep Learning for Driver and Occupancy Monitoring
    6. 4.6 Reference Code and Applications
  8. 5Application Examples and Benchmarking
    1. 5.1 Application 1: Single-stream Capture and Visualization with GST
    2. 5.2 Application 2: Dual-stream Capture and Visualization with GST and TIOVX Frameworks
    3. 5.3 Application 3: Representative OMS-DMS + Video Telephony Pipeline in GStreamer
  9. 6Summary
  10. 7References
  11. 8Revision History

Application 3: Representative OMS-DMS + Video Telephony Pipeline in GStreamer

In this example application, a representative GStreamer pipeline is run for occupancy monitoring, driver monitoring and video telephony on live stream from an OX05B1S camera.

For OMS and DMS, the infrared frames are passed through a segmentation and object detection model, respectively. These models emulate a seatbelt detection and face detection task, respectively. The RGB frames are H.265 encoded and saved into a file. This represents a starting point for an RGB-IR in-cabin monitoring applications. Note that the deep learning models used here are not optimized (1)for DMS/OMS. A final product needs to extend this to include more DMS and OMS models and postprocessing for a robust and feature-rich product.

 GStreamer Application Flow For Dual-stream RGB-IR For DMS-OMS With Video RecordingFigure 5-8 GStreamer Application Flow For Dual-stream RGB-IR For DMS-OMS With Video Recording

In this application, depicted by Figure 5-8, the RGB frames are kept only for file storage by scaling and encoding in H.265 format. Infrared input is processed and scaled down before splitting into OMS and DMS paths. DMS runs at 30 FPS whereas OMS runs more slowly at 5 FPS (with excess frames dropped in OMS path). From here, the infrared frames are prepared for deep learning by scaling, converting colorspace to RGB (although final models can be optimized for grayscale input), preprocessed, and run through a CNN on the C7x deep learning accelerator. Any post-processing for these models run in an application code exposed by the GStreamer appsink plugin.

Figure 5-9 shows the core load on AM62A while running this application. The VISS-ISP hardware accelerator is nearly maxed out for the 315 MP/s capacity. However, there is plenty of headroom left on processing cores. The 4x Arm® Cortex®-A53s are only used approximately 26%, leaving plenty of space for application code and other services. The C7xMMA AI accelerator is less than 50% loaded, leaving headroom for other AI models, and many further optimizations can be performed to maximize IR image analysis. The 32-bit, 3200 MT/s DDR bus shows utilization of 35%, and can reach approximately 50-60% before this shared resource becomes contended for. Note that DDR utilization must be strongly considered when optimizing the overall system.

Individually, the OMS, DMS, and telephony/recording portions of the pipeline have latencies of approximately 85ms, 51ms, and 67ms, respectively (not including frame-capture latency).

Figure 5-9 shows compute, accelerator, DDR utilization for the DMS-OMS reference GStreamer application. Note that models here are off-the-shelf from TI model zoo and used to emulate a realistic load for a simple DMS/OMS application. There is headroom for further deep learning and image analysis algorithms, including opportunity to optimize and reduce DDR load.

 Core Utilizations for RGB-Ir DMS/OMS
                ApplicationFigure 5-9 Core Utilizations for RGB-Ir DMS/OMS Application
The best models use Infrared frames as grayscale images, although the models profiled here use RGB data. The models profiled in this app note have higher DDR utilization than designed models for this use case.