yolo

exec to add a function into a class

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So I've looked at similar questions, and I've found some solutions to this, but I can't quite figure out how to do this. What I'm trying to do is add a method to a class from a string. I can do this with the setattr() method, but that won't let me use self as an attribute in the extra method. Here's an example: (and I apologize for the variable names, I always use yolo when I'm mocking up an idea) class what: def __init__(self): s = 'def yolo(self):\n\tself.extra = "Hello"\n\tprint self.extra' exec(s) setattr(self,"yolo",yolo) what().yolo()

Darknet YOLO image size

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to train custom object classifier in Darknet YOLO v2 https://pjreddie.com/darknet/yolo/ I gathered a dataset for images most of them are 6000 x 4000 px and some lower resolutions as well. Do I need to resize the images before training to be squared ? I found that the config uses: [net] batch=64 subdivisions=8 height=416 width=416 channels=3 momentum=0.9 decay=0.0005 angle=0 saturation = 1.5 exposure = 1.5 hue=.1 thats why I was wondering how to use it for different sizes of data sets. 回答1: You don't have to resize it, because

YOLOv3 best_iou问题

匿名 (未验证) 提交于 2019-12-03 00:34:01
YOLO v3解读 转自: https://xmfbit.github.io/2018/04/01/paper-yolov3/ YOLO的作者又放出了V3版本,在之前的版本上做出了一些改进,达到了更好的性能。这篇博客介绍这篇论文: YOLOv3: An Incremental Improvement 。下面这张图是YOLO V3与RetinaNet的比较。 可以使用搜索功能,在本博客内搜索YOLO前作的论文阅读和代码。 YOLO v3比你们不知道高到哪里去了 YOLO v3在保持其一贯的检测速度快的特点前提下,性能又有了提升:输入图像为大小的图像,可以在ms跑完,mAP达到了,这个数据和SSD相同,但是快了倍。在TitanX上,YOLO v3可以在ms内完成,的值为。而RetinaNet需要ms,近似却略低,为。 ps:啥是AP AP就是average precision啦。在detection中,我们认为当预测的bounding box和ground truth的IoU大于某个阈值(如取为)时,认为是一个True Positive。如果小于这个阈值,就是一个False Positive。 所谓precision,就是指检测出的框框中有多少是True Positive。另外,还有一个指标叫做recall,是指所有的ground truth里面,有多少被检测出来了

one-shot 检测算法YOLO、SSD

匿名 (未验证) 提交于 2019-12-03 00:32:02
YOLO 优点:速度快,端到端。在Titan gpu上的帧率是45fps,并且加速版的帧率可以达到155fps。 缺点:实践证明,该算法对小物体和离得近的物体分类效果比较差。 实验效果 SSD 在Titan X上的帧率达到58fps,(在VOC2007测试中, 58 FPS下 72.1%mAP,对Faster R-CNN 7 FPS 下mAP 73.2%,YOLO 45 FPS 下mAP 63.4%). 对于其原理 SSD的缺点参考:https://blog.csdn.net/u010402786/article/details/78123546 原文:https://www.cnblogs.com/xiaoheizi-12345/p/9215496.html

YOLOѧϰ

匿名 (未验证) 提交于 2019-12-03 00:22:01
yolo1 将图像分成7*7个小块,每个小块有两个boundingbox(每个bounding有5个值,x,y,w,h,和置信度),一共有20个类别 7*7*(2*5+20)输出 yolo2 参考这个文章https://blog.csdn.net/u011507206/article/details/60884602 主要改进是 1、增加了batch normalization方法 一旦每批训练数据的分布各不相同(batch),那么网络就要在每次迭代都去学习适应不同的分布,这样将会大大降低网络的训练速度。使用 batch normalization可以是收敛更快并且不加dropout等约束也可以不容易过拟合 。使得mAP(mean average precision)获得了2%的提升。 2、 所有state-of-the-art的检测方法基本上都会使用ImageNet预训练过的模型(classifier)来提取特征,例如AlexNet输入图片会被resize到不足256 * 256,这导致分辨率不够高,给检测带来困难。所以YOLO(v1)先以分辨率224*224训练分类网络,然后需要增加分辨率到448*448,这样做不仅切换为检测算法也改变了分辨率。所以作者想能不能在预训练的时候就把分辨率提高了,训练的时候只是由分类算法切换为检测算法。

YOLO学习总结

匿名 (未验证) 提交于 2019-12-03 00:22:01
confidence代表了所预测的box中含有object的置信度和这个box预测的有多准两重信息。 OLO的一些细节: 1:每个grid有30维,这30维中,8维是回归box的坐标,2维是box的confidence,还有20维是类别。 3:激活函数:leaky rectified linear activation YOLO的网络结构图: YOLO直接从一张图片中提取特征,来预测每一个Bounding box,最小化和ground turth的误差。由于YOLO是一个端到端的训练,并且中间没有region proposal生成,所以在速度上有了很大的提升。 loss损失函数 实验: YOLO一张图片只会预测98个Bounding Box和所述类的可能性。所以YOLO在计算过程中,速度很快。 但是YOLO的局限性也相当明显,首先一个cell只能预测两个Bounding Box,预测一类物体,所以当 有一群小物体密集的时候很难得到正确的Bounding Box,小物体在卷积和pooling的过程中,损失的 信息越来越多,得到的有用信息已经很少,所以YOLO在检测小目标效果不尽人意。 总结: 每个 grid cell 中只能预测两个 boxes,以及有一个类别。这种太强的空间约束,限制了 YOLO 对于相邻物体的检测能力,一旦相邻的物体数量过多,YOLO 就检测不好了。

Ubuntu安装及配置OpenCV3.2.0

匿名 (未验证) 提交于 2019-12-03 00:22:01
最近在看一些目标检测相关的paper,再看完YOLO三部曲之后,想自己测试一下YOLOv2和YOLOv3的效果,于是安装了OpenCV,下面记录一下安装步骤,及遇到的问题。 环境:Ubuntu16.04 安装:OpenCV3.2.0 1.使用conda安装OpenCV,在终端下输入以下指令: source activate gymlab conda install -c menpo opencv3=3.2.0 2.使用以下指令检查安装的OpenCV版本号: pkg-config --modversion opencv 3.这时,遇到了一些问题,找不到opencv.pc,错误如下: Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv.pc' to the PKG_CONFIG_PATH environment variable No package 'opencv' found export PKG_CONFIG_PATH=~/anaconda3/envs/gymlab/lib/pkgconfig:$PKG_CONFIG_PATH source ~/.bashrc 4.再次运行第2步的指令,可以看到版本号3

Yolo学习1-Yolov3训练自己的数据

匿名 (未验证) 提交于 2019-12-03 00:19:01
前提: 可运行的yolov3环境,环境搭建见官网 https://pjreddie.com/darknet/yolo/ 目的: 实现利用yolov3训练自己的数据集(voc格式) 方法: 1) 构建VOC数据集 将你手中的数据集的标注txt修改成voc格式的txt,voc格式如下: 000002.jpg car 44 28 132 121 000003.jpg car 54 19 243 178 000004.jpg car 168 6 298 164 其中第一列为图片名,第二列为目标类别,最后是目标的包围框坐标(左上角和右下角坐标)。 批量修改文件名python代码: pic_path = "D:/VOCdevkit/VOC2007/JPEGImages/" piclist = os.listdir(pic_path) total_num = len(piclist) i = 1 for pic in piclist: if pic.endswith(".jpg"): old_path = os.path.join(os.path.abspath(pic_path), pic) new_path = os.path.join(os.path.abspath(pic_path), '000' + format(str(i), '0>5') + '.jpg') os.renames

对YOLO训练输出参数的理解

匿名 (未验证) 提交于 2019-12-03 00:19:01
I was recently asked what the different parameters mean you see logged to your terminal while training and how we should interpret these. An interesting question I will try to explain here. .cfg Next, a screenshot of the terminal output I am currently seeing: batch subdivisions .cfg batch = 64 subdivision = 8 . Looking at the image above, the training iteration has 8 groups of 8 images, reflecting these specific settings. Batch output detector.c this line of code . 9798 0.370096 0.451929 avg 0.060730 avg , you can stop training. 0.001000 rate .cfg 3.300000 seconds 627072 images 9778 * 64 , the

目标检测(十)――SSD

匿名 (未验证) 提交于 2019-12-03 00:18:01
SSD: Single Shot MultiBox Detector intro: ECCV 2016 Oral arxiv: http://arxiv.org/abs/1512.02325 paper: http://www.cs.unc.edu/~wliu/papers/ssd.pdf slides: http://www.cs.unc.edu/%7Ewliu/papers/ssd_eccv2016_slide.pdf github(Official): https://github.com/weiliu89/caffe/tree/ssd video: http://weibo.com/p/2304447a2326da963254c963c97fb05dd3a973 github: https://github.com/zhreshold/mxnet-ssd github: https://github.com/zhreshold/mxnet-ssd.cpp github: https://github.com/rykov8/ssd_keras github: https://github.com/balancap/SSD-Tensorflow github: https://github.com/amdegroot/ssd.pytorch github(Caffe):