Coder Social home page Coder Social logo

Spectral Positional Encoding about lama HOT 6 CLOSED

advimman avatar advimman commented on July 20, 2024
Spectral Positional Encoding

from lama.

Comments (6)

BrianPugh avatar BrianPugh commented on July 20, 2024 2

Interesting, I would expect positional encoding (possibly a different encoding than a simple linear mesh) would have helped.

So, this suggests a few possible outcomes (1x1 filter/conv here will always refer to the conv in the frequency domain inside the Spectral Transform block):

  1. The 1x1 filter doesn't take frequency into account/is frequency agnostic (this also applies to the original FFC paper).
  2. Some sort of spatial information is latently encoded in the featuremaps. In this case, the 1x1 convolution takes frequency into account, but the positional encoding is redundant.
  3. The frequency/phase domain isn't really important; each pixel in the spectral image is to just be interpreted as a different hash of the entire input featuremap.
  4. The 1x1 filter doesn't actually do anything. Perhaps the real power just comes from applying BN and relu on the spectral image before applying the iFFT. Or, perhaps its inappropriate to perform the BN/relu since it limits what the post-iFFT transform image looks like.

from lama.

windj007 avatar windj007 commented on July 20, 2024

Wow! Great that you've noticed that :)

We experimented with positional encoding in spectral domain just a little bit. It did not help for the inpainting on our benchmarks - but might work in other cases. But we did not explore that feature thoroughly enough to say something for sure.

I'll be happy to hear back if this feature helps :)

from lama.

Marcelo5444 avatar Marcelo5444 commented on July 20, 2024

Hi @BrianPugh, Have you done any further research on that?

from lama.

BrianPugh avatar BrianPugh commented on July 20, 2024

i have not had a chance/the resources to perform experiments with these changes.

from lama.

Mengmengbai avatar Mengmengbai commented on July 20, 2024

Interesting, I would expect positional encoding (possibly a different encoding than a simple linear mesh) would have helped.

So, this suggests a few possible outcomes (1x1 filter/conv here will always refer to the conv in the frequency domain inside the Spectral Transform block):

  1. The 1x1 filter doesn't take frequency into account/is frequency agnostic (this also applies to the original FFC paper).
  2. Some sort of spatial information is latently encoded in the featuremaps. In this case, the 1x1 convolution takes frequency into account, but the positional encoding is redundant.
  3. The frequency/phase domain isn't really important; each pixel in the spectral image is to just be interpreted as a different hash of the entire input featuremap.
  4. The 1x1 filter doesn't actually do anything. Perhaps the real power just comes from applying BN and relu on the spectral image before applying the iFFT. Or, perhaps its inappropriate to perform the BN/relu since it limits what the post-iFFT transform image looks like.

Great idea!I agree with you. Maybe I can do some experiments.

from lama.

Ellohiye avatar Ellohiye commented on July 20, 2024

Interesting, I would expect positional encoding (possibly a different encoding than a simple linear mesh) would have helped.
So, this suggests a few possible outcomes (1x1 filter/conv here will always refer to the conv in the frequency domain inside the Spectral Transform block):

  1. The 1x1 filter doesn't take frequency into account/is frequency agnostic (this also applies to the original FFC paper).
  2. Some sort of spatial information is latently encoded in the featuremaps. In this case, the 1x1 convolution takes frequency into account, but the positional encoding is redundant.
  3. The frequency/phase domain isn't really important; each pixel in the spectral image is to just be interpreted as a different hash of the entire input featuremap.
  4. The 1x1 filter doesn't actually do anything. Perhaps the real power just comes from applying BN and relu on the spectral image before applying the iFFT. Or, perhaps its inappropriate to perform the BN/relu since it limits what the post-iFFT transform image looks like.

Great idea!I agree with you. Maybe I can do some experiments.

Hi, have you done an experiment? What was the result?

from lama.

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.