-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detector - Mosaic data augmentation #4264
Comments
Implemented. |
Something goes wrong with
chart: |
For me, mosaic gave me -0.4% mAP - don't really know if that's just random fluctuation or it did actually hurt performance a little. |
results were updated here #3874 (comment) |
@Kyuuki93 It seems that new mosaic=1 significantly improves AP@75
Also it seems that |
And I updated
|
@Kyuuki93 So both iou_thresh=0.213 and mosaic=1 increase accuracy. |
Speaking of training accuracy fluctuation I did an experiment on a small private dataset (see #3874 (comment) for dataset details). I trained 15 instances of "Yolo v3 Tiny 3L" for 10_000 steps on the same dataset with same config file and parameters. The randomness of training brings some fluctuation in accuracy (mAP@.5):
Std Dev and extend are higher for classes harder to detect. |
What pre-trained weights-file did you use for training |
I don't use any pre-trained weights in all my experiments, every network is trained from scratch. |
@laclouis5 (I don't use any pre-trained weights) - This can reduce accuracy, the larger the model, the more pre-trained weights are needed. |
I try to train my networks in a very similar context to obtain a fair comparison. I don't fully control and understand how pre-trained weights affect initialisation and training as pre-trained weights could be different between networks (Tiny and plain Yolo for instance), so I prefer to train from scratch to compare apples to apples. I also observe that on small database and small network (Yolo v3 Tiny) training curve is steeper but the final accuracy (mAP@.5) is roughly the same as it plateaus rapidly near 3_000 iterations in my case. In the following image are overlapped training curves with and without pre-trained weights (from a network I previously trained). Maybe pre-trained weights / transfert learning is more relevant and can increase accuracy for deeper networks such as That being said, when deploying a network I would certainly train with Coco weights to get the best result. |
@AlexeyAB I'll train |
I think so.
Yes, try and compare accuracy. |
Is ok to use mosaic=1 and mixup=1 at the same time? @AlexeyAB |
@tianfengyijiu Yes, but will be used only Mosaic. |
@AlexeyAB Here is the result:
The pre-trained version is much more stable, +0.30% mAP@0.5 and +3% mAP@[0.5...0.95] higher than my best non pre-trained network. If I have time l'll train other networks with pre-trained weights to be able to compare this result against. |
Continuing issue with I'm indeed using the newest repo and the issue seems to only occur when For example : This issue goes away when turning off |
@BernoGreyling Thanks! Yes, it seems there is an issue for combination |
hi @AlexeyAB |
Not yet |
can you share the paper for mosaic, i want cite, but not find in Google Scholar, THX |
mosaic cames from yolov3 or yolov4 |
Hi @AlexeyAB |
Yes, Just use
In my experiments, usually this "bug" improves accuracy, so usually it is better to train without
https://github.com/AlexeyAB/darknet/wiki/CFG-Parameters-in-the-%5Bnet%5D-section
|
Mosaic-data augmentation (like CutMix augmentation): #3114 (comment)
Mosaic-data mAP increasing: Implement Yolo-LSTM (~+4-9 AP) for detection on Video with high mAP and without blinking issues #3114 (comment)
comparison MixUp and CutMix: BoF (Bag of Freebies) - Visually Coherent Image Mixup ~+4 AP@[.5, .95] #3272 (comment)
Use:
Currently works only if Darknet is compiled with OpenCV.
New mosaic:
Old mosaic=1 - CLICK ME to view
The text was updated successfully, but these errors were encountered: