Closed xmfbit closed 7 years ago
A good question. I think there was no particular reason for the exact value "32". However, keep in mind that 2^15 is only 32768, so with a factor of 32 we are already limited to a flow maximum of 1024. You are right that larger factors would preserve more details, but any larger factor would be too much of a constraint (such large flows are rare, but not implausible).
@nikolausmayer Thanks for your response. In fact, I observed that the performance decreased slightly when I used 1024 as the multiply factor instead of 32 with the same experiment configuration.
Sorry, it is about the code itself, not for building error report. But I didn't find any forums to discuss flownet for the researcher. So I have to post it here.
In the file
tools/convert_imageset_and_flow.cpp
, I found that the ground truth value of optical flow is multiplied by 32 when creating LMDB. See https://github.com/lmb-freiburg/flownet2/blob/master/tools/convert_imageset_and_flow.cpp#L176 . And I found that inlayers/custom_data_layer.cpp
, 32 is divided. OK, just for storing in LMDB, no problem.I understand that you were to convert the flow data into int16 data type to feed it to the LMDB file. It is the number 32 that confuses me. Why you used 32 as the ratio? I print some ground truth value of optical flow:
Considering that the range of int16 is -2^15~2^15, why not to multiply a lager number to reduce the round error in the transformation? Are there some special reasons for that?