2b-t / stereo-matching

Stereo-image depth reconstruction with different matching costs and matching algorithms in Python using Numpy and Numba
MIT License
58 stars 8 forks source link

it is too slow in running sgm. #1

Closed If-only1 closed 2 years ago

If-only1 commented 3 years ago

i can't get the resulet of sgm, it is too slow?

2b-t commented 3 years ago

Hey @If-only1 Semi-global matching (SGM) is quite a bit slower than Winner Takes it All (WTA) but you should be able to run less in a matter of several seconds if I remember correctly (I can test how long it takes on my workstation in the evening.) even on a low-power notebook as long as you use numba. If you would uncomment numba (jit decorators) you might end up with a code that might take very long as it then uses loops in native Python (which is very slow). Another reason that might make it slow is running it inside a virtual machine which is underpowered.

What test image are you using (resolution) and what is your set-up (CPU, RAM, OS, VM?, Python version)? Did you leave the disparity and radius settings on default?

2b-t commented 2 years ago

Closed due to inactivity.

If-only1 commented 2 years ago

thansk for you answer. I have solved this problem by repalace"@jit(nopython = True, parallel = True, cache = True)" as "@jit"