StereoNet
StereoNet copied to clipboard
Cost Volume computation
In CostVolume function, I print the value of leftMinusRightMove for each disparity but it seems that all of them are equal. I used both torch.all(torch.eq(org, leftMinusRightMove)) and torch.equal(org, leftMinusRightMove) to test it, and both of them return True.
Also from the code,
left_move = torch.cat((origin, zero_padding), 3) leftMinusRightMove = left_move[:, :, :, :origin.shape[3]] - candidate or leftMinusRightMove = torch.cat((left_move[:, :, :, :origin.shape[3]], candidate), 1)
It seems that left_move[:, :, :, :origin.shape[3]] will be always equal to origin.
If it is true, cost_volume may save the same value for each disparity. I am a beginner in stereo matching. Please correct me, if I am wrong.
Copy that. I’m a little busy these days. I’ll check it ASAP.