标签:file 停止 detection avg data training layer multi stop
目录
主要来自于:AlexeyAB 版本darknet
提供window支持
相较于原版pjreddie版本darknet提升了训练速度
添加了二值化网络,XNOR(bit) ,速度快,准确率稍低https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov3-tiny_xnor.cfg
提升7%通过将卷积层和BN层合并为一个(*_*)不太懂。
多GPU训练提升
修补了[reorg]层
添加了mAP, IOU,Precision-Recall计算
darknet detector map...
可以在训练过程中画loss图像
添加了根据自己数据集的anchor生成
提升视频检测,网络摄像头,opencv相关问题
提出了一个INT8的网络,提升了检测速度,但是准确率稍有下降
GPU=1
to build with CUDA to accelerate by using GPU (CUDA should be in /usr/local/cuda
)CUDNN=1
to build with cuDNN v5-v7 to accelerate training by using GPU (cuDNN should be in /usr/local/cudnn
)CUDNN_HALF=1
to build for Tensor Cores (on Titan V / Tesla V100 / DGX-2 and later) speedup Detection 3x, Training 2xOPENCV=1
to build with OpenCV 3.x/2.4.x - allows to detect on video files and video streams from network cameras or web-camsDEBUG=1
to bould debug version of YoloOPENMP=1
to build with OpenMP support to accelerate Yolo by using multi-core CPULIBSO=1
to build a library darknet.so
and binary runable file uselib
that uses this library. Or you can try to run so LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./uselib test.mp4
How to use this SO-library from your own code - you can look at C++ example: https://github.com/AlexeyAB/darknet/blob/master/src/yolo_console_dll.cpp or use in such a way: LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH ./uselib data/coco.names cfg/yolov3.cfg yolov3.weights test.mp4
https://github.com/AlexeyAB/Yolo_mark
什么时候停止训练
avg loss不再下降的时候
通常每个类需要2000-4000次迭代训练即可
防止过拟合:需要在Early stopping point停止训练
使用以下命令:
darknet.exe detector map
...
建议训练的时候带上-map
,可以画图
random=1可以设置适应多分辨率
提升分辨率:416--> 608等必须是32倍数
重新计算你的数据集的anchor:(注意设置的时候计算问题)
darknet.exe detector calc_anchors data/obj.data -num_of_clusters 9 -width 416 -height 416
检查数据集通过https://github.com/AlexeyAB/Yolo_mark
数据集最好每个类有2000张图片,至少需要迭代2000*类的个数
数据集最好有没有标注的对象,即负样本,对应空的txt文件,最好有多少样本就设计多少负样本。
对于一张图有很多个样本的情况,使用max=200属性(yolo层或者region层)
for training for small objects - set layers = -1, 11
instead of https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L720 and set stride=4
instead of https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L717
训练数据需要满足以下条件:
train_network_width * train_obj_width / train_image_width ~= detection_network_width * detection_obj_width / detection_image_width
train_network_height * train_obj_height / train_image_height ~= detection_network_height * detection_obj_height / detection_image_height
为了加速训练,可以做fine-tuning而不是从头开始训练,设置stopbackward=1在网络的结束部分(以####作为分割)
在训练完以后,进行目标检测的时候,可以提高网络的分辨率,以便刚好检测小目标。
为了小目标:
标签:file 停止 detection avg data training layer multi stop
原文地址:https://www.cnblogs.com/pprp/p/10204480.html