Versions Compared

Key

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

...

We provide an example function for post-processing, which can complete the parsing of NN processing results: View file

namevnn_post_process.zip

  • post_proc_init

  • post_proc_process

  • post_proc_deinit

...

For detailed function implementation, please refer to the following file:

View file
namevnn_post_process.zip

we needs to be unzipped and placed in ~/c3v/Models/yolov8s-pose/wksp/yolov8s_int16_nbg_unify Folder.

2.2. Program Compile

When compiling NN-related applications, SDK's headers and libraries must be included.

...

Code Block
LIBS+=-lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -ljpeg -lovxlib

This The following file is an example Makefile that just needs to be unzipped and placed in ~/c3v/Models/yolov8s-pose/wksp/yolov8s_int16_nbg_unify Folder. And set the relevant VIVIANTE_ SDK_ DIR and TOOLCHAIN can complete the compilation of the app.

View file
nameMakefile.zip

2.2.3 build in c3v

If you want to build the project in c3v directly, please modify these contents of Makefile:

Code Block
BIN=yolov8s-detection-int16

# 2.build in c3v
NN_SDK_DIR=/usr

CC=gcc
CXX=g++

2.2.4 cross compile in Linux

If you want to build the project in host Linux, please modify these contents of Makefile:

Code Block
BIN=yolov8s-posedetection-int16

# 1.cross compile
# NN_SDK_DIR=Path to NN SDK directory
# TOOLCHAIN=Path to toolchain directory

#
CROSS_COMPILE=$(TOOLCHAIN)/aarch64-none-linux-gnu-
# CC=$(CROSS_COMPILE)gcc
# CXX=$(CROSS_COMPILE)g++

# 2.build in c3v
# 

you need to set the right path of NN_SDK_DIR

...

and TOOLCHAIN

NN_SDK_

...

DIR: The path to NPU SDK

TOOLCHAIN: The cross-compile toolchain path. which format may be like this:

Code Block
TOOLCHAIN=/pub/toolchain/crossgcc/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin

the brief folder of the project is like this:

...

then using make to compile the project.

Code Block
make

3. Running on the C3V Linux

Insmod to the kernel if the driver is not probeprobed or skip this step.

Code Block
insmod ./galcore.ko
[14358.019373] galcore f8140000.galcore: NPU get power success
[14358.019458] galcore f8140000.galcore: galcore irq number is 44
[14358.020542] galcore f8140000.galcore: NPU clock: 900000000
[14358.026015] Galcore version 6.4.18.5

Copy the application and related libraries into C3V Linux and run:

param1 is the nb file that converts from the acuity toolkit.

param2 is the image that is for detection.

Code Block
./yolov8s-pose-int16 ./network_binary.nb ./input.jpg

...