lmb-freiburg / flownet2

FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
https://lmb.informatik.uni-freiburg.de/Publications/2017/IMKDB17/
Other
1k stars 318 forks source link

should i decrease the value of the gt when i compute the "predict_flow"? #56

Closed Lvhhhh closed 7 years ago

Lvhhhh commented 7 years ago

i am back again! should i decrease the value of the gt when i compute the "predict_flow" because the size of the flow_gt is smaller than the input image . the value of gt is related to the size of the input pictures~

nikolausmayer commented 7 years ago

Hi, sorry, I'm not sure what you mean. Are you asking about our training files? Or do you have your own training data where the image resolution is different from the flow resolution?

nikolausmayer commented 7 years ago

Ok, let's look at an example:

You have two images, left and right. Their resolution is e.g. 512x384 pixels. The pixel at (x,y) position (200,100) in the left image is found at (150,100) in the right image. That pixel's correct disparity is 50.

Now you upsample both images to double resolution, i.e. 1024x768. Resampling images linearly scales all spatial relations. This means that the pixel is now located at (400,200) in the left image and (300,200) in the right image. Disparity is also a spatial relationship, so it scales linearly as well. The pixel's correct new disparity is 100.

If you upsample your images for training, you must upsample the groundtruth and linearly scale its values.

nikolausmayer commented 7 years ago

Ah, I get it. No, the intermediate (lower-resolution) outputs do not have to be correctly scaled disparity maps. I'm pretty sure we just nearest-neighbor downsampled the data without rescaling. At those points we do not need technically correct outputs, and the difference is just a factor which the network could easily learn anyway.

eddy-ilg commented 7 years ago

Dear Lvhhh,

we kindly ask you not to post questions in the form "I typed this command and hit enter - and it didn't work". Please do only ask questions when you have understood the problem thoroughly and provide a detailed description. We weill not answer questions where you don't take the time to formulate a clear inquiery and then expect us to spend large amounts of time to figure this out.

Regards,

Eddy Ilg