-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Image Augmentation #1763
Comments
@manav-agarwal1 can you please help me understand your query further? For the first problem, I you can use a library named imgaug. You will have to provide your initial images and annotations, this library will do the necessary augmentations and will give you corresponding annotations. For the second you can try something like this. This will do pick images and do transformations and then use those transformations in training your model using detectron2.
|
@rahulg963 Thanks for replying. I tried both of the methods you just mentioned. Now the thing was with the first one I wasn't able to get my annotations transformed as It was doing to the image. But for the second one, I tried the same fix but at runtime, something weird happened. But can you help me understand one thing that in the second mapper approach when I included the reshape, brightness transform then my prediction labels of test and Val set were looked a lot like garbage value as in an image with 15 labels it was predicting around 50 labels with all same values around 34, sometimes 20 like this. I don't know why this happened. These were my transforms |
Imgaug library does transforms corresponding annotations as well. I have been using this for multiple projects of mine. Please check their example and try to do in that way. Here is a small snippet of the same.
I am not very sure regarding your attempt of second approach, why you are seeing such results. However, in this augmentation, you provide probability for each augmentation, there are chances that it may use original image as well, not a guaranty though. |
@ppwwyyxx I don't think this is an issue of detectron2. Can you please add relevant labels to this one. |
thanks @rahulg963 for helping! |
So, I am trying to train an object detection model following the detectron2 tutorial and after getting a benchmark I have decided to do image data augmentation and I am stuck badly. As I have tried bunch of different things but I don't know how to get annotations out of them as annotations are available form previous data. I have made a dictionary of it as explained in tutorial and followed it. But now I am stuck at how to should I make changes. Whether I need to write the image in my training folder or how can I get annotations for them. then if I am doing random cropping then how can I obtain changed locations of boxes.
Please help I am just a beginner.
The text was updated successfully, but these errors were encountered: