【YOLO】YOLOv5
论文地址:https://arxiv.org/pdf/1506.02640.pdf
代码地址(yolov5):https://github.com/ultralytics/yolov5
入门说明:https://zhuanlan.zhihu.com/p/25236464
深入浅出Yolo系列之Yolov5核心基础知识完整讲解: https://zhuanlan.zhihu.com/p/172121380
region proposal 概念??? https://zhuanlan.zhihu.com/p/338217417
B站学习网站:https://www.bilibili.com/video/BV1sF411F7yS?p=2&vd_source=722db5440bd2b088e4f9197f23ba286e
方向名称:Object Detection(目标检测/物体检测)
定位(Where?):Localization,识别(What?):Recogntion
类别标签:Catagory Label,置信度得分:Confidence score
矩形框:Bounding box
其他任务:单个物体:Classification,Classification+Localization,
多个物体:Object Detection ,Ins.. Segmentation
定位和检测:
定位是找到检测图像中带有一个给定标签的单个目标
检测是找到图像中带有给定标签的所有目标
目标检测领域发论文常用数据集:PASCAL VOC ,MS COCO
PASCAL VOC 2007:9963张图像,24640个标注;PASCAL VOC 2012:11530张图像,27450个标注该数据集有20个分类:
链接: http://host.robots.ox.ac.uk/pascal/voc/voc2012/
coco (Common Objects in Context)数据集包含20万个图像:11.5万多张训练集图像,5千张验证集图像,2万多张测试集图像
80个类别中有超过50万个目标标注。平均每个图像的目标数为7.2
MS COCO 链接:http: //cocodataset.org/
数据集代码中文件夹规范:
下采样:25=32
Yolov5模型结构&损失函数
YOLOv5网络结构:
Loss函数的计算,改进Loss的介绍:
Yolov5相关评价指标
目标检测性能指标
检测精度
·Precision, Recall, F1 score
·lou (Intersection over Union)
·P-R curve (Precison-Recall curve)
·AP (Average Precision)
.mAP (mean Average Precision)
检测速度
·前传耗时
·每秒帧数FPS(Frames Per Second)
·浮点运算量(FLOPS)
F1值的计算:
判断模型框的准不准,指标IOU:
An loU of 1 implies that predicted and the ground-truth bounding boxes perfectly overlap.
You can set a threshold value for the loU to determine if the object detection is valid or not.Let's say you set lou to 0.5, in that case
. if lou ≥0.5, classify the object detection as True Positive(TP)
. if loU <0.5, then it is a wrong detection and classify it as False Positive(FP)
·When a ground truth is present in the image and model failed to detect the object, classifyit as False Negative(FN).
·True Negative (TN):TN is every part of the image where we did not predict an object.Thismetrics is not useful for object detection, hence we ignore TN.
·AP衡量的是学习出来的模型在每个类别上的好坏
.mAP衡量的是学出的模型在所有类别上的好坏。mAP就是取所有类别上AP的平均值
·对于PASCAL VOC挑战,如果loU>0.5,则预测为正样本(TP)。但是,如果检测到同一目标的多个检测,则视第一个检测为正样本(TP),而视其余检测为负样本(FP)。
·对于COCO
IOU值越大,说明我们对预测框的要求比较紧tight,大于要求的IOU值才能认为是正样本
在训练过程中--iou-thres参数的功能,如果两个框有重合部分,计算得到的IOU值小于设置的阈值,那么不做取舍,两个框都保留,如果计算得到的大于阈值,两个框要做一个取舍。
AP计算:
检测速度:
--save-txt 可以以txt文件的形式生成图片的检测结果,[类别,x坐标,y坐标,宽,高]
hyp.scratch.yaml作为模型一开始训练的超参数文件,from scratch从头开始训练
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步