This documentation will introduce how to compile the application source code.
- Only support local compile on VIM3/3L
- Only support OpenCV4
sudo apt update
- DDK_xxx - Different versions of library source code
- detect_library - Application layer source code. detect_library/model_code link to the latest version of DDK
- NN_SLT - Separate source code directory for DnCnn model (no longer maintained)
- LICENSE - LICENSE file
Enter the directory of the library source code, which is the directory of the DDK.
detect_mtcnn, each directory represents a different model, and each model will be compiled into a library.
- detect_yoloface - yoloface model, used to detect faces
- detect_yolo_v2 - yolov2 model, for object detection
- detect_yolo_v3 - yolov3 model, for object detection
- detect_yolo_v3_tiny - yolov3-tiny model, for object detection
- detect_yolo_v4 - yolov4 model, used to detect faces
detect_yolo_v3 as an example to illustrate the structure of each directory
Main content description:
- build_vx.sh - Compile script
- include - The corresponding header files and all definitions will be placed in this directory
- Makefile - Makefile file
- makefile.linux - Make environment configuration file
- vnn_yolov3.c - SDK The converted model processing file is mainly used to interface with the nb file
- yolo_v3.c - Specify the called nb file, and define all the interfaces of the model call
- yolov3_process.c - Mainly defines the pre-processing and post-processing of the model
Enter the application source code directory
model_code link to the leastest DDK, every other directory will compile a demo of the upper application
- source_code - Compile libnn_detect.so. as a bridge to connect different libraries and different application demos
- sample_demo_fb - Compile detect_demo_fb of the aml_npu_demo_binaries repository for image recognition under framebuffer
- sample_demo_x11 - Compile detect_demo_x11 of the aml_npu_demo_binaries repository for image recognition under X11
- yolo_demo_gst_uvc_fb - Compile the detect_demo_uvc_fb of the aml_npu_demo_binaries repository for dynamic recognition of the USB camera under the framebuffer
- yolo_demo_mipi_fb - Compile detect_demo_mipi_fb of the aml_npu_demo_binaries repository for dynamic recognition of mipi camera under framebuffer
- yolo_demo_x11 - Compile detect_demo_x11 of the aml_npu_demo_binaries repository for dynamic camera recognition under X11
Here is an example of
Here is an explanation of the main files,
- build_vx.sh - Compile script
- makefile.linux - Respectively, the compilation scripts need to specify the makefile.linux file when compiling
- main.cpp - Is the main source code of the application demo.
- xxx.h - The definition related header files that the application layer needs to use
To compile the library, just enter the directory of the corresponding library and compile it. Here is yolov3 as an example
You can see the generated library in the output directory
When compiling the application, first compile
libnn_detect.so. This is one of the dependent libraries for compiling other applications.
source_code directory and compile
libnn_detect.so will be generated
Here is sample_demo_x11 as an example
bin_r_cv4 directory, you will see the generated
To compile the opencv4 version, just use the
build_vx_cv4.sh script to compile.