Lakonik / SSDNeRF

[ICCV 2023] Single-Stage Diffusion NeRF
https://lakonik.github.io/ssdnerf/
MIT License
438 stars 24 forks source link

Download Failed. Invalid URL 'work_dirs/cache/inception-2015-12-05.pt': No scheme supplied. #35

Closed Liiswen closed 11 months ago

Liiswen commented 11 months ago

Thank you for the awesome library!

I encountered the following error while executing the inference code

python test.py ./configs/paper_cfgs/ssdnerf_cars_recons1v.py ./checkpoints/ssdnerf_cars_recons1v_80k_emaonly.pth --gpu-ids 0
2023-12-24 16:08:56,824 - mmgen - INFO - Try to load Tero's Inception Model from 'work_dirs/cache/inception-2015-12-05.pt'.
2023-12-24 16:08:56,824 - mmgen - INFO - Load Tero's Inception Model failed. 'The provided filename work_dirs/cache/inception-2015-12-05.pt does not exist' occurs.
2023-12-24 16:08:56,824 - mmgen - INFO - Try to download Inception Model from work_dirs/cache/inception-2015-12-05.pt...
Download Failed. Invalid URL 'work_dirs/cache/inception-2015-12-05.pt': No scheme supplied. Perhaps you meant https://work_dirs/cache/inception-2015-12-05.pt? occurs.
Traceback (most recent call last):
  File "/root/anaconda3/envs/ssdnerf/lib/python3.8/site-packages/mmcv/utils/registry.py", line 69, in build_from_cfg
    return obj_cls(**args)
  File "/data/lgh/mmgeneration/mmgen/core/evaluation/metrics.py", line 494, in __init__
    self.inception_net, self.inception_style = load_inception(
  File "/data/lgh/mmgeneration/mmgen/core/evaluation/metrics.py", line 85, in load_inception
    raise RuntimeError('Cannot Load Inception Model, please check the input '
RuntimeError: Cannot Load Inception Model, please check the input `inception_args`: {'type': 'StyleGAN', 'inception_path': 'work_dirs/cache/inception-2015-12-05.pt'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 75, in <module>
    main()
  File "test.py", line 58, in main
    tools.test.main()
  File "/data/lgh/SSDNeRF/tools/test.py", line 200, in main
    metrics = [build_metric(metric) for metric in metrics]
  File "/data/lgh/SSDNeRF/tools/test.py", line 200, in <listcomp>
    metrics = [build_metric(metric) for metric in metrics]
  File "/data/lgh/mmgeneration/mmgen/core/registry.py", line 30, in build_metric
    return build(cfg, METRICS)
  File "/data/lgh/mmgeneration/mmgen/core/registry.py", line 25, in build
    return build_from_cfg(cfg, registry, default_args)
  File "/root/anaconda3/envs/ssdnerf/lib/python3.8/site-packages/mmcv/utils/registry.py", line 72, in build_from_cfg
    raise type(e)(f'{obj_cls.__name__}: {e}')
RuntimeError: FID: Cannot Load Inception Model, please check the input `inception_args`: {'type': 'StyleGAN', 'inception_path': 'work_dirs/cache/inception-2015-12-05.pt'}

Where do I need to get this filework_dirs/cache/inception-2015-12-05.pt? Is it generated during training? Thanks a lot!

Lakonik commented 11 months ago

Hi! Please follow these instructions:

For FID and KID evaluation, run the following commands to extract the Inception features of the real images. (This script will use all the available GPUs on your machine, so remember to set CUDA_VISIBLE_DEVICES.)

CUDA_VISIBLE_DEVICES=0 python tools/inception_stat.py configs/paper_cfgs/ssdnerf_cars_uncond.py
CUDA_VISIBLE_DEVICES=0 python tools/inception_stat.py configs/paper_cfgs/ssdnerf_chairs_recons1v.py
CUDA_VISIBLE_DEVICES=0 python tools/inception_stat.py configs/paper_cfgs/ssdnerf_abotables_uncond.py