1. Export of rknn model
Please refer to other blogs and repositories;
[Edge device] yolov5 training and rknn model export and deployment on RK3588 (pro-test effective)
Training and Export Warehouse
2. Test verification
git clone
Warehouse to local
git clone https://github.com/wangqiqi/rk3588_yolov5_deploy.git
NOTE: The local mentioned here is the development board. It is necessary to connect the development board to the Internet and configure relevant git information
- Compile and install
bash build_rk3588_yolov5.sh
- test
bash test_rk3588_yolov5.sh
3. rknn
Deploy your own models and projects
- Put the exported
rknn
modelassets
under the folder; - Modify
assets/labels_list.txt
the file to store the training target category names in rows; - Add the test picture to
assets
the folder ; - According to the needs of the project, modify the relevant information in the file
file yolov5/include/postprocess.h
inline 7~11
#define OBJ_NAME_MAX_SIZE 16 // 最长目标名称
#define OBJ_NUMB_MAX_SIZE 64 // 最多目标个数
#define OBJ_CLASS_NUM 1 // 目标类别数--需要根据项目进行修改
#define NMS_THRESH 0.45 // NMS 阈值
#define BOX_THRESH 0.25 // 目标置信度
- Compile, install and test
bash build_rk3588_yolov5.sh
Modify
test_rk3588_yolov5.sh
different models and test images in the script
set -e
ROOT_PWD=$( cd "$( dirname $0 )" && cd -P "$( dirname "$SOURCE" )" && pwd )
INSTALL_DIR=${ROOT_PWD}/install
cd ${INSTALL_DIR}
./rk3588_yolov5 assets/drp.rknn assets/drp.png
cd -
then execute
bash test_rk3588_yolov5.sh
4. Clean up
bash clean_all.sh