Skip to content

Image size doesn't appear to change with resolution argument #927

@morgankohler

Description

@morgankohler

Search before asking

  • I have searched the RF-DETR issues and found no similar bug report.

Bug

Hello, I am training a RFDETRMedium model but the resolution argument doesn't seem to change the input size of the images when training. The training output always prints:

[INFO] rf-detr - Building Roboflow val dataset with square resize at resolution 576
[INFO] rf-detr - Using multi-scale training with square resize and scales: [736]

When setting a breakpoint in the lightning training loop, the image size in the batch fluctuates between different scales rather than the resolution set by the argument. These resolutions also always seem to be roughly identical no matter what the resolution is set to. The resolutions I have tried are 320, 960, 672. It also seems like the model is using patch size 16 rather than 14 as stated in the documentation. Thank you for your help.

Environment

-rfdetr 1.6.3
-torch 2.10.0
-RTX A5000
-Ubuntu 22.04.2 LTS
-cuda 12.8

Minimal Reproducible Example

import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"

from rfdetr import RFDETRMedium

model = RFDETRMedium()

model.train(
    dataset_dir="<dataset_dir>",
    epochs=100,
    resolution=672,
    batch_size=12,
    grad_accum_steps=2,
    lr=1e-4,
    output_dir="<output_dir>",
)

Additional

No response

Are you willing to submit a PR?

  • Yes, I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions