Giter VIP home page Giter VIP logo

Comments (15)

Diksha-Moolchandani avatar Diksha-Moolchandani commented on June 1, 2024

Why is patch match slower than others? Is it inherently supposed to be slow or it is due to some data structures?

from patchmatchstereo.

ethan-li-coding avatar ethan-li-coding commented on June 1, 2024

Why is patch match slower than others? Is it inherently supposed to be slow or it is due to some data structures?

Inherently. The main bottleneck of algorithm speed is plane optimization step, which can be ignored when frontal parallel windows mode is selected.

from patchmatchstereo.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on June 1, 2024

But if that step is ignored, can it be called patchmatch algorithm? It would be modified version of patchmatch then.

from patchmatchstereo.

ethan-li-coding avatar ethan-li-coding commented on June 1, 2024

But if that step is ignored, can it be called patchmatch algorithm? It would be modified version of patchmatch then.

yep, you are right.

from patchmatchstereo.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on June 1, 2024

Thanks

from patchmatchstereo.

ethan-li-coding avatar ethan-li-coding commented on June 1, 2024

Thanks

Happy to help

from patchmatchstereo.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on June 1, 2024

How should I check if the operating environment is in Release mode?
I have already done this step: pms_option.is_fource_fpw = true

I am running it in linux from command line as a cpp code. I am not using visual studio.

from patchmatchstereo.

ethan-li-coding avatar ethan-li-coding commented on June 1, 2024

add -O2 when compiling

from patchmatchstereo.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on June 1, 2024

Thanks. I was using -O3 while compiling.

from patchmatchstereo.

ethan-li-coding avatar ethan-li-coding commented on June 1, 2024

from patchmatchstereo.

lingkang avatar lingkang commented on June 1, 2024

不知道作者还看不看这个issue了,我觉得好像是代码中实现plane refinement的过程有点小问题,在论文中2.2节作者提到

The idea is to allow large changes in the first iterations, which makes sense if the current plane is completely wrong. In later iterations, we sample planes that are very close to our current one, which allows capturing disparity details, e.g., at rounded surfaces.

也就是说,在后面的迭代中,视图优化部分使用的步长可以更小一些,隐含的意思应该是指每次迭代只做一次视图优化(步长随着迭代次数指数下降)。
但是在现在的实现中,每一次迭代都从最大步长走到了最小步长走了一遍,这应该是算法比较慢的主要原因,实际上迭代后期,每次还随机一个很大的步长都是无用的,基本不可能得到一个更好的cost,实际上也就disp_update、norm_update最后的几次可能有作用。
也就是说在PlaneRefine函数中,while (disp_update > stop_thres) 这个while循环本质上应该是和外层iteration是一个层级的,这样相当于整体提高了一个数量级的时间复杂度。
同时因为在外层设置了 fronto-parallel 模式不进行plane refinement 所以 fronto-parallel 要快很多。

from patchmatchstereo.

ethan-li-coding avatar ethan-li-coding commented on June 1, 2024

代码里的disp_update每次循环完是更新为上一次的1/2的,是指数减小的。

from patchmatchstereo.

lingkang avatar lingkang commented on June 1, 2024

代码里的disp_update每次循环完是更新为上一次的1/2的,是指数减小的。

指数减小是对的,我的意思是 DoPropagation()中的 PlaneRefine() 函数应该放到这边的for循环里,和其他Propagation应该是同级的
`
// 迭代传播
for (int k = 0; k < option_.num_iters; k++) {

propa_left.DoPropagation();
propa_left.planerefine();
propa_right.DoPropagation();
propa_right.planerefine();
}
`
这样对于planeRefine()来说,运行次数就会少很多,当然这也会要求iteration次数变多

按照作者的意思应该是这样的,现在的实现可以保证有很好的结果,但是感觉速度上牺牲比较多

from patchmatchstereo.

Diksha-Moolchandani avatar Diksha-Moolchandani commented on June 1, 2024

Hi @lingkang ,

Did you calculate the accuracy of this algorithm? I am getting a 14-15% error rate on the KITTI dataset. Can you confirm?

from patchmatchstereo.

ethan-li-coding avatar ethan-li-coding commented on June 1, 2024

代码里的disp_update每次循环完是更新为上一次的1/2的,是指数减小的。

指数减小是对的,我的意思是 DoPropagation()中的 PlaneRefine() 函数应该放到这边的for循环里,和其他Propagation应该是同级的
`
// 迭代传播
for (int k = 0; k < option_.num_iters; k++) {

propa_left.DoPropagation();
propa_left.planerefine();
propa_right.DoPropagation();
propa_right.planerefine();
}
`
这样对于planeRefine()来说,运行次数就会少很多,当然这也会要求iteration次数变多

按照作者的意思应该是这样的,现在的实现可以保证有很好的结果,但是感觉速度上牺牲比较多

我觉得不是这样,
(1)“iteration次数变多”,原文中明确提及到迭代次数是3次:“In our experiment, we run three iterations.“ 这个次数是无法满足你设定的这个迭代逻辑的。 即便原文是想让Plane Refine单独设置迭代次数,那么他也应该在论文中提及这个迭代次数的设置。
(2)你贴的原文中有一句话:“The idea is to allow large changes in the first iterations, which makes sense if the current plane is completely wrong”,这个是说为什么一开始要设置一个较大的调整范围,即maxdisp/2,是为了校正那些完全错误的平面,这是合理的,而即使经过了多次迭代也不能避免有些像素存在完全错误的平面,所以每次迭代最大调整范围都是使用的maxdisp/2也合理。

from patchmatchstereo.

Related Issues (15)

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.