Add depth estimation pipeline
See original GitHub issueFeature 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 https://github.com/huggingface/transformers/pull/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.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
What is Depth Estimation? - Hugging Face
Depth estimation models can be used to estimate the depth of different objects present in an image. Estimation of Volumetric Information. Depth ...
Read more >facebook360_dep · Facebook360 Depth Estimation Pipeline
Designed without any constraints imposed on the camera systems used to capture content, allowing rapid prototyping of new camera arrangements and lens types....
Read more >Depth Estimation: Basics and Intuition | by Daryl Tan
For stereo based or multiview depth estimation that requires triangulation, it usually involves the pipeline of Detect-Describe-Match. Matching ...
Read more >Monocular depth estimation - Keras
The goal in monocular depth estimation is to predict the depth value of each pixel or inferring depth information, given only a single...
Read more >Research Guide for Depth Estimation with Deep Learning
The supervision pipeline is based on view synthesis. The depth network takes the target view as the input and outputs a per-pixel depth...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Narsil,
I’m not sure whether we should add this to the existing
image-segmentation
pipeline. Depth estimation is basically pixel regression, rather than pixel classification (the latter is image segmentation). It would be quite confusing to add it there.Depth estimation is quite a different field, see e.g. https://paperswithcode.com/task/depth-estimation
And hi @nandwalritik, thanks for your interest in this. Feel free to start a draft PR.
I said we should inspire from it, not reuse it, but I suggested using an
image-generation
one. (Just to be slightly more general) The output is a grayscale image, right ?