aa4f363748a99758179d16928b5a9afa2443d31e,albumentations/augmentations/functional.py,,longest_max_size,#Any#Any#Any#,261

Before Change


    scale = longest_max_size / float(max(width, height))

    if scale != 1.0:
        out_size = tuple(int(dim * scale) for dim in (width, height))
        img = cv2.resize(img, out_size, interpolation=interpolation)
    return img


def median_blur(img, ksize):
    if img.dtype == np.float32 and ksize not in {3, 5}:

After Change




def longest_max_size(img, max_size, interpolation):
    return _func_max_size(img, max_size, interpolation, max)


def smallest_max_size(img, max_size, interpolation):
    return _func_max_size(img, max_size, interpolation, min)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: albu/albumentations
Commit Name: aa4f363748a99758179d16928b5a9afa2443d31e
Time: 2018-09-27
Author: erikgaas@gmail.com
File Name: albumentations/augmentations/functional.py
Class Name:
Method Name: longest_max_size


Project Name: albu/albumentations
Commit Name: 252f267ff6ed2bec5ed6e3ce34675a6527e4dbcc
Time: 2020-10-29
Author: dipetm@gmail.com
File Name: albumentations/augmentations/domain_adaptation.py
Class Name: HistogramMatching
Method Name: apply


Project Name: albu/albumentations
Commit Name: ff1a17f52f363a3901f2b7a2d720b7745e1c3bc4
Time: 2019-10-10
Author: creafz@gmail.com
File Name: benchmark/benchmark.py
Class Name: RandomSizedCrop_64_512
Method Name: torchvision


Project Name: matthewwithanm/django-imagekit
Commit Name: 15e0981835bf6620d8a68f57436ea3c0863928d5
Time: 2012-02-11
Author: matthew@exanimo.com
File Name: imagekit/processors/resize.py
Class Name: Cover
Method Name: process