# Question about custom image resolutions during RF-DETR training

**URL:** <https://discuss.roboflow.com/t/question-about-custom-image-resolutions-during-rf-detr-training/11431>\
**Category:** 🤝  Community Help\
**Tags:** research, rf-detr\
**Created:** [November 6, 2025, 5:47pm UTC](https://discuss.roboflow.com/t/question-about-custom-image-resolutions-during-rf-detr-training/11431 "2025-11-06T17:47:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amanda\_Marino](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/amanda_marino/32/8632_2.png) [@Amanda\_Marino](https://discuss.roboflow.com/u/Amanda_Marino)\
**Post date:** [November 6, 2025, 5:47pm UTC](https://discuss.roboflow.com/t/question-about-custom-image-resolutions-during-rf-detr-training/11431/1 "2025-11-06T17:47:16Z")

</div>

Hi everyone,

I’m trying to train an rfdata model on a custom dataset. I’d like to train two separate models - one optimized for inference at 640p and another at 1280p.

All of my dataset images have the same native resolution, so I’m wondering if it’s possible to specify custom width and height values during training to match that.

Right now, I can set the `resolution` hyperparameter to an integer (for example, `640`), but I’m not sure how that actually works - does it automatically make the images square, or is there a way to keep different width and height values?

---

<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:** [November 6, 2025, 6:28pm UTC](https://discuss.roboflow.com/t/question-about-custom-image-resolutions-during-rf-detr-training/11431/2 "2025-11-06T18:28:54Z")

</div>

Hi @Amanda_Marino,  
Great question! You can specify the training resolution using the [resize preprocessing step](https://docs.roboflow.com/datasets/dataset-versions/image-preprocessing#resize). Specifically, we recommend implementing the `stretch to` resizing step.

Out of curiosity, which RF-DETR variant are you training?

---

<div class="post-metadata">

**Author:** ![Amanda\_Marino](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/amanda_marino/32/8632_2.png) [@Amanda\_Marino](https://discuss.roboflow.com/u/Amanda_Marino)\
**Post date:** [November 6, 2025, 7:45pm UTC](https://discuss.roboflow.com/t/question-about-custom-image-resolutions-during-rf-detr-training/11431/3 "2025-11-06T19:45:13Z")

</div>

I’m doing my training in python using the rfdetr sdk. I’m trying to train the small model, RFDETRSmall(). I have not considered doing any preprocessing myself.

Does setting the resolution hyperparameter to 640 automatically resize my data using stretching? Would they be resized to [640x640]? My original data is [3840 x 2160].

---

<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:** [November 27, 2025, 7:45pm UTC](https://discuss.roboflow.com/t/question-about-custom-image-resolutions-during-rf-detr-training/11431/4 "2025-11-27T19:45:43Z")

</div>

Closed on November 27, 2025, 7:45pm UTC

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