princeton-vl / RAFT

BSD 3-Clause "New" or "Revised" License
3.12k stars 621 forks source link

`augmentor.resize_sparse_flow_map` does not work for non-sparse flow-maps #175

Open Etienne66 opened 8 months ago

Etienne66 commented 8 months ago

https://github.com/princeton-vl/RAFT/blob/3fa0bb0a9c633ea0a9bb8a79c576b6785d4e6a02/core/utils/augmentor.py#L161

I created Valid mask before-hand for FlyingThings. When I use this to resize it my numbers are vastly off from just re-scaling the flows and recalculating the Valid mask. That and my model doesn't learn when resize_sparse_flow_map is used. I'm not sure what is wrong with it, but something isn't right.

I thought perhaps the x and y coordinates were swapped, but thought perhaps that was due to the reshape that is used. Not too sure.

Or maybe it just doesn't work on Valid masks that only have a view invalid pixels.