I'm a beginner at programming and I've only touched the code for a few days, but I really wanted to supplement the image with AI, so I started programming that I'm not used to.
What you tried
SIGGRAPH thesis
I spent a few days on my own building the environment using Docker and Ubuntu's LTS version 20.4 to install and use the package.However, this error occurred in the process of complementing the image and it continues to stack.
root@82a52e3b8c9f:/mount#thimpaint.lua --input example.png --mask example_mask.png
{
gpu —false
mask: "example_mask.png"
postproc:false
model: "completionnet_places2_freeform.t7"
maxdim —600
input: "example.png"
}
Loading model...
/root/torch/install/bin/luajit:impaint.lua:78:inconsistent tensor size, expected
tensor [4 x 336 x 600] and mask [3 x 336 x 600] to have the same number of elements,
but got 806400 and 604800 elements respectively at
/root/torch/pkg/torch/lib/TH/generic/THTensorMath.c:138
stack traceback:
[C]: in function 'maskedFill'
impaint.lua:78:in main chunk
[C]: in function 'dofile'
/root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150:in main chunk
[C]—at 0x00405d50
I looked up the error code on the Internet, but I'm at a loss because nothing fits me well.As an amateur, the size of the image was unified, and I made it with example.png and example_mask.png with the first name.However, it has not been resolved at all.
And there was no article in the SIGGRAPH paper that said such an error occurred, and I couldn't find a way to correct it, and I was so angry that I couldn't help but wonder why I was the only one who had to go through this.Can someone solve this problem?
lua torch
/root/torch/install/bin/luajit:impaint.lua:78:inconsistent sensor size, expected
tensor [4 x 336 x 600] and mask [3 x 336 x 600] to have the same number of elements,
butgot 806400 and 604800 elements respectively at
Looking at the error message, it seems that the reason for the error is that the number of channels in the PNG file is different.You will need to match the number of channels between the input image and the mask image.
今回 In this case, there seems to be no alpha channel in the mask image.
Note: For some reason, there are three PNG format differences
611 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
581 PHP ssh2_scp_send fails to send files as intended
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.