WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network
GNU General Public License v3.0
2.02k stars 575 forks source link

从零开始训练yolov4-tiny-3l + coco + rtx2080的问题 #57

Open lovehuanhuan opened 3 years ago

lovehuanhuan commented 3 years ago

三天了,不见收敛的迹象,loss始终在20左右。。。 下面是我的cfg

[net]
# Testing
#batch=1
#subdivisions=1
# Training
batch=64
subdivisions=4
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.00261
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1

[convolutional]
batch_normalize=1
filters=32
size=3
stride=2
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=64
size=3
stride=2
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky

[route]
layers=-1
groups=2
group_id=1

[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky

[route]
layers = -1,-2

[convolutional]
batch_normalize=1
filters=64
size=1
stride=1
pad=1
activation=leaky

[route]
layers = -6,-1

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky

[route]
layers=-1
groups=2
group_id=1

[convolutional]
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky

[route]
layers = -1,-2

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[route]
layers = -6,-1

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[route]
layers=-1
groups=2
group_id=1

[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky

[route]
layers = -1,-2

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[route]
layers = -6,-1

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

##################################

[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky

[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear

[yolo]
mask = 6,7,8
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
classes=80
num=9
jitter=.3
scale_x_y = 1.05
cls_normalizer=1.0
iou_normalizer=0.07
iou_loss=ciou
ignore_thresh = .7
truth_thresh = 1
random=0
resize=1.5
nms_kind=greedynms
beta_nms=0.6

[route]
layers = -4

[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky

[upsample]
stride=2

[route]
layers = -1, 23

[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear

[yolo]
mask = 3,4,5
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
classes=80
num=9
jitter=.3
scale_x_y = 1.05
cls_normalizer=1.0
iou_normalizer=0.07
iou_loss=ciou
ignore_thresh = .7
truth_thresh = 1
random=0
resize=1.5
nms_kind=greedynms
beta_nms=0.6

[route]
layers = -3

[convolutional]
batch_normalize=1
filters=64
size=1
stride=1
pad=1
activation=leaky

[upsample]
stride=2

[route]
layers = -1, 15

[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky

[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear

[yolo]
mask = 0,1,2
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
classes=80
num=9
jitter=.3
scale_x_y = 1.05
cls_normalizer=1.0
iou_normalizer=0.07
iou_loss=ciou
ignore_thresh = .7
truth_thresh = 1
random=0
resize=1.5
nms_kind=greedynms
beta_nms=0.6
WongKinYiu commented 3 years ago

用哪個branch訓練的 cfg檔名是什麼 map目前多少

lovehuanhuan commented 3 years ago

DONE (t=60.85s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.10546 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.25535 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.06510 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.07652 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.13497 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.11892 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.13808 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.30336 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.37949 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.27342 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.41811 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.43502

AlexeyAB / darknet master cfg/yolov4-tiny-3l.cfg

WongKinYiu commented 3 years ago

看起來還行 tiny models train from scratch 的話 max_batches 建議設成 2000200 一般也建議resolution/augmentation較小/少

lovehuanhuan commented 3 years ago

这个训练 loss一般要降低到多大才正常呢?

WongKinYiu commented 3 years ago

loss只是個相對值 多大都有可能是正常的

sunriselqq commented 3 years ago

用这个cfg训练的话,预训练权重选择哪个呢?

chennaikai11 commented 2 years ago

assert not any(u), "Unsupported fields %s in %s. See https://github.com/ultralytics/yolov3/issues/631" % (u, path) AssertionError: Unsupported fields ['resize'] in cfg/yolov4-tiny-3l.cfg. See https://github.com/ultralytics/yolov3/issues/631 请问这个bug 楼主有遇到过吗