Versions Compared

Key

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

...

Next, place the model-converted yolov5_cavalry.bin file in the sample app directory with the following configuration.

[For ambaCV2X app]
${SDK_DIR}/src/adamapp/yuv_yolov5_app/data_CV2X/cnn/yolov5_cavalry.bin
[For ambaCV5X app]
${SDK_DIR}/src/adamapp/yuv_yolov5_app/data_CV5X/cnn/yolov5_cavalry.bin

make.

...

Place the model-converted yolov5_cavalry.bin file in the sample app directory with the following configuration.

[For ambaCV2X app]
${SDK_DIR}/src/adamapp-py/yuv_yolov5_app/data_CV2X/cnn/yolov5_cavalry.bin
[For ambaCV5X app]
${SDK_DIR}/src/adamapp-py/yuv_yolov5_app/data_CV5X/cnn/yolov5_cavalry.bin

See here for building with Python.

...

How to change AI model

  1. Please replace
    data_CV2X/cnn/*.bin
    and
    data_CV5X/cnn/*.bin
    with your model.

  2. Please change the following part of main.cpp according to the model specifications.

    #define OUTSIZE_HEIGHT <Model input height>
    #define OUTSIZE_WIDTH <Model input width>
    #define NETNAME <Model file name>
    #define LAYERNAMEIN <Model input layer>
    #define LAYERNAMEOUT_CONV1037 <Layer name of feature map (stride 32)>
    #define LAYERNAMEOUT_CONV1017 <Layer name of feature map (stride 16)>
    #define LAYERNAMEOUT_CONV997 <Layer name of feature map (stride 8)>
    #define TOTAL_CLS <Number of model classes>

    char const *names (object_name_list in pymain.py)
    Please change it according to the model specifications.
    const float anchors (anchors_list in pymain.py)
    The value of anchors in the URL below is used.
    https://github.com/ultralytics/yolov5/blob/master/models/yolov5s.yaml
    The values may vary depending on the model, so please check the model specifications.

...