Skip to content

Commit bcf6cda

Browse files
authored
SBDataset: Only download noval file when image_set='train_noval' (#8475)
1 parent a471305 commit bcf6cda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torchvision/datasets/sbd.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ def __init__(
8181
for f in ["cls", "img", "inst", "train.txt", "val.txt"]:
8282
old_path = os.path.join(extracted_ds_root, f)
8383
shutil.move(old_path, sbd_root)
84-
download_url(self.voc_train_url, sbd_root, self.voc_split_filename, self.voc_split_md5)
84+
if self.image_set == "train_noval":
85+
# Note: this is failing as of June 2024 https://github.com/pytorch/vision/issues/8471
86+
download_url(self.voc_train_url, sbd_root, self.voc_split_filename, self.voc_split_md5)
8587

8688
if not os.path.isdir(sbd_root):
8789
raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it")

0 commit comments

Comments
 (0)