Open huizhang2017 opened 4 years ago
I don't have answers to all your questions, but a few of your questions are answered here: https://www.ccoderun.ca/darkmark/DataAugmentation.html
I don't have answers to all your questions, but a few of your questions are answered here: https://www.ccoderun.ca/darkmark/DataAugmentation.html
Thank you very much!
Read: https://github.com/AlexeyAB/darknet/wiki/CFG-Parameters-in-the-%5Bnet%5D-section
Thank you very much.
@AlexeyAB For detection does the image augmentation apply scaling and cropping? If yes, may i know where to set the parameters. If no, may I know why?
Thank you for the great work.
I think I may have found it...in yolo layer...jitter and scale- randomly changes size of image and its aspect ratio from x(1 - 2jitter) to x(1 + 2jitter)
Edit: I found the answer to my specific follow-up question in issue #4626. Rotation is only implemented for classification at this stage, not object detection. It is already listed as 'want enhancement'.
Hi Alexey,
could you please explain this line on that wiki page:
angle=0 - randomly rotates images during training (classification only)
I don't understand why angle would only apply to classification, or really what "classification" means in the context of an object detector like YOLO. I noticed that your example config files use angle=0
. Does that mean that you recommend keeping that setting based on your testing? I was previously under the impression that random rotation was a valuable data augmentation technique.
(P.S. I think this fits well here as a follow up question, but I can make it a separate issue if Alexey or huizhang prefers.)
Edit: I found the answer to my specific follow-up question in issue #4626. Rotation is only implemented for classification at this stage, not object detection. It is already listed as 'want enhancement'.
Hi Alexey,
could you please explain this line on that wiki page:
angle=0 - randomly rotates images during training (classification only)
I don't understand why angle would only apply to classification, or really what "classification" means in the context of an object detector like YOLO. I noticed that your example config files use
angle=0
. Does that mean that you recommend keeping that setting based on your testing? I was previously under the impression that random rotation was a valuable data augmentation technique.(P.S. I think this fits well here as a follow up question, but I can make it a separate issue if Alexey or huizhang prefers.)
Can anyone answer this? Does this means that rotations are not happening during training?
@rafcy I'm pretty sure it hasn't been implemented yet. One of the tricky things with rotating bounding boxes is that they are usually aligned to the image (perfectly horizontal/vertical). If you rotate the image, it's not totally clear how big the new bounding boxes should be. If you have a square bounding box, and rotate it 45°, you might end up with a new bounding box that is 1.41x taller and wider than the original. If the true shape of the object was a circle, that would be wrong because the new bounding box shouldn't change size.
Seeing as this is an open source project, you could always try implementing it yourself and make a pull request.
...but having said that, you can easily rotate 90, 180, and 270 degrees without having to deal with the bounding boxes. DarkMark allows exactly that: https://www.ccoderun.ca/darkmark/DataAugmentationRotation.html
@AlexeyAB , Hi... Could you please explain several parameters in the yolov4-custom.cfg? Such as: (1) scales=.1,.1, what does the two '.1' mean? Scare for the height and width with +/- 10%? Or ....? (2) burn_in = 1000, what does this parameter mean? (3) angle =0, rotate the image? If I set angle=15, what does it mean? Rotate the image left or right in 15 degrees?
In fact, I want to only use several simple methods of data augmentation, such as flip, change the pixel value for some pixels, add gaussian noise, but I especially do not want to scale the image, because some regions near the image edge is important, I don't want to loss the information near the edge.
So how to select the methods of data augmentation? I only need to revise the yolov4-custom.cfg file?
I am looking forward to your reply , Thank you very much.