DPVO
- class grid.model.perception.vo.vo_dpvo.DPVO(*args, **kwargs)
DPVO: Visual Odometry Model
This class implements a wrapper for the DPVO model, which estimates camera poses from RGB images using a deep learning approach.
- Credits:
- License:
This code is licensed under the MIT License.
- __init__(calib=array([320, 320, 320, 240]))
- Return type:
None
- run(image)
Uses DPVO to predict the camera pose for the given RGB image relative to the previous one. If this is the first image, initializes the pose estimation routine.
- Parameters:
image (np.ndarray) -- The input RGB image.
- Returns:
The predicted pose as a 1x6 tensor containing X, Y, Z positions and R, P, Y orientation.
- Return type:
torch.Tensor
Example
>>> from grid.model.perception.vo.vo_dpvo import DPVO >>> calib = np.array([320, 320, 320, 240]) >>> vo = DPVO(calib) >>> pose = vo.run(img) >>> print(pose)
- terminate(reconstruct=False)
Terminates the prediction routine and clears the keyframes.
- Parameters:
reconstruct (bool) -- If True, display the reconstructed sparse map as a point cloud in Rerun.
- Returns:
A tuple containing the predicted camera poses and the reconstructed sparse map.
- Return type:
Tuple[np.ndarray, np.ndarray]