Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please get the V1.0.0 release resource here.

Before starting any work, please carefully read the instruction files such as readme.md in the document directory.

...

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

Code Block
   /SNNF/release # ./snnf_run.sh
Usage: ./bin/snnf_nnsample [-m|-s|-a|-h] [-i|-v|option]
        Version: 1.0.0_
        Time:
        [-m,--model <model>] run a single model
                <model>:Age                        Det10g    ArcFace                 HumanAttr
      Det10g                  LightFace       HumanAttr           OcrCls           LightFace          OcrDet
           OcrCls             OcrRec            OcrDet         VehicleAttr                OcrRecW600kR50
                        VehicleAttrYolov5sDetection           Yolov5sV1              W600kR50    Yolov5sV2
                  Yolov5sDetection      Yolov8nClassify         Yolov5sV1   Yolov8sClassify            Yolov5sV3
         Yolov5sV2               BotSortTrackStgcn       Yolov8nClassify   Rtmdets             Yolov8sClassify        YoloV10sDetection
                Yolov5sV3        YoloV8nCcpd              BotSortTrackStgcn  YoloV8nDetectionBaseOpti   YoloV8nDetectionOpti
        Rtmdets                YoloV8nObbOpti         YoloV10sDetection    YoloV8nPoseOpti          YoloV8nCcpd  YoloV8nSegmentOpti
                 YoloV8nDetectionBaseOpti       YoloV8sDetection           YoloV8sDetectionBaseOpti   YoloV8sDetectionOpti
   YoloV8nDetectionOpti           YoloV8nObbOpti          YoloV8sObb       YoloV8nPoseOpti          YoloV8sPose               YoloV8nSegmentOpti YoloV8sSegment

          YoloV8sDetection      example:./bin/snnf_nnsample -m Yolov5sDetection
      YoloV8sDetectionBaseOpti                     ./bin/snnf_nnsample --model HumanAttr

  YoloV8sDetectionOpti      [-s,--sequential <model1,model2,...>] run sequential models
 YoloV8sObb               <models>:Yolov5sDetection,HumanAttr
      YoloV8sPose                  LightFace,Age
      YoloV8sSegment                 example:./bin/snnf_nnsample -m Yolov5sDetection OcrDet,OcrRec
                         ./bin/snnf_nnsample --model HumanAttrOcrDet,OcrCls,OcrRec
            [-s,--sequential <model1,model2,...>] run sequential models                 <models>:Yolov5sDetection,HumanAttrYoloV8nCcpd,OcrRec
                        LightFaceDet10g,AgeW600kR50
                        OcrDetYoloV8sDetection,OcrRecVehicleAttr
                        OcrDetYoloV8nDetectionOpti,OcrCls,OcrRecBotSortTrack
                        YoloV8nCcpdYoloV8nPoseOpti,OcrRecBotSortTrackStgcn
                        Det10gYoloV8nCcpd,W600kR50OcrRec
                        YoloV8sDetectionYoloV8nCcpd,OcrCls,VehicleAttrOcrRec

                example:./bin/snnf_nnsample -s  Yolov5s,HumanAttr
   YoloV8nDetectionOpti,BotSortTrack                     ./bin/snnf_nnsample --sequential ocrDet,ocrCls,ocrRec
 YoloV8nPoseOpti,BotSortTrackStgcn                       ./bin/snnf_nnsample -s YoloV8nCcpd,OcrRec
       ,imageWriter
                YoloV8nCcpd,OcrCls,OcrRec                 example:./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr
YoloV8nDetectionOpti,BotSortTrack,videoWriter -v resource/video/humanCount.mp4
                        ./bin/snnf_nnsample --sequentials ocrDetYoloV8nPoseOpti,ocrClsBotSortTrackStgcn,ocrRecvideoWriter -v resource/video/person-falling.mp4

        [-i,--image file] set image file to nn detection.
     ./bin/snnf_nnsample -s YoloV8nCcpd,OcrRec,imageWriter         <file>: file name
             ./bin/snnf_nnsample -s YoloV8nDetectionOpti,BotSortTrack,videoWriter [-v resource/video/humanCount.mp4
         c | option]: test count, this parameter is only match with -i

                example:./bin/snnf_nnsample -s YoloV8nPoseOptiYolov5sDetection,BotSortTrackStgcn,videoWriterHumanAttr -v resource/video/person-falling.mp4
i filename -c testCount
        [-i,--image file] set image file to nn detection.         ./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr --image filename -c testCount

        [-v,--video file] set video file to nn detection.
                <file>: file name

                example:./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr -iv filename
-c testCount                         ./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr --imagevideo filename -c
testCount
         [-va,--videoall] file]run setall videomodel filetesting
to
nn detection.                 <file>assist tools: fileimageWriter name
                example:./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr -v filename
                        ./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr --video filename

        [-a,--all] run all model testing

        assist tools: imageWriter videoWriter BotSortTrack

Release folder structure

...

bin: nnf_nnsample. Prebuild sample programs that can run on the c3v Linux platform.

...

include:header file of NN framework SDK.

...

lib:libraries of NN framework SDK.

resource

...

config: some config files for features.

...

font: ttf file for plotting sample.

...

videoWriter BotSortTrack

Release folder structure

...

  • bin: nnf_nnsample. Prebuild sample programs that can run on the c3v Linux platform.

  • include:header file of NN framework SDK.

  • lib:libraries of NN framework SDK.

  • resource

    • config: some config files for features.

    • font: ttf file for plotting sample.

    • image: image files used for test.

    • model: models to be used in the sample program.

    • video: video files used for test.

  • samples:example code for using NN framework.

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

  • thirdparty: just as its name implies.

...

Code Block
# ./snnf_run.sh -s YoloV8sPose,imageWriter
1727627887700|7fafe27020|T|common: [app]sequential in
1727627887700|7fafe27020|T|common: [app]warning: sequential model list(not tested)
1727627887725|7fafe27020|I|common: [nn]create model from pluginName: YoloV8sPose takes: 24
1727627887858|7fafe27020|T|common: [app]input image name: resource/image/pose_input.jpg
1727627888707|7f9db2a0e0|I|common: [nn]picked: 5
1727627888707|7f9db2a0e0|I|common: [nn]plot:  0  91%, [(852, 142) - (1169, 753)], person
1727627888710|7f9db2a0e0|I|common: [nn]plot:  0  89%, [(1689, 187) - (1835, 642)], person
1727627888711|7f9db2a0e0|I|common: [nn]plot:  0  89%, [(61, 123) - (232, 601)], person
1727627888711|7f9db2a0e0|I|common: [nn]plot:  0  88%, [(1337, 330) - (1441, 679)], person
1727627888712|7f9db2a0e0|I|common: [nn]plot:  0  87%, [(369, 252) - (480, 671)], person
1727627888839|7f9db2a0e0|T|common: [app]write an image: detected_1883_0931_1727627888712.jpg
1727627893526|7fafe27020|T|common: [app]sequential out, retVal: -0x0

Results will save to the image detected_1883_0931_1727627888712.jpg.

How to build SNNF

  1. Cross-compile for C3V environment.

a. Please use snnf_build.sh for SNNF compiling.

b. All the resource will installed to release folder.

  1. Copy release folder to the C3V platform.

  2. Setup environment variable.

a. Setting environment variables independently.

Code Block
export LD_LIBRARY_PATH=${PWD}/lib:${PWD}/thirdparty/opencv4/lib:${PWD}/thirdparty/pytorch/lib:${PWD}/thirdparty/freetype/lib:${PWD}/thirdparty/libpng/lib:${LD_LIBRARY_PATH}

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

  1. Then, you can run snnf_run.sh for SNNF sample.

Models of the gamma release

...

Model Name

...

Version or Path

image: detected_1883_0931_1727627888712.jpg
1727627893526|7fafe27020|T|common: [app]sequential out, retVal: -0x0

Results will save to the image detected_1883_0931_1727627888712.jpg.

How to build SNNF

  1. Cross-compile for C3V environment.

a. Please use snnf_build.sh for SNNF compiling.

b. All the resource will installed to release folder.

  1. Copy release folder to the C3V platform.

  2. Setup environment variable.

a. Setting environment variables independently.

Code Block
export LD_LIBRARY_PATH=${PWD}/lib:${PWD}/thirdparty/opencv4/lib:${PWD}/thirdparty/pytorch/lib:${PWD}/thirdparty/freetype/lib:${PWD}/thirdparty/libpng/lib:${LD_LIBRARY_PATH}

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

  1. Then, you can run snnf_run.sh for SNNF sample.

Models reference