a41c1ed49bcf7554eaf113d9302bca05342bbeb0,imgaug/augmenters/arithmetic.py,,CoarseSalt,#Any#Any#Any#Any#Any#Any#Any#Any#,1079

Before Change



    

    if ia.is_single_number(p):
        mask = Binomial(p)
    elif isinstance(p, tuple):
        ia.do_assert(len(p) == 2)
        ia.do_assert(0 <= p[0] <= 1.0)
        ia.do_assert(0 <= p[1] <= 1.0)
        mask = Binomial(Uniform(p[0], p[1]))
    elif ia.is_iterable(p):
        ia.do_assert(all([0 <= pi <= 1.0 for pi in p]))
        mask = Binomial(iap.Choice(p))
    elif isinstance(p, StochasticParameter):
        mask = p
    else:
        raise Exception("Expected p to be number or tuple of two number or list of number or StochasticParameter, got %s." % (type(p),))

    if size_px is not None:
        mask_low = FromLowerResolution(other_param=mask, size_px=size_px, min_size=min_size)
    elif size_percent is not None:
        mask_low = FromLowerResolution(other_param=mask, size_percent=size_percent, min_size=min_size)

After Change


    to the input image size, leading to large rectangular areas being replaced.

    
    mask = iap.handle_probability_param(p, "p", tuple_to_uniform=True, list_to_choice=True)

    if size_px is not None:
        mask_low = FromLowerResolution(other_param=mask, size_px=size_px, min_size=min_size)
    elif size_percent is not None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 31

Instances


Project Name: aleju/imgaug
Commit Name: a41c1ed49bcf7554eaf113d9302bca05342bbeb0
Time: 2018-08-31
Author: kontakt@ajung.name
File Name: imgaug/augmenters/arithmetic.py
Class Name:
Method Name: CoarseSalt


Project Name: aleju/imgaug
Commit Name: 1e43f817bba9812a2c3fac84c593b6f1dc9244b6
Time: 2018-08-31
Author: kontakt@ajung.name
File Name: imgaug/augmenters/arithmetic.py
Class Name:
Method Name: CoarsePepper


Project Name: aleju/imgaug
Commit Name: 5bf79c3528af47b7986161d1ce2dcdc0e2b2feee
Time: 2018-08-31
Author: kontakt@ajung.name
File Name: imgaug/augmenters/arithmetic.py
Class Name:
Method Name: CoarseSaltAndPepper


Project Name: aleju/imgaug
Commit Name: a41c1ed49bcf7554eaf113d9302bca05342bbeb0
Time: 2018-08-31
Author: kontakt@ajung.name
File Name: imgaug/augmenters/arithmetic.py
Class Name:
Method Name: CoarseSalt