Skip to content

[Community Pipeline] Add Marigold Monocular Depth Estimation#6249

Merged
sayakpaul merged 7 commits intohuggingface:mainfrom
markkua:marigold
Dec 22, 2023
Merged

[Community Pipeline] Add Marigold Monocular Depth Estimation#6249
sayakpaul merged 7 commits intohuggingface:mainfrom
markkua:marigold

Conversation

@markkua
Copy link
Copy Markdown
Contributor

@markkua markkua commented Dec 20, 2023

What does this PR do?

This PR adds a community pipeline of Marigold, a universal monocular depth estimator derived from Stable Diffusion.

This pipeline can run on a single GPU and was tested on single RTX 3090/4090 and GTX 1080Ti.

Example code, project page, and full codebase are provided. The Colab notebook will be updated to use community pipeline once it is available.

In-the-wild inference result (1st row - input image; 2nd row - predicted depth map; 3rd row - unprojected point cloud):
Marigold Teaser

Before submitting

Who can review?

@patrickvonplaten and @sayakpaul

Comment thread examples/community/README.md Outdated

pipe.to("cuda")

image = Image.open("./input_image.jpg")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to provide a direct link here and have it loaded like so:

from diffusers.utils import load_image

image = load_image(image_url)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. I've updated the example code with a direct link in README (see the new commit).

Copy link
Copy Markdown
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment. Looks very good!

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Will merge after the CI is green.

@sayakpaul sayakpaul merged commit 3369bc8 into huggingface:main Dec 22, 2023
donhardman pushed a commit to donhardman/diffusers that referenced this pull request Dec 29, 2023
…face#6249)

* [Community Pipeline] Add Marigold Monocular Depth Estimation

- add single-file pipeline
- update README

* fix format - add one blank line

* format script with ruff

* use direct image link in example code

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…face#6249)

* [Community Pipeline] Add Marigold Monocular Depth Estimation

- add single-file pipeline
- update README

* fix format - add one blank line

* format script with ruff

* use direct image link in example code

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants