Open spinlud opened 4 years ago
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 mAP@0.5 by ~0.1% compared to yolov4-tiny, and decrease mAP@0.5-0.9 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.
I added these models: https://github.com/AlexeyAB/darknet/commit/de68e19cc627f642023f09513ac2306fbcbc1e4b
@AlexeyAB Are there MSCOCO pre-trained weights available for yolov4-tiny-3l? Someone was asking on the discord today. I don't see a link to it in the readme.
@stephanecharette You can use the same COCO pre-trained weights https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.conv.29
for both yolov4-tiny.cfg
and yolov4-tiny-3l.cfg
@AlexeyAB @stephanecharette : This weight yolov4-tiny.conv.29 file is ~19MB whereas yolov4-tiny weight file is ~23MB. I was guessing that the file size of yolov4-tiny-3l should be more than yolov4-tiny. Isn't it the case?
@Micky-123 They use different Neck/Head, while they use the same backbone, and weights-file yolov4-tiny.conv.29
is for backbone.
@AlexeyAB : Do I need to add some more weights to yolov4-tiny.conv.29 to make it work with yolov4-tiny-3l.cfg? there should be some weights related to neck/head as well or there are none?
@AlexeyAB : can you please help throw some light on the above question...
@Micky-123
Do I need to add some more weights to yolov4-tiny.conv.29 to make it work with yolov4-tiny-3l.cfg? there should be some weights related to neck/head as well or there are none?
No, you don't need neck / head weights because they are more class-specific. Just use yolov4-tiny.conv.29
file.
@Micky-123
Do I need to add some more weights to yolov4-tiny.conv.29 to make it work with yolov4-tiny-3l.cfg? there should be some weights related to neck/head as well or there are none?
No, you don't need neck / head weights because they are more class-specific. Just use
yolov4-tiny.conv.29
file.
Thanks @AlexeyAB . Will try it out.
Is it possible to have an example of
yolov4-tiny
with 3 layers to improve detection for small objects?yolov3-tiny_3l