The beta release of NN Framework

Target of the beta release

The beta release will be a open-source release.

In this version, we have done the following work:

  1. Optimize the pipeline dataflow.

  2. Optimize model plugin.

  3. Add some NN modules.

    1. Optical character recognition.

    2. Age recognition.

    3. Face det and Age recognition.

    4. Yolov8 Detection.

  4. Add command for model list.

  5. Regarding the user interface, maintain compatibility and consistency with the alpha version.

  6. Adjust the internal structure of NNF and output the initial version of open-source code.

  7. Optimize the system to make it more robust, and after long-term testing, the system is stable.

Form of the beta 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.

  • Open source the NN Framework to facilitate users to better understand the internal operations of NNF. In the next version, we will distinguish between official and customized partitions, making it easier for users to add their own models or copy an official model to a customized partition for customized modifications.

Beta release resource

Please get the beta release resource here.

Usage of the beta release

How to verify Official Demos

You can use the script we provide to start as follows:

/NNF/release # ./nnf_run.sh usage: ./bin/nnf_nnsample model modelName modelNames: yolov5s lightFace age humanAttr ocrDet ocrCls ocrRec yolov8n usage: ./bin/nnf_nnsample sequential modelNames avaliable model combinations: yolov5s humanAttr lightFace age ocrDet ocrRec ocrDet ocrCls ocrRec usage: ./bin/nnf_nnsample streaming modelNames avaliable model combinations: yolov5s humanAttr lightFace age ocrDet ocrRec ocrDet ocrCls ocrRec usage: ./bin/nnf_nnsample fileStreaming fileName modelNames avaliable model combinations: yolov5s humanAttr lightFace age ocrDet ocrRec ocrDet ocrCls ocrRec usage: ./bin/nnf_nnsample all Perform all the above test items

Release folder structure

image-20240731-020905.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.

  • video: Some released video files.

  • nnf_run.sh:executable script for running sample code.

How to run NN framework sample

  1. Copy the release foler to C3V Linux.

/NNF/release # ls -alh drwxr-xr-x 9 10989 11400 4.0K Jul 10 2024 . drwxr-xr-x 10 10989 11400 4.0K Jul 10 2024 .. drwxr-xr-x 2 10989 11400 4.0K Jul 10 2024 bin drwxr-xr-x 2 10989 11400 4.0K Jul 10 2024 image drwxr-xr-x 5 10989 11400 4.0K Jul 10 2024 include drwxr-xr-x 5 10989 11400 4.0K Jul 10 2024 lib drwxr-xr-x 2 10989 11400 4.0K Jul 10 2024 model -rw-r-xr-x 1 10989 11400 349 Jul 10 2024 nnf_run.sh drwxr-xr-x 5 10989 11400 4.0K Jul 10 2024 sources drwxr-xr-x 2 10989 11400 4.0K Jul 10 2024 video
  1. Run nnf_run.sh to run NNF sample.

a. One-time input

./nnf_run.sh model yolov8n

sunplus@ubuntu:~/workspace/release$ ./nnf_run.sh model yolov8n yolov8n in general(box: 0 54 634 585) --> label: 0, confidence: 0.90 yolov8n out, retVal: 0

b. Multiple inputs

./nnf_run.sh streaming yolov8n

c. Read inputs from video file.

./nnf_run.sh fileStreaming video/humanCount.mp4 yolov8n

How to build NN framework

  1. Cross-compile for C3V environment.

a. Please use nnf_build.sh for NN framework compiling.

b. All the resouce will installed to release folder.

  1. Copy release folder to the C3V platform.

  2. Setup environment variable.

a. Setting environment variables independently.

b. Run nnf_run.sh will auto set environment variables.

  1. Then, you can run nnf_run.sh for NNF sample.

Models of the beta release

Model Name

Version or Path

Optical character recognition

  • ch_PP-OCRv3_det_infer

  • ch_ppocr_mobile_v2.0_cls_infer

  • ch_PP-OCRv3_rec_infer

Age recognition

https://gitcode.com/smahesh29/Gender-and-Age-Detection/commits/master 7c024d9d453c9b35a72a984d8821b5832ef17401

Yolov8 Detection

GitHub - ultralytics/ultralytics: Ultralytics YOLO11 🚀