DQiaole / MemFlow

[CVPR 2024] MemFlow: Optical Flow Estimation and Prediction with Memory
Apache License 2.0
114 stars 6 forks source link

How to transform visualized flow png into flow arrays? #6

Closed G1tQuality closed 2 months ago

G1tQuality commented 3 months ago

Is this a reverse process for flow_viz.py? (我想根据前向光流和反向光流用checking for consistent forward and backward flow的方法来计算Occlusion mask,但是直接输出光流tensor的json文件有100多MB,速度比较慢。以上的逆过程会更快占用空间更小吗?同时请问大佬有什么效果较好的方法得到Occlusion mask吗?)

DQiaole commented 3 months ago

Instead of using flow_viz.flow_to_image (which is designed for visualization), please use the function writeFlow, writeFlo5File or writeFlowKITTI within https://github.com/DQiaole/MemFlow/blob/main/core/utils/frame_utils.py for flow saving.

As for occlusion mask, you can use the methods provided in your link.