9332a1dd29b5aefb82d7c15e79e73908d5c09fee,mmcv/image/transforms/normalize.py,,imnormalize,#Any#Any#Any#Any#,6

Before Change



def imnormalize(img, mean, std, to_rgb=True):
    img = np.float32(img) if img.dtype != np.float32 else img.copy()
    mean = np.float64(mean.reshape(1, -1))
    stdinv = 1 / np.float64(std.reshape(1, -1))
    if to_rgb:
        cv2.cvtColor(img, cv2.COLOR_BGR2RGB, img)  // inplace
    cv2.subtract(img, mean, img)  // inplace
    cv2.multiply(img, stdinv, img)  // inplace
    return img

After Change


        ndarray: The normalized image.
    
    img = np.float32(img) if img.dtype != np.float32 else img.copy()
    return imnormalize_(img, mean, std, to_rgb)


def imnormalize_(img, mean, std, to_rgb=True):
    Inplace normalize an image with mean and std.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: open-mmlab/mmcv
Commit Name: 9332a1dd29b5aefb82d7c15e79e73908d5c09fee
Time: 2020-02-19
Author: 34728304+JoannaLXY@users.noreply.github.com
File Name: mmcv/image/transforms/normalize.py
Class Name:
Method Name: imnormalize


Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: 3782cc530a2914543e4f86fc727a9021defc0342
Time: 2017-10-30
Author: christian.brenninkmeijer@manchester.ac.uk
File Name: spynnaker/pyNN/models/neuron/synapse_types/synapse_type_exponential.py
Class Name:
Method Name: get_exponential_decay_and_init


Project Name: hyperspy/hyperspy
Commit Name: d1563216e9751557420755ccb9823a1d51fdc782
Time: 2020-07-30
Author: tjof2@cam.ac.uk
File Name: hyperspy/misc/array_tools.py
Class Name:
Method Name: calculate_bins_histogram