yolo

How to convert Keras .h5 model to darknet yolo.weights format?

我只是一个虾纸丫 提交于 2020-05-27 00:38:08
问题 I have trained the yolov2 and yolov3 model using keras with this github project(https://github.com/experiencor/keras-yolo2). Now I want to use the trained model (.h5) in darknet prediction. Essentially I need to convert this h5 model into the format expected by darknet(.weights). I have seen this project (https://github.com/allanzelener/YAD2K/blob/master/yad2k.py) which does the reverse of what I want? Did anyone tried this before? 来源: https://stackoverflow.com/questions/55568135/how-to

How to send OpenCV output to browser with python?

房东的猫 提交于 2020-05-26 08:06:50
问题 I have a simple python script with open cv, which takes in a video and does object detection on it using YOLO. My question is, how can I display the output to my website as a live stream. Here is the python code, saving to output.avi. import cv2 from darkflow.net.build import TFNet import numpy as np import time import pafy options = { 'model': 'cfg/tiny-yolo.cfg', 'load': 'bin/yolov2-tiny.weights', 'threshold': 0.2, 'gpu': 0.75 } tfnet = TFNet(options) colors = [tuple(255 * np.random.rand(3)

How to send OpenCV output to browser with python?

这一生的挚爱 提交于 2020-05-26 08:03:36
问题 I have a simple python script with open cv, which takes in a video and does object detection on it using YOLO. My question is, how can I display the output to my website as a live stream. Here is the python code, saving to output.avi. import cv2 from darkflow.net.build import TFNet import numpy as np import time import pafy options = { 'model': 'cfg/tiny-yolo.cfg', 'load': 'bin/yolov2-tiny.weights', 'threshold': 0.2, 'gpu': 0.75 } tfnet = TFNet(options) colors = [tuple(255 * np.random.rand(3)

Loss goes to NAN when training the custom YOLO model

瘦欲@ 提交于 2020-04-30 10:37:52
问题 I implemented a custom loss function and model for YOLO using Keras. I am using Tensorflow as backend. import pickle import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from keras.models import Sequential,load_model from keras.layers import Dense,Conv2D,Activation,MaxPooling2D,Flatten import keras as k from keras import optimizers import cv2 batch=12 sess= tf.Session() #loss function def yolo_loss(yTrue,yPred): coord=5 noobj=0.5 L_noobj=1 L_obj=1 if yTrue[6] == 1: L_obj

Why yolo can't detect all objects in image?

柔情痞子 提交于 2020-03-25 18:08:33
问题 I am trying to detect objects in image using AlexeyAB darknet.But it is detecting only 2 or 3 object.It can't detect small objects(for example hat).I am using this command: ./darknet detector test ./cfg/coco.data ./cfg/yolov3.cfg /weight_path/ /image_path/ How can I do it? 回答1: According to the AlexeyAB page for small objects you can do this: for training for small objects (smaller than 16x16 after the image is resized to 416x416) - set layers = -1, 11 instead of https://github.com/AlexeyAB

Why yolo can't detect all objects in image?

旧城冷巷雨未停 提交于 2020-03-25 18:04:59
问题 I am trying to detect objects in image using AlexeyAB darknet.But it is detecting only 2 or 3 object.It can't detect small objects(for example hat).I am using this command: ./darknet detector test ./cfg/coco.data ./cfg/yolov3.cfg /weight_path/ /image_path/ How can I do it? 回答1: According to the AlexeyAB page for small objects you can do this: for training for small objects (smaller than 16x16 after the image is resized to 416x416) - set layers = -1, 11 instead of https://github.com/AlexeyAB

Realtime YOLO Object Detection using laptop webcam in Google Colab

坚强是说给别人听的谎言 提交于 2020-03-22 09:20:51
问题 I am using YOLOv3 and OpenCV for realtime object detection on my local system using a Webcam. Everything works like a charm and here is the link of what I did for my local system(it uses VideoStream ). I want to do the same on Google colab for faster FPS(my system is not giving high FPS). I read that Google Colab runs on some virtual environment and hence cannot access my local system webcam. But any suggestions if it is possible? 来源: https://stackoverflow.com/questions/54886155/realtime-yolo

YOLOv3: An Incremental Improvement - 1 - 论文学习

馋奶兔 提交于 2020-03-17 13:04:34
Abstract 我们为YOLO提供一些更新!我们做了一些小的设计上的改变来使它更好。我们还训练了这个非常棒的新网络。它 比上次大了一点,但更准确。不过还是很快的 ,别担心。在320×320大小图片上, YOLOv3运行22毫秒,结果为28.2 mAP,和SSD一样准确,但比他快三倍。当我们以旧的 0.5 IOU mAP检测指标为标准的时候,YOLOv3的结果还是是相当不错的。与RetinaNet的57.5 AP 50 (198 ms)相比,它在Titan X上实现57.9 AP 50 (51 ms),性能类似,但快了3.8倍。和往常一样,所有的代码都可见https://pjreddie.com/yolo/. 1. Introduction 有时候你会给它打一年电话,你知道吗?我今年没有做很多研究。花了很多时间在Twitter上。玩了一会儿GANs。去年[12][1]还剩下一点动力;我对YOLO做了一些改进。但是,说实话,没有什么超级有趣的,只是一些小的改变,使它更好。我也帮助别人做了一些研究。 事实上,这就是我们今天来到这里的原因。我们有一个准备好拍摄的最后期限[4],我们需要引用一些 YOLO中的 随机更新,但我们没有一个来源。所以准备好技术报告吧! 技术报告的伟大之处在于他们不需要介绍,你们都知道我们为什么在这里。因此,这一介绍的结尾将为论文的其余部分指明方向

YOLO V1,V2,V3总结

混江龙づ霸主 提交于 2020-03-11 17:06:55
内容概要: YOLOV1 YOLOV2 YOLOV3 YOLOV1: 论文地址: http://arxiv.org/abs/1506.02640 参考文章: https://blog.csdn.net/c20081052/article/details/80236015 https://blog.csdn.net/qq_38232598/article/details/88695454?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task https://zhuanlan.zhihu.com/p/24916786 https://zhuanlan.zhihu.com/p/25053311 YOLOV1用一个单独的网络,把目标检测当做 回归问题 ,直接在整张图上进行bbox的预测和相关的类别预测,实现了端到端的目标检测,而先前的方法主要是利用分类器来检测。 YOLO检测分为 三步 :将图resize;run一个CNN网络;设置阈值获得结果 YOLO的优势 :非常快,在 Titan X 的 GPU 上 能够达到 45 帧每秒;预测能基于整张图像,假阳率低;能学到目标的广义特征; YOLO的不足 :定位不准,尤其是小物体和小的一群物体

目标检测---YOLO训练测试

十年热恋 提交于 2020-03-08 10:13:09
文章目录 COCO数据集 YOLO环境搭建 DarkNet DarkNet安装配置 DarkNet目录结构 训练命令 训练日志 模型测试 COCO数据集 YOLO环境搭建 DarkNet DarkNet官网 DarkNet安装配置 如果使用opencv将makefile文件中的相关项,由0改为1 DarkNet目录结构 subdivisions= 16:前向运算时,将batchsize=64的样本拆分为16组,每次将其中的一组送入网络,降低显存的消耗 训练命令 训练日志 20000次模型基本收敛,要达到更好的效果,可以训练50w次 模型测试 通过阈值的筛选 -thresh,可以设置为0.4,0.5,0.6,0.7,根据目标选择框的置信度决定 来源: CSDN 作者: milk_and_bread 链接: https://blog.csdn.net/milk_and_bread/article/details/104722045