amaralibey commited on
Commit
df4e74c
·
verified ·
1 Parent(s): 517f676

Update load_album.py

Browse files
Files changed (1) hide show
  1. load_album.py +2 -8
load_album.py CHANGED
@@ -9,7 +9,6 @@
9
  from pathlib import Path
10
  from PIL import Image
11
  from torch.utils.data import Dataset
12
- from torchvision import transforms as T
13
 
14
 
15
  class AlbumDataset(Dataset):
@@ -36,10 +35,5 @@ class AlbumDataset(Dataset):
36
  return len(self.imgs)
37
 
38
  def __getitem__(self, idx):
39
- image_path = self.imgs[idx]
40
- image = Image.open(image_path).convert("RGB") # Ensure 3-channel RGB
41
-
42
- if self.transform:
43
- image = self.transform(image)
44
-
45
- return image, str(image_path) # Optionally return the path with the image
 
9
  from pathlib import Path
10
  from PIL import Image
11
  from torch.utils.data import Dataset
 
12
 
13
 
14
  class AlbumDataset(Dataset):
 
35
  return len(self.imgs)
36
 
37
  def __getitem__(self, idx):
38
+ # not needed
39
+ pass