Skip to content

zgh2022/YOLOPv2-YOLOv8-NCNN-Android

Repository files navigation

YOLOPv2-YOLOv8-NCNN-Android

闲来无事写的一个简单的安卓项目,将YOLOPv2和YOLOv8的模型用NCNN运行,用YOLOv8的目标检测替换了YOLOPv2中的目标检测部分,并写成了c++的多线程保证实时性(所以就不计算帧率了,没意义),骁龙8+手机模型计算耗时和效果图如下(来自手机录屏): Screenrecorder-2024-10-02-19-00-40-691 00-01-20 20241003-122219430

添加了几个可选功能: 1、可选择的三个任务的计算与绘制:目标检测、车道线识别、可行驶区域识别 Screenrecorder-2024-10-02-19-00-40-691 00-01-29 20241003-113620681 (1)(1)

2、一个Zoom放大工具条(由于手机摄像头广角太大,用初始画面实际上体现不出来实际距离,所以写的一个简单的放大图像功能,当然这也是为后续功能铺路) Screenrecorder-2024-10-02-19-00-40-691 00-00-45 20241003-113526658 (1)(1)

3、CPU和GPU切换(建议首次运行后马上点开GPU,保证性能)

项目工程里面给了安卓实现

目前问题

  1. 速度还行,但是不太稳定,测试工具为骁龙8+芯片的手机,yolopv2耗时在50-70ms左右、yolov8n的耗时在20-50不等,做过测试,发热不明显,耗电一般,后面考虑加上bytetrack(有空直接做个辅助驾驶软件吧)
  2. 安卓工程并没有做尺寸调整,固定yolopv2的输入为320,而yolov8为640

安卓结果

我也导出了APP,给大家下载玩玩: (建议首次运行后马上点开GPU,保证性能) 链接: https://pan.baidu.com/s/1R6TnjWUQuDW3sgJyeBZRjQ?pwd=ykfu 提取码: ykfu

screenshot

Screenrecorder-2024-10-02-19-15-32-51 00-05-19 20241003-112756347 缩放功能:Screenrecorder-2024-10-02-19-00-40-691 00-00-45 20241003-113452820 Screenrecorder-2024-10-02-19-00-40-691 00-00-46 20241003-113532468 任务选择:Screenrecorder-2024-10-02-19-00-40-691 00-01-31 20241003-113629142 Screenrecorder-2024-10-02-19-00-40-691 00-01-34 20241003-113635878 Screenrecorder-2024-10-02-19-00-40-691 00-01-41 20241003-113647245 Screenrecorder-2024-10-02-19-00-40-691 00-03-05 20241003-113732575

reference

https://github.com/FeiGeChuanShu/YOLOPv2-ncnn

https://github.com/FeiGeChuanShu/ncnn-android-yolov8

https://github.com/CAIC-AD/YOLOPv2

https://github.com/Tencent/ncnn

If this helped you, don't forget to Star 🌟 the repo.

另外 合肥 视觉方面的工作可以联系我

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published