-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update to support new from_transformers
methods
#1113
Comments
You can find examples of the new and old function calls in this Colab |
@LinasKo I was checking on this issue and below are my observations :
|
Hi @shaddu 👋 That's an analysis we vitally needed. Thank you very much!
If you still have the time, I'd gladly assign the issue to you. Is there any more information you'd like? |
@LinasKo , Thank you for the response. I would like to work on the issue. One assumption I'm making is that the Detection class is universal, so we should avoid making any changes to it and only modify the |
I've assigned the ticket to you. Let us know how it goes! The assumption is true, however there's some flexibility - You have a very thoughtful approach to the problem. If you see an obstacle that can't be solved without modifying core classes - I trust your judgment; feel free to make the changes and we can discuss in the PR. I'm away from Wednesday, but you may have some luck catching @SkalskiP if you have more questions. |
Hi @SkalskiP, I need a quick confirmation about |
Hi @shaddu 👋🏻 that was not part of the original task, but if you have the time to make it happen, I'd love it! |
Implemented via #1386. Closing the issue. |
Description
Supervision contains the function
from_transformers
that includes the results of a Hugging Face transformer and converts it intoDetections.
Up until now, we were recommending users to call one of two
transformers
functions:post_process_segmentation
for any segmentation taskpost_process
for detection.Reading through the code of transformers, it appears both are being deprecated and will be removed in version 5. At the time of writing, the latest is v4.39.3, with the first v4 release in late 2020.
Let's make sure we support the new version!
Detections
object is universal - it can contain both masks and segmentation. Let's change thefrom_transformers
method so it checks its inputs, determines which function was called formats the output, and builds the Detections object like we're doing now.Additional
The text was updated successfully, but these errors were encountered: