question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add depth estimation pipeline

See original GitHub issue

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 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
NielsRoggecommented, Aug 4, 2022

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.

0reactions
Narsilcommented, Aug 4, 2022

I’m not sure whether we should add this to the existing image-segmentation pipeline.

I said we should inspire from it, not reuse it, but I suggested using an image-generationone. (Just to be slightly more general) The output is a grayscale image, right ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found