8d0d0c7a6db3904f0222cbe058388a92cf21a548,calamari_ocr/ocr/dataset/imageprocessors/center_normalizer.py,CenterNormalizer,dewarp,#CenterNormalizer#Any#Any#Any#,43

Before Change


        // The actual image img is embedded into a larger image by
        // adding vertical space on top and at the bottom (padding)
        hpadding = r // this is large enough
        padded = np.vstack([cval * np.ones((hpadding, w)), img, cval * np.ones((hpadding, w))])
        center = center + hpadding
        dewarped = [padded[center[i] - r:center[i]+r, i] for i in range(w)]
        dewarped = np.array(dewarped, dtype=dtype).T

After Change



        center = center + hpad - r
        new_h = 2*r
        dewarped = [padded[c:c+new_h, i] for i, c in enumerate(center)]
        dewarped = np.swapaxes(np.array(dewarped, dtype=img.dtype), 1, 0)
        return dewarped
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: dewarp


Project Name: scikit-learn-contrib/DESlib
Commit Name: f1292b23b2c7685c54c98485ca5346273554faa1
Time: 2018-03-26
Author: rafaelmenelau@gmail.com
File Name: deslib/base.py
Class Name: DS
Method Name: _frienemy_pruning


Project Name: eriklindernoren/Keras-GAN
Commit Name: 5c18953a3da18402d3fcc9ff96d1e983d48c98cb
Time: 2018-04-16
Author: eriklindernoren@gmail.com
File Name: pix2pix/pix2pix.py
Class Name: Pix2Pix
Method Name: train