princeton-vl / RAFT-Stereo

MIT License
697 stars 136 forks source link

Questions about different augmentors for sparse and dense gt. #15

Closed zhujiagang closed 2 years ago

zhujiagang commented 2 years ago

Thanks for sharing your excellent work! Why do you provide two different ways for augmenting data? The sparse one does not have yjitter,asymmetric color augmentation. Besides, why do you provide a new function resize_sparse_flow_map, instead of using cv2.resize(flow, interpolation=cv2.INTER_NEAREST)for resizing sparse gt?

lahavlipson commented 2 years ago

When altering sparse ground truth stereo, the mask of valid correspondences needs to be updated to reflect this change. This is what resize_sparse_flow_map does.

Other than that, the SparseFlowAugmentor and FlowAugmentor classes are pretty much the same, except the latter has a few extra features since the primary data we use for training (i.e. sceneflow) is dense.

zhujiagang commented 2 years ago

When altering sparse ground truth stereo, is there any difference if we use cv2.resize(flow, interpolation=cv2.INTER_NEAREST) andflow > 0 to set the valid flag, instead of resize_sparse_flow_map.

lahavlipson commented 2 years ago

Apologies, I didn't see your reply until now. When resizing the ground truth flow, you also need to scale the coordinates.

zhujiagang commented 2 years ago

Thanks a lot. Yes, we have resized the ground truth by cv2.resize(flow, interpolation=cv2.INTER_NEAREST) and scale.

lahavlipson commented 2 years ago

Closing this issue.