pytorch / pytorch/vision

Phototour dataset URLs are broken

Open
#8,711 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🐛 Describe the bug

datasets.PhotoTour(root="./data/phototour", name="notredame", train=False, download=True)
when i run this code, it comes up with this bug.
Traceback (most recent call last):
File "D:\workshop2\demo1\matchnet\matchNetPytorch\train.py", line 213, in
main()
File "D:\workshop2\demo1\matchnet\matchNetPytorch\train.py", line 63, in main
dataset = datasets.PhotoTour(root="./data/phototour", name="notredame", train=False, download=True,
File "C:\Users\user.conda\envs\test_env\lib\site-packages\torchvision\datasets\phototour.py", line 109, in init
self.download()
File "C:\Users\user.conda\envs\test_env\lib\site-packages\torchvision\datasets\phototour.py", line 158, in download
download_url(url, self.root, filename, md5)
File "C:\Users\user.conda\envs\test_env\lib\site-packages\torchvision\datasets\utils.py", line 122, in download_url
url = _get_redirect_url(url, max_hops=max_redirect_hops)
File "C:\Users\user.conda\envs\test_env\lib\site-packages\torchvision\datasets\utils.py", line 66, in _get_redirect_url
with urllib.request.urlopen(urllib.request.Request(url, headers=headers)) as response:
File "C:\Users\user.conda\envs\test_env\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\user.conda\envs\test_env\lib\urllib\request.py", line 525, in open
response = meth(req, response)
File "C:\Users\user.conda\envs\test_env\lib\urllib\request.py", line 634, in http_response
response = self.parent.error(
File "C:\Users\user.conda\envs\test_env\lib\urllib\request.py", line 563, in error
return self._call_chain(*args)
File "C:\Users\user.conda\envs\test_env\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\user.conda\envs\test_env\lib\urllib\request.py", line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 502: Bad Gateway
It is suggested that the url is not available.

Versions

Python version: 3.10.15 | packaged by Anaconda, Inc. | (main, Oct 3 2024, 07:22:19) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19045-SP0
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Name: 13th Gen Intel(R) Core(TM) i7-1360P
Manufacturer: GenuineIntel
Family: 198
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 2200
MaxClockSpeed: 2200
L2CacheSize: 4096
L2CacheSpeed: None
Revision: None

Versions of relevant libraries:
[pip3] numpy==1.22.4
[pip3] torch==2.5.1
[pip3] torchaudio==2.5.1
[pip3] torchvision==0.20.1
[conda] blas 1.0 mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
[conda] mkl 2023.1.0 h6b88ed4_46358 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
[conda] mkl-service 2.4.0 py310h2bbff1b_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
[conda] mkl_fft 1.3.10 py310h827c3e9_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
[conda] mkl_random 1.2.7 py310hc64d2fc_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
[conda] numpy 1.22.4 pypi_0 pypi
[conda] pytorch 2.5.1 py3.10_cpu_0 pytorch
[conda] pytorch-mutex 1.0 cpu pytorch
[conda] torchaudio 2.5.1 py310_cpu pytorch
[conda] torchvision 0.20.1 py310_cpu pytorch

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with torchvision/datasets/phototour.py and the PhotoTour download path shown in the traceback. Determine which dataset URL is failing, identify a working replacement, and verify that PhotoTour downloads successfully for the notredame dataset with download=True.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.