6411c9079a834fd7549ab4593261a3619519eb02,imgaug/augmenters/size.py,CropAndPad,_augment_images,#CropAndPad#Any#Any#Any#Any#,979

Before Change


        rngs = random_state.duplicate(nb_images)
        for i in sm.xrange(nb_images):
            height, width = images[i].shape[0:2]
            crop_top, crop_right, crop_bottom, crop_left, \
                pad_top, pad_right, pad_bottom, pad_left, pad_mode, \
                pad_cval = self._draw_samples_image(rngs[i], height, width)

After Change


        result = []
        nb_images = len(images)
        rngs = random_state.duplicate(nb_images)
        for image, rng in zip(images, rngs):
            height, width = image.shape[0:2]
            samples = self._draw_samples_image(rng, height, width)

            x1, y1, x2, y2 = samples.to_crop_xyxy(image.shape)
            image_cr = image[y1:y2, x1:x2, ...]

            image_cr_pa = ia.pad(
                image_cr,
                top=samples.pad_top, right=samples.pad_right,
                bottom=samples.pad_bottom, left=samples.pad_left,
                mode=samples.pad_mode, cval=samples.pad_cval)

            if self.keep_size:
                image_cr_pa = ia.imresize_single_image(image_cr_pa,
                                                       (height, width))

            result.append(image_cr_pa)

        if ia.is_np_array(images):
            if self.keep_size:
                result = np.array(result, dtype=images.dtype)
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: aleju/imgaug
Commit Name: 6411c9079a834fd7549ab4593261a3619519eb02
Time: 2019-09-04
Author: kontakt@ajung.name
File Name: imgaug/augmenters/size.py
Class Name: CropAndPad
Method Name: _augment_images


Project Name: aleju/imgaug
Commit Name: b0bdcbfdabcae1933980925c8f2438cbb2359a49
Time: 2019-09-13
Author: kontakt@ajung.name
File Name: imgaug/augmenters/geometric.py
Class Name: ElasticTransformation
Method Name: _augment_keypoints


Project Name: aleju/imgaug
Commit Name: b0bdcbfdabcae1933980925c8f2438cbb2359a49
Time: 2019-09-13
Author: kontakt@ajung.name
File Name: imgaug/augmenters/geometric.py
Class Name: ElasticTransformation
Method Name: _augment_images