Skip to content

Commit 9977f88

Browse files
sedna-modelbox
Signed-off-by: Ymh13383894400 <[email protected]>
1 parent 3da0c28 commit 9977f88

1 file changed

+94
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
[toc]
2+
3+
# The proposal about building a high frequency Sedna based end to end use case in ModelBox format
4+
5+
## 1. Background
6+
7+
> Sedna is an edge cloud collaborative AI project at KubeEdge SIG AI. Benefiting from the edge-cloud collaboration capabilities provided by KubeEdge, Sedna can realize cross-edge-cloud collaborative training and collaborative reasoning capabilities, and Sedna supports a variety of popular AI frameworks. **Sedna can simply enable edge-cloud synergy for existing training and inference scripts**, bringing the benefits of lower costs, improved model performance, and data privacy. **The goal of ModelBox is to solve the programming complexity of AI developers when developing AI applications**, reduce the development difficulty of AI applications, and hand over complex data processing to ModelBox. Developers mainly focus on the business logic itself, not the software details. While improving the efficiency of AI inference development, it ensures the performance, reliability, security and other attributes of the software, **so as to better enable Sedna developers to manage and use the Sedna framework**.
8+
9+
## 2. Motivation
10+
11+
### Goals
12+
13+
- ModelBox provides visual layout function to help Sedna developers improve the programming complexity when developing edge cloud collaborative AI.
14+
- ModelBox provides support for multiple hardware devices and software frameworks to help Sedna shield heterogeneous software and hardware problems.
15+
- ModelBox provides a high-performance scheduling engine to help Sedna developers solve the commercial performance problems of AI applications.
16+
17+
## 3. Proposal
18+
19+
- Make use of the extensible function of ModelBox, use Python to develop functional units, and package Sedna library and related codes in ModelBox. Use the visual layout function of ModelBox container to call Sedna API to realize the collaborative application development of edge cloud.![ModelBox Development Application](images/ModelBox Development Application.png)
20+
21+
**use case**
22+
23+
- Carry out the collaborative development of edge clouds on ModelBox, and use helmet detection incremental learning training samples. Start the ModelBox reasoning service, and the helmet detection video stream data is reasoned on the side. When encountering difficulties, it is uploaded to the cloud side. After the incremental sample conditions are met, the training container starts the incremental training model, puts the model in the evaluation container for evaluation, and finally starts the side reasoning service.
24+
25+
- **View [official website document for details]( https://modelbox-ai.com/ )**
26+
27+
28+
29+
![Helmet_detection case](images/Helmet_detection case.png)
30+
31+
## 4. Design Details
32+
33+
### Flow chart of ModelBox integrated Sedna edge-cloud collaboration function
34+
35+
Use **ModelBox** visual development function to integrate **Sedna** related functional units. Use the **k8s** service to schedule and manage end-to-end cloud clusters. First start the **ModelBox side ** inference container. The side **Sedna LC** controls the acquisition of data, and upload the cloud to enable the side **Sedna worker **to create inference services. After normal sample inference, output the results. After encountering difficult cases, the **LC trigger** monitors that the incremental samples meet the retraining requirements, and automatically triggers the training container to start and complete the model training. After training, the model is placed in the **Evaluation container** for evaluation. Finally, after the evaluation pod is finished, the reasoning container of the side **ModelBox** is started, and then the reasoning result is output.
36+
37+
![ModelBox intergrated Sedna flow chart](images/ModelBox intergrated Sedna flow chart.png)
38+
39+
### 1. Specific development process of functional unit of ModelBox
40+
41+
#### 1. Function unit creation
42+
43+
The directory structure of the created **C++** functional unit is as follows:
44+
45+
```
46+
[flowunit-name]
47+
|---CMakeList.txt # For cpack packaging
48+
|---[flowunit-name].toml # Configuration file for webui display
49+
|---[flowunit-name].py # Interface implementation file
50+
```
51+
52+
#### 2. Function unit attribute configuration
53+
54+
#### 3. Logical realization of functional unit
55+
56+
#### 4. Function unit compilation and operation
57+
58+
The ModelBox framework Python project is compiled. The functional units created through the command line or visual UI contain file by default. The main functions are as follows:
59+
60+
- Set function unit name
61+
- Header files required for linking functional units
62+
- Libraries required for linking functional units
63+
- Set compilation target to dynamic library
64+
- Specify the function unit installation directory
65+
66+
**View [official website document for details]( https://modelbox-ai.com/ )**
67+
68+
69+
70+
### 2. Application case of encapsulated Sedna
71+
72+
#### 1. Create incremental learning
73+
74+
#### 2. Start incremental training
75+
76+
**View [use incremental learning in helmet detection scenario for specific details](https://github.com/kubeedge/sedna/blob/main/examples/incremental_learning/helmet_detection/README.md)**
77+
78+
79+
80+
## 5.Road Map
81+
82+
**2022.07.01 - 2022.08.15**
83+
84+
**1. Installation and construction of ModelBox environment**
85+
86+
**2. Understand the development tasks of ModelBox functional units**
87+
88+
**2022.08.16 - 2022.09.30**
89+
90+
**1. Complete Sedna function module**
91+
92+
**2. Complete helmet detection incremental training application case**
93+
94+
**3. Topic summary and document arrangement**

0 commit comments

Comments
 (0)