YOLO:YOLO简介、安装、使用方法详细攻略

YOLO简介

YOLO论文发表于CVPR2016, 目标检测论文YOLO: Unified, Real-Time Object Detection

     概要说明We present YOLO, a new approach to object detection.Prior work on object detection repurposes classifiers to perform detection. Instead, we frame object detection as a regression problem to spatially separated bounding boxes and associated class probabilities. A single neural network predicts bounding boxes and class probabilities directly from full images in one evaluation. Since the whole detection pipeline is a single network, it can be optimized end-to-end directly on detection performance.Our unified architecture is extremely fast. Our base YOLO model processes images in real-time at 45 frames per second. A smaller version of the network, Fast YOLO, processes an astounding 155 frames per second while still achieving double the mAP of other real-time detectors. Compared to state-of-the-art detection systems, YOLO makes more localization errors but is less likely to predict false positives on background. Finally, YOLO learns very general representations of objects. It outperforms other detection methods, including DPM and R-CNN, when generalizing from natural images to other domains like artwork.

 

YOLO安装

 

 

YOLO的VOC数据集概念

          YOLO本身使用的是VOC的数据集,所以可以按照VOC数据集的架构来构建自己的数据集。现在深度学习很多框架都在使用VOC数据集。一般voc解压出来后都包括Annotations,ImageSets,JPEFImages,SegmentationClass ,SegmentationObject;  Annotations中是放着所有图片的标记信息,以xml为后缀名.以分类检测的数据为例,打开ImageSets中的layout,会有train,trainval,val三个txt格式数据:  

1 train 很明显是训练数据(注意,均为图片名,没有后缀)  
2 val    验证数据  
3 trainval 则是所有训练和验证数据  
4 test  测试数据

YOLO使用方法

anchor概念:根据YOLOv2的论文,YOLOv2使用anchor boxes来预测bounding boxes的坐标。YOLOv2使用的anchor boxes和Faster R-CNN不同,不是手选的先验框,而是通过k-means得到的。anchor的窗口尺寸,三个面积尺寸(128^2,256^2,512^2),然后在每个面积尺寸下,取三种不同的长宽比例(1:1,1:2,2:1).这样一来,我们得到了一共9种面积尺寸各异的anchor。训练YOLO2时会用到cfg文件,这个网络结构文件里面的Region层有一个anchors参数就是论文中对应的用k-means方法产生的5个box的信息。grid和anchor的唯一作用就是为了计算IOU,从而来确定正负样本。

   对于每个3x3窗口,作者假定它来自9种不同原始区域的池化,但是这些池化在原始图片中的中心点,都完全一样。这个中心点,就是刚才提到的,3x3窗口中心点所对应的原始图片中的中心点。如此一来,在每个窗口位置,我们都可以根据9个不同长宽比例、不同面积的anchor,逆向推导出它所对应的原始图片中的一个区域,这个区域的尺寸以及坐标,都是已知的。而这个区域,就是我们想要的 proposal。

YOLO:YOLO简介、安装、使用方法详细攻略

推荐参考文献:YOLOv1论文理解

目标检测网络之 YOLOv3

[目标检测]YOLO原理

faster rcnn中rpn的anchor,sliding windows,proposals?