Skip to content

Conversation

@kprokofi
Copy link
Contributor

@kprokofi kprokofi commented Dec 13, 2025

Summary

  • Add RFDetr model (OD)
  • Add RFDetr model (IS)
  • Add unit tests
  • Fine-tune hyper parameters (LR, Augmentations, EMA, Scheduling, BS, Grad accumulation, multi-scale training)
  • Resolve an issue with filtering predictions during test (filtering predictions before computing mAP -> destroyed the metric. Now we do filtering only in predict method and directly use threshold in F1-score metric)
  • Upgrade TorchMetrics and Lightning to use EMA. Fix Dice metric for segmentation
  • Provide full benchmark

How to test

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

@kprokofi kprokofi requested a review from a team as a code owner December 13, 2025 22:44
Copilot AI review requested due to automatic review settings December 13, 2025 22:44
@github-actions github-actions bot added the TEST Any changes in tests label Dec 13, 2025
@kprokofi kprokofi marked this pull request as draft December 13, 2025 22:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for the RF-DETR (Real-time Fast DETR) object detection model from Roboflow, integrating it into the OTX framework. RF-DETR combines a DINOv2 backbone with a lightweight DETR decoder for real-time object detection.

Key changes:

  • Integration of RF-DETR model with five variants (nano, small, base, medium, large)
  • Unit tests for RF-DETR model and detector wrapper
  • Training recipes for all model variants

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
library/src/otx/backend/native/models/detection/rfdetr.py Core RF-DETR model implementation with training, inference, and export functionality
library/src/otx/backend/native/models/detection/detectors/rfdetr.py Detector wrapper that interfaces between OTX and the rfdetr package
library/src/otx/backend/native/models/detection/detectors/init.py Added RFDETRDetector export
library/src/otx/backend/native/models/detection/init.py Added RFDETR model export
library/src/otx/recipe/detection/rfdetr_*.yaml Training configuration files for all five RF-DETR variants
library/tests/unit/backend/native/models/detection/test_rfdetr.py Unit tests for RFDETR model class
library/tests/unit/backend/native/models/detection/detectors/test_rfdetr_detector.py Unit tests for RFDETRDetector wrapper

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@leoll2 leoll2 requested a review from eugene123tw December 17, 2025 15:42
@github-actions github-actions bot added DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM BUILD labels Dec 30, 2025
@kprokofi kprokofi marked this pull request as ready for review January 12, 2026 22:18
@kprokofi kprokofi changed the title Add RFDetr object detection model Add RFDetr model for Object Detection and Instance Segmentation Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUILD DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants