ZoeDepth

class grid.model.perception.depth.zoedepth.ZoeDepth(*args, **kwargs)

ZoeDepth: Depth Estimation Model

This class implements a wrapper for the ZoeDepth model, which estimates depth maps from RGB images using the pipeline method from the Hugging Face transformers library.

Credits:

https://huggingface.co/Intel/zoedepth-kitti

License:

This code is licensed under the MIT License.

__init__()

Initialize the ZoeDepth model.

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

Return type:

None

run(rgbimage)

Runs the ZoeDepth 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)
>>> zoedepth = ZoeDepth()
>>> depth = zoedepth.run(img)
>>> print(depth.shape)