Skip to content

Add depth estimation pipeline #18446

Description

@NielsRogge

Feature request

We currently have 2 monocular depth estimation models in the library, namely DPT and GLPN.

It would be great to have a pipeline for this task, with the following API:

from transformers import pipeline

pipe = pipeline("depth-estimation")
pipe("cats.png")

This pipeline could default to the https://huggingface.co/Intel/dpt-large checkpoint. Also check out the Space that showcases the model.

This can be implemented similar to other pipelines. For an example PR that added a pipeline, see #11598.

Motivation

Pipelines are a great way to quickly perform inference with a model for a given task, abstracting away all the complexity.

Your contribution

I can assist with this, together with @Narsil.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions