Bringing-Old-Photos-Back-to-Life icon indicating copy to clipboard operation
Bringing-Old-Photos-Back-to-Life copied to clipboard

Going through the demo but no files

Open miladavaz opened this issue 3 years ago β€’ 4 comments

Succesfully going through the demo with zero errors, but getting no output in any of the created folders.

miladavaz avatar Mar 27 '21 14:03 miladavaz

Do you use the colab demo as is? We do not come across such issue. Can you please post more information or share the demo link to us?

zhangmozhe avatar Apr 02 '21 05:04 zhangmozhe

Hey, Im not using the colab, but the local install.

Here is the excerpt when I run the code. all things seem to be going well (i know it also tries to treat the .dsstore file but that shouldnt be any issue here.


Macbook:Bringing-Old-Photos-Back-to-Life username$ pipenv run python run.py --input_folder alfa --output_folder alfa/done --GPU -1
Running Stage 1: Overall restoration
Traceback (most recent call last):
  File "/Users/username/Desktop/coding/photosave/Bringing-Old-Photos-Back-to-Life/Global/test.py", line 131, in <module>
    input = Image.open(input_file).convert("RGB")
  File "/Users/username/.local/share/virtualenvs/Bringing-Old-Photos-Back-to-Life-5q-Oxyjf/lib/python3.9/site-packages/PIL/Image.py", line 2958, in open
    raise UnidentifiedImageError(
PIL.UnidentifiedImageError: cannot identify image file '/Users/username/Desktop/coding/photosave/Bringing-Old-Photos-Back-to-Life/alfa/.DS_Store'
Finish Stage 1 ...


Running Stage 2: Face Detection
Finish Stage 2 ...


Running Stage 3: Face Enhancement
dataset [FaceTestDataset] of size 0 was created
The size of the latent vector size is [8,8]
Network [SPADEGenerator] was created. Total number of parameters: 92.1 million. To see the architecture, do print(network).
hi :)
Finish Stage 3 ...


Running Stage 4: Blending
Finish Stage 4 ...


All the processing is done. Please check the results.
Macbook:Bringing-Old-Photos-Back-to-Life username$ 

miladavaz avatar Apr 03 '21 16:04 miladavaz

I met the same problem, too. my treeπŸ‘‡ . β”œβ”€β”€ in β”‚Β Β  └── src.jpg └── out β”œβ”€β”€ final_output β”œβ”€β”€ stage_1_restore_output β”‚Β Β  β”œβ”€β”€ input_image β”‚Β Β  β”œβ”€β”€ origin β”‚Β Β  └── restored_image β”œβ”€β”€ stage_2_detection_output └── stage_3_face_output └── each_img

AdrianDSW avatar Apr 15 '21 12:04 AdrianDSW

Hi,

so you are using Mac OS X - I solved it by editing Global/test.py adding an extension variable and checked if filename with last 3 digits is in list ext => " if input_name[-3:] in ext:"

  mask_transform = transforms.ToTensor()
  ext=['jpg','png','gif']
  for i in range(dataset_size):
    input_name = input_loader[i]
        if input_name[-3:] in ext:
            input_file = os.path.join(opt.test_input, input_name)
            if not os.path.isfile(input_file):
                print("Skipping non-file %s" % input_name)
                continue
            input = Image.open(input_file).convert("RGB")
            print("Now you are processing %s" % (input_name))

rn54n avatar Jan 02 '23 19:01 rn54n