Code Monkey home page Code Monkey logo

Comments (7)

HymEric avatar HymEric commented on July 23, 2024 3

@yfzcopy0702 I have same question. And do you know why there is a mask? When I first read the paper, it doesn't appear in paper.

from meta-sr-pytorch.

XuecaiHu avatar XuecaiHu commented on July 23, 2024

Good question!!
If we provide mask.mat for the forward function, maybe it can avoid this problems. I will spend some time to test the time study.
And thank your for my advice.

from meta-sr-pytorch.

suke27 avatar suke27 commented on July 23, 2024

@yfzcopy0702 my 1st idea is do like what you said, but it will slower than XuecaiHu's version. because mask will do in inchannels(maybe 64) but not 3 channels

from meta-sr-pytorch.

ZhangDY827 avatar ZhangDY827 commented on July 23, 2024

@HymEric Actually, the model super-resolves the LR inputs with integer upscaling factors, due to the mask, the model is capable of solving super-resolution of arbitrary scale factor (including noninteger scale factors) with a single model.

from meta-sr-pytorch.

XuecaiHu avatar XuecaiHu commented on July 23, 2024

@ZhangDY827 guy, your statement is false. We use the mask to implement the meta-upscale module with Matrix operations instead of using "for" loop in python.

from meta-sr-pytorch.

ZhangDY827 avatar ZhangDY827 commented on July 23, 2024

@XuecaiHu Hello, I have reproduced your paper recently and thanks for your great work firstly! In your metardn.py file, you use "scale_int = math.ceil(self.scale)" to transfer the non-integer upscaling factor to integer factor. So, in my opinion, the size of output HR image is the integral. The mask matrix contains 0 and 1 to sample the useful pixel through "torch.masked_select" function. Is my understanding correct?

from meta-sr-pytorch.

XuecaiHu avatar XuecaiHu commented on July 23, 2024

@ZhangDY827 Maybe you should try to implement the meta-upscale module yourself. And you will understand why i use the mask. We add the unmeaning pixels which make the upscaled feature maps suitable for matrix operations. And use the mask to remove the unmeaning pixels to generate the needed SR image. While, if you use two "for" loops to implement our meta-upscale layer as the Pseudo code in our paper, you donot need the mask but it is very time-consuming. It is the implementation details and it is unneccesary to introduce in our paper.

from meta-sr-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.