Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib.error.HTTPError: HTTP Error 404: Not Found #30

Open
ZongWei-HUST opened this issue May 4, 2022 · 1 comment
Open

urllib.error.HTTPError: HTTP Error 404: Not Found #30

ZongWei-HUST opened this issue May 4, 2022 · 1 comment

Comments

@ZongWei-HUST
Copy link

I found that when calculating custom dataset, using UPPERCASE named custom_name such as "dragan_Rs", it will be ERROR. And i change it to "dragan_rs", its OK.
I don't know why.

The complete error as follows:
Traceback (most recent call last):
  File "/home/user/duzongwei/Projects/FSGAN/metrics/fid.py", line 46, in <module>
    compute_fid_kid(fake_fdir, custom_name)
  File "/home/user/duzongwei/Projects/FSGAN/metrics/fid.py", line 15, in compute_fid_kid
    score_fid = fid.compute_fid(fake_fdir, dataset_name=custom_name, mode=mode, dataset_split=dataset_split)
  File "/home/user/anaconda3/envs/dzw_gan/lib/python3.7/site-packages/cleanfid/fid.py", line 456, in compute_fid
    batch_size=batch_size, device=device, verbose=verbose)
  File "/home/user/anaconda3/envs/dzw_gan/lib/python3.7/site-packages/cleanfid/fid.py", line 179, in fid_folder
    mode=mode, seed=0, split=dataset_split)
  File "/home/user/anaconda3/envs/dzw_gan/lib/python3.7/site-packages/cleanfid/features.py", line 58, in get_reference_statistics
    fpath = check_download_url(local_folder=stats_folder, url=url)
  File "/home/user/anaconda3/envs/dzw_gan/lib/python3.7/site-packages/cleanfid/downloads_helper.py", line 36, in check_download_url
    with urllib.request.urlopen(url) as response, open(local_path, 'wb') as f:
  File "/home/user/anaconda3/envs/dzw_gan/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/home/user/anaconda3/envs/dzw_gan/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/home/user/anaconda3/envs/dzw_gan/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
@GaParmar
Copy link
Owner

Hi,

Thank you for pointing it out. This is because when the FID stats are loaded, the library checks for the lowercase version of the string. I will address this in the next revision!

Regards,
Gaurav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants