6411c9079a834fd7549ab4593261a3619519eb02,imgaug/augmenters/size.py,CropAndPad,_augment_images,#CropAndPad#Any#Any#Any#Any#,979
Before Change
result = []
nb_images = len(images)
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)
image_cr = images[i][crop_top:height-crop_bottom,
crop_left:width-crop_right,
:]
image_cr_pa = ia.pad(
image_cr, top=pad_top, right=pad_right, bottom=pad_bottom,
left=pad_left, mode=pad_mode, cval=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:
After Change
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,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
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: 6411c9079a834fd7549ab4593261a3619519eb02
Time: 2019-09-04
Author: kontakt@ajung.name
File Name: imgaug/augmenters/size.py
Class Name: CropAndPad
Method Name: _augment_images
Project Name: nipy/dipy
Commit Name: 463948aa8cd97969883ff9c9cdbb8b5429c0bc9d
Time: 2011-09-17
Author: garyfallidis@gmail.com
File Name: dipy/reconst/dni.py
Class Name: EquatorialInversion
Method Name: fast_odf
Project Name: brian-team/brian2
Commit Name: 4c6d93a517800f03e93472ebbe10990159a1721b
Time: 2014-01-20
Author: marcel.stimberg@ens.fr
File Name: brian2/core/namespace.py
Class Name:
Method Name: get_local_namespace