-
Notifications
You must be signed in to change notification settings - Fork 454
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 ONNX export support for RT-DETR models #1930
base: main
Are you sure you want to change the base?
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny question that you likely know answer to
from transformers.onnx.utils import get_preprocessor | ||
|
||
preprocessor = get_preprocessor(normalized_config._name_or_path) | ||
if preprocessor is not None and hasattr(preprocessor, "size"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an Optimum expert, just wanted to ask in what case preprocessor would be None and we'd proceed?
@xenova can you add a test? |
Done! @fxmarty :) I also set CHW axes to be static (must be what the model was trained on) |
static shapes might not be necessary actually: huggingface/transformers#31640 |
Hi, may I know that if it's possible to run with onnxruntime instead of using optimum and obtaining model processor using HF pipeline? Also, I tried to export with Cuda but it seems not working. Is there anything I can tweak? Thanks again for the great work! |
What does this PR do?
cc @merveenoyan
Fixes # (issue)
Before submitting
Who can review?