vye16 / slahmr

MIT License
475 stars 50 forks source link

Camera Data Loading: Move first Camera to Origin #18

Open smueksch opened 1 year ago

smueksch commented 1 year ago

I have a question about the meaning of a particular code snippet in the CameraData.load_data function, lines 325-237:

t0 = -cam_t[sidx:sidx+1] + torch.randn(3) * 0.1
self.cam_R = cam_R[sidx:eidx]
self.cam_t = cam_t[sidx:eidx] - t0

My understanding is that cam_R and cam_t together form the world-2-cam matrix, so cam_t does not represent the position of the camera in world coordinates. Given this, I am confused what this code snippet really is meant to do and if this is not a bug in the implementation.