Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused about stereo matching code in unimatch.py #63

Open
JarvisLee0423 opened this issue Jul 22, 2024 · 2 comments
Open

Confused about stereo matching code in unimatch.py #63

JarvisLee0423 opened this issue Jul 22, 2024 · 2 comments

Comments

@JarvisLee0423
Copy link

Thanks for your excellent work! After saw your code in unimatch.py, I got a little bit confused about line 160 and the following warping part. I want to know why you warp the right feature when the disparity is not none? In my view, the main problem of stereo matching is to find the correct pixel position in right which can match to the pixel in left. This is why we have to use all pixels in left to compute correlation with all pixels in right, in order to find the best matching point. This is why the attention map has the natural structure to replace the computation of cost volume. But after warping, all the right feature will be warped to left space, which means the corresponding between left feature and warped right feature will be pixel by pixel without any offsets. Therefore, in this case, the correlation between left feature and warped right feature have to be element multiplication, not the type we used to compute attention map. However, in the following codes, you will use left feature and warped right feature to compute attention map which is not element multiplication. In my view, it seems to illegal. Can you tell me why you implement your model in this way?

@JarvisLee0423
Copy link
Author

I had further reading your code. I thought that the reason why you implemented in this way is that after you have the first disparity map, all the following prediction is to generate the delta-disparity, therefore, you only need to find the correlation between left feature and warped right feature which is more close to left space but not the exactly left space. Thus, the attention map can find the correlation between left feature and current warped right feature to generate delta-disparity to further optimizing the original disparity. Is that right?

@haofeixu
Copy link
Member

Yes, right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants