Coder Social home page Coder Social logo

How to generate Figure 2(b)? about igev HOT 3 CLOSED

gangweix avatar gangweix commented on June 9, 2024
How to generate Figure 2(b)?

from igev.

Comments (3)

gangweiX avatar gangweiX commented on June 9, 2024

By function corr(fmap1, fmap2), I can get correlation [B, H, W1, W2]. along the last dim, apply softmax function to compute disparity.

from igev.

waychin-weiqin avatar waychin-weiqin commented on June 9, 2024

Thank you so much for the prompt reply! Can you clarify if to apply softmax or soft-argmax to the last dim of the correlation volume?

Thank you again :)

from igev.

gangweiX avatar gangweiX commented on June 9, 2024

pseudo code:

CV : [B, H, W1, W2]

prob = F.softmax(CV, dim=-1)
disp = torch.arange(0, W2, dtype=prob.dtype, device=prob.device)
disp = disp .view(1, 1, 1, W2)
disp = torch.sum(prob * disp , dim=-1)
coords = torch.arange(W2).float().to(disp.device).reshape(1,1,W2).repeat(B, H, 1)
final_disp = coords - disp

I wrote it by hand, without debugging, maybe it has some mistakes, but the process is like this

from igev.

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.