Marigold
- class grid.model.perception.depth.marigold.Marigold(*args, **kwargs)
Marigold: Depth Estimation Model
This class implements a wrapper for the Marigold model, which estimates depth maps from RGB images using the MarigoldPipeline.
- Credits:
- License:
This code is licensed under the Apache 2.0 License.
- __init__()
Initialize the Marigold model.
The model is loaded onto the GPU if available, otherwise it defaults to the CPU.
- Return type:
None
- run(rgbimage)
Runs the Marigold depth estimation model on the given RGB image.
- Parameters:
rgbimage (np.ndarray) -- The input RGB image for depth estimation.
- Returns:
The predicted depth map.
- Return type:
np.ndarray
Example
>>> img = np.random.randint(0, 255, (256, 256, 3)).astype(np.uint8) >>> marigold = Marigold() >>> depth = marigold.run(img) >>> print(depth.shape) (256, 256)