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

[RT-Detr] - Add RT-Detr Onnx Config #2040

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

YHallouard
Copy link

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@YHallouard
Copy link
Author

Hi @fxmarty, @echarlaix, @JingyaHuang, @michaelbenayoun,

I'm creating this PR following @qubvel and @ArthurZucker advices on that PR: huggingface/transformers#33877

Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the addition @YHallouard

optimum/exporters/onnx/model_configs.py Show resolved Hide resolved
optimum/exporters/tasks.py Show resolved Hide resolved
@YHallouard
Copy link
Author

Hi @echarlaix, thanks for the review!

I added "PekingU/rtdetr_r18vd" for testing, but I saw that you used hf-internal-testing. Should I create a random initiated model their ?

@YHallouard
Copy link
Author

Hi @echarlaix, what are your insights ? I made the changes but should I create a random initiated model in hf-internal-testing ?

@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.

@echarlaix
Copy link
Collaborator

echarlaix commented Dec 17, 2024

Apologies for the delay @YHallouard, just fixed the conflicts so that we can soon merge. Two things must be fixed before we can merge :

def inputs(self) -> Dict[str, Dict[int, str]]:
return {
"pixel_values": {0: "batch_size", 1: "num_channels", 2: "height", 3: "width"},
"pixel_mask": {0: "batch_size"},
Copy link
Collaborator

@echarlaix echarlaix Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it needed ? (not needed for ViT models but might be needed for RT-DETR)

Copy link
Collaborator

@echarlaix echarlaix Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also if needed shouldn't the height / width dimension set to dynamic as well?

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