【翻译】【YOLOv3】YOLOv3: An Incremental Improvement

13 篇文章 0 订阅
6 篇文章 0 订阅

YOLOv3: An Incremental Improvement
YOLOv3:一个渐进式的改进

Joseph Redmon Ali Farhadi

论文:YOLOv3: An Incremental Improvement
代码:https://pjreddie.com/darknet/yolo/

Abstract(摘要)

We present some updates to YOLO! We made a bunch of little design changes to make it better. We also trained this new network that’s pretty swell. It’s a little bigger than last time but more accurate. It’s still fast though, don’t worry. At 320 × 320 YOLOv3 runs in 22 ms at 28.2 mAP, as accurate as SSD but three times faster. When we look at the old .5 IOU mAP detection metric YOLOv3 is quite good. It achieves 57.9 AP50 in 51 ms on a Titan X, compared to 57.5 AP50 in 198 ms by RetinaNet, similar performance but 3.8× faster. As always, all the code is online at https://pjreddie.com/yolo/.
  我们提出了对YOLO的一些更新! 我们做了一些设计上的小改动,使它变得更好。我们还训练了这个新的网络,这个网络非常棒。它比上次大了一点,但更准确。不过不用担心,它仍然很快。在 320 × 320 320×320 320×320的情况下,YOLOv3在28.2mAP的情况下运行22毫秒,与SSD一样准确,但速度快三倍。当我们看旧的.5 IOU mAP检测指标时,YOLOv3相当不错。在Titan X上,它在51毫秒内实现了57.9%的AP50,而RetinaNet在198毫秒内实现了57.5%的AP50,性能相似但快了3.8倍。像往常一样,所有的代码都在网上,https://pjreddie.com/yolo/

1. Introduction(介绍)

Sometimes you just kinda phone it in for a year, you know? I didn’t do a whole lot of research this year. Spent a lot of time on Twitter. Played around with GANs a little. I had a little momentum left over from last year [12] [1]; I managed to make some improvements to YOLO. But, honestly, nothing like super interesting, just a bunch of small changes that make it better. I also helped out with other people’s research a little.
  知道吗,有时你会敷衍了事浑浑噩噩就度过了一年?今年我没有做大量的研究。在Twitter上花了很多时间。玩了一下GANs。我有一点去年留下的动力[12] [1];我设法对YOLO做了一些改进。但是,说实话,没有什么超级有趣的东西,只是做了一些小改动,让它变得更好。我还为其他人的研究提供了一些帮助。
  Actually, that’s what brings us here today. We have a camera-ready deadline [4] and we need to cite some of the random updates I made to YOLO but we don’t have a source. So get ready for a TECH REPORT!
  实际上,这就是我们今天来到这里的原因。我们有一个最终的截止日期,需要引用一些我对YOLO进行的随机更新,但我们没有一个资源。所以准备好迎接这篇技术报告!
  The great thing about tech reports is that they don’t need intros, y’all know why we’re here. So the end of this introduction will signpost for the rest of the paper. First we’ll tell you what the deal is with YOLOv3. Then we’ll tell you how we do. We’ll also tell you about some things we tried that didn’t work. Finally we’ll contemplate what this all means.
  技术报告的好处是,它们不需要介绍,你们都知道我们为什么在这里。因此,这个介绍的结尾将为本文的其余部分做一个指示。首先,我们将告诉你YOLOv3是什么情况。然后我们会告诉你我们是如何做的。我们也会告诉你一些我们尝试过但没有成功的事情。最后,我们将思考这一切意味着什么。

2. The Deal(解决方案)

So here’s the deal with YOLOv3: We mostly took good ideas from other people. We also trained a new classifier network that’s better than the other ones. We’ll just take you through the whole system from scratch so you can understand it all.
  因此,YOLOv3的情况是这样的:我们大多从其他人那里获得了好的想法。我们还训练了一个新的分类器网络,比其他的更好。我们就从头开始带你了解整个系统,以便你能理解这一切。

2.1. Bounding Box Prediction(Bbox预测)

Following YOLO9000 our system predicts bounding boxes using dimension clusters as anchor boxes [15]. The network predicts 4 coordinates for each bounding box, t x , t y , t w , t h t_x, t_y, t_w, t_h tx,ty,tw,th. If the cell is offset from the top left corner of the image by ( c x , c y ) (c_x, c_y) (cx,cy) and the bounding box prior has width and height p w , p h p_w, p_h pw,ph, then the predictions correspond to:
  继YOLO9000之后,我们的系统使用维度集类作为锚框来预测bbox[15]。该网络为每个bbox框预测了4个坐标, t x , t y , t w , t h t_x, t_y, t_w, t_h tx,ty,tw,th。如果单元格从图像的左上角偏移 ( c x , c y ) (c_x, c_y) (cx,cy),并且bbox先验有宽度和高度 p w , p h p_w, p_h pw,ph,那么预测就对应于:在这里插入图片描述
  During training we use sum of squared error loss. If the ground truth for some coordinate prediction is t ∗ ^ \hat{t*} t^ our gradient is the ground truth value (computed from the ground truth box) minus our prediction: t ∗ ^ − t ∗ \hat{t*}-t* t^t. This ground truth value can be easily computed by inverting the equations above.
  在训练过程中,我们使用平方和误差损失。如果某个坐标预测的GT是 t ∗ ^ \hat{t*} t^,我们的梯度就是GT(从GT框中计算)减去我们的预测值: t ∗ ^ − t ∗ \hat{t*}-t* t^t。这个GT值可以通过倒置上面的方程轻松计算出来。
  YOLOv3 predicts an objectness score for each bounding box using logistic regression. This should be 1 if the bounding box prior overlaps a ground truth object by more than any other bounding box prior. If the bounding box prior is not the best but does overlap a ground truth object by more than some threshold we ignore the prediction, following [17]. We use the threshold of .5. Unlike [17] our system only assigns one bounding box prior for each ground truth object. If a bounding box prior is not assigned to a ground truth object it incurs no loss for coordinate or class predictions, only objectness.
  YOLOv3使用逻辑回归法为每个bbox预测一个objectness分数。如果bbox先验与GT实物体的重叠程度超过任何其他bbox先验,则该分数应为1。如果bbox先验不是最好的,但与GT目标的重叠程度超过了某个阈值,我们就会按照[17]的规定,忽略该预测。我们使用0.5的阈值。与[17]不同的是,我们的系统只为每个GT目标分配一个bbox先验。如果没有为一个GT目标分配一个bbox先验,它不会对坐标或类别的预测产生任何损失,只有objectness。

2.2. Class Prediction(类别预测)

Each box predicts the classes the bounding box may contain using multilabel classification. We do not use a softmax as we have found it is unnecessary for good performance, instead we simply use independent logistic classifiers. During training we use binary cross-entropy loss for the class predictions.
  每个box都使用多标签分类来预测bbox可能包含的类别。我们不使用softmax,因为我们发现它对于良好的性能是不必要的,相反,我们只是使用独立的逻辑分类器。在训练过程中,我们使用二元交叉熵损失来预测类别。
  This formulation helps when we move to more complex domains like the Open Images Dataset [7]. In this dataset there are many overlapping labels (i.e. Woman and Person). Using a softmax imposes the assumption that each box has exactly one class which is often not the case. A multilabel approach better models the data.
  当我们转向更复杂的领域,如开放图像数据集[7]时,这种方案会有所帮助。在这个数据集中,有许多重叠的标签(即女人和人)。使用softmax的假设是,每个box都有一个确切的类别,但情况往往并非如此。多标签方法可以更好地模拟数据。

2.3. Predictions Across Scales(跨尺度的预测)

YOLOv3 predicts boxes at 3 different scales. Our system extracts features from those scales using a similar concept to feature pyramid networks [8]. From our base feature extractor we add several convolutional layers. The last of these predicts a 3-d tensor encoding bounding box, objectness, and class predictions. In our experiments with COCO [10] we predict 3 boxes at each scale so the tensor is N × N × [3 ∗ (4 + 1 + 80)] for the 4 bounding box offsets, 1 objectness prediction, and 80 class predictions.
  YOLOv3在3个不同尺度上预测box。我们的系统使用类似于特征金字塔网络的概念[8],从这些尺度上提取特征。从我们的基础特征提取器中,我们添加了几个卷积层。最后一个卷积层预测一个3维张量,encoding bounding box, objectness和类别预测。在我们与COCO[10]的实验中,我们在每个尺度上预测3个box,所以张量是N×N×[3∗(4+1+80)],用于4个bbox的偏移,1个objectness预测和80个类别预测。
  Next we take the feature map from 2 2 2 layers previous and upsample it by 2 × 2× 2×. We also take a feature map from earlier in the network and merge it with our upsampled features using concatenation. This method allows us to get more meaningful semantic information from the upsampled features and finer-grained information from the earlier feature map. We then add a few more convolutional layers to process this combined feature map, and eventually predict a similar tensor, although now twice the size.
  接下来,我们从之前的两个层中提取特征图,并对其进行2倍的上采样。我们还从网络中的早期特征图中取出一个特征图,用concatenation将其与我们的上采样特征图合并。这种方法使我们能够从上采样的特征中获得更有意义的语义信息,并从早期的特征图中获得更精细的信息。然后,我们再增加几个卷积层来处理这个合并的特征图,最终预测出一个类似的张量,尽管现在是原来张量的两倍。
  We perform the same design one more time to predict boxes for the final scale. Thus our predictions for the 3rd scale benefit from all the prior computation as well as finegrained features from early on in the network. We still use k-means clustering to determine our bounding box priors. We just sort of chose 9 9 9 clusters and 3 3 3 scales arbitrarily and then divide up the clusters evenly across scales. On the COCO dataset the 9 9 9 clusters were: ( 10 × 13 ) , ( 16 × 30 ) , ( 33 × 23 ) , ( 30 × 61 ) , ( 62 × 45 ) , ( 59 × 119 ) , ( 116 × 90 ) , ( 156 × 198 ) , ( 373 × 326 ) (10 × 13), (16 × 30), (33 × 23), (30 × 61), (62 × 45), (59 × 119), (116 × 90), (156 × 198), (373 × 326) (10×13),(16×30),(33×23),(30×61),(62×45),(59×119),(116×90),(156×198),(373×326).
  我们再进行一次同样的设计,以预测最终规模的box。因此,我们对第三个尺度的预测得益于所有的先验计算以及网络早期的细化特征。我们仍然使用k-means聚类法来确定我们的bbox先验。我们只是任意选择了 9 9 9个聚类和 3 3 3个尺度,然后将聚类在各个尺度上平均分配。在COCO数据集上, 9 9 9个聚类分别是: ( 10 × 13 ) , ( 16 × 30 ) , ( 33 × 23 ) , ( 30 × 61 ) , ( 62 × 45 ) , ( 59 × 119 ) , ( 116 × 90 ) , ( 156 × 198 ) , ( 373 × 326 ) (10 × 13), (16 × 30), (33 × 23), (30 × 61), (62 × 45), (59 × 119), (116 × 90), (156 × 198), (373 × 326) (10×13),(16×30),(33×23),(30×61),(62×45),(59×119),(116×90),(156×198),(373×326).

2.4. Feature Extractor(特征提取器)

We use a new network for performing feature extraction. Our new network is a hybrid approach between the network used in YOLOv2, Darknet-19, and that newfangled residual network stuff. Our network uses successive 3 × 3 and 1 × 1 convolutional layers but now has some shortcut connections as well and is significantly larger. It has 53 convolutional layers so we call it… wait for it… Darknet-53!
  我们使用一个新的网络来进行特征提取。我们的新网络是YOLOv2中使用的网络、Darknet-19和那个新奇的残差网络东西之间的混合方法。我们的网络使用连续的3×3和1×1卷积层,但现在也有一些恒等连接,而且明显更大。它有53个卷积层,所以我们把它叫做… 等待它… 暗网-53!
在这里插入图片描述
  This new network is much more powerful than Darknet19 but still more efficient than ResNet-101 or ResNet-152. Here are some ImageNet results:
  这个新网络比Darknet19强大得多,但仍然比ResNet-101或ResNet-152更有效率。下面是一些ImageNet的结果。在这里插入图片描述
  Each network is trained with identical settings and tested at 256 × 256 256 × 256 256×256, single crop accuracy. Run times are measured on a Titan X at 256 × 256 256 × 256 256×256. Thus Darknet-53 performs on par with state-of-the-art classifiers but with fewer floating point operations and more speed. Darknet-53 is better than ResNet-101 and 1.5 × 1.5× 1.5× faster.
  每个网络都以相同的设置进行训练,并在 256 × 256 256×256 256×256的条件下进行测试单一裁剪的精度。运行时间是在Titan X上以 256 × 256 256×256 256×256的分辨率测试的。因此,Darknet-53的性能与最先进的分类器相当,但浮点运算更少,速度更高。Darknet-53比ResNet-101好,速度快1.5倍。
  Darknet-53 has similar performance to ResNet-152 and is 2× faster. Darknet-53 also achieves the highest measured floating point operations per second. This means the network structure better utilizes the GPU, making it more efficient to evaluate and thus faster. That’s mostly because ResNets have just way too many layers and aren’t very efficient.
  Darknet-53的性能与ResNet-152相似,速度快2倍。Darknet-53还实现了每秒最高的测量浮点运算。这意味着该网络结构更好地利用了GPU,使其评估效率更高,因此速度更快。这主要是因为ResNets的层数实在太多,效率不高。

2.5. Training(训练)

We still train on full images with no hard negative mining or any of that stuff. We use multi-scale training, lots of data augmentation, batch normalization, all the standard stuff. We use the Darknet neural network framework for training and testing [14].
  我们仍然在完整的图像上进行训练,没有困难负样本挖掘或任何这些东西。我们使用多尺度训练,大量的数据增强,批归一化,所有标准的东西。我们使用Darknet神经网络框架进行训练和测试[14]。

3. How We Do(我们如何做)

在这里插入图片描述
  YOLOv3 is pretty good! See table 3. In terms of COCOs weird average mean AP metric it is on par with the SSD variants but is 3× faster. It is still quite a bit behind other models like RetinaNet in this metric though.
  YOLOv3是相当不错的! 见表3。在COCOs怪异的平均AP指标方面,它与SSD变体持平,但速度快3倍。不过,在这个指标上,它仍然比RetinaNet等其他模型落后不少。
  However, when we look at the “old” detection metric of mAP at IOU= .5 (or AP50 in the chart) YOLOv3 is very strong. It is almost on par with RetinaNet and far above the SSD variants. This indicates that YOLOv3 is a very strong detector that excels at producing decent boxes for objects. However, performance drops significantly as the IOU threshold increases indicating YOLOv3 struggles to get the boxes perfectly aligned with the object.
  然而,当我们看IOU=.5时的 "旧 "检测指标mAP(或图表中的AP50),YOLOv3非常强大。它几乎与RetinaNet持平,远高于SSD的变体。这表明YOLOv3是一个非常强大的检测器,擅长为目标生成合适的box。然而,随着IOU阈值的增加,性能明显下降,表明YOLOv3努力使box与目标完全对齐。
  In the past YOLO struggled with small objects. However, now we see a reversal in that trend. With the new multi-scale predictions we see YOLOv3 has relatively high A P S AP_S APSperformance. However, it has comparatively worse performance on medium and larger size objects. More investigation is needed to get to the bottom of this.
  在过去,YOLO在小目标上挣扎。然而,现在我们看到这一趋势发生了逆转。通过新的多尺度预测,我们看到YOLOv3具有相对较高的 A P S AP_S APS性能。然而,它在中等和较大尺寸物体上的性能相对较差。需要进行更多的调查,以弄清这个问题的真相。在这里插入图片描述
  When we plot accuracy vs speed on the AP50 metric (see figure 5) we see YOLOv3 has significant benefits over other detection systems. Namely, it’s faster and better.
  当我们在AP50指标上绘制准确度与速度的关系图时(见图5),我们看到YOLOv3比其他检测系统有显著的优势。也就是说,它更快、更好。

4. Things We Tried That Didn’t Work(我们尝试过但没有成功的事情)

We tried lots of stuff while we were working on YOLOv3. A lot of it didn’t work. Here’s the stuff we can remember.
  我们在开发YOLOv3时尝试了很多东西。很多东西都没有成功。这里是我们能记住的东西。
  Anchor box x , y x, y x,y offset predictions. We tried using the normal anchor box prediction mechanism where you predict the x, y offset as a multiple of the box width or height using a linear activation. We found this formulation decreased model stability and didn’t work very well.
  锚定盒 x , y x, y x,y偏移量预测。我们尝试使用正常的锚定框预测机制,即用线性激活的方式预测x、y偏移量为框宽或框高的倍数。我们发现这种提法降低了模型的稳定性,而且效果不是很好。
  Linear x , y x, y x,y predictions instead of logistic. We tried using a linear activation to directly predict the x, y offset instead of the logistic activation. This led to a couple point drop in mAP.
  线性 x , y x,y xy预测,而不是logistic。我们尝试用线性激活来直接预测x,y的偏移量,而不是用逻辑激活。这导致了mAP下降了几个点。
  Focal loss. We tried using focal loss. It dropped our mAP about 2 points. YOLOv3 may already be robust to the problem focal loss is trying to solve because it has separate objectness predictions and conditional class predictions. Thus for most examples there is no loss from the class predictions? Or something? We aren’t totally sure.
  焦距损失。我们尝试使用焦距损失。它使我们的mAP下降了大约2点。YOLOv3可能已经对焦点损失试图解决的问题很稳健了,因为它有独立的对象性预测和条件类预测。因此,对于大多数例子来说,类别预测没有损失?还是什么?我们并不完全确定。
  Dual IOU thresholds and truth assignment. Faster RCNN uses two IOU thresholds during training. If a prediction overlaps the ground truth by .7 it is as a positive example, by [.3 − .7] it is ignored, less than .3 for all ground truth objects it is a negative example. We tried a similar strategy but couldn’t get good results.
  双IOU阈值和truth分配。Faster RCNN在训练中使用两个IOU阈值。如果一个预测与地面真相重叠0.7,那么它就是一个正面的例子,重叠[.3 - .7],它就会被忽略,对于所有地面真相对象来说,小于0.3就是一个负面的例子。我们尝试过类似的策略,但没有得到好的结果。
  We quite like our current formulation, it seems to be at a local optima at least. It is possible that some of these techniques could eventually produce good results, perhaps they just need some tuning to stabilize the training.
  我们相当喜欢我们目前的配方,它似乎至少处于一个局部优化状态。这些技术中的一些可能最终会产生好的结果,也许它们只是需要一些调整来稳定训练。

5. What This All Means(这一切意味着什么)

YOLOv3 is a good detector. It’s fast, it’s accurate. It’s not as great on the COCO average AP between .5 and .95 IOU metric. But it’s very good on the old detection metric of .5 IOU.
  YOLOv3是一个好的检测器。它很快,很准确。它在0.5和0.95 IOU之间的COCO平均AP指标上不那么好。但它在0.5 IOU的旧检测指标上非常好。
  Why did we switch metrics anyway? The original COCO paper just has this cryptic sentence: “A full discussion of evaluation metrics will be added once the evaluation server is complete”. Russakovsky et al report that that humans have a hard time distinguishing an IOU of .3 from .5! “Training humans to visually inspect a bounding box with IOU of 0.3 and distinguish it from one with IOU 0.5 is surprisingly difficult.” [18] If humans have a hard time telling the difference, how much does it matter?
  我们到底为什么要转换度量衡?最初的COCO文件中只有这样一句话:"在评价服务器完成后,将增加对评价指标的全面讨论。“一旦评估服务器完成,将增加对评估指标的全面讨论”。Russakovsky等人报告说,人类很难区分0.3和0.5的欠条!"训练人类目视检查边界的情况。“训练人类目测一个IOU为0.3的包围盒并将其与一个IOU为0.5的包围盒区分开来是出乎意料的困难。” [18] 如果人类很难区分,那么这又有多大关系呢?
  But maybe a better question is: “What are we going to do with these detectors now that we have them?” A lot of the people doing this research are at Google and Facebook. I guess at least we know the technology is in good hands and definitely won’t be used to harvest your personal information and sell it to… wait, you’re saying that’s exactly what it will be used for?? Oh.
  但也许一个更好的问题是:“既然我们有了这些探测器,我们要用它们做什么?” 很多做这项研究的人都在谷歌和Facebook。我想至少我们知道这项技术是在良好的手中,绝对不会被用来收集你的个人信息并出售给…,等等,你是说这正是它将被用来做什么?哦。
  Well the other people heavily funding vision research are the military and they’ve never done anything horrible like killing lots of people with new technology oh wait…(The author is funded by the Office of Naval Research and Google.)
  好吧,其他大量资助视觉研究的人是军方,他们从来没有做过任何可怕的事情,比如用新技术杀死很多人哦,等等…(作者是由海军研究办公室和谷歌资助。)
  I have a lot of hope that most of the people using computer vision are just doing happy, good stuff with it, like counting the number of zebras in a national park [13], or tracking their cat as it wanders around their house [19]. But computer vision is already being put to questionable use and as researchers we have a responsibility to at least consider the harm our work might be doing and think of ways to mitigate it. We owe the world that much. In closing, do not @ me. (Because I finally quit Twitter).
  我很希望大多数使用计算机视觉的人只是在用它做快乐的、好的事情,比如计算国家公园里的斑马数量[13],或者在他们的猫在家里徘徊时跟踪它[19]。但是,计算机视觉已经被用于可疑的用途,作为研究人员,我们有责任至少考虑我们的工作可能造成的伤害,并想办法减轻它。我们欠世界这么多。最后,请不要@我。(因为我终于退出了Twitter)。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值