当前位置: 首页 > news >正文

72、结合无人机进行rk3588oak-lite跟踪目标物体进行识别、跟踪、保持距离

基本思想:

搭建仿真转换模型环境,主要python版本和我下载的rknn2的版本

(rk3588) ubuntu@ubuntu:~/Downloads/rknn-toolkit2-1.5.0/packages$ python3
Python 3.8.0 (default, Nov  6 2019, 21:49:08) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rknn
>>> exit()

截取shape节点,输出模型

其中安装的whl版本

from rknn.api import RKNNONNX_MODEL = '/home/ubuntu/yolov7/runs/train/exp3/weights/best.onnx'
RKNN_MODEL = '/home/ubuntu/yolov7/runs/train/exp3/weights/best.rknn'if __name__ == '__main__':# Create RKNN objectrknn = RKNN(verbose=True)# pre-process configprint('--> config model')rknn.config(mean_values=[[0, 0, 0]], std_values=[[255, 255, 255]],target_platform='rk3588',quantized_dtype='asymmetric_quantized-8')print('done')print('--> Loading model')ret = rknn.load_onnx(model=ONNX_MODEL, outputs=["/model.77/Reshape_2_output_0", "/model.77/Reshape_1_output_0","/model.77/Reshape_output_0"])if ret != 0:print('Load model  failed!')exit(ret)print('done')# Build modelprint('--> Building model')ret = rknn.build(do_quantization=True, dataset='dataset.txt')  # ,pre_compile=Trueif ret != 0:print('Build yolov5s failed!')exit(ret)print('done')# Export rknn modelprint('--> Export RKNN model')ret = rknn.export_rknn(RKNN_MODEL)if ret != 0:print('Export yolov5s.rknn failed!')exit(ret)print('done')rknn.release()

so库也要对应转模型的whl

连接开发板

neardi 用户密码:lindikeji 或 neardi

ubuntu@ubuntu:~$ ssh neardi@192.168.2.29
neardi@192.168.2.29's password: 
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.110 aarch64)* Documentation:  https://help.ubuntu.com* Management:     https://landscape.canonical.com* Support:        https://ubuntu.com/advantageThe programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.neardi@LPA3588:~$ sudo apt-get install cmake gcc g++ ffmpeg

测试一下代码

cmakelists.txt

mian.cpp

参考

Ubuntu新手入门 — Neardi Linux 用户手册 v1.1.2 documentation


http://www.mrgr.cn/news/28823.html

相关文章:

  • leetcode268 丢失的数字
  • 探索美赛:从准备到挑战的详细指南
  • 代码随想录训练营Day24 | 134. 加油站 - 135. 分发糖果 - 860.柠檬水找零 - 406.根据身高重建队列
  • 简析大模型参数高效微调方法
  • 关于指针p有关的3个值
  • Apache服务安装
  • 虚拟机centos_7 配置教程(镜像源、配置centos、静态ip地址、Finalshell远程操控使用)
  • LeetCode 每日一题 2024/9/9-2024/9/15
  • 微服务下设计一个注解标识是否需要登录
  • ccfcsp-202203(1、2)
  • LaTex2024 下载安装运行HelloWorld—全流程笔记
  • 动手学深度学习(四)卷积神经网络-下
  • 数据结构易错整理1
  • C++基础知识7 list
  • 变压器漏感对整流电路的影响
  • C++学习笔记(28)
  • 进程间关系与进程守护
  • ZooKeeper远程连接超时排查与解决
  • 如何用安卓玩Java版Minecraft,安卓手机安装我的世界Java版游戏的教程
  • 过拟合与欠拟合、批量标准化
  • docker- No space left on device
  • 开源模型应用落地-qwen模型小试-调用Qwen2-VL-7B-Instruct-更清晰地看世界(一)
  • 紧急预警!台风贝碧嘉正面袭击上海浦东,风雨交加影响全城
  • 自然语言处理实战项目
  • 文件标识符fd
  • 【看这里】记录一下,如何在springboot中使用EasyExcel并行导出多个Excel文件并压缩zip后下载