Darknet: yolov4-tiny_3l (3 layers) to improve detection for small objects?

Created on 7 Jul 2020  路  13Comments  路  Source: AlexeyAB/darknet

Is it possible to have an example of yolov4-tiny with 3 layers to improve detection for small objects?

yolov3-tiny_3l

image

Most helpful comment

yolov4-tiny-3l.zip
Hi, @spinlud I have tested this cfg file, The MAP trained on my small-person-and-car data is 0.46 and it is still going up. The MAP of yolov4-tiny.cfg model I trained on my data is 0.365. I have tested the performance of this cfg file on my data and it performs better than yolov4-tiny. Maybe it works fine for your data of small objects too!

All 13 comments

Thanks @dadaligoudan, will give it a try!
The formula filters=(classes + 5) x 3 in the [convolutional] before each [yolo] layer still applies?

Thanks @dadaligoudan, will give it a try!
The formula filters=(classes + 5) x 3 in the [convolutional] before each [yolo] layer still applies?

Yes, the formula still applies. Sorry for deleting the cfg file temporarily, I will test this cfg file within two days and see how it works. If it works fine, I will publish the cfg file and the trainning result here.

yolov4-tiny-3l.zip
Hi, @spinlud I have tested this cfg file, The MAP trained on my small-person-and-car data is 0.46 and it is still going up. The MAP of yolov4-tiny.cfg model I trained on my data is 0.365. I have tested the performance of this cfg file on my data and it performs better than yolov4-tiny. Maybe it works fine for your data of small objects too!

@dadaligoudan
Thank you! I am training right now with your version, let's see how it goes 馃槑

@dadaligoudan Should we use the same pretrained .weights file(from the original yolov4-tiny trained n COCO) with this new config?

How does it compare with the original yolov4-tiny in terms of speed?

Training my custom dataset on a single object with yolov4-tiny-3l decrease my [email protected] by ~0.1% compared to yolov4-tiny, and decrease [email protected] by ~2%. I think it performs worse because the number of small objects in my dataset is less than number of big objects, but still strange

I also trained this network on my database (1200 images), it does not have particularly very small objects but old Yolo v3 Tiny 3L improved the AP50 an AP compared to Yolo v3 Tiny and I expected same improvement with Yolo v4 Tiny 3L but the result is mitigated : AP decreased by almost 2 but AP50 increase about almost 1%.

I've obtained pretty much the same accuracy on my dataset, about 25k images. I am testing now higher resolutions for the yolov4-tiny

Ok, I also tested different resolutions for Yolo v4 Tiny : 416, 544 and 632. A better resolution increased AP50 but decreased AP (632 resolution). The optimum is 544 for my database.

Resolution |AP | AP50
-- | -- | --
416 | 41.06聽% | 85.72聽%
544 | 46.74聽% | 88.76聽%
632 | 42.45聽% | 88.89聽%

It makes me confused too. The map should not be smaller, if not bigger than the yolov4-tiny. The yolov4-tiny-3l combines the feature map of the former layer and produces the output 7676, 3838, 1919 instead of 3838, 1919 if the input of the network is 608608. In principle, it will fit the small objects better. The yolov3-tiny-3l did the same way... I am not sure if it is something wrong with the yolov4-tiny-3l.cfg, but i do have higher map compared with yolov4-tiny. My database is full of small objects which size is less than 15*15 pixels, maybe that is the reason. I changed the anchors based on my database and i think adding more small anchors based on my database helps. I am sorry for troubling you and maybe in recent days AlexeyAB will publish a official yolov4-tiny-3l.cfg file...

Sure, maybe Yolo V4 Tiny 3L implementation is wrong.

Did you try Yolo v4 Tiny with changing anchors to better fit your small objects?

Sure, maybe Yolo V4 Tiny 3L implementation is wrong.

Did you try Yolo v4 Tiny with changing anchors to better fit your small objects?

I use K-means method to get the anchors for my database cause the anchors of coco dataset seems too big for my database and it will cause infinite loss.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yongcong1415 picture yongcong1415  路  3Comments

Greta-A picture Greta-A  路  3Comments

PROGRAMMINGENGINEER-NIKI picture PROGRAMMINGENGINEER-NIKI  路  3Comments

rezaabdullah picture rezaabdullah  路  3Comments

Yumin-Sun-00 picture Yumin-Sun-00  路  3Comments