haofeixu / aanet

[CVPR'20] AANet: Adaptive Aggregation Network for Efficient Stereo Matching
Apache License 2.0
521 stars 100 forks source link

how to set input size #86

Closed yyy809643573 closed 1 year ago

yyy809643573 commented 1 year ago

how can I set the input size,when the new image size is not euqal with training data size, using padding or crop ? it seems that crop or padding will influence the stereo matching result,is there any general ways ?

haofeixu commented 1 year ago

You can also try to resize to the training resolution for prediction and finally resize the output back to the original resolution (https://github.com/autonomousvision/unimatch/blob/master/evaluate_stereo.py#L782-L813).

yyy809643573 commented 1 year ago

thank you! I see that in the row 813 of evaluate_stereo.py is pred_disp = pred_disp * ori_size[-1] / float(inference_size[-1]), when resizing back, predicted disp is only considered in the width dimension, whether the height dimension is needed to consider,thank you!

haofeixu commented 1 year ago

No since the displacement in the vertical direction is 0.