Target of the alpha release
The alpha release will be a closed-source release.
The main purpose is to rely on the initial version of the multi model serial connection system, messaging system, log management system, etc. that have been implemented, to recommend the current official application methods and official NN demo to users.
Libs, header files and a sample app will be provided for this release. Users can quickly get started and easily add NN demo samples to their own applications.
Struct of the alpha release
The main structure of the NN framework is shown in the following figure.
The main schematic diagram of the multi-model serial connection process is shown in the following figure.
Form of the alpha release
Provide a sample demo for users to refer to, and they can directly run the sample app to verify the NN environment of C3V.
Provide Libs and header files for users to integrate specific NN modules into their applications using the standard interfaces we provide.
Provide COMPILE SH to enable users to easily compile NN framework and locate generated resources in the specified release directory.
Usage of the alpha release
How to verify Official Demos
Classify from a system perspective
Write main() in main. cpp in the following form. After compiling, the system will generate an app with nnf_nnsample_api.
Code Block |
---|
int main() { __apply_logger(); __test_sequential_func("sequential_test"); return 0; } |
At the same time, place the three files
nnf_human attr. nb
,nnf_yolov5s. nb
, andnnf_nnsample
together in a directory of C3V rootfs (using /app as an example), and place a humanoid image named person.jpg. Execute the app directly on the C3V platform (./nnf_nnsample
), and the serial console will display information similar to the following:
The example of this demo is to use a sequential mechanism to first extract the ROI of the human shape detected by yolov5s, and then feed the ROI RECT as input to the person attr module, ultimately obtaining information such as the person's gender, age, and clothing.
Classify from a functional perspective
Write main() in main. cpp in the following form. After compiling, the system will generate an app with nnf_nnsample_api.
Code Block |
---|
int main() { __apply_logger(); __test_model_func("lightface"); return 0; } |
At the same time, place the two files
nnf_lightface. nb
andnnf_nnsample
together in a directory of C3V rootfs (using /app as an example), and place a face image named face.jpg. Execute the app directly on the C3V platform (./nnf_nnsample
), and the serial console will display information similar to the following:
The example of this demo is to detect the human face and output each face ROI RECT informations.
Release folder structure
bin: nnf_nnsample. Prebuild sample programs that can run on the c3v Linux platform.
image: images used for detection.
model: models to be used in the sample program.
include:header file of NN framework SDK.
lib:libraries of NN framework SDK.
souces:example code for using NN framework.
nnf_run.sh:executable script for running sample code.
How to run NN framework sample
copy the release foler to C3V Linux.
Code Block |
---|
/app/release # ls -alh drwxr-xr-x 8 10989 11400 4.0K Jun 7 2024 . drwxr-xr-x 3 10989 11400 4.0K Jun 7 2024 .. drwxr-xr-x 2 10989 11400 4.0K Jun 7 2024 bin drwxr-xr-x 2 10989 11400 4.0K Jun 7 2024 image drwxr-xr-x 4 10989 11400 4.0K Jun 7 2024 include drwxr-xr-x 3 10989 11400 4.0K Jun 7 2024 lib drwxr-xr-x 2 10989 11400 4.0K Jun 7 2024 model -rw-r-xr-x 1 10989 11400 101 Jun 7 2024 nnf_run.sh drwxr-xr-x 3 10989 11400 4.0K Jun 7 2024 sources |
Run nnf_run.sh to run nnf_sample.
Code Block |
---|
/app/release # ./nnf_run.sh sequential_test in and 'q' to quit human attr --> label: Male Age18-60 Direct: Front Glasses: True Bag: No bag Upper: ShortSleeve UpperStride Lower: Trousers human attr --> label: Female Age18-60 Direct: Back Glasses: False Bag: ShoulderBag Upper: ShortSleeve Lower: LowerPattern Shorts |
Models of the alpha release
Model Name | Version or Path |
Yolov5s | https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt |
Human Attributes | https://bj.bcebos.com/v1/paddledet/models/pipeline/PPLCNet_x1_0_person_attribute_945_infer.zip |
Light Face |