Skip to content

Conversation

@grzegorz-roboflow
Copy link
Collaborator

@grzegorz-roboflow grzegorz-roboflow commented Jan 16, 2026

What does this PR do?

Fix rfdetr instance segmentation and object detection postprocessing unhandled error caused by argpartition crash when max_detections exceeds logits length

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Testing

I tested manually to confirm bug is fixed

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

N/A


Note

Fixes RFDETR postprocessing crash when max_detections can exceed logits length.

  • In both RFDETRObjectDetection.postprocess and RFDETRInstanceSegmentation.postprocess, conditionally use np.argpartition only when len(logits_flat) > max_detections; otherwise fall back to np.argsort to select top scores
  • Bumps __version__ to 0.64.3

Written by Cursor Bugbot for commit 476534e. This will update automatically on new commits. Configure here.

…unhandled error caused by argpartition crash when max_detections exceeds logits length
@grzegorz-roboflow grzegorz-roboflow merged commit 61eaeee into main Jan 16, 2026
53 checks passed
@grzegorz-roboflow grzegorz-roboflow deleted the fix/rfdetr-argpartition-max-detections-overflow branch January 16, 2026 13:07
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