yuv_yolo_app

 

Table of contents


 

Introduction


This explanation assumes that the i-PRO camera application development environment has been completed.
If you are not ready to build the development environment, please refer to here to complete it.

Also, in this tutorial, the SDK installation directory is described as ${SDK_DIR}.

Operation overview


yuv_yolo_app is a sample application that draws object names and frames on the model on the camera.

 

External libraries required for operation


To build with Python, need below:

numpy

The use of external libraries will be explained later.

 

Directory path of the sample app


The C/C++ source code is stored below.

${SDK_DIR}/src/adamapp/yuv_yolo_app

The Python source code is stored below.

${SDK_DIR}/src/adamapp-py/yuv_yolo_app

 

How to build the sample app (C/C++)


Load the build environment settings file in the SDK installation directory.

$ cd ${SDK_DIR} $ source setup_env.sh ipro-ambaCV2X

Set the build environment according to each environment.
Here, specify ipro-ambaCV2X.

 

make.

$ cd src/adamapp/yuv_yolo_app $ make

It is successful if the .ext file is created in ${SDK_DIR}/src/adamapp/yuv_yolo_app.

 

Install it on the camera (eg, you can install from the green frame in the image below). Select the created .ext file and install it.
Open the app screen (red frame button in the image below).

 

If the image of the camera is displayed, it is successful.

 

How to build the sample app (Python)


See here for building with Python.

 

How to use the sample app


The default resolution of the sample app is 1920×1080. It will not work if the camera resolution setting is not 1920x1080. Please see below for details.

Fail to call ADAM_DevYcVideo_Create() - Technology Partner FAQ (En) - Confluence (atlassian.net)

Take a picture of some model with your camera. In the example below, you can see that the model (hand and fingers) is surrounded by a frame and the object name (person) is displayed.

 

Appendix


How to change preferences

This application has some preferneces which a user is able to change.
When changing some preferneces, push "AppPrefs" button in "ADAM OPERATION UI" html page.

Resoultion:
Resolution to get YUV images. Specfify HD(1280x720) or FHD(1920x1080).
However, by the ability of the camera, it may not work with the specified value.

Frame rate:
Frame rate to get YUV images. Specify 1 or more.
However, by the ability of the camera, it may not work with the specified value.

 

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 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 LAYERNAMEIN"data"<Input layer name of your model>
    #define LAYERNAMEOUT_CONV59"conv59"<Output layer name of your model>
    #define LAYERNAMEOUT_CONV67"conv67"<Output layer name of your model>
    #define LAYERNAMEOUT_CONV75"conv75"<Output layer name of your model>
    #define PROPERTY_NUMCLASSES<Number of classes of your model>

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

 

Port in use

This application uses 8083 port for websocket communication.