6b5aa515e09e44f73439b07a8ac1079aaf9af440,foolbox/utils.py,,imagenet_example,#Any#,59

Before Change


    
    import scipy
    path = os.path.join(os.path.dirname(__file__), "example.png")
    image = scipy.misc.imread(path)[:, :, :3]
    return scipy.misc.imresize(image, shape).astype(np.float32), 282

After Change


    
    import PIL
    path = os.path.join(os.path.dirname(__file__), "example.png")
    image = PIL.Image.open(path)
    image = image.resize(shape)
    image = np.asarray(image, dtype=np.float32)
    image = image[:, :, :3]
    assert image.shape == shape + (3,)
    return image, 282
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: bethgelab/foolbox
Commit Name: 6b5aa515e09e44f73439b07a8ac1079aaf9af440
Time: 2017-11-03
Author: git@jonasrauber.de
File Name: foolbox/utils.py
Class Name:
Method Name: imagenet_example


Project Name: minerva-ml/open-solution-data-science-bowl-2018
Commit Name: 57e82c37bd1e40f9fb37b21719fda4ebadd095de
Time: 2018-02-16
Author: kamil.kaczmarek@codilime.com
File Name: steps/pytorch/loaders.py
Class Name: MetadataImageDataset
Method Name: load_image


Project Name: ageitgey/face_recognition
Commit Name: c261b64d51ef8f55ad04f7b09cad7da9deacafef
Time: 2018-02-27
Author: ageitgey@gmail.com
File Name: face_recognition/api.py
Class Name:
Method Name: load_image_file