8c96a80ee2b2ec6e934480dbe01396dbe52b783f,src/SamplePreprocessor.py,,preprocess,#,7

Before Change



        // map image into target image
        M = np.float32([[fx, 0, tx], [0, fy, ty]])
        target = np.ones(imgSize[::-1]) * np.random.uniform(0, 255)
        img = cv2.warpAffine(img, M, dsize=imgSize, dst=target, borderMode=cv2.BORDER_TRANSPARENT)

    // no data augmentation
    else:

After Change


        h, w = img.shape
        f = min(wt / w, ht / h)
        fx = f * np.random.uniform(0.75, 1.25)
        fy = f * np.random.uniform(0.75, 1.25)

        // random position around center
        txc = (wt - w * fx) / 2
        tyc = (ht - h * fy) / 2
        freedom_x = max((wt - fx * w) / 2, 0) + wt / 10
        freedom_y = max((ht - fy * h) / 2, 0) + ht / 10
        tx = txc + np.random.uniform(-freedom_x, freedom_x)
        ty = tyc + np.random.uniform(-freedom_y, freedom_y)

        // map image into target image
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: githubharald/SimpleHTR
Commit Name: 8c96a80ee2b2ec6e934480dbe01396dbe52b783f
Time: 2021-02-02
Author: harald@newpc.com
File Name: src/SamplePreprocessor.py
Class Name:
Method Name: preprocess


Project Name: 7ossam81/EvoloPy
Commit Name: e0e90bab32976898a01bb2da29c3002b83596425
Time: 2019-06-18
Author: raneem.qaddoura@gmail.com
File Name: GA.py
Class Name:
Method Name: GA


Project Name: donlnz/nonconformist
Commit Name: 3cc37b0b54ec938edda9eecc7fe41193a97a19cf
Time: 2015-05-13
Author: henrik@supindis.com
File Name: nonconformist/icp.py
Class Name: IcpClassifier
Method Name: predict


Project Name: hyperopt/hyperopt-sklearn
Commit Name: 897e1f85ca99903641763ca399afa25aa1ff68c8
Time: 2014-02-14
Author: james.bergstra@gmail.com
File Name: hpsklearn/components.py
Class Name:
Method Name: svc_poly