gpt4 book ai didi

python - YOLO : Either overfits or underfits, 增加batch还是增加样本图像池?

转载 作者:太空宇宙 更新时间:2023-11-03 20:26:21 26 4
gpt4 key购买 nike

我正在尝试训练我的 yolo 模型来识别灭火器并将其标记为“消防安全”。目前,我要么得到过拟合图像,要么得到欠拟合图像(见下文)。

我的带有注释的示例图像大小约为 1500

yolo-new.cfg 配置宽度=608 和高度=608

我已经使用以下命令进行了训练:

python flow --model cfg/yolo-new.cfg --labels one_label.txt --train --trainer adam --dataset "C://Users//G//Desktop//Development//ML//YOLO//BBox-Label-Tool//Images//002" --annotation "C://Users//G//Desktop//Development//ML//YOLO//BBox-Label-Tool//AnnotationsXML//002" --batch 4 --gpu 0.8

所以在 13000 步之后: enter image description here

所以我去验证我的结果,这就是我得到的结果(检查点 13000): enter image description here

所以也许我认为这可能是严重过度拟合的情况,因此我迭代检查点以查看哪个最适合。

这是我使用检查点 6500 得到的结果 enter image description here

这是我使用检查点 6000 得到的结果

enter image description here

这是我使用检查点 5500 得到的结果 enter image description here

因此,如您所见,检查点 6000 在我的情况下是可能的最佳结果,但还不够好。我该如何改进?增加批量大小?(我的 GPU 1070Ti 无法处理。出现 Cuda 内存不足)有解决这个问题的想法吗?

最佳答案

使用 Yolov3 训练我的图像集解决了我的问题。 https://github.com/AlexeyAB/darknet

需要注意的一点是注释时不要留下任何空白,也许这可能是检测未按计划进行的原因之一。

关于python - YOLO : Either overfits or underfits, 增加batch还是增加样本图像池?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57792085/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com