VinAIResearch / CPM

💄 Lipstick ain't enough: Beyond Color-Matching for In-the-Wild Makeup Transfer (CVPR 2021)

Home Page:https://thaoshibe.github.io/CPM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Read-only CPM folder preventing me from running Colab example - Read-only file system: './result.png'

vietanhdev opened this issue · comments

Hello,
As in your Colab instruction, I added a shortcut of CPM-Shared-Folder to my Drive. However, I don't have the permission to write to your Drive, so I see the following error when running your instruction:

Traceback (most recent call last):
  File "main.py", line 54, in <module>
    Image.fromarray((output).astype("uint8")).save(save_path)
  File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2131, in save
    fp = builtins.open(filename, "w+b")
OSError: [Errno 30] Read-only file system: './result.png'

Suggested solutions: Point savedir to another directory:

# Pattern + Color: Image will be saved in 'result.png'
os.chdir(path)
!python -W ignore main.py --style ./imgs/style-1.png --input ./imgs/non-makeup.png --savedir=/content/

You should also update other commands.

Thank you for pointing out the issue.