Versions Compared

Key

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

Table of contents

...

Table of Contents
minLevel1
maxLevel4

Introduction

...

AdamApp must be packaged into a defined format and be installed. AdamAppSDK provides the environment to make building and packaging AdamApps with ease.

...

Also, this tutorial refers to the SDK installation directory as ${SDK_DIR}.

Packaging format of AdamApp

...

AdamApp needs to be in a package format when it is installed into IP camera. Create a zip file and encrypt it with a directory structure indicated below. *C/C++ is described as an example.

...

This directory stores configuration information which is always a combination of Applicense.bin
file and profile.bin file. These 2 files are created out of a configuration file (placed by the name
of configuration.txt as a sample of AdamAppSDK) by using a tool called adamapp_configurator.
Please refer to here for how to write a configuration.txt.

...

bin/

Directory to store AdamApp execution program

conf/

Directory to store configuration files

data/

Directory to store external data files for AdamApp

python/

Directory to place Python scripts

setup/

Directory to store set-up scripts

Target Dependent Macro

...

This section explains target dependent macros, which represent differences of models, OSs, and so on. They are defined as macro variables and are available within source files, header files and Makefiles. You can use these macros to change implementation of AdamApp on a specific model or OS that you are using.

Macros for source file and header file

Target dependent macros for source file and header file are as follows:

Macro Name

Description

Macro to represent the architecture (ADAM_TARGET_ARCH_XXX)

ADAM_TARGET_ARCH_aarch64-linux-gnu

Linux 64bit on aarch64 (For ambaCV2X)

Macro to represent the model name (ADAM_TARGET_MODEL_XXX)

ADAM_TARGET_MODEL_ipro

i-pro Model

Macro to represent the OS (ADAM_TARGET_OS_XXX)

ADAM_TARGET_MODEL_linux

Linux

Macro to represent the detail platform (ADAM_TARGET_PF_XXX)

ADAM_TARGET_PF_ipro_ambaCV2X_linux

i-pro Model / ambaCV2X / Linux

Macros for Makefile

Target dependent macros for Makefile are as follows:

Macro Name

Value

Description

ADAM_TARGET_ARCH

Macro to represent the architecture

aarch64-linux-gnu

Linux 64bit on aarch64 (For ambaCV2X)

ADAM_TARGET_MODEL

Macro to represent the model name

ipro

i-pro Model

ADAM_TARGET_OS

Macro to represent the OS

linux

Linux

ADAM_TARGET_PF

Macro to represent the detail platform

ipro_ambaCV2X_linux

i-pro Model / ambaCV2X / Linux

Procedure for generation of AdamApp package

...

The procedure to generate an AdamApp package using a sample application (SkeltonSampleApp) is discussed in this section. There are three phases to generate a package.

...

Each specific method will be explained below.

Generate source file and Makefile

(1) Generate and place source files

...

PROG_CXXFLAGS= $(ADAM_CXXFLAGS)

PROG_CXXFLAGS+= -fno-rtti

PROG_CXXFLAGS+=

PROG_CXXFLAGS is a variable for setting C++ compiling option.
If developers need the unique C++ compiling option for AdamApp, please describe value.
By the way, DO NOT delete pre-set value $(ADAM_CXXFLAGS).

Generate and place files

(1) Generate and place external data files for AdamApp

...

Follow the procedure indicated in the here to create a configuration file. Place the file under skeleton_sample_app/ directory by the name of configuration.text.

...

Please refer to here to create setting value control file when using setting
value control function. Place the file under skeleton_sample_app/ directory by the name of
appPref.json.

Building AdamApp & generate package

Build and create a package of AdamApp after creating and placing the required files for AdamApp.
(1) Read configuration file for the AdamApp execution environment and (2) Execute make

...

SkeletonSampleApp.zip :

This is a package file including bin, data, config and setup directories and is encoded by zip.

SkeletonSampleApp.ext :

This file is an encoded file of SkeltonSampleApp.zip by BASE64. Use this file if you need to specify Base64 instead of zip file when installing AdamApp to the camera. (e.g., installation using UI of commercial surveillance camera).

Format of configuration file

...

Configuration file contains essential information to run AdamApp. AdamApp is controlled within Adam execution environment in line with the contents of this file (e.g., at the time of installation or starting). Therefore, installation or starting of AdamApp may fail if the content in this file is incorrect. In addition, this file is also used when AdamApp is packaged, which means that you need to create this file before the execution of make to create AdamApp.

...

${SDK_DIR}/src/adamapp/[any sample app]/configuration.txt

Each term in configuration.txt

Each item has a tag and a value as shown below.

...

*2: RAMSIZE, CPURATE, AIACCRATE,
At first, set the same value as the sample application.
At last, set the value when running the application on the i-PRO camera.
How to see these parameters described in here.
Available ROM/RAM resources described in here.

*3: AIMEMSIZE

Set the same value as the sample application.

Case of using AI accelerator

...

Note

・AI accelerator is available only in AdamApp for i-pro ambaCV2X model.

・Tool(cvtool) is not included in AdamAppSDK. Please contact i-PRO Co., Ltd. if you need one.

...

  1. Convert a pre-trained AI model into a binary file for accelerator.

  2. Create AdamApp package in accord to here in this document. Place the binary file generated in step 1 under data/cnn directory.

...

A tool (cvtool) to be used to process the step1 above is provided by Adam. Please see here for how to use cvtool.

Appendix

...

Appendix A: Regarding product security

Please be aware of the following matters to ensure product security throughout the course of your development.

...

- When using OSS, use the latest OSS or check for known vulnerabilities before using.

Appendix B: CPU and RAM available in AdamApp

The CPU usage and RAM usage available in AdamApp varies depending on i-PRO camera model. The camera will restrain AdamApp not to use CPU when CPU usage limit has been reached. AdamApp will be forced to terminate as the memory usage reaches the limit. Please access the URL for usage information for each model.

https://dev-partner.i-pro.com/space/TPFAQ/694780048

Appendix C: About development in Python

Python environment of i-PRO camera

The Python environment pre-installed to the i-PRO camera is shown below.

Interpreter : Python 3.7.9

External library : python adam module for ADAM API

Structure of the Python version AdamApp

The Python version AdamApp runs 2 threads, Main thread and Python thread as shown below.

...