...
This is the formal release V1.1.0
...
This version is the first time, we formal release the of SNNF(Sunplus Neural Network Framework), the original version is V1.
Table of Contents | ||
---|---|---|
|
Target of the V1.1.0
On the basis of v1.0.0.
There are some release notes for the version which are as below:
There are some NN modules and Samples.
lightFace;
age;
lightFace + age;
det_10g;
det_10g + w600k_r50;
humanAttr;
yolov5s + humanAttr;
vehicleAttr;
yolov8s_detection + vehicleAttr;
yolov8s_detection;
yolov8s_obb;
yolov8s_pose;
yolov8s_segment;
yolov8s_classify;
yolov10s_detection;
yolov8n_obb_opti;
yolov8n_pose_opti;
yolov8n_segment_opti;
yolov8n_detection_opti;
yolov8n_classify;
RTMDet-s;
Human tracking;
Human falling detection;
yolov5s_detection;
OCRDet;
OCRCls;
OCRRec;
OCRDet + OCRRec;
OCRDet + OCRCls + OCRRec;
yolov8n_CCPD;
yolov8n_CCPD + OCRRec;
yolov8n_CCPD + OCRCls + OCRRec.
A command mechanism for model list, you can get the all the available models,combination of models and applications and so on, which showed above.
Provide a sample demo for users to refer to, and they can directly run the sample app to verify the NN environment of C3V.
Parallel operations in multi-model applications can maximize the utilization of NPU and CPU, ultimately maximizing the processing frame rate of the application.
Implement official and customized partitions, you can copy an offical model to customized zone for further customizing, or just put your own model in the customized zone as a new model.
Define some specified paths for some resource, for example, config, font, test image, model file, test video and so on.
Define some specified folders such as botSortTrack, imageWriter, videoWriter for assist.
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 SNNF and locate generated resources in the specified release directory.
Open source the SNNF to facilitate users to better understand the internal operations of SNNF.
Optimize the system to make it more robust, and after long-term testing, the system is stable.
Resource
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.
Usage of V1.0.0
How to verify Official Demos
You can use the script we provide to start as follows:
...
, v1.1.0 mainly has the following updates:
Add some NN module.
genderage: gender and age
Det_10g + genderage
LightFace + genderage
Based on the current main framework of SNNF, provide a porting tool so that users can easily add a new model to the Customized zone using the official generated nbg code as the source. The initial version of this tool is currently available, and there will be further updates in the next version.
Fix some known issues, such as:
OCR have a probability of crashing.
HumanAttr have a probability of crashing.
When multiple models are connected in series, if the last model comes out, the result may have an unfinished flag fin=false.
Standardize post-process code.
Organize samples and unittest codes:
samples
is a sample code for snnf command sample which is just for snnf_run.sh.unittest/modelTest
is just for a buildin model's test sample.unittest/pluginTest
is just for the plugin model's test sample.unittest/sequntialTest
is the sample for the pipeline in which several models are sequentially linked together in series.
Add NN filter, which can facilitate users to do their own private data processing at the application layer. Users only need to insert the filter directly into the corresponding position of the pipeline when creating the model flow, and then perform private and correct processing at the most appropriate location. The advantage of this is that there is no need to write a dedicated module within SNNF for this private processing, only the official interface of SNNF needs to be called. Of course, SNNF provides some commonly used private processing filters internally, such as label filtering. For example, when Object Detect+HumanAttr, the label results of Object Detect can be filtered, and only the person can be passed to HumanAttr. If the requirements of the application layer happen to match this usage, there is no need to implement it yourself at the application layer. Simply call the methods provided by SNNF.
Provide users with a mAP test sample to compare the precision of the C3V platform's model running results with the precision of the model's official PC running results. The default test model is yolov8s object detection. Users can refer to this mAP sample to rewrite the model they need to test mAP values for. Please refer the SOP.
Improve the toString() function for each model's result, and support the detection result toString JSON format.
Update some make config.
In addition to cross compilation on the server, we also provide compilation methods on the C3V platform.
If it is cross compilation on the server, please confirm the config
CROSS_COMPILE := ON
in makefile_config.mk .If compilation is required on the C3V platform, please confirm the config
CROSS_COMPILE := OFF
in makefile_config.mk .
Users can choose the model plugin in makefile_config.mk that needs to be compiled according to their own needs, which can effectively reduce the code size of specific projects and shorten compilation time.
Code Block | ||
---|---|---|
| ||
# ------------------------------------------------------------------------ # define which PLUGIN to build NN_PLUGIN_ENABLE_YOLOV5S_V2 <model>:Age := yes NN_PLUGIN_ENABLE_RTMDETS Det10g := no NN_PLUGIN_ENABLE_GEDERAGE HumanAttr := no NN_PLUGIN_ENABLE_YOLOV8S_DETECTION LightFace:= no NN_PLUGIN_ENABLE_YOLOV8S_OBB OcrCls := no NN_PLUGIN_ENABLE_YOLOV8S_POSE OcrDet:= no NN_PLUGIN_ENABLE_YOLOV8S_SEGMENT := no NN_PLUGIN_ENABLE_YOLOV10S_DETECTION OcrRec := no NN_PLUGIN_ENABLE_YOLOV8N_CCPD VehicleAttr := no NN_PLUGIN_ENABLE_YOLOV8N_OBB_OPTI W600kR50 := no NN_PLUGIN_ENABLE_YOLOV8N_POSE_OPTI := no NN_PLUGIN_ENABLE_YOLOV8N_SEGMENT_OPTI Yolov5sDetection := no Yolov5sV1NN_PLUGIN_ENABLE_YOLOV8N_DETECTION_OPTI := no NN_PLUGIN_ENABLE_YOLOV8S_DETECTION_OPTI := no Yolov5sV2 NN_PLUGIN_ENABLE_BOTSORT_TRACK Yolov8nClassify Yolov8sClassify:= no |
Adjust the access of certain model header files and provide more necessary header files for the application layer to use.
Change the bbox value type from uint to float. Although this change does not have a substantial impact on the rendering of the results, it can make the precision value more accurate when calculating mAP.
In previous versions, assist modules such as imageWriter/videoWriter/JsonWriter only supported the default filename. Starting from this version, we will support filename config.
Also provide release folder so that new users can easily preview or evaluate our SNNF demo without spending too much time on environment setup and code compilation.
Resource
Please get the V1.1.0 release resource here.
Before starting any work, please carefully read the instruction files such as readme.md in the document directory.
Usage of V1.1.0
How to verify Official Demos
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|-o|option] Version: 1.1.0_ Time: [-m,--model <model>] run a single model <model>:Age Det10g HumanAttr HumanFilter LightFace OcrCls OcrDet OcrRec VehicleAttr Yolov5sV3 VehicleFilter BotSortTrackStgcn W600kR50 Rtmdets YoloV8sOdMap YoloV10sDetection Yolov5sDetection YoloV8nCcpd Yolov5sV1 YoloV8nDetectionBaseOpti YoloV8nDetectionOptiYolov8nClassify YoloV8nObbOptiYolov8sClassify stgcn YoloV8nPoseOpti YoloV8nSegmentOpti Yolov5sV2 YoloV8sDetection BotSortTrackStgcn YoloV8sDetectionBaseOpti YoloV8sDetectionOpti GenderAge Rtmdets YoloV8sObb YoloV8sPose YoloV10sDetection YoloV8sSegmentYoloV8nCcpdOpti YoloV8nDetectionBaseOpti example:./bin/snnf_nnsample -m Yolov5sDetection YoloV8nDetectionOpti YoloV8nObbOpti ./bin/snnf_nnsample --model HumanAttr [-s,--sequential <model1,model2,...>] run sequential modelsYoloV8nPoseOpti <models>:Yolov5sDetection,HumanAttr YoloV8nSegmentOpti YoloV8sDetection YoloV8sDetectionBaseOpti LightFace,Age YoloV8sDetectionOpti OcrDet,OcrRec YoloV8sObb YoloV8sPose OcrDet,OcrCls,OcrRec YoloV8sSegment YoloV8nCcpd,OcrRec example:./bin/snnf_nnsample -m Yolov5sDetection Det10g,W600kR50 ./bin/snnf_nnsample --model HumanAttr YoloV8sDetection,VehicleAttr [-s,--sequential <model1,model2,...>] run sequential models YoloV8nDetectionOpti,BotSortTrack<models>:Yolov5sDetection,HumanFilter,HumanAttr YoloV8nPoseOptiLightFace,BotSortTrackStgcnAge YoloV8nCcpdOcrDet,OcrRec YoloV8nCcpdOcrDet,OcrCls,OcrRec example:./bin/snnf_nnsample -s Yolov5s,HumanAttr ./bin/snnf_nnsample --sequential ocrDet,ocrCls,ocrRec YoloV8nCcpdOpti,OcrRec ./bin/snnf_nnsample -s YoloV8nCcpd,OcrRec,imageWriter Det10g,W600kR50 ./bin/snnf_nnsample -s YoloV8nDetectionOpti,BotSortTrack,videoWriter -v resource/video/humanCount.mp4YoloV8sDetection,VehicleFilter,VehicleAttr YoloV8nDetectionOpti,BotSortTrack ./bin/snnf_nnsample -s YoloV8nPoseOpti,BotSortTrackStgcn,videoWriter -v resource/video/person-falling.mp4 [-i,--image file] set image file to nn detection. YoloV8nPoseOpti,BotSortTrackStgcn <file>: file name YoloV8nCcpdOpti,OcrRec [-c | option]: test count, this parameter is only match with -i YoloV8nCcpdOpti,OcrCls,OcrRec example:./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr -i filename -c testCountHumanFilter,HumanAttr ./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr --image filename -c testCount --sequential ocrDet,ocrCls,ocrRec [-v,--video file] set video file to nn detection. ./bin/snnf_nnsample -s YoloV8nCcpdOpti,OcrRec,imageWriter <file>: file name example:./bin/snnf_nnsample -s Yolov5sDetectionYoloV8sDetectionOpti,BotSortTrack,HumanAttrvideoWriter -v filenameresource/video/pk-12.mp4 ./bin/snnf_nnsample -s Yolov5sDetectionYoloV8nPoseOpti,BotSortTrackStgcn,HumanAttrvideoWriter --video filenamev resource/video/person-falling.mp4 [-ai,--allimage file] runset image allfile modelto testingnn detection. 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.
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.
How to run NN framework sample
Copy the release foler to C3V Linux.
Code Block |
---|
/SNNF/release # ls -alh
total 36
drwxr-xr-x 8 xxx B400 4096 Sep 30 14:23 ./
drwxr-xr-x 15 xxx B400 4096 Sep 30 14:15 ../
drwxr-xr-x 2 xxx B400 4096 Sep 30 14:15 bin/
drwxr-xr-x 6 xxx B400 4096 Sep 30 14:15 include/
drwxr-xr-x 3 xxx B400 4096 Sep 30 14:15 lib/
drwxr-xr-x 7 xxx B400 4096 Sep 30 14:15 resource/
drwxr-xr-x 4 xxx B400 4096 Sep 30 14:15 samples/
-rwxr-xr-x 1 xxx B400 262 Sep 30 14:15 snnf_run.sh*
drwxr-xr-x 7 xxx B400 4096 Sep 30 14:15 thirdparty/ |
Run nnf_run.sh to run the NNF sample.
a. One-time input
./snnf_run.sh -m YoloV8sDetection
Code Block |
---|
#./snnf_run.sh -m YoloV8sDetection
1727625905242|7fad06c020|T|common: [app]YoloV8sDetection in
1727625905261|7fad06c020|I|common: [nn]create model from pluginName: YoloV8sDetection takes: 17
1727625905722|7f96fdf0e0|I|common: [nn]picked: 5
1727625905722|7f96fdf0e0|T|common: [app]GeneralModelOutputListener detect from resource/image/objectDetect.jpg, the result: (box: 35 196 158 403) --> label: 0(person), confidence: 0.89, fin: false
1727625905722|7f96fdf0e0|T|common: [app]GeneralModelOutputListener detect from resource/image/objectDetect.jpg, the result: (box: 526 185 112 392) --> label: 0(person), confidence: 0.87, fin: false
1727625905722|7f96fdf0e0|T|common: [app]GeneralModelOutputListener detect from resource/image/objectDetect.jpg, the result: (box: 173 203 97 360) --> label: 0(person), confidence: 0.86, fin: false
1727625905722|7f96fdf0e0|T|common: [app]GeneralModelOutputListener detect from resource/image/objectDetect.jpg, the result: (box: 0 321 44 253) --> label: 0(person), confidence: 0.75, fin: false
1727625905722|7f96fdf0e0|T|common: [app]GeneralModelOutputListener detect from resource/image/objectDetect.jpg, the result: (box: 12 66 625 403) --> label: 5(bus), confidence: 0.74, fin: true
1727625905781|7fad06c020|T|common: [app]YoloV8sDetection out, retVal: 0 |
b. Read input from the image file
./snnf_run.sh -m YoloV8nDetectionOpti -i resource/image/person640x640.jpg
Code Block |
---|
# ./snnf_run.sh -m YoloV8nDetectionOpti -i resource/image/person640x640.jpg
1727626580087|7fbd7de020|T|common: [app]YoloV8nDetectionOpti in
1727626582152|7fbd7de020|I|common: [nn]create model from pluginName: YoloV8nDetectionOpti takes: 2063
1727626582574|7fa569a0e0|T|common: [app]GeneralModelOutputListener detect from resource/image/person640x640.jpg, the result: (box: 0 19 614 619) --> label: 0(person), confidence: 0.87, fin: true
1727626582622|7fbd7de020|T|common: [app]YoloV8nDetectionOpti out, retVal: 0 |
c. Read inputs from the video file.
./snnf_run.sh -m YoloV8nDetectionOpti -v resource/video/humanCount.mp4
Code Block |
---|
# ./snnf_run.sh -m YoloV8nDetectionOpti -v resource/video/humanCount.mp4 1727626644381|7faf81e020|T|common: [app]streaming in 1727626645952|7faf81e020|I|common: [nn]create model from pluginName: YoloV8nDetectionOpti takes: 1388 1727626646044|7f951d80e0|T|common: [app]streaming test: runner func in 1727626646304|7f959e80e0|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 671 129 307 873) --> label: 0(person), confidence: 0.90, fin: false 1727626646305|7f959e80e0|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 0 364 268 461) --> label: 7(truck), confidence: 0.38, fin: true 1727626646375|7f959e80e0 <file>: file name [-c | option]: test count, this parameter is only match with -i example:./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr -i filename -c testCount ./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 -v filename ./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr --video filename [-o,--output file] specify the output file name for saving results. <file>: file name with extension (e.g., output.jpg, output.json, output.mp4) This parameter must be used in conjunction with imageWriter, jsonWriter, or videoWriter. example:./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr,imageWriter -i filename -o output.jpg ./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr,jsonWriter -i filename -o output.json ./bin/snnf_nnsample -s Yolov5sDetection,HumanAttr,videoWriter -v filename -o output.mp4 [-a,--all] run all model testing assist tools: imageWriter videoWriter jsonWriter BotSortTrack HumanFilter VehicleFilter |
Release folder structure
...
bin: snnf_nnsample. Prebuild sample programs that can run on the c3v Linux platform.
include:header file of sunplus NN framework SDK.
lib:libraries of sunplus 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 sunplus NN framework.
snnf_run.sh:executable script for running sample code.
snnf_build_samples.sh: executable script for building sample code.
snnf_env.sh: executable script for compiling environment.
thirdparty: just as its name implies.
How to run SNNF sample
Copy the release foler to C3V Linux.
Code Block |
---|
/SNNF/release # ls -alh
total 44K
drwxr-xr-x 8 101065 11400 4.0K Jan 3 2025 .
drwxr-xr-x 5 101065 11400 4.0K Jan 3 2025 ..
drwxr-xr-x 2 101065 11400 4.0K Jan 3 2025 bin
drwxr-xr-x 6 101065 11400 4.0K Jan 3 2025 include
drwxr-xr-x 3 101065 11400 4.0K Jan 3 2025 lib
drwxr-xr-x 7 101065 11400 4.0K Jan 3 2025 resource
drwxr-xr-x 4 101065 11400 4.0K Jan 3 2025 samples
-rwxr-xr-x 1 101065 11400 223 Jan 3 2025 snnf_build_samples.sh
-rwxr-xr-x 1 101065 11400 1.6K Jan 3 2025 snnf_env.sh
-rwxr-xr-x 1 101065 11400 430 Jan 3 2025 snnf_run.sh
drwxr-xr-x 7 101065 11400 4.0K Jan 3 2025 thirdparty |
Run nnf_run.sh to run the SNNF sample.
a. One-time input
./snnf_run.sh -m YoloV8sDetection
Code Block |
---|
# ./snnf_run.sh -m YoloV8sDetection 1735821845919|7f808d8a00|T|common: [app]YoloV8sDetection in 1735821846236|7f69ef80e0|T|common: [app]GeneralModelOutputListener detect from resource/image/vehicle.jpg, the result: (box: 672 127 325 873415.31 288.56 1218.38 520.88) --> label: 02(personcar), confidence: 0.9096, fin: falsetrue 17276266463751735821846284|7f959e80e07f808d8a00|T|common: [app]GeneralModelOutputListener detect from YoloV8sDetection out, the resultretVal: (box: 0 364 267 461) --> label: 7(truck), confidence: 0.39, fin: true 1727626646440|7f959e80e00 |
b. Read input from the image file
./snnf_run.sh -m YoloV8nDetectionOpti -i resource/image/person640x640.jpg
Code Block |
---|
# ./snnf_run.sh -m YoloV8nDetectionOpti -i resource/image/person640x640.jpg 1735822076622|7fbe2f5a00|T|common: [app]YoloV8nDetectionOpti in 1735822079033|7fa61da0e0|T|common: [app]GeneralModelOutputListener detect from resource/image/person640x640.jpg, the result: (box: 671 125 327 8780.00 19.00 614.75 619.44) --> label: 0(person), confidence: 0.90, fin: false 1727626646440|7f959e80e087, fin: true 1735822079075|7fbe2f5a00|T|common: [app]YoloV8nDetectionOpti out, retVal: 0 |
c. Read inputs from the video file.
./snnf_run.sh -m YoloV8nDetectionOpti -v resource/video/humanCount.mp4
Code Block |
---|
# ./snnf_run.sh -m YoloV8nDetectionOpti -v resource/video/humanCount.mp4 1735823196079|7fabb9e040|T|common: [app]GeneralModelOutputListenerstreaming detect from , the result: (box: 0 364 267 460) --> label: 7(truck), confidence: 0.41, fin: true 1727626646498|7f959e80e0in 1735823198479|7f91468080|T|common: [app]streaming test: runner func in 1735823198840|7f91c78080|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 673 125 323 878672.19 131.25 303.19 873.38) --> label: 0(person), confidence: 0.90, fin: false ...... 1727626682667|7f959e80e01735823198840|7f91c78080|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 977 159 330 8940.56 364.31 268.12 460.69) --> label: 07(persontruck), confidence: 0.9139, fin: false 17276266826671735823198840|7f959e80e07f91c78080|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 668 262 270 708 548.06 10.31 1369.88 1009.69) --> label: 06(persontrain), confidence: 0.8625, fin: falsetrue 17276266826671735823198859|7f959e80e07f91c78080|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 673.88 127.88 1 363 267 457323.06 875.44) --> label: 70(truckperson), confidence: 0.3590, fin: false 17276266826671735823198859|7f959e80e07f91c78080|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 465 26 1454 10030.56 364.31 268.31 460.69) --> label: 67(traintruck), confidence: 0.3240, fin: false 17276266826671735823198859|7f959e80e07f91c78080|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 847 565 173 403543.00 13.31 1375.31 1009.50) --> label: 06(persontrain), confidence: 0.26, fin: true 1727626686753|7faf81e020|T|common: [app]q to quit |
d. Sequential models
./snnf_run.sh -s Yolov5sDetection,HumanAttr
Code Block |
---|
# ./snnf_run.sh -s Yolov5sDetection,HumanAttr 1727627713332|7fa3285020: true ...... 1735823234584|7f91c78080|T|common: [app]sequential in 1727627713501|7fa3285020|T|common: [app]input image name: resource/image/person.jpg 1727627713833|7f937c50e0|T|common: [nn]detectedInfos: 1 1727627713833|7f937c50e0GeneralModelOutputListener detect from , the result: (box: 977.81 159.75 329.81 895.69) --> label: 0(person), confidence: 0.90, fin: false 1735823234584|7f91c78080|T|common: [app]human attr(box: 606 141 274 655GeneralModelOutputListener detect from , the result: (box: 666.94 263.81 275.06 708.00) --> resultlabel: Male Age18-60 Direct: Front Glasses: True Hat: False HoldObjectsInFront: False Bag: No bag Upper: ShortSleeve UpperStride Lower: Trousers Shose: No boots 1727627713833|7f937c50e0|T|common: [nn]detectedInfos: 1 1727627713833|7f937c50e00(person), confidence: 0.87, fin: false 1735823234584|7f91c78080|T|common: [app]GeneralModelOutputListener detect from , the result: (box: 1583.39 458.81 64.27 130.03) --> label: 0(person), confidence: 0.33, fin: false 1735823234584|7f91c78080|T|common: [app]human attr(box: 308 188 207 591GeneralModelOutputListener detect from , the result: (box: 466.12 10.88 1453.88 1017.75) --> result: Female Age18-60 Direct: Back Glasses: False Hat: False HoldObjectsInFront: False Bag: ShoulderBag Upper: ShortSleeve UpperLogo Lower: LowerPattern Shorts Shose: No boots 1727627718787|7fa3285020label: 6(train), confidence: 0.32, fin: true 1735823343756|7fabb9e040|T|common: [app]q to quit q 1735823348373|7fabb9e040|T|common: [app]The input file: resource/video/humanCount.mp4 has 516 frames 1735823348374|7fabb9e040|T|common: [app]sequentialstreaming out, retVal: -0x0 |
...
-0x0 |
d. Sequential models
./snnf_run.sh -s YoloV8sPoseYolov5sDetection,imageWriterHumanAttr
Code Block |
---|
# ./snnf_run.sh -s YoloV8sPoseYolov5sDetection,imageWriterHumanAttr 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|7fafe270201735827166109|7f8a9f9040|T|common: [app]sequential in 1735827166536|7f8a9f9040|T|common: [app]input image name: resource/image/pose_inputperson.jpg 17276278887071735827166657|7f9db2a0e07f792b9080|IT|common: [nnapp]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|7fafe27020human attr(box: 612.44 156.84 268.88 625.51) --> result: age: 18-60 bag: No bag direction: Front gender: Male glasses: True hat: False holdObjectsInFront: False lower: Trousers shose: No boots upper: ShortSleeve UpperStride 1735827166660|7f792b9080|T|common: [app]human attr(box: 311.82 181.12 199.79 606.84) --> result: age: 18-60 bag: ShoulderBag direction: Back gender: Female glasses: False hat: False holdObjectsInFront: False lower: LowerPattern Shorts shose: No boots upper: ShortSleeve 1735827171625|7f8a9f9040|T|common: [app]sequential out, retVal: -0x0 |
Results will e. Model inference results save to the image detected_1883_0931_1727627888712.jpg
.
How to build SNNF
...
.a
.
...
/snnf_
...
run.sh
...
b. All the resource will installed to release folder.
Copy release folder to the C3V platform.
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.
Then, you can run snnf_run.sh for SNNF sample.
Models reference
...
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
...
...
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
...
https://github.com/ultralytics/ultralytics
...
Yolov8 Pose
...
https://github.com/ultralytics/ultralytics
...
Yolov8 OBB
...
https://github.com/ultralytics/ultralytics
...
Yolov8 Segmentation
...
https://github.com/ultralytics/ultralytics
...
Yolov8 Classification
...
https://github.com/ultralytics/ultralytics
...
Vehicle attributes
...
https://bj.bcebos.com/v1/paddledet/models/pipeline/vehicle_attribute_model.zip
...
License plate recognition
...
CCPD2020
Yolov8 CCPD detection
OCR
...
Yolov10 Detection
...
https://github.com/THU-MIG/yolov10
...
RTMDet
...
https://github.com/open-mmlab/mmdetection
...
-s YoloV8sPose,imageWriter
Code Block |
---|
# ./snnf_run.sh -s YoloV8sPose,imageWriter
1735827675908|7fba745040|T|common: [app]sequential in
1735827675908|7fba745040|T|common: [app]warning: sequential model list(not tested)
1735827676344|7fba745040|T|common: [app]input image name: resource/image/pose_input.jpg
1735827676641|7fa3fff080|T|common: [app]write an image: detected_1883_0931_1735827676535.jpg
1735827681383|7fba745040|T|common: [app]sequential out, retVal: -0x0 |
Results will save to the image detected_1883_0931_1735827676535.jpg.
f. Model inference results save to json file.
./snnf_run.sh -s YoloV8sPose,jsonWriter -o yolov8PoseResults.json
Code Block |
---|
# ./snnf_run.sh -s YoloV8sPose,jsonWriter -o yolov8PoseResults.json
1736129305551|7fb7dfae30|T|common: [app]sequential in
1736129305551|7fb7dfae30|T|common: [app]warning: sequential model list(not tested)
1736129305738|7fb7dfae30|T|common: [app]input image name: resource/image/pose_input.jpg
1736129310785|7fb7dfae30|T|common: [app]sequential out, retVal: -0x0 |
Results will save to yolov8PoseResults.json. If the - o
option is unused, it will be saved as a file by default: default_result.json.
How to build SNNF
Cross-compile for C3V environment.
a. Please use snnf_build.sh
for SNNF compiling.
b. All the resource will be installed to the release folder.
Copy the release folder to the C3V platform.
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.
Then, you can run snnf_run.sh for SNNF sample.
Models reference
Model Name | Version or Path |
genderage | |
Object tracking | BotSort | Falling Recognition | STGCN
User API
Please refer to API DOC v2.0 .