Yonuts commited on
Commit
12f846b
·
1 Parent(s): 104be2e

Adds common natural img and remove previous

Browse files
.gitattributes CHANGED
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.pth.tar filter=lfs diff=lfs merge=lfs -text
37
  *.png filter=lfs diff=lfs merge=lfs -text
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.pth.tar filter=lfs diff=lfs merge=lfs -text
37
  *.png filter=lfs diff=lfs merge=lfs -text
38
+ *.JPEG filter=lfs diff=lfs merge=lfs -text
datasets.py CHANGED
@@ -93,7 +93,7 @@ class LsdirMiniDataset(torch.utils.data.Dataset):
93
  transform: Optional[Callable] = None,
94
  ) -> None:
95
  self.root = root
96
- self.image_files = [f for f in os.listdir(self.root) if f.lower().endswith('.png')]
97
  self.transform = transform
98
 
99
  def __len__(self) -> int:
@@ -101,7 +101,7 @@ class LsdirMiniDataset(torch.utils.data.Dataset):
101
 
102
  def __getitem__(self, idx):
103
  img_path = os.path.join(self.root, self.image_files[idx])
104
- img = Image.open(img_path)
105
  if self.transform:
106
  img = self.transform(img)
107
 
 
93
  transform: Optional[Callable] = None,
94
  ) -> None:
95
  self.root = root
96
+ self.image_files = [f for f in os.listdir(self.root) if f.lower().endswith(('.png', '.JPEG'))]
97
  self.transform = transform
98
 
99
  def __len__(self) -> int:
 
101
 
102
  def __getitem__(self, idx):
103
  img_path = os.path.join(self.root, self.image_files[idx])
104
+ img = Image.open(img_path).convert("RGB") # Ensure consistent 3-channel format
105
  if self.transform:
106
  img = self.transform(img)
107
 
img_samples/LSDIR_samples/ILSVRC2012_val_00000502.JPEG ADDED

Git LFS Details

  • SHA256: cc0bfb4fcc59a0f759dc336c0abf73f7705f0eb6ed67453cdb4ddd52eae5ed28
  • Pointer size: 131 Bytes
  • Size of remote file: 281 kB
img_samples/LSDIR_samples/ILSVRC2012_val_00000696.JPEG ADDED

Git LFS Details

  • SHA256: c6b83f244e01e25230c2f997b8d32cfb5c8a57d5ff33bd0863ea7f2b42096e90
  • Pointer size: 131 Bytes
  • Size of remote file: 293 kB
img_samples/LSDIR_samples/ILSVRC2012_val_00001112.JPEG ADDED

Git LFS Details

  • SHA256: f78c67d561e9dd8cd2d4dd1cccb778e0dc773102f1a2ef8420fadf54e806590a
  • Pointer size: 131 Bytes
  • Size of remote file: 106 kB
img_samples/LSDIR_samples/butterfly.png ADDED

Git LFS Details

  • SHA256: cd7245ebb9409e65d97fafb88406c4663b6dec8b890a68b9129ae21f4759e46d
  • Pointer size: 131 Bytes
  • Size of remote file: 128 kB
img_samples/LSDIR_samples/leaves.png ADDED

Git LFS Details

  • SHA256: f36fb3442bf3f6bb7a566e9f71bde701aa24ed47922f11730c0d6546d868f267
  • Pointer size: 131 Bytes
  • Size of remote file: 130 kB
img_samples/LSDIR_samples/starfish.png ADDED

Git LFS Details

  • SHA256: da66f562a30b5be01cb0ce7cb74f7f844acee8dcdc700619e31343c656c4b281
  • Pointer size: 131 Bytes
  • Size of remote file: 127 kB