Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.

image-20240607-095852.png

The main schematic diagram of the multi-model serial connection process is shown in the following figure.

image-20240607-095927.png

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

  1. Write main() in main. cpp in the following form. After compiling, the system will generate an app with nnf_nnsample_api.

int main()
{
    __apply_logger();
    __test_sequential_func("sequential_test");
    return 0;
}
  1. At the same time, place the three files nnf_human attr. nb, nnf_yolov5s. nb, and nnf_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:

image-20240607-100309.png
  1. 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

  1. Write main() in main. cpp in the following form. After compiling, the system will generate an app with nnf_nnsample_api.

int main()
{
    __apply_logger();
    __test_model_func("lightface");
    return 0;
}
  1. At the same time, place the two files nnf_lightface. nb and nnf_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:

image-20240607-102716.png
  1. The example of this demo is to detect the human face and output each face ROI RECT informations.

Release folder structure

image-20240607-100406.png
  • 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

  1. copy the release foler to C3V Linux.

/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
  1. Run nnf_run.sh to run nnf_sample.

/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

  • No labels