google / lasr

Code for "LASR: Learning Articulated Shape Reconstruction from a Monocular Video". CVPR 2021.
https://lasr-google.github.io/
Apache License 2.0
170 stars 17 forks source link

Flipped flow maps in the flow loss #16

Open sanjayharesh opened 2 years ago

sanjayharesh commented 2 years ago

Hi Gengshan,

Thanks for the great work.

I noticed that you flip the flows before saving in autogen.py https://github.com/google/lasr/blob/29d8759354f853119276f41504d6b527fd5484e5/preprocess/auto_gen.py#L173-L178

Is there a good reason to do this? An unintended consequence is that it leads to flipped flows being loaded at training time and the flow loss ends up being wrong.

Here's an example of flow error being logged while running lasr on Camel example. As you can see, the ground truth flow here is flipped image

gengshan-y commented 2 years ago

Hi, it doesn’t save flipped flow image since write_pfm() internally flips it here. Can you check whether the color-coded flow images are flipped?

sanjayharesh commented 2 years ago

Yes, there's a corresponding flip operation in readPFM as well, https://github.com/google/lasr/blob/29d8759354f853119276f41504d6b527fd5484e5/third_party/ext_utils/util_flow.py#L79

So maybe the initial flipping is not needed?

gengshan-y commented 2 years ago

Yeah, I believe the flip operation is not necessary within the the pfm functions.