This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:vim3:npu:npu-app [2023/09/12 03:06] sravan [Source Description] |
products:sbc:vim3:npu:npu-app [2024/03/12 05:26] (current) louis |
||
|---|---|---|---|
| Line 18: | Line 18: | ||
| ===== Source Description ===== | ===== Source Description ===== | ||
| + | ==== Base directory ==== | ||
| + | Base directory of the cloned repository. | ||
| ```shell | ```shell | ||
| $ cd aml_npu_app | $ cd aml_npu_app | ||
| Line 24: | Line 25: | ||
| DDK_6.3.2 | DDK_6.3.2 | ||
| ``` | ``` | ||
| - | ^ File | + | ^ File ^ Description ^ |
| - | | **DDK_xxx** | + | | DDK_xx |
| - | | **detect_library** | Application layer source code. detect_library/ | + | | detect_library | Application layer source code. the detect_library/ |
| - | | **NN_SLT** | Separate source code directory for DnCnn model (no longer maintained). | | + | | NN_SLT | Separate source code directory for DnCnn model (no longer maintained). | |
| - | | **LICENSE** | LICENSE file. | | + | | LICENSE | LICENSE file. | |
| + | | ||
| + | ==== Detect library ==== | ||
| + | Directory with various model specific application code. | ||
| ```shell | ```shell | ||
| $ cd aml_npu_app/ | $ cd aml_npu_app/ | ||
| Line 40: | Line 44: | ||
| | **model_code** | | **model_code** | ||
| | **source_code** | Provide interfaces for demo to call model_code. | | | **source_code** | Provide interfaces for demo to call model_code. | | ||
| - | | **Other folders** | Load input and visualize the results. | + | | **Other folders** | Application source code | |
| - | Enter the directory of the library | + | ==== Model code ==== |
| + | Directory containing all the detection | ||
| ```shell | ```shell | ||
| Line 64: | Line 69: | ||
| | **detect_yolov8n** | yolov8n model, for object detection. The latest yolo model. | | | **detect_yolov8n** | yolov8n model, for object detection. The latest yolo model. | | ||
| | **facenet** | Deprecated - No longer in use. | | | **facenet** | Deprecated - No longer in use. | | ||
| - | |||
| Line 85: | Line 89: | ||
| - | Enter the directory of the **source_code**. | + | ==== Source code ==== |
| + | Directory containing | ||
| ```shell | ```shell | ||
| Line 92: | Line 97: | ||
| build_vx.sh | build_vx.sh | ||
| ``` | ``` | ||
| - | |||
| - | Main content description: | ||
| ^ File ^ Description ^ | ^ File ^ Description ^ | ||
| Line 104: | Line 107: | ||
| - | Enter the directory of the **yolo_demo_x11_usb**: | + | Enter the directory of the '' |
| ```shell | ```shell | ||
| Line 119: | Line 122: | ||
| | **makefile.target_name** | The name of the compiled executable. | | | **makefile.target_name** | The name of the compiled executable. | | ||
| - | ===== Compile | + | ===== Compile |
| 1. Compile the model you want to use from the '' | 1. Compile the model you want to use from the '' | ||
| Line 132: | Line 135: | ||
| ``` | ``` | ||
| - | 2. The compiled library '' | + | 2. The compiled library '' |
| ```shell | ```shell | ||
| - | $ sudo cp -r bin_r/ | + | $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: |
| ``` | ``` | ||
| - | 3. You will also need to build the contents of the '' | + | 3. You will also need to build the contents of the '' |
| ```shell | ```shell | ||
| $ cd aml_npu_app/ | $ cd aml_npu_app/ | ||
| Line 146: | Line 149: | ||
| $ ls | $ ls | ||
| bin_r build_vx.sh | bin_r build_vx.sh | ||
| - | $ sudo cp -r bin_r/ | ||
| ``` | ``` | ||
| - | 4. Now, Build the example application | + | 4. The compiled library '' |
| + | |||
| + | ```shell | ||
| + | $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: | ||
| + | ``` | ||
| + | |||
| + | 5. Now, Build the example application. | ||
| ```shell | ```shell | ||
| $ cd aml_npu_app/ | $ cd aml_npu_app/ | ||
| Line 159: | Line 167: | ||
| ``` | ``` | ||
| - | 5. Create a folder named '' | + | <WRAP important > |
| + | If you use kernel are using version | ||
| + | </ | ||
| + | |||
| + | ```diff | ||
| + | LIBS += -L$(VIVANTE_SDK_LIB) -lOpenVX -lOpenVXU -lGAL -lovxlib -lArchModelSw -lNNArchPerf | ||
| + | |||
| + | LIBS += -L../ | ||
| + | |||
| + | -#LIBS +=-L$(LIB_DIR) -lstdc++ | ||
| + | -LIBS += -lvpcodec -lamcodec -lamadec -lamvdec -lamavutils -lrt -lpthread -lge2d -lion | ||
| + | |||
| + | ############################################################################# | ||
| + | # Macros. | ||
| + | PROGRAM = 1 | ||
| + | CUR_SOURCE = ${wildcard *.c} | ||
| + | ############################################################################# | ||
| + | ``` | ||
| + | |||
| + | 6. Create a folder named '' | ||
| ```shell | ```shell | ||
| $ cd bin_r_cv4 | $ cd bin_r_cv4 | ||
| Line 167: | Line 194: | ||
| detect_demo_x11_usb | detect_demo_x11_usb | ||
| ``` | ``` | ||
| + | ===== Run the application ===== | ||
| - | 6. Finally | + | Now you can run inference on captured video data using the model. |
| ```shell | ```shell | ||
| $ ./ | $ ./ | ||
| ``` | ``` | ||
| - | ==== Run-time | + | ==== Application setup parameters ==== |
| - | === Selecting | + | === Parameter to select |
| The parameter '' | The parameter '' | ||
| - | * **0** - detect_yoloface | ||
| - | * **1** - detect_yolo_v2 | ||
| - | * **2** - detect_yolo_v3 | ||
| - | * **3** - detect_yolo_v3_tiny | ||
| - | * **4** - detect_yolo_v4 | ||
| - | * **13** - detect_yolo_v7_tiny | ||
| - | * **14** - detect_yolov8n | ||
| - | * **15** - densenet_ctc | ||
| - | * **16** - detect_retinaface | ||
| - | For the above example, we used the serial number '' | + | ^ Index ^ File ^ |
| + | | **0** | detect_yoloface | | ||
| + | | **1** | detect_yolo_v2 | | ||
| + | | **2** | detect_yolo_v3 | | ||
| + | | **3** | detect_yolo_v3_tiny | | ||
| + | | **4** | detect_yolo_v4 | | ||
| + | | **13** | detect_yolo_v7_tiny | | ||
| + | | **14** | detect_yolov8n | | ||
| + | | **15** | densenet_ctc | | ||
| + | | **16** | detect_retinaface | | ||
| + | |||
| + | |||
| + | For the above example, we used the serial number '' | ||
| - | === Providing picture as input === | + | === Parameter to set the input as picture |
| - | If you use the model that takes input as a picture, change '' | + | If you use the model that takes input as a picture, change '' |
| ```shell | ```shell | ||
| $ ./ | $ ./ | ||
| ``` | ``` | ||