Feat: Add Model RF-DETR#333
Open
DerrickUnleashed wants to merge 22 commits into
Open
Conversation
Contributor
Author
Contributor
Author
|
Can we implement a vignette for this perhaps? @cregouby |
cregouby
requested changes
Jul 4, 2026
cregouby
left a comment
Collaborator
There was a problem hiding this comment.
praise This is massive, thanks for it
todo see inline.
- Add representative usage example for model_rfdetr_large with image loading, inference, postprocessing, and bounding box visualization - Add attribution comment referencing the original RF-DETR implementation
In eval mode, model forward now returns list(detections = ...) with each detection containing boxes (xyxy), labels, and scores — matching the convention used by LW-DETR, Faster R-CNN, and other models.
- Clamp leading corners to >= 0, enforce minimum 2px box dimensions - Adjust test helper: check cat label anywhere in detections (not just top) - Lower min_score default from 0.25 to 0.15 for smaller model variants
The model forward now accepts an optional target_sizes parameter to scale boxes to original image dimensions (matching original behavior). When omitted, boxes are scaled to the input tensor dimensions. Example updated to pass target_sizes so boxes draw correctly on the original image.
… format - Model now auto-resizes input images to its native resolution during eval, recording original dims for automatic box scaling via target_sizes - Users no longer need to call nnf_interpolate or pass target_sizes manually - Example simplified to match LW-DETR example style: load image, call model, draw top-5 detections with tensor_image_browse
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This PR adds :
Closes #327