Implementing a Custom Application in DeepStream Reference Designs

From RidgeRun Developer Wiki


Previous: Customizing the Project/Implementing Custom Media Index Next: Contact Us





Throughout this section of the wiki about how to customize the project, different explanations have been provided on each of the custom components that can be incorporated into the design structure, and together with the reusable modules of the main framework, specific purpose applications can be developed. In this section, an overview will be provided on the structure that a generic custom application should have, using the specialized components previously explained.


Component Diagram

The following figure shows a simplified version of the system architecture, emphasizing the custom components that the user can incorporate into their project, and their relationship with the main framework modules.


Custom Application Diagram


The diagram above shows what the structure of a generic application called "Custom Application" would be like. Any design of any custom application must take the general modules of Camera Capture, AI Manager, Action Dispatcher, and Config Parser as the base of its structure. From these blocks, it is possible to extend and customize the system, regardless of the context of the application, whether it is an intelligent parking system, security systems in shopping centers, or medical industry applications, among others. Remember that if you want a broader explanation about specific examples of custom applications that use this system, we invite you to review the Reference Designs section.

Directory Structure

Below you can appreciate the structure of a generic custom project based on the DeepStream Reference Designs system.


custom-application/
├── config_files
│   ├── custom_app.yaml
├── doc
├── README.md
├── setup.py
└── src
    ├── core
    │   ├── actiondispatcher
    │   ├── ai_manager
    │   │   ├── custom_listener
    │   │   ├── custom_media
    │   │   │   ├── engine
    │   │   └── custom_parser
    │   ├── cameracapture
    │   │   └── custom_media
    │   └── config_parser
    ├── custom_app
    │   ├── custom_actions
    │   ├── custom_policies
    │   └── main.py

This structure uses a directory format based on the Python programming language. However, it is important to note that for the simplicity of the example, not all the components of the main framework (core directory) are included, which are reusable modules provided as part of the system. The important thing about this example is that you can understand the location where the custom components should be inserted, like Custom media, Custom Inference Parser and Listener, Custom Actions and Policies, and Custom Config providers. It is important to point out that in the example a configuration file in yaml format is being used. Nevertheless, remembering the High-Level Design section where the different system components were explained, the configuration information does not necessarily have to be provided by a file, since the system has that property of flexibility where all these specific implementation details are up to you.

In the case of custom media, it can be seen that it is located both in the Camera Capture module and in the AI Manager directory. This is because the AI Manager bases its operation on a module called "Engine", which extends the functionalities of the media selected by the application, to include inference processing capabilities and integration with the NVIDIA DeepStream SDK. In addition to the custom components that have been explained in this section about customizing the project, the presented structure includes a main.py file inside the custom app directory. The idea is that in this file, you can provide the mechanisms to initialize and terminate your application, the way you want it, making use of the main framework components and your custom components.



Previous: Customizing the Project/Implementing Custom Media Index Next: Contact Us