# yolov5-opencv
## Prerequisites
Make sure you have already on your system:
Any modern Linux OS (tested on Ubuntu 20.04)
OpenCV 4.5.4+
Python 3.7+
IMPORTANT!!! Note that OpenCV versions prior to 4.5.4 will not work at all.
## Which YOLO version should I use?
This repository uses YOLO V5 but it is not the only YOLO version out there. You can read [this article](https://towardsdatascience.com/yolo-v4-or-yolo-v5-or-pp-yolo-dad8e40f7109) to learn more about YOLO versions and choose the more suitable one for you.
## Exporting yolo v5 models to .onnx format
Check here: https://github.com/ultralytics/yolov5/issues/251
My commands were:
```bash
git clone https://github.com/ultralytics/yolov5
cd yolov5
pip install -r requirements.txt
```
And then to convert the model:
```bash
$ python3 export.py --weights yolov5n.pt --img 640 --include onnx
export: data=data/coco128.yaml, weights=['yolov5n.pt'], imgsz=[640], batch_size=1, device=cpu, half=False, inplace=False, train=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=12, verbose=False, workspace=4, nms=False, agnostic_nms=False, topk_per_class=100, topk_all=100, iou_thres=0.45, conf_thres=0.25, include=['onnx']
YOLOv5 ���� v6.0-192-g436ffc4 torch 1.10.1+cu102 CPU
Fusing layers...
Model Summary: 213 layers, 1867405 parameters, 0 gradients
PyTorch: starting from yolov5n.pt (4.0 MB)
ONNX: starting export with onnx 1.10.2...
/home/user/workspace/smartcam/yolov5/models/yolo.py:57: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if self.onnx_dynamic or self.grid[i].shape[2:4] != x[i].shape[2:4]:
ONNX: export success, saved as yolov5n.onnx (7.9 MB)
Export complete (1.33s)
Results saved to /home/doleron/workspace/smartcam/yolov5
Visualize with https://netron.app
Detect with `python detect.py --weights yolov5n.onnx` or `model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5n.onnx')
Validate with `python val.py --weights yolov5n.onnx`
$
```
## References
- https://github.com/ultralytics/yolov5/issues/708
没有合适的资源?快使用搜索试试~ 我知道了~
毕业设计-基于yolov5实现目标检测+双目摄像头实现距离测量源码

共9个文件
jpg:3个
txt:2个
py:1个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 160 浏览量
2024-12-21
15:52:47
上传
评论
收藏 24.35MB ZIP 举报
温馨提示
基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计) 基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计) 基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计) 基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计) 基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计) 基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计)基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计)基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计)基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计)基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计)基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计)基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计)基于yolov5实现目标检测+双目摄像头实现距离测量源码+文档(毕业设计)基于yolov5实现目标检测
资源推荐
资源详情
资源评论






























收起资源包目录














共 9 条
- 1
资源评论


荒野大飞
- 粉丝: 1w+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 520网络情人节祝福语简短一句话.docx
- 计算机专业单片机课程设计要求.docx
- 基于元胞自动机的适应网络病毒传播研究.pptx
- 网络公司第一季度工作总结.pptx
- 网络咨询解答技巧.ppt
- 数据库课程设计机票预订系统.doc
- 信息系统安全等级保护第二级要求技术要求物理安全物理位置选择------.pdf
- 软件工程需求分析.doc
- 2023年计算机二级MSOFFICE模拟考试题及答案题目.doc
- 移动通信试题基础题.doc
- 设备报废申请单(Excel表格通用模板).xlsx
- 数字医学图像处理复习资料.pdf
- 高级语言程序设计.doc
- 互联网公司员工的辞职信.doc
- 东莞大剧院综合布线系统智能化系统项目工程设计文件.doc
- easy-query-SQL资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
