7fffa98b9166a03b4a53fb40202d97b09e8e9036,utils/datasets.py,ListDataset,__getitem__,#ListDataset#,57
Before Change
img_path = self.img_files[index % len(self.img_files)].rstrip()
img = np.array(Image.open(img_path))
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
After 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
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 7fffa98b9166a03b4a53fb40202d97b09e8e9036
Time: 2018-05-29
Author: eriklindernoren@gmail.com
File Name: utils/datasets.py
Class Name: ListDataset
Method Name: __getitem__
Project Name: ufal/npfl114
Commit Name: c343409098b4f4b8396119d9f26e040e479a0e2b
Time: 2020-04-20
Author: milan@strakovi.com
File Name: labs/08/speech_recognition_eval.py
Class Name:
Method Name:
Project Name: metalbubble/moments_models
Commit Name: 5212f598c3d65670a0399afe0a7434e91a5556aa
Time: 2018-01-15
Author: alexandonian@gmail.com
File Name: test_model.py
Class Name:
Method Name: