Hello everyone, i am struggling with tranining my car detection model.
Dataset contains crossroads (about 60, but many with <10 pictures), with labeled cars in coco format. Firstly there was 11 classes, but in new annotations we added 2 extra classes, so my training divided by half (with old annotations, and with new).
First, I trained model RFDETRMedium on half of my dataset (full ds - 32k, half - 16k) from pretrain weights from the box. I used default parameters (lr=1e-4, resolution 576x576 and etc).
I trained with two parts, first with 11 classes (150 epochs), second with adding 2 classes (~100 epochs).
And it was trained well: mAP50 ~= 0.87 on 13 classes, train loss ~= 3.87, test loss ~= 4.38.
Also, I was training this part on GPU A100 (with batch_size=16, grad_accum_steps=1)
mAP50 graphic - https://ibb.co/mFJJGGX1
Then I wanted to train on full dataset, so i saved my images/labels from validation to new dataset and added second half of my full dataset. I have set this params
import os
os.environ[‘MASTER_ADDR’]=‘localhost’
os.environ[‘MASTER_PORT’]=‘5678’
os.environ[‘WORLD_SIZE’]=‘1’
os.environ[‘RANK’]=‘0’
os.environ[‘LOCAL_RANK’]=‘0’
from rfdetr import RFDETRMedium
model = RFDETRMedium(pretrain_weights=‘inference/checkpoint_best_total.pth’)
model.train(
dataset_dir=‘data/new_car_ds’,
epochs=50,
batch_size=4,
resolution=768,
grad_accum_steps=4,
lr=2e-5,
output_dir=‘finetune_04.03.2026’,
checkpoint_interval=1,
)
and best checkpoint from my last training. In this part of training I used GPU A30. But now mertrics is not that good.
mAP50 graphic:
Test_loss graphic - now test loss hosted at ImgBB — ImgBB
So i trained my model for 23 epochs, and it doesn’t study like before. I also tried to train my model with lr=1e-4, but it was not good too.
I think the problem is that first dataset was very easy (low amount of small objects), but in new version there was added many hard crossroads. Maybe I need to configure my hyperparameters smarter? Is there some advices that you can give me on this task?




