677467e2ae6a25911428540620b5e992cd64f482,src/predict/predict.py,Predictor,forward_pass,#Predictor#,54

Before Change


                imwrite(output_path, sr_img)

    def forward_pass(self, file_path):
        lr_img = imread(str(file_path)) / 255.0
        lr_img = np.expand_dims(lr_img, axis=0)
        sr_img = self.model.rdn.predict(lr_img)
        return np.clip(sr_img, 0, 1) * 255

After Change



    def forward_pass(self, file_path):
        lr_img = imread(file_path)
        if lr_img.shape[2] == 3:
            lr_img = lr_img / 255.0
            lr_img = np.expand_dims(lr_img, axis=0)
            sr_img = self.model.rdn.predict(lr_img)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: idealo/image-super-resolution
Commit Name: 677467e2ae6a25911428540620b5e992cd64f482
Time: 2018-12-20
Author: testadicardi@gmail.com
File Name: src/predict/predict.py
Class Name: Predictor
Method Name: forward_pass


Project Name: ClementPinard/FlowNetPytorch
Commit Name: 6c3a117b9b39fd7f993c85091f7a1a0d96d10d08
Time: 2018-01-29
Author: clement.pinard@parrot.com
File Name: datasets/KITTI.py
Class Name:
Method Name: load_flow_from_png


Project Name: xinntao/BasicSR
Commit Name: 6917d8a3dbf6617f02b1247fd50fbc20d3cb6fd4
Time: 2018-06-10
Author: wxt1994@126.com
File Name: codes/data/LR_dataset.py
Class Name: LRDataset
Method Name: __getitem__