csuhan / ReDet

Official code of the paper "ReDet: A Rotation-Equivariant Detector for Aerial Object Detection" (CVPR 2021)
https://redet.csuhan.com
Apache License 2.0
388 stars 79 forks source link

The training failed even though the accuracy up to 99.7 and the loss is 0.2 #170

Open Geo-Chou opened 2 years ago

Geo-Chou commented 2 years ago

When I train the ReDet model with some RS images, the result during training is as shown below: 2022-08-0302:56:57,351-INFO- Epoch [48][40/61] lr :0.00629, eta :2:45:00, time :2.765, datatime :0.018, memory :3801, loss_rpncls :0.0318, loss rpn bbox:0.0034,s0.rbbox loss cls :0.0229,s0.rbbox_ acc :99.5605, s0.rbboxloss bbox :0.0314, s1.rbbox loss cls :0.0117, s1 . rbbox _ acc :99.7456, s1. rbboxloss bbox :0.0019, loss:0.1032

But when I test the model trained, the result is: recall = 0.9583333333333334, presicion = 0.025669642857142856, map50 = 0.5672377341984399

I can't find the reason for this.

csuhan commented 2 years ago

I guess the model is overfitted to your training data.

If you only have a few images, you can use our pretrained model on DOTA and fine-tune on your own data.

Besides, please check your hyper-parameters, such as:

All our models are trained on 4GPUs with a learning rate 0.01. If you train your model with more/fewer GPUs, remember to change the learning rate, e.g., 0.02lr=0.0025lr8GPU, 0.0025lr=0.0025lr1GPU.

Also, check if you have loaded our pretrained ReResNet backbone. See README.md->ImageNet pretrain.