Skip to content

SBDataset downloads fails because train_noval.txt is no more available at the specified url Β #8471

@jeremyfix

Description

@jeremyfix

πŸ› Describe the bug

When creating the SBDataset(.., download=True), requesting it to be downloaded, the script fails.

Downloading https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz to /tmp/fix-72406/SBDataset/benchmark.tgz
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1419539633/1419539633 [01:55<00:00, 12338089.02it/s]
Extracting /tmp/fix-72406/SBDataset/benchmark.tgz to /tmp/fix-72406/SBDataset
Downloading https://www.cs.cornell.edu/~bharathh/ to /tmp/fix-72406/SBDataset/train_noval.txt
21334it [00:00, 252128.84it/s]                 
Traceback (most recent call last):          
  File "data.py", line 322, in <module>        
    plot_samples("/tmp/fix-72406/SBDataset")   
  File "data.py", line 266, in plot_samples  
    train_valid_dataset = torchvision.datasets.SBDataset(
  File "/tmp/fix-72406/venv/lib/python3.8/site-packages/torchvision/datasets/sbd.py", line 84, in __init__
    download_url(self.voc_train_url, sbd_root, self.voc_split_filename, self.voc_split_md5)
  File "/tmp/fix-72406/venv/lib/python3.8/site-packages/torchvision/datasets/utils.py", line 143, in download_url
    raise RuntimeError("File not found or corrupted.")                                                                                              
RuntimeError: File not found or corrupted.             

The issue seems to me related to the download of the file train_noval.txt which I believe is downloaded from http://home.bharathh.info/pubs/codes/SBD/train_noval.txt as stated in https://github.com/pytorch/vision/blob/b6770a7ee198ecb3426d2dc4ffe2f88e4dc62952/torchvision/datasets/sbd.py#L49C22-L49C78 by the definition of voc_train_url

Unfortunately, following the link http://home.bharathh.info/pubs/codes/SBD/train_noval.txt , we get redirected to https://www.cs.cornell.edu/~bharathh/ .This page is downloaded instead of the expected file, hence, I believe, leading to the RuntimeError . Indeed, running the code below, I do have a train_noval.txt file downloaded but its content is the home page of B. Hariharan.

The code below allows to reproduce the error :

import torchvision

train_valid_dataset = torchvision.datasets.SBDataset( root="/tmp/", image_set="train", transforms=None, download=True)
   

Versions

Collecting environment information...
PyTorch version: 2.3.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.31

Python version: 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.13.0-35-lowlatency-x86_64-with-glibc2.29
Is CUDA available: True
CUDA runtime version: 11.7.99
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090
Nvidia driver version: 525.85.12
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.4.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
ArchitectureΒ : x86_64
Mode(s) opΓ©ratoire(s) des processeursΒ : 32-bit, 64-bit
BoutismeΒ : Little Endian
Address sizes: 46 bits physical, 48 bits virtual
Processeur(s)Β : 8
Liste de processeur(s) en ligneΒ : 0-7
Thread(s) par cΕ“urΒ : 2
CΕ“ur(s) par socketΒ : 4
Socket(s)Β : 1
NΕ“ud(s) NUMAΒ : 1
Identifiant constructeurΒ : GenuineIntel
Famille de processeurΒ : 6
Modèle : 85
Nom de modèle : Intel(R) Xeon(R) W-2125 CPU @ 4.00GHz
RΓ©visionΒ : 4
Vitesse du processeur en MHzΒ : 4000.000
Vitesse maximale du processeur en MHzΒ : 4500,0000
Vitesse minimale du processeur en MHzΒ : 1200,0000
BogoMIPSΒ : 7999.96
VirtualisationΒ : VT-x
Cache L1dΒ : 128 KiB
Cache L1iΒ : 128 KiB
Cache L2Β : 4 MiB
Cache L3Β : 8,3 MiB
NΕ“ud NUMAΒ 0 de processeur(s)Β : 0-7
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable
DrapauxΒ : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req md_clear flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] numpy==1.24.4
[pip3] torch==2.3.1
[pip3] torchinfo==1.8.0
[pip3] torchvision==0.18.1
[pip3] triton==2.3.1
[conda] Could not collect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions