Skip to content

[Community Pipeline] Add Marigold Monocular Depth Estimation #6249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 22, 2023

Conversation

markkua
Copy link
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


pipe.to("cuda")

image = Image.open("./input_image.jpg")
Copy link
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
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
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

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
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 <[email protected]>
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 <[email protected]>
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