Open gongjing1996 opened 5 years ago
@gongjing1996 Hi,
Use 2000 iterations for each class(object), how many classes do you have?
Try to use 9 anchors and set masks as described - so that 1st-[yolo]-layer has anchors larger than 60x60, 2nd larger than 30x30, 3rd remaining: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection
But you should change indexes of anchors masks= for each [yolo]-layer, so that 1st-[yolo]-layer has anchors larger than 60x60, 2nd larger than 30x30, 3rd remaining. Also you should change the filters=(classes + 5)*
before each [yolo]-layer. If many of the calculated anchors do not fit under the appropriate layers - then just try using all the default anchors.
channels=3
in cfg-file.Otherwise if you trained by using 1-channel images, then set channels=1
in cfg-file.
@AlexeyAB Thank you very much!
Hello, I want to train tiny-yolov3 to detect a single class. I have 8862 images for training, 1366 images for validation. All the images are gray images and the image resolution is 640×512. First time I train tiny-yolov3 with the following cfg: batch=64 subdivisions=16 width=640 height=512 channels=3 ... max_batches = 50020 policy=steps steps=40000,45000
And I get the mAP around 75%, avg loss larger than 1.3. Now I want to improve the object detection,so I recalculate anchors for my dataset with -width 640 -height 512, 6 anchors with IOU 69.19%: 17, 17, 34, 31, 60, 45, 80, 80, 134, 95, 179,167 9 anchors with IOU 73.42%: 15, 16, 27, 23, 33, 39, 55, 35, 64, 56, 100, 71, 66,124, 146,106, 185,178 The questions I want to ask are:
What number of max_batches should I set? You have said that usually sufficient 2000 iterations for each class(object), but not less than 4000 iterations in total. So I think maybe I should use a smaller max_batches.
How many anchors should I choose? And how should I modify the mask(in cfg)?
If I want to expand the single channel image into three channels, one channel is the origin image,anothers are the images with intensity inversion or histogram normalization. Maybe this is like 'concatanate'. Is this feasible?
If I have changed the cfg file, such as add some conv layers after the seventh layer,but the first 7 layers remained the same. Should I use the partial commad to extract yolov3-tiny.conv.7 to train?