Skip to content

Commit

Permalink
consider both JPG and JPEG images
Browse files Browse the repository at this point in the history
  • Loading branch information
emilbaekdahl committed Dec 6, 2021
1 parent 930bfa1 commit c6bc066
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dataloaders/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ class Movies(Dataset):
def __init__(self, data_dir="data/movies"):
self.data_dir = pathlib.Path(data_dir)

self.file_names = list(self.data_dir.glob("*.jpeg"))
self.file_names = [
file_name
for extension in ["jpeg", "jpg"]
for file_name in pl.Path("data/movies").glob(f"*.{extension}")
]

def __getitem__(self, index):
file_name = self.file_names[index]
Expand Down

0 comments on commit c6bc066

Please sign in to comment.