yzcjtr / GeoNet

Code for GeoNet: Unsupervised Learning of Dense Depth, Optical Flow and Camera Pose (CVPR 2018)
MIT License
723 stars 181 forks source link

geometric consistency #46

Closed CathyingQ closed 5 years ago

CathyingQ commented 5 years ago

Hi, I have read your GeoNet paper and code. But I have a question about geometric consistency. In build_rigid_flow_warping and data_loader part: fwd_rigid_flow = compute_rigid_flow(tf.squeeze(self.pred_depth[s][:bs], axis=3), self.pred_poses[:,i,:], self.intrinsics[:,s,:,:], False) bwd_rigid_flow = compute_rigid_flow(tf.squeeze(self.pred_depth[s][bs(i+1):bs(i+2)], axis=3), self.pred_poses[:,i,:], self.intrinsics[:,s,:,:], True) In the unpack_image_sequence for data_loader, assuming the center image is the target frame, means if a sequence has 2 batches for each have 3 frames A:[a1, a2, a3] and B:[b1, b2, b3], the a2 and b2 are selected target frames. Then the standards for the fwd_rigid_flow and bwd_rigid_flow are a2 and b2, but they are different, how to check the geometric consistency?

yzcjtr commented 5 years ago

You can warp the backward flow according to the forward flow to align their reference system.