-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Content mask format #62
Comments
PIL is having issues loading your mask image. Try loading the image in a seperate script or the Python interpreter and see if it works. Likely it is an issue with the mask. |
Hmmm, so it seems that in INetwork.py, line 268
in utils.py, the error is called when forced to use mode RGB on the balck/white image (which has shape of (W, H) and no RGB dimensions). However, if I change this line to allow other mode, some other errors appear later in the program. Therefore the initial question of what kind of image should I pass in as a mask? If it helps, I can try to reproduce the "errors later in the program" and paste it here later today. |
The mask image must be a binary image, with pixel values either 0 or 1. It can be saved as a png preferably. Could you also paste the errors that occur. I think I need the refactor my utils.py script to account for masking in mode L |
Sure. So if I change utils.py at ~line 33 into:
I get the following:
If I go into a Python shell and test some stuffs out, here's some results, not sure if helpful:
|
Someones solved it? |
I've been exploring INetwork.py, and the regular neural style transfer works well, but if I add the --content_mask option it results in the following error:
The full command is
and if I remove the last part (--content_mask), everything runs fine. It is likely something is wrong with my mask image, but I've tried jpg / png / bmp (all using Windows paint / 3d paint). Just wondering if you have any idea what could be the issue? Thanks in advance!
The text was updated successfully, but these errors were encountered: