8d0d0c7a6db3904f0222cbe058388a92cf21a548,calamari_ocr/ocr/dataset/imageprocessors/center_normalizer.py,CenterNormalizer,normalize,#CenterNormalizer#,67

Before Change


        t = dewarped.shape[0] - img.shape[0]
        // scale to target height
        scaled = ScaleToHeightProcessor.scale_to_h(dewarped, self.target_height, order=order, dtype=dtype, cval=cval)
        if dewarped.shape[1] != 0:
            m2 = scaled.shape[1] / dewarped.shape[1]
        else:
            m2 = -1

After Change


        if img.size == 0:
            cval = 1
        elif img.ndim == 2:
            cval = np.amax(img).item()
        else:
            x, y = np.unravel_index(np.argmax(np.mean(img, axis=2)), img.shape[:2])
            cval = img[x, y, :].tolist()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: Calamari-OCR/calamari
Commit Name: 8d0d0c7a6db3904f0222cbe058388a92cf21a548
Time: 2021-02-06
Author: ChWick@users.noreply.github.com
File Name: calamari_ocr/ocr/dataset/imageprocessors/center_normalizer.py
Class Name: CenterNormalizer
Method Name: normalize


Project Name: oddt/oddt
Commit Name: 9e6c74851e51302f887c765f89daac7769146b5b
Time: 2017-07-17
Author: paulina.knut@gmail.com
File Name: oddt/shape.py
Class Name:
Method Name: electroshape


Project Name: jakeret/tf_unet
Commit Name: ec151176c159d79f733ab1255f299dfddfcf801b
Time: 2016-08-12
Author: jakeret@phys.ethz.ch
File Name: tf_unet/util.py
Class Name:
Method Name: plot_prediction