martinbenson/deep-photo-styletransfer

Error when using three or more style images

Closed this issue · 0 comments

The full error message:

/home/ubuntu/torch/install/bin/luajit: deepmatting_seg.lua:225: attempt to index a nil value
stack traceback:
        deepmatting_seg.lua:224: in function 'main'
        deepmatting_seg.lua:857: in main chunk
        [C]: in function 'dofile'
        ...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
        [C]: at 0x00405d50

This can be reproduced by using 3 style images. Use a content mask with 2 color regions. Have 1 style image target a single region, and then have the other 2 style image masks target the other region.

Edit:

It appears that this issue is caused by using 3 or more style images, not by matching color masks between style images.

Second Edit:

Embarrassingly enough, this error occurred with the new feature added by my pull request. It occured because the colors specified in my -color_codes parameter were not the same colors I used in my content mask image. I only had 2 colors specified, but my content mask had 6 colors.