122c24b4aeb11ecba5f77c3bf5ef8f20f2167c77,utils/datasets.py,ListDataset,__getitem__,#ListDataset#,57
Before Change
img = np.array(Image.open(img_path))
// Black and white images
if len(img.shape) == 2:
img = np.repeat(img[:, :, np.newaxis], 3, axis=2)
h, w, _ = img.shape
dim_diff = np.abs(h - w)
// Upper (left) and lower (right) padding
pad1, pad2 = dim_diff // 2, dim_diff - dim_diff // 2
After Change
img = np.array(Image.open(img_path))
// Handles images with less than three channels
while len(img.shape) != 3:
index += 1
img_path = self.img_files[index % len(self.img_files)].rstrip()
img = np.array(Image.open(img_path))
h, w, _ = img.shape
dim_diff = np.abs(h - w)
// Upper (left) and lower (right) padding

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 122c24b4aeb11ecba5f77c3bf5ef8f20f2167c77
Time: 2018-06-07
Author: eriklindernoren@gmail.com
File Name: utils/datasets.py
Class Name: ListDataset
Method Name: __getitem__
Project Name: havakv/pycox
Commit Name: 1b3de6b301f962db0271fdad1bbb5036880b7fbc
Time: 2019-10-12
Author: haavard.kvamme@gmail..com
File Name: pycox/preprocessing/label_transforms.py
Class Name: LabTransDiscreteTime
Method Name: __init__
Project Name: havakv/pycox
Commit Name: 1b3de6b301f962db0271fdad1bbb5036880b7fbc
Time: 2019-10-12
Author: haavard.kvamme@gmail..com
File Name: pycox/preprocessing/label_transforms.py
Class Name: LabTransPCHazard
Method Name: __init__