Skip to content

Commit

Permalink
Update officecaltech.py
Browse files Browse the repository at this point in the history
  • Loading branch information
thucbx99 committed Aug 8, 2023
1 parent d28dabf commit d87fc5d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tllib/vision/datasets/officecaltech.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ def __init__(self, root: str, task: str, download: Optional[bool] = False, **kwa
if download:
for dir in self.directories.values():
if not os.path.exists(os.path.join(root, dir)):
download_and_extract_archive(url="https://cloud.tsinghua.edu.cn/f/e93f2e07d93243d6b57e/?dl=1",
download_and_extract_archive(url="https://cloud.tsinghua.edu.cn/f/eea518fa781a41d1b20e/?dl=1",
download_root=os.path.join(root, 'download'),
filename="officecaltech.tgz", remove_finished=False, extract_root=root)
filename="office-caltech.tgz", remove_finished=False,
extract_root=root)
break
else:
list(map(lambda dir, _: check_exits(root, dir), self.directories.values()))
Expand All @@ -72,4 +73,4 @@ def num_classes(self):

@classmethod
def domains(cls):
return list(cls.directories.keys())
return list(cls.directories.keys())

0 comments on commit d87fc5d

Please sign in to comment.