From 36591896a844576989abe7c50d8e7cc17f1dc504 Mon Sep 17 00:00:00 2001 From: triplemu Date: Sat, 13 Apr 2024 18:25:22 +0800 Subject: [PATCH] fix num_cls --- configs/rotated_rtmdet/_base_/comp_rr.py | 8 ++++++++ configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota-comp.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configs/rotated_rtmdet/_base_/comp_rr.py b/configs/rotated_rtmdet/_base_/comp_rr.py index b640c8e8f..d1dafd24e 100644 --- a/configs/rotated_rtmdet/_base_/comp_rr.py +++ b/configs/rotated_rtmdet/_base_/comp_rr.py @@ -2,6 +2,12 @@ dataset_type = 'DOTADataset' data_root = 'data/DOTA/' +metainfo = { + 'classes': ('A', 'B', 'C', 'D', 'E', 'F'), + 'palette': [(165, 42, 42), (189, 183, 107), (0, 255, 0), (255, 0, 0), + (138, 43, 226), (255, 128, 0)] +} + file_client_args = dict(backend='disk') train_pipeline = [ @@ -58,6 +64,7 @@ dataset=dict( type=dataset_type, data_root=data_root, + metainfo=metainfo, ann_file='train/annfiles/', data_prefix=dict(img_path='train/images/'), img_shape=(1024, 1024), @@ -72,6 +79,7 @@ dataset=dict( type=dataset_type, data_root=data_root, + metainfo=metainfo, ann_file='val/annfiles/', data_prefix=dict(img_path='val/images/'), img_shape=(1024, 1024), diff --git a/configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota-comp.py b/configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota-comp.py index 20afe4288..21073a08e 100644 --- a/configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota-comp.py +++ b/configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota-comp.py @@ -35,7 +35,7 @@ act_cfg=dict(type='SiLU')), bbox_head=dict( type='RotatedRTMDetSepBNHead', - num_classes=15, + num_classes=6, in_channels=256, stacked_convs=2, feat_channels=256,