Lotayou / Face-Renovation

Official repository of the paper "HiFaceGAN: Face Renovation via Collaborative Suppression and Replenishment".
https://arxiv.org/abs/2005.05005
GNU General Public License v3.0
284 stars 49 forks source link

No such file or directory #23

Closed AlexRMU closed 3 years ago

AlexRMU commented 3 years ago

!python ./metrics_package/main.py --help

/usr/local/lib/python3.6/dist-packages/torchvision/models/inception.py:77: FutureWarning: The default weight initialization of inception_v3 will be changed in future releases of torchvision. If you wish to keep the old behavior (which leads to long initialization times due to scipy/scipy#11299), please set init_weights=True.
  ' due to scipy/scipy#11299), please set init_weights=True.', FutureWarning)
Traceback (most recent call last):
  File "./metrics_package/main.py", line 169, in <module>
    run_main(folder)
  File "./metrics_package/main.py", line 78, in run_main
    file_packs = [os.path.join(FOLDER, l) for l in os.listdir(FOLDER)]
FileNotFoundError: [Errno 2] No such file or directory: '/home/lingbo.ylb/datasets/FFHQ_yuv_recon/37'

(colab)

AlexRMU commented 3 years ago
test_nogt.py
test.py
Traceback (most recent call last):
  File "test_nogt.py", line 20, in <module>
    dataloader = data.create_dataloader(opt)
  File "/content/Face-Renovation/data/__init__.py", line 44, in create_dataloader
    instance.initialize(opt)
  File "/content/Face-Renovation/data/test_dataset.py", line 25, in initialize
    files = [l for l in glob.glob(os.path.join(opt.dataroot, '*')) if l.lower().endswith(('jpg','png','jpeg'))][-opt.max_dataset_size:]
AttributeError: 'TestOptions' object has no attribute 'dataroot'
Lotayou commented 3 years ago

Hey man, I don't know where you store the data on your computer, so you need to switch the dataroot in configuration file first.