zuruoke / watermark-removal

a machine learning image inpainting task that instinctively removes watermarks from image indistinguishable from the ground truth image
1.86k stars 291 forks source link

Missing potrait/mask.png #4

Closed Marc-3d closed 2 years ago

Marc-3d commented 2 years ago

Hi zuruoke,

That's a great tool you are putting out there. I have run the command all the commands, your package seems to detect that I want to clean up a portrait and is looking for "utils/portrait/mask.png", but the "portrait" folder does not even exist.

Here is the error message:

image size: (1730, 1155, 3)
Traceback (most recent call last):
  File "main.py", line 32, in <module>
    input_image = preprocess_image(image, args.watermark_type)
  File "/content/watermark-removal/preprocess_image.py", line 25, in preprocess_image
    "utils/{}/{}/mask.png".format(watermark_type, image_type))
  File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2843, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'utils/istock/potrait/mask.png'

Should I run some code to generate the mask?

Prem95 commented 2 years ago

Just change the path in the file to the absolute path. It will work.