How to augment data to increase the number of instances being trained on? #3705
Replies: 4 comments
-
You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. |
Beta Was this translation helpful? Give feedback.
-
I faced the same thing today I kept reading the docs looking for a method to "augment" data not just "transform", the use of T.transform is well explained with exemples and everyone is copy pasting the same method,but when you duve deep in the code you discover that what really happens is that the transfromed img and its transformed annotations replace the original instance in dataset_dict |
Beta Was this translation helpful? Give feedback.
-
I also want to increase the training dataset size by applying augmentation. I went through the API documentation, tutorials and tried them all. But, I could not find any option to increase the dataset size, it just replace the original images with transformations. If there is any update please let us know. |
Beta Was this translation helpful? Give feedback.
-
Hi @NamalJayasuriya, After working with Detectron2 for quite some time, here is what I learned:
Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Discussed in #3698
Originally posted by mohamedamrali1993 November 15, 2021
Hi, I am having a hard time understanding "Augmentation" in the context of Detectron2. It seems like the Data Augmentation page is striving to create variations within the dataset, but not necessarily "augmenting" as in increasing the size of the dataset. i.e. if I have a dataset with 100 images and I apply RandomFlip() transformation to 5% of the data, I still end up with 100 instances to train on. Not 105! Am I understanding this correctly or is it supposed to increase the instances, and I am just doing something wrong?
Expected behavior:
I tracked down the process of data augmentation, and at no point did I see data being appended to a larger query (with original images + transformed images), which is eventually sent to the model. Here is what I understand so far:
I would like to increase the number of images that I am training on, and their respective transformed labels. Is this doable using Detectron2 and is it a good idea for Mask R-CNN? FAIR's 2018 Mask R-CNN paper has a small section in Appendix B that talks about "Train-time augmentation" where they scale images (if I am understanding things correctly), but I am not sure if they are actually training on the original images or "original images + scaled images." I am expecting the latter!
If this can be done using Detectron2 then please advise (including code examples), if not, I would imagine this would be a good enhancement!?
I am not the first one to report/ask about this, someone else asked about it in issue #1763
Beta Was this translation helpful? Give feedback.
All reactions