# RF-DETR Hyperparameters for Class Imbalance

**URL:** <https://discuss.roboflow.com/t/rf-detr-hyperparameters-for-class-imbalance/10695>\
**Category:** 🤝  Community Help\
**Created:** [July 25, 2025, 7:12pm UTC](https://discuss.roboflow.com/t/rf-detr-hyperparameters-for-class-imbalance/10695 "2025-07-25T19:12:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RhysDeLoach](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/rhysdeloach/32/7999_2.png) [@RhysDeLoach](https://discuss.roboflow.com/u/RhysDeLoach)\
**Post date:** [July 25, 2025, 7:12pm UTC](https://discuss.roboflow.com/t/rf-detr-hyperparameters-for-class-imbalance/10695/1 "2025-07-25T19:12:33Z")

</div>

Hey y’all,

I am using RF-DETR on a dataset that has two classes with a decent class imbalance. This imbalance isn’t hurting mAP50, but I am seeing a 10% difference in mAP. I know that some sort of per-class augmentation could help, but I am hoping to fix this with my training parameters instead. I’ve already played with gamma values, alpha values, varifocal and ia bce loss, class loss coefficient, class cost, and tried implementing per-class weights for loss. Does anyone know any other parameters that I may be able to try?

Best,  
Rhys

---

<div class="post-metadata">

**Author:** ![Ford](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ford/32/7747_2.png) [@Ford](https://discuss.roboflow.com/u/Ford)\
**Post date:** [July 28, 2025, 8:20pm UTC](https://discuss.roboflow.com/t/rf-detr-hyperparameters-for-class-imbalance/10695/2 "2025-07-28T20:20:44Z")

</div>

Hi @RhysDeLoach!  
Have you attempted to train on the Roboflow app? Our models team has done an incredible job optimizing training to handle this situation.

---

<div class="post-metadata">

**Author:** ![RhysDeLoach](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/rhysdeloach/32/7999_2.png) [@RhysDeLoach](https://discuss.roboflow.com/u/RhysDeLoach)\
**Post date:** [July 29, 2025, 12:23pm UTC](https://discuss.roboflow.com/t/rf-detr-hyperparameters-for-class-imbalance/10695/3 "2025-07-29T12:23:47Z")

</div>

Hey @Ford,

Yes, I have. The app model performed the same as some of my tuned models.

Best,  
Rhys

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [August 19, 2025, 12:24pm UTC](https://discuss.roboflow.com/t/rf-detr-hyperparameters-for-class-imbalance/10695/4 "2025-08-19T12:24:37Z")

</div>

Closed on August 19, 2025, 12:24pm UTC

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
