...
Code Block |
---|
/mnt/yolov8s_uint8_nbg_unify # ./yolov8s-detection-uint8 ./network_binary.nb ./input.jpg Create Neural Network: 28ms or 28375us Verify... Verify Graph: 21ms or 21116us Start run graph [1] times... Run the 1 time: 57.55ms or 57548.24us vxProcessGraph execution time: Total 58.05ms or 58053.36us Average 58.05ms or 58053.36us obj: L: 0 P:0.93, [(0, 42) - (200, 599)] obj: L: 0 P:0.91, [(309, 279) - (180, 361)] obj: L: 0 P:0.58, [(344, 171) - (170, 301)] |
3.2. cross-compile in Linux
If you want to build the project in host Linux, please modify these contents of Makefile:
Code Block |
---|
BIN=yolov8s-detection-uint8
# 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++ |
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 |
then using make to compile the project.
Code Block |
---|
make |
Copy the application, network_binary.nb file and related libraries into C3V Linux and run:
The param1 is the nb file that converts from the acuity toolkit.
The param2 is the image that is for detection. Please prepare the image file which format is jpg and the pixel size is 640 * 640.
Code Block |
---|
./yolov8s-detection-uint8 ./network_binary.nb ./input.jpg |
The result is like this:
Code Block |
---|
/mnt/yolov8s_uint8_nbg_unify # ./yolov8s-detection-uint8 ./network_binary.nb
./input.jpg
Create Neural Network: 28ms or 28375us
Verify...
Verify Graph: 21ms or 21116us
Start run graph [1] times...
Run the 1 time: 57.55ms or 57548.24us
vxProcessGraph execution time:
Total 58.05ms or 58053.36us
Average 58.05ms or 58053.36us
obj: L: 0 P:0.93, [(0, 42) - (200, 599)]
obj: L: 0 P:0.91, [(309, 279) - (180, 361)]
obj: L: 0 P:0.58, [(344, 171) - (170, 301)] |