Versions Compared

Key

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

...

Info

The yuv_dnn_app sample application has the following files, so you can check the operation without using the AI model conversion tool.

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

...

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

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

make.

Code Block
$ cd src/adamapp/yuv_dnn_app
$ make

...

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

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

...

How to change AI model

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

  2. Please change the following part of main.cpp according to your model.
    #define OUTSIZE_HEIGHT<Input height of your model>
    #define OUTSIZE_WIDTH<Input width of your model>

    #define NETNAME<File name of your model>
    #define PRIORBOXFILE<File name of prior box>
    #define LAYERNAMEIN<Input layer name of your model>
    #define LAYERNAMEOUT_MBOX_LOC<Output layer name of your model to indicate boundary box location>
    #define LAYERNAMEOUT_MBOX_CONF_FLATTEN<Output layer name of your model to indicate boundary box confidence>
    #define PROPERTY_NUMCLASSES<Number of classes including background label>
    #define PROPERTY_MBOXLOCSIZE<Number of boundary boxes * 4> : 4 means (x,y,w,h)
    #define PROPERTY_BACKGROUND_LABEL_ID<Background label id>

    Following parameters are valid only for tensorflow SSD. For caffe SSD, please set these values to 0.
    #define X_SCALE<X scale value>
    #define Y_SCALE<Y scale value>
    #define WIDTH_SCALE<Width scale value>
    #define HEIGHT_SCALE<Height scale value>

  3. Please describe "objectname" (label-objectname matrix) according to your model.

...