diff --git a/camera_estimation.py b/camera_estimation.py index fbb04df..943f5ff 100644 --- a/camera_estimation.py +++ b/camera_estimation.py @@ -180,7 +180,7 @@ class TorchCameraEstimate(CameraEstimate): # camera_translation[0,2] = 5 * torch.ones(1) camera_rotation = torch.tensor( - [[1e-5, 1e-5, 1e-5]], requires_grad=True, dtype=self.dtype, device=self.device) + [[0,0,0]], requires_grad=False, dtype=self.dtype, device=self.device) camera_intrinsics = torch.zeros( 4, 4, dtype=self.dtype, device=self.device) camera_intrinsics[0, 0] = 5 diff --git a/config.yaml b/config.yaml index 23dab80..6b5bef3 100644 --- a/config.yaml +++ b/config.yaml @@ -21,17 +21,17 @@ camera: pose: # device: cuda lr: 0.05 - optimizer: LBFGS # currently supported Adam, LBFGS - iterations: 300 + optimizer: Adam # currently supported Adam, LBFGS + iterations: 100 useCameraIntrinsics: false bodyMeanLoss: enabled: false weight: 0.001 bodyPrior: - enabled: false + enabled: true weight: 2 anglePrior: - enabled: true + enabled: false weight: 0.001 # idxWeights: # - 0.5 diff --git a/modules/camera.py b/modules/camera.py index 49a1dea..eb92c96 100644 --- a/modules/camera.py +++ b/modules/camera.py @@ -48,7 +48,7 @@ class SimpleCamera(nn.Module): dtype, device, transform_mat=cam_trans, - # camera_intrinsics=camera_int, camera_trans_rot=camera_params + camera_intrinsics=cam_int, camera_trans_rot=cam_params ), cam_trans, cam_int, cam_params def forward(self, points): @@ -59,7 +59,7 @@ class SimpleCamera(nn.Module): return proj_points if self.hasCameraTransform: proj_points = self.cam_int[:3, :3] @ self.cam_trans_rot[:3, - :] @ points.reshape(-1, 4, 1) + :] @ self.trans @ points.reshape(-1, 4, 1) result = proj_points.squeeze(2) denomiator = torch.zeros(points.shape[1], 3) for i in range(points.shape[1]):