Skip to content

Conversation

Abdul-Mukit
Copy link

Description

Closes: #396
In main.py, the Model.export() has the argument shape. Developers often try to use it and find it broken. This makes the export process confusing. See: #396 and #99 (comment)

The clean solution is to define resolution during model initialization. Then just call model.export(). Furthermore, the requirement for the input shape to be divisible by 14 is outdated. See: #396 (comment)
All this makes the shape argument in Model.export() call redundant and confusing.

This MR simply proposes to remove this argument and the requirement that the shape be divisible by 14 from the Model.export() call.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

Tried these and both worked:

from rfdetr import RFDETRSegPreview, RFDETRMedium
model = RFDETRMedium()
mode.export()
model = RFDETRSegPreview()
model.export()

… call. Remove shape arg from Model.export call.
@Abdul-Mukit
Copy link
Author

I have read the CLA Document and I sign the CLA.

@CLAassistant
Copy link

CLAassistant commented Oct 9, 2025

CLA assistant check
All committers have signed the CLA.

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.

During RFDETRSegPreview ONNX export call, why does the desired shape has to be divisible by both 24 and 14?

2 participants