GithubHelp home page GithubHelp logo

Comments (5)

wpeebles avatar wpeebles commented on August 21, 2024 1

Hi @petercmh01. Here's an updated version of mixed_reality.py which supports this. You can call it with the same arguments as usual, but now you can also add --save_correspondences to your command to save dense_correspondences.pt in the output folder. You can open it with torch.load("dense_correspondences.pt"). The tensor has shape (num_frames, num_points, 2) with continuous (sub-pixel) values usually* in range [0, frame_resolution - 1] that represent the location of each point. The points are arranged in (x, y) format.

I haven't had time to test this updated script particularly thoroughly (but it at least runs :), so let me know if you encounter any issues. It should work on both single-GPU and distributed.

*Actually, the range of values is technically unbounded since some correspondences may lie beyond the boundary of the image. So, e.g., you may sometimes find negative numbers in that tensor.

UPDATE June 29, 2022: This feature has been merged into the main codebase, so I have removed the code snippet in this comment to make this thread more readable.

from gangealing.

wpeebles avatar wpeebles commented on August 21, 2024 1

Hi @petercmh01. Hmm, I'm pretty sure that the format should be in (x,y). Could it be that the points you're propagating are in (y,x) format, and so converting dense_correspondences.pt to (y,x) makes it consistent? Also, could you let me know if you ran the script with one versus multiple GPUs?

Regarding the splatting, it should usually be fine to round the predicted points to int format if you don't need sub-pixel accurate correspondences. But, our splatting implementation takes advantage of subpixel information so you'll get higher quality results in general if you use our splat_points function instead of quantizing to int. You can find documentation for splat_points in utils/vis_tools/helpers.py, but feel free to reach out if you have any trouble. Note that it only supports GPU currently (we didn't write a CPU implementation). The way it works under-the-hood is by placing a Gaussian at each (x,y) location, and so the final color assigned to a given quantized pixel is proportional to the distance to each Gaussian.

from gangealing.

petercmh01 avatar petercmh01 commented on August 21, 2024

Hello: @wpeebles , I tested the code and I was able to get some coordinates, but it seems like the coordinates for each frame is in a wrong order. I was able to get full dense tracking mask but it seems like the mask should be in other frames when I map it.

Can you check if there's a order issue when collect the propagated points?

By the way, the coordinates were all in floats, can I take its int or is there anything else (i.e. interpolation) that I need to aware of? can you roughly explain how the splat was done?

Thank you so much again for consistent help.

from gangealing.

petercmh01 avatar petercmh01 commented on August 21, 2024

Edit: sorry you're right I was iterating the x and y in a wrong way. The coordination was correct

from gangealing.

wpeebles avatar wpeebles commented on August 21, 2024

The save_correspondences feature for mixed_reality.py has now been merged into the main codebase. Thanks for testing it!

from gangealing.

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.