Skip to content
Discussion options

You must be logged in to vote

Yes, padding is required.

super(UpCUNet, self).__init__(locals(), scale=2, offset=36, in_channels=in_channels)

For the cunet 2x model, offset=36. This means 36 pixels are cropped from each edge of the 2x output. To keep the same image area as the original input, all sides of the input should be padded by 18 pixels (18=36px/2x).

The ONNX model is used in unlimited:waifu2x, so it will probably be helpful as a reference.
https://github.com/nagadomi/nunif/tree/master/waifu2x/unlimited_waifu2x

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by frederik-uni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants