Environment and Tools:
- One x86_64 ubuntu22.04 host
- One YY3588 development board
- One YY3588 standard power supply
- One USB typeA to typeC debugging cable
Connect the power interface and adb debugging interface of the YY3588 development board, and connect the other end of adb to the ubuntu22.04 host; as shown below:
# Tip: Use a normal user
$ sudo apt update
$ sudo apt search python3.10
# Select one to install
$ sudo apt install xxx
# Check if the installation is successful
$ python --version
$ sudo apt install adb
# Check the development board information. If the development board information appears, it means the installation is successful
$ adb devices
List of devices attached
e917a56d5822e215 device
Download information, click to jump
$ mkdir yyt_RKNN_Projects
$ cd yyt_RKNN_Projects
$ mv /path/to/rknn-toolkit2 /path/to/rknn_model_zoo -t ./
# If there is no error, it has been installed (if it has been installed, you can skip this section)
$ python
$ from rknn.api import RKNN
$ cd yyt_RKNN_Projects/rknn-toolkit2/rknn-toolkit2
$ pip install -r packages/x86_64/requirements_cp310-2.3.0.txt
$ pip install -r packages/x86_64/rknn_toolkit2-2.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
$ sudo apt install cmake
$ cd yyt_RKNN_Projects/rknn_model_zoo/examples/yolov5/model
# You can download the model yourself or use the model we downloaded in the RKNN related warehouse data
$ ./download_model.sh
# Downloaded model path model/yolov5s_relu.onnx
$ cd yyt_RKNN_Projects/rknn_model_zoo/examples/yolov5/python
$ python convert.py ../model/yolov5s_relu.onnx rk3588 i8 ../model/yolov5s_relu.rknn
$ cd Projects/rknn_model_zoo/examples/yolov5/python
# Push adbd.zip in the RKNN related warehouse data to the board
$ unzip adbd.zip
$ adb push adbd/linux-aarch64/adbd /usr/bin/adbd
$ adb shell "chmod +x /usr/bin/adbd"
$ adb reboot
# Wait for the board to start
$ sudo adb kill-server
# Debug command
## Debug with connected board
$ adb shell "restart_rknn.sh"
$ python yolov5.py --model_path ../model/yolov5s_relu.rknn --target rk3588 --img_save
## Host debugging
$ python yolov5.py --model_path ../model/yolov5s_relu.onnx --img_save

The output images of both debugging results are under the result
directory. The default input has 2 photos (bus.jpg, women.jpg)
// TO DO