autonomousvision / unimatch

[TPAMI'23] Unifying Flow, Stereo and Depth Estimation
https://haofeixu.github.io/unimatch/
MIT License
980 stars 102 forks source link

What is the best resolution for inferencing optical flow? #42

Closed CJCHEN1230 closed 9 months ago

CJCHEN1230 commented 9 months ago

Thanks for sharing such a Nice Work!!! I use "gmflow-scale2-regrefine6-mixdata-train320x576-4e7b215d.pth" for inferencing the optical flow. My purpose is to use the optical flow as my ground truth for single image depth estimation. However, I found that different resolution will make huge difference. Input image

resolution 1888*1015 image

half resolution 944*507 image

1/4 resolution 472*253 image

1/8 236*126 image

Does that make sense? I tried the stereo matching, but I didn't encounter the same situation. Maybe the best resolution for inferencing optical flow is as close as the training size? Or how do I get the best quality of optical flow with large resolution?

haofeixu commented 9 months ago

Hi, this could be expected since the model is not very robust to inference resolution currently. I think the models should be able to handle higher resolutions like ~512x1024, but even higher might be problematic. In practice you might need to tune the inference size to get the optimal performance for your data.

CJCHEN1230 commented 9 months ago

Thanks for your reply. I'm a newbie in this field. I recently find many research generate depth label by optical flow. I never see any mention about this kind of situation. In tradition, is optical flow model usually sensitive to resolution?

haofeixu commented 9 months ago

Yes, this is a common issue.

CJCHEN1230 commented 9 months ago

Thanks!