ff97a1402877d0613158b37ca7fc781d1901f951,imgaug/augmenters/overlay.py,Alpha,__init__,#Alpha#Any#Any#Any#Any#Any#Any#Any#,140

Before Change


                 name=None, deterministic=False, random_state=None):
        super(Alpha, self).__init__(name=name, deterministic=deterministic, random_state=random_state)

        if ia.is_single_number(factor):
            ia.do_assert(0.0 <= factor <= 1.0, "Expected factor to have range [0, 1.0], got value %.2f." % (factor,))
            self.factor = Deterministic(factor)
        elif ia.is_iterable(factor):
            ia.do_assert(len(factor) == 2, "Expected tuple/list with 2 entries, got %d entries." % (len(factor),))
            self.factor = Uniform(factor[0], factor[1])
        elif isinstance(factor, StochasticParameter):
            self.factor = factor
        else:
            raise Exception("Expected float or int, tuple/list with 2 entries or StochasticParameter. Got %s." % (type(factor),))

        ia.do_assert(first is not None or second is not None, "Expected "first" and/or "second" to not be None (i.e. at least one Augmenter), but got two None values.")

        self.first = handle_children_list(first, self.name, "first")
        self.second = handle_children_list(second, self.name, "second")

        if per_channel in [True, False, 0, 1, 0.0, 1.0]:
            self.per_channel = Deterministic(int(per_channel))
        elif ia.is_single_number(per_channel):
            ia.do_assert(0 <= per_channel <= 1.0)
            self.per_channel = Binomial(per_channel)
        else:
            raise Exception("Expected per_channel to be boolean or number or StochasticParameter")

        self.epsilon = 0.01

    def _augment_images(self, images, random_state, parents, hooks):
        result = images

After Change


                 name=None, deterministic=False, random_state=None):
        super(Alpha, self).__init__(name=name, deterministic=deterministic, random_state=random_state)

        self.factor = iap.handle_continuous_param(factor, "factor", value_range=(0, 1.0), tuple_to_uniform=True, list_to_choice=True)

        ia.do_assert(first is not None or second is not None, "Expected "first" and/or "second" to not be None (i.e. at least one Augmenter), but got two None values.")
        self.first = handle_children_list(first, self.name, "first")
        self.second = handle_children_list(second, self.name, "second")

        self.per_channel = iap.handle_probability_param(per_channel, "per_channel")

        self.epsilon = 0.01

    def _augment_images(self, images, random_state, parents, hooks):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 45

Instances


Project Name: aleju/imgaug
Commit Name: ff97a1402877d0613158b37ca7fc781d1901f951
Time: 2018-09-01
Author: kontakt@ajung.name
File Name: imgaug/augmenters/overlay.py
Class Name: Alpha
Method Name: __init__


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


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


Project Name: aleju/imgaug
Commit Name: ff97a1402877d0613158b37ca7fc781d1901f951
Time: 2018-09-01
Author: kontakt@ajung.name
File Name: imgaug/augmenters/overlay.py
Class Name: Alpha
Method Name: __init__


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