TRI-ML / packnet-sfm

TRI-ML Monocular Depth Estimation Repository
https://tri-ml.github.io/packnet-sfm/
MIT License
1.24k stars 243 forks source link

Can I give the model the GT pose instead of the model's pose network? #146

Open sjg02122 opened 3 years ago

sjg02122 commented 3 years ago

Thank you for the excellent work.

I'm doing an experiment on Depth Network. To this end, I would like to add GT of Pose instead of Posenetwork. How can I handle it?

Thanks!

VitorGuizilini-TRI commented 3 years ago

Sure, you would have to change this line here, so instead of using the predicted poses you pass the GT poses from the batch directly.

https://github.com/TRI-ML/packnet-sfm/blob/c03e4bf929f202ff67819340135c53778d36047f/packnet_sfm/models/SfmModel.py#L141

sjg02122 commented 3 years ago

Thanks for your reply.

I just changed the code

https://github.com/TRI-ML/packnet-sfm/blob/c03e4bf929f202ff67819340135c53778d36047f/packnet_sfm/datasets/kitti_dataset.py#L97

with_pose --> True

then, I check the form ob data

the computed pose is list (length 2, [object of pose, object of pose]) gt pose in the batch (batch['pose'] is tensor, batch['pose_context'] is list(length :2 ,tensor))

how to change the code??

Thanks a lot!

VitorGuizilini-TRI commented 3 years ago

You will have to change the internal code, there is no flag to switch from predicted to GT pose, unfortunately.

hjxwhy commented 2 years ago

Thanks for your reply.

I just changed the code

https://github.com/TRI-ML/packnet-sfm/blob/c03e4bf929f202ff67819340135c53778d36047f/packnet_sfm/datasets/kitti_dataset.py#L97

with_pose --> True

then, I check the form ob data

the computed pose is list (length 2, [object of pose, object of pose]) gt pose in the batch (batch['pose'] is tensor, batch['pose_context'] is list(length :2 ,tensor))

how to change the code??

Thanks a lot!

Hello, have you changed success? I used the gt_pose, but the predicted depth is wrong. If you have changed success, can you show me where and how are you change the code?

sjg02122 commented 2 years ago
        pose = None
        if 'rgb_context' in batch and self.pose_net is not None:
            pose = self.compute_poses(batch['rgb'],batch['rgb_context'])

Change the value of pose to GT. you can acess the gt value in batch dict

file : SfmModel.py

livey commented 2 years ago

Thank you for the excellent work.

I'm doing an experiment on Depth Network. To this end, I would like to add GT of Pose instead of Posenetwork. How can I handle it?

Thanks!

Have you tried this? When I use the GT pose, the self-supervised model does not produce a good depth estimation.

GANWANSHUI commented 1 year ago

@livey Hi, may I ask which dataset you are using for the GT-pose experiment? Thanks a lot!

livey commented 1 year ago

@livey Hi, may I ask which dataset you are using for the GT-pose experiment? Thanks a lot!

I used the DDAD dataset.

VitorGuizilini-TRI commented 1 year ago

The KITTI dataset seems to have poor GT poses, we routinely get worse depth estimates using GT poses compared to using predicted poses (the predictions are scaled, though).

GANWANSHUI commented 1 year ago

@VitorGuizilini-TRI @livey Hi, Thanks a lot for the information. According to the discussion in https://github.com/TRI-ML/DDAD/issues/29, it seems the GT-pose in DDAD dataset is also not well. @VitorGuizilini-TRI was there a refined version for the GT-pose for DDAD dataset? Thanks again!

livey commented 1 year ago

@VitorGuizilini-TRI @livey Hi, Thanks a lot for the information. According to the discussion in https://github.com/TRI-ML/DDAD/issues/29, it seems the GT-pose in DDAD dataset is also not well. @VitorGuizilini-TRI was there a refined version for the GT-pose for DDAD dataset? Thanks again!

When using the ground truth pose, I think the real problem is the dynamic objects.

GANWANSHUI commented 1 year ago

@VitorGuizilini-TRI @livey Hi, Thanks a lot for the information. According to the discussion in https://github.com/TRI-ML/DDAD/issues/29, it seems the GT-pose in DDAD dataset is also not well. @VitorGuizilini-TRI was there a refined version for the GT-pose for DDAD dataset? Thanks again!

When using the ground truth pose, I think the real problem is the dynamic objects.

Thanks for the discussion. Could you give more explanation about the dynamic objects? I try to visualize the transformation of two random frames, and it seems reasonable. Thanks again!