219b3f98001448eff5f2cbb5467940b6a2bfb4fe,data/aligned_dataset.py,AlignedDataset,__getitem__,#AlignedDataset#Any#,19
Before Change
w_total = AB.size(2)
w = int(w_total / 2)
h = AB.size(1)
if self.center_crop:
w_offset = int(round((w - self.opt.fineSize) / 2.0))
h_offset = int(round((h - self.opt.fineSize) / 2.0))
else:
w_offset = random.randint(0, max(0, w - self.opt.fineSize - 1))
h_offset = random.randint(0, max(0, h - self.opt.fineSize - 1))
After Change
w, h = AB.size
w2 = int(w / 2)
A = AB.crop((0, 0, w2, h)).resize((self.opt.loadSize, self.opt.loadSize), Image.BICUBIC)
B = AB.crop((w2, 0, w, h)).resize((self.opt.loadSize, self.opt.loadSize), Image.BICUBIC)
A = transforms.ToTensor()(A)
B = transforms.ToTensor()(B)
w_offset = random.randint(0, max(0, self.opt.loadSize - self.opt.fineSize - 1))
h_offset = random.randint(0, max(0, self.opt.loadSize - self.opt.fineSize - 1))
A = A[:, h_offset:h_offset + self.opt.fineSize, w_offset:w_offset + self.opt.fineSize]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: junyanz/BicycleGAN
Commit Name: 219b3f98001448eff5f2cbb5467940b6a2bfb4fe
Time: 2018-09-03
Author: junyanzhu89@gmail.com
File Name: data/aligned_dataset.py
Class Name: AlignedDataset
Method Name: __getitem__
Project Name: baldassarreFe/deep-koalarization
Commit Name: 4af0d6b993453f2c8aec62c4ff7a8c0b1c877f22
Time: 2017-10-15
Author: baldassarre.fe@gmail.com
File Name: dataset/resize.py
Class Name: ImagenetResizer
Method Name: resize_img
Project Name: sony/nnabla-examples
Commit Name: 56926bc8b4a158e1c40cddbc795303bc6a66f44d
Time: 2019-05-23
Author: sukriti.mehrotra@sony.com
File Name: semantic-segmentation/deeplabv3plus/image_preprocess.py
Class Name:
Method Name: resize