Augmentor icon indicating copy to clipboard operation
Augmentor copied to clipboard

Add padding value for mask

Open puhoshville opened this issue 5 years ago • 5 comments

I have noticed that the image and ground truth are processing in the same way, but this entails difficulties when they have different color schemes. So I made a new do_mask function that handles ground_truth images.

Example of usage:

    p.rotate_without_crop(
        probability=0.7,
        max_left_rotation=10,
        max_right_rotation=10,
        fillcolor=(255, 255, 255),  # will apply to image
        mask_fillcolor=127,  # will apply to grayscale ground truth 
    )

Relates to #165


This change is Reviewable

puhoshville avatar Jul 11 '19 04:07 puhoshville

Hi @puhoshville I will take a look a closer look at this soon, and merge it once I've done so. Thanks for the efforts! M.

mdbloice avatar Jul 12 '19 12:07 mdbloice

Did some refactoring. Also, there is an issue with white lines and I don't know how can I fix it: original_original_ISIC_0000001 jpg_3d502b08-4955-4195-9404-94a929751b51

puhoshville avatar Jul 16 '19 13:07 puhoshville

Hi @puhoshville are the white lines something to do with aliasing maybe? And that anti-aliasing needs to be applied which may not be the case by default (I cannot remember off the top of my head).

mdbloice avatar Jul 17 '19 10:07 mdbloice

@mdbloice sorry I didn't check it before - there is white lines problem on commit e6ef7bc73d5790c864d3977f7cc4e2e9905c03f5 - it's before my contributions, so I created a separate issue to handle it. You can review current PR and merge it if all is ok.

puhoshville avatar Jul 17 '19 15:07 puhoshville

@mdbloice, any updates?

puhoshville avatar Jul 23 '19 13:07 puhoshville