rf-detr icon indicating copy to clipboard operation
rf-detr copied to clipboard

import rfdetr is very slow

Open cdeil opened this issue 1 month ago • 0 comments

Search before asking

  • [x] I have searched the RF-DETR issues and found no similar bug report.

Bug

For me on MacOS python -c 'import rfdetr' shows that it takes 6 seconds. Most other packages including heavy ML take less than a second.

Presumably the reason is that you do some heavy I/O or compute on import, where most other packages do it on object creation?

Would it make sense to move the relevant actions or do you prefer to keep it like that?

For now I'll delay the rfdetr import in my project so that I only pay the cost on the executions where I actually run it.

Environment

MacOS 26.1

Minimal Reproducible Example

python -c 'import rfdetr'

Additional

No response

Are you willing to submit a PR?

  • [ ] Yes, I'd like to help by submitting a PR!

cdeil avatar Nov 05 '25 20:11 cdeil