-
Notifications
You must be signed in to change notification settings - Fork 172
Depth anything v2 workflow block #875
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
Conversation
until the two above are clarified I will not approve the PR |
For first bullet point, can 'transformers' become a core dependency or is it too large to be included for just having one block? I can foresee more huggingface wrapper workflow blocks being built. For the second bullet, we could set up a model cache within the block. This could keep the model in memory between instances. I'm not sure how well that would handle on a multi-process server. I was thinking that we could use the Huggingface Inference API to post an image and get a prediction returned. That would be much more lightweight. On the model card, https://huggingface.co/depth-anything/Depth-Anything-V2-Base-hf, I read that "This model does not have enough activity to be deployed to Inference API (serverless) yet. ncrease its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead." Thats a bummer, it has 34,918 downloads, would have to think it will hosted on the serverless API soon. I'm also now just discovering ModelManager. How do we host CLIP, Florence 2? I would imagine thats a similar situation where loading these models would be extremely slow. |
is this still active? would like to close if its stale |
Yes its still active. I'm going to get back to this soon. I want to reimplement without huggingface for better performance. Depth anything has come up in a bunch of use cases so its still really important for us to have. |
@PawelPeczek-Roboflow , I'd like to revisit this. We've seen the need for a depth model in workflows pop up a few times. Do you think a solution to the points you made above (1. huggingfaced pinned dependency, 2. slow loading of the model) could be solved by us hosting the model ourselves by building it from the source, https://github.com/DepthAnything/Depth-Anything-V2?tab=readme-ov-file The requirements are pytorch and opencv which I believe inference already supports. |
not sure that we will make this specific model to work nicely (but we have plenty of options: https://huggingface.co/models?pipeline_tag=depth-estimation&sort=trending) I believe that now we have sorted out a way for that HF models to work - take look at @capjamesg PR: #1106
achieving all 4 means we can very effectively host it and people would have no-brainer option to use the model |
Description
This PR implements the Depth Anything V2 model integration as a workflow block, enabling depth map prediction from 2D images. The implementation provides:
Dependencies:
Type of change
Please delete options that are not relevant.
How has this change been tested, please provide a testcase or example of how you tested the change?
The implementation has been tested with:
Any specific deployment considerations
For example, documentation changes, usability, usage/costs, secrets, etc.
Docs
LONG_DESCRIPTION