c8c8540ac9d0ea3e3c77ccef2386b47f38dd4fd0,imgaug/augmenters/contrast.py,SigmoidContrast,__init__,#SigmoidContrast#Any#Any#Any#Any#Any#Any#,564

Before Change


    def __init__(self, gain=10, cutoff=0.5, per_channel=False,
                 name=None, deterministic=False, random_state=None):
        // TODO add inv parameter?
        params1d = [
            iap.handle_continuous_param(
                gain, "gain", value_range=(0, None), tuple_to_uniform=True,
                list_to_choice=True),
            iap.handle_continuous_param(
                cutoff, "cutoff", value_range=(0, 1.0), tuple_to_uniform=True,
                list_to_choice=True)
        ]
        func = adjust_contrast_sigmoid

        super(SigmoidContrast, self).__init__(
            func, params1d, per_channel,

After Change


        tile_grid_size_px_h = np.maximum(tile_grid_size_px_h,
                                         self.tile_grid_size_px_min)

        gen = enumerate(zip(images, clip_limit, tile_grid_size_px_h,
                            tile_grid_size_px_w, per_channel))
        for i, (image, clip_limit_i, tgs_px_h_i, tgs_px_w_i, pchannel_i) in gen:
            if image.size == 0:
                continue

            nb_channels = image.shape[2]
            c_param = 0
            image_warped = []
            for c in sm.xrange(nb_channels):
                if tgs_px_w_i[c_param] > 1 or tgs_px_h_i[c_param] > 1:
                    clahe = cv2.createCLAHE(
                        clipLimit=clip_limit_i[c_param],
                        tileGridSize=(tgs_px_w_i[c_param], tgs_px_h_i[c_param])
                    )
                    channel_warped = clahe.apply(
                        _normalize_cv2_input_arr_(image[..., c])
                    )
                    image_warped.append(channel_warped)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: aleju/imgaug
Commit Name: c8c8540ac9d0ea3e3c77ccef2386b47f38dd4fd0
Time: 2020-01-13
Author: kontakt@ajung.name
File Name: imgaug/augmenters/contrast.py
Class Name: SigmoidContrast
Method Name: __init__


Project Name: aleju/imgaug
Commit Name: 0db2ef87c3b18aab99e2653369dabaa0f9129f87
Time: 2020-01-25
Author: kontakt@ajung.name
File Name: imgaug/augmenters/blur.py
Class Name: MotionBlur
Method Name: __init__


Project Name: aleju/imgaug
Commit Name: 0db2ef87c3b18aab99e2653369dabaa0f9129f87
Time: 2020-01-25
Author: kontakt@ajung.name
File Name: imgaug/augmenters/contrast.py
Class Name: AllChannelsCLAHE
Method Name: __init__