Skip to content

Commit b657b49

Browse files
committed
add image path and folder even if dataloaders are imageless
1 parent 83e3082 commit b657b49

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

data/db.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -2750,7 +2750,13 @@ def __getitem__(self, item):
27502750
if self.transform:
27512751
img = self.transform(img)
27522752
else:
2753-
path_to_image, img = 0, 0
2753+
image_folder = sample['image_path'][11:21] + "R" if '.JPG' in sample['image_path'] else sample[
2754+
'image_name'][
2755+
11:21] + "R"
2756+
path_to_image = os.path.join(self.path_to_images, image_folder,
2757+
sample['image_path'] if '.JPG' in sample['image_path'] else sample[
2758+
'image_name'])
2759+
img = 0
27542760

27552761
ret_sample = {
27562762
'image': img,

0 commit comments

Comments
 (0)