Versions Compared

Key

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

This is the document on how to test the YOLOv8s detection map with the COCO 2017.

Table of Contents
stylenone

1. Prerequest

1.1. Provided Files

Unzip Download C3V_Validation_Resources_v1.0.zip and unzip the provided zipped file. We use 'provided_files' to represent the folder where you unzip the file to. The folder structure is as follows:

...

The results will be printed in the terminal as follows:

...

3.3. Inference by C code

3.3.1. Prepare the environment

...

(C3V Board)

Code Block
sudo apt update
sudo apt install python3-pip libopencv-dev libjsoncpp-dev
pip install pycocotools

3.3.2. Prepare the project (Ubuntu PC)

Download the mapTestTools, the .zip and unzip the provided zipped file. The project code tree like this:

...

  1. Copy these three files to the vnn_nbg_framework/model folder, the files were exported by the acuity toolkit in this step: https://sunplus.atlassian.net/wiki/spaces/C3/pages/2354020355/C3V+validation+Guilde#3.1.-Transition-(Ubuntu-PC-%2F-Acuity)

  • network_binary.nb

  • vnn_quantized_extracted_yolov8s_inspiren.c

  • vnn_quantized_extracted_yolov8s_inspiren.h

  1. Modify vnn_nbg_model/vnn_model.c like this.

Code Block
#include "common.h"
#include "vnn_quantized_extracted_yolov8s_inspiren.h"

vsi_nn_graph_t *
vnn_CreateGraph(const char *data_file_name, vsi_nn_context_t in_ctx,
                                const vsi_nn_preprocess_map_element_t *pre_process_map,
                                uint32_t pre_process_map_count,
                                const vsi_nn_postprocess_map_element_t *post_process_map,
                                uint32_t post_process_map_count)
{
        return vnn_Createquantized_extracted_yolov8s_inspiren(data_file_name, in_ctx, pre_process_map, pre_process_map_count, post_process_map, post_process_map_count);
}

void vnn_ReleaseGraph(vsi_nn_graph_t *graph, vsi_bool release_ctx)
{
        vnn_Releasequantized_extracted_yolov8s_inspiren(graph, release_ctx);
}

3.3.3. Build and Evaluation

...

(C3V Board)

Copy the project files to the C3V, and build it on C3V Ubuntu with follow command.

...

Code Block
./mapTest.sh ./bin/network_binary.nb ./cocoVal2017 ./c3v_detect_results.json

...