Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel4

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_yolov8_app is a sample application that draws object names and frames on the model on the camera.

Directory path of the sample app

...

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

...

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

Use of AI model conversion tool

...

Before building the sample app, you need to use the AI model conversion tool.

Get the AI model conversion tool from below and build the environment.

AI model convert tool - Technology Partner FAQ (En) - Confluence (atlassian.net)

Info

It may take several days from the time you make an inquiry to the time it is provided.

 After building the environment, refer to the following and convert the yolov8 sample model.

AI model convert tool: ONNX(PyTorch) - Technology Partner FAQ (En) - Confluence (atlassian.net)

Here, the model converted file is explained as "yolov8s_cavalry.bin".

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

...

Info

This article describes how to build it as AdamApp.
If you want to build it as Container AdamApp for Azure IoT Edge, see below.

Development tutorial (Container AdamApp for Azure IoT Edge) - Technology Partner FAQ (En) - Confluence (atlassian.net)

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

...

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

How to build the sample app (Python)

...

Info

This article describes how to build it as AdamApp.
If you want to build it as Container AdamApp for Azure IoT Edge, see below.

Development tutorial (Container AdamApp for Azure IoT Edge) - Technology Partner FAQ (En) - Confluence (atlassian.net)

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

...

See here for building with Python.

How to use the sample app

...

Info

The initial resolution of the sample application is 1920x1080 for C/C++ and 1280x720 for Python. Sample application will not work if the camera resolution setting is not 1920x1080 for C/C++ and 1280x720 for Python. Please check 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 the model specifications.
    #define NETNAME <Model file name>
    #define LAYERNAMEIN <Model input layer>
    #define LAYERNAMEOUT <Model output layer>

    char const *names (object_name_list in pymain.py)
    Please change it according to the model specifications.

Port in use

This application uses 8083 port for websocket communication.

...