Augmentor icon indicating copy to clipboard operation
Augmentor copied to clipboard

Use for Semantic Segmentation

Open Superzlw opened this issue 3 years ago • 4 comments

Hi, thank you very much for the augmentor, it helped me a lot. But I have a question, I am not sure whether Augmentor can be used for multi-label semantic segmentation, but according to my experiments, most of the newly generated labels are wrong, such as the image below, the erased area does not correspond, and There are a lot of masks at the border that shouldn't be there. wrong1

I tested some pictures and the erased areas are all wrong. wrong2

I would like to ask, can augmentor not be used for semantic segmentation?

Superzlw avatar Jun 22 '22 12:06 Superzlw

Hi @Superzlw I will have to take a look at this more closely and try to find a fix... so you are passing images and their masks (as pairs) in to the pipeline, and augmenting them as normal?

If you could show some code that you are using to do this, that would help! If I can see your code I am sure we can fix it.

mdbloice avatar Jun 22 '22 13:06 mdbloice

Hi @mdbloice , Thanks for the reply. My test code is as follow:

import Augmentor

p = Augmentor.Pipeline(img_path)   # img_path: folder path of the images
p.ground_truth(label_path)         # label_path: folder path of the labels

p.random_erasing(probability=0.8, rectangle_area=0.5)
p.sample(10)

Augmentor works very well for flipping, but for some more complex operations like distortion, erasing, and borders there will be some undesired masks

Superzlw avatar Jun 22 '22 13:06 Superzlw

Hi, @mdbloice, it seems I also face a similar problem described by @Superzlw .

NUS-Tim avatar Mar 28 '23 13:03 NUS-Tim

Hi @Superzlw, hi @NUS-Tim

I updated the code in version 0.2.11 of Augmentor just now. Try upgrading with pip install --upgrade Augmentor and let me know if this works for you now... 🤔

mdbloice avatar Mar 28 '23 14:03 mdbloice