Skip to content
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

add post_process_depth_estimation to image processors #31029

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

the-neural-networker
Copy link
Contributor

@the-neural-networker the-neural-networker commented May 25, 2024

What does this PR do?

This PR adds a post_process_depth_estimation method to the DPTImageProcessor class. The method takes the raw outputs of DPTForDepthEstimation and an optional target_sizes parameter, and returns a list of depth estimation maps resized to the specified target sizes (if provided) or in their original size. Since DepthAnything model also uses the DPTImageProcessor, this feature is applicable to DepthAnything as well.

Addresses #30917

Who can review?

@NielsRogge

@the-neural-networker
Copy link
Contributor Author

Any suggestions are more than welcome!

@amyeroberts
Copy link
Collaborator

@the-neural-networker Thanks for working on this!

The main two requests would be:

  • Add this for all depth estimation models
  • Add tests to make sure the output is as expected

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.

None yet

2 participants