Build from IoT Yocto Layer
Note
Before downloading the Yocto layer, make sure you already have a populated Yocto building environment. Please refer to Build from Source Code for more information.
Please run following command to download the Yocto layer:
git clone https://gitlab.com/mediatek/aiot/rity/meta-mediatek-demo.git $PROJ_ROOT/src/meta-mediatek-demo
Setup Yocto building environment as described in Build from Source Code:
cd $PROJ_ROOT
export TEMPLATECONF=${PWD}/src/meta-rity/meta/conf/
source src/poky/oe-init-build-env
export BUILD_DIR=`pwd`
Run following command to add the layer we just downloaded to the environment:
bitbake-layers add-layer ../src/meta-mediatek-demo
Enable R2Inference and GstInference in your $PROJ_ROOT/build/conf/local.conf.
IMAGE_INSTALL:append = "r2inference gstinference"
Rebuild the image:
DISTRO=rity-demo MACHINE=genio-1200-evk bitbake rity-demo-image
Please refer to Flash Image to Boards to flash the target board with the built image.
You can find the example models and labels in the /usr/share/gstinference_example
directory.
Here is the folder structure of gstinference_example:
.
├── image_classification
│ ├── labels.txt
│ ├── mobilenet_v1_1.0_224_quant.tflite
│ └── mobilenet_v1_1.0_224_quant.dla
└── object_detection
├── labels_pascal.txt
├── mobilenet_ssd_pascal_quant.tflite
└── mobilenet_ssd_pascal_quant.dla
To run the built-in application, please connect the camera to the board first. Please refer to Camera section for camera configuration.
Run the Demo section has the detail for how to launch the APP.