MarigoldE2EFT

class grid.model.perception.depth.marigold_e2e_ft.MarigoldE2EFT(*args, **kwargs)

MarigoldE2EFT: Depth Estimation Model

A wrapper for the Marigold end-to-end fine-tuned depth estimation model.

Credits:

https://huggingface.co/GonzaloMG/marigold-e2e-ft-depth

License:

This code is licensed under the Apache 2.0 License.

__init__()

Initialize the MarigoldE2EFT model. Loads the model onto the GPU if available, otherwise defaults to the CPU.

Return type:

None

load_model(checkpoint_path)

Load the Marigold pipeline model.

run(rgbimage)

Runs the MarigoldE2EFT depth estimation model on the given RGB image.

Parameters:

rgbimage (np.ndarray) -- The input RGB image.

Returns:

The predicted depth map.

Return type:

np.ndarray

Example

>>> img = np.random.randint(0, 255, (256, 256, 3)).astype(np.uint8)
>>> img = Image.fromarray(img)
>>> marigold_e2e_ft = MarigoldE2EFT()
>>> depth = marigold_e2e_ft.run(img)
>>> print(depth.shape