Git Product home page Git Product logo

Comments (1)

ShivamDuggal4 avatar ShivamDuggal4 commented on September 17, 2024

Hi @xubin1994

PatchMatch has 3 operations: Sampling, Propagation and Evaluation.
As mentioned in the paper and in implementation, we divide the entire disparity search range into k bins, sample 1 disparity particle from each bin and then perform propagation/ evaluation on each bin separately, forcing the i-th particle to be in a i−th interval.

As shown in Figure 1. of the paper, we apply PatchMatch 2 times, one on the original disparity search range and later on the reduced search range.

  • During the first instance of PatchMatch, the search range of each pixel would be same (say, 0- max_disparity/4), therefore after PatchMatch operations, the i-th sampled disparity particle would be in the i-th bin, for sure.

  • However, during the second instance, there is no guarantee that the disparity search range of neighbouring pixels would be similar. Thus to make sure, that the i-th sampled disparity particle stays in the i-th bin after PatchMatch operations, we need to perform PatchMatch on the normalized disparity space.

Thus, to keep the code generic enough to be applied in cases where neighbouring pixels have different search ranges, we used the two variables: disparity_samples and normalized_disparity_samples

We perform PatchMatch propagation on the normalized disparity space, and then transform the normalized particles to the original space as in lines:

normalized_disparity_samples = self.propagation(normalized_disparity_samples, device, propagation_type="horizontal")

Hope this helps.
Regards.

from deeppruner.

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.