default_scope = 'mmdet' dataset_type = 'CocoDataset' data_root = '/home/safouane/Downloads/benchmark_aircraft/data/' backend_args = None batch_size = 64 max_epochs = 300 metainfo = { 'classes': ('airplane', ), 'palette': [ (0, 128, 255), ] } num_classes = 1 default_hooks = dict( timer=dict(type='IterTimerHook'), logger=dict(type='LoggerHook', interval=50), param_scheduler=dict(type='ParamSchedulerHook'), checkpoint=dict(type='CheckpointHook', interval=10, max_keep_ckpts=3), sampler_seed=dict(type='DistSamplerSeedHook'), visualization=dict(type='DetVisualizationHook')) env_cfg = dict( cudnn_benchmark=False, mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0), dist_cfg=dict(backend='nccl')) vis_backends = [ dict(type='LocalVisBackend'), ] visualizer = dict( type='DetLocalVisualizer', vis_backends=[ dict(type='LocalVisBackend'), dict(type='TensorboardVisBackend'), ], name='visualizer') log_processor = dict(type='LogProcessor', window_size=50, by_epoch=True) log_level = 'INFO' load_from = '/home/safouane/Downloads/benchmark_aircraft/mmdetection/configs/rtmdet/checkpoints/rtmdet_tiny_8xb32-300e_coco_20220902_112414-78e30dcc.pth' resume = False train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=500, val_interval=10) val_cfg = dict(type='ValLoop') test_cfg = dict(type='TestLoop') param_scheduler = [ dict( type='LinearLR', start_factor=1e-05, by_epoch=False, begin=0, end=1000), dict( type='CosineAnnealingLR', eta_min=0.0002, begin=150, end=300, T_max=150, by_epoch=True, convert_to_iter_based=True), ] optim_wrapper = dict( type='OptimWrapper', optimizer=dict(type='AdamW', lr=0.004, weight_decay=0.05), paramwise_cfg=dict( norm_decay_mult=0, bias_decay_mult=0, bypass_duplicate=True)) auto_scale_lr = dict(enable=False, base_batch_size=16) train_pipeline = [ dict(type='LoadImageFromFile', backend_args=None), dict(type='LoadAnnotations', with_bbox=True), dict( type='CachedMosaic', img_scale=( 640, 640, ), pad_val=114.0, max_cached_images=20, random_pop=False), dict( type='RandomResize', scale=( 1280, 1280, ), ratio_range=( 0.5, 2.0, ), keep_ratio=True), dict(type='RandomCrop', crop_size=( 640, 640, )), dict(type='YOLOXHSVRandomAug'), dict(type='RandomFlip', prob=0.5), dict(type='Pad', size=( 640, 640, ), pad_val=dict(img=( 114, 114, 114, ))), dict( type='CachedMixUp', img_scale=( 640, 640, ), ratio_range=( 1.0, 1.0, ), max_cached_images=10, random_pop=False, pad_val=( 114, 114, 114, ), prob=0.5), dict(type='PackDetInputs'), ] test_pipeline = [ dict(type='LoadImageFromFile', backend_args=None), dict(type='Resize', scale=( 640, 640, ), keep_ratio=True), dict(type='Pad', size=( 640, 640, ), pad_val=dict(img=( 114, 114, 114, ))), dict(type='LoadAnnotations', with_bbox=True), dict( type='PackDetInputs', meta_keys=( 'img_id', 'img_path', 'ori_shape', 'img_shape', 'scale_factor', )), ] train_dataloader = dict( batch_size=64, num_workers=2, persistent_workers=True, sampler=dict(type='DefaultSampler', shuffle=True), batch_sampler=None, dataset=dict( type='CocoDataset', metainfo=dict(classes=('airplane', ), palette=[ ( 220, 20, 60, ), ]), data_root='/home/safouane/Downloads/benchmark_aircraft/data/', ann_file='train/__coco.json', data_prefix=dict(img='train/'), filter_cfg=dict(filter_empty_gt=True, min_size=32), pipeline=[ dict(type='LoadImageFromFile', backend_args=None), dict(type='LoadAnnotations', with_bbox=True), dict( type='CachedMosaic', img_scale=( 640, 640, ), pad_val=114.0, max_cached_images=20, random_pop=False), dict( type='RandomResize', scale=( 1280, 1280, ), ratio_range=( 0.5, 2.0, ), keep_ratio=True), dict(type='RandomCrop', crop_size=( 640, 640, )), dict(type='YOLOXHSVRandomAug'), dict(type='RandomFlip', prob=0.5), dict( type='Pad', size=( 640, 640, ), pad_val=dict(img=( 114, 114, 114, ))), dict( type='CachedMixUp', img_scale=( 640, 640, ), ratio_range=( 1.0, 1.0, ), max_cached_images=10, random_pop=False, pad_val=( 114, 114, 114, ), prob=0.5), dict(type='PackDetInputs'), ], backend_args=None), pin_memory=True) val_dataloader = dict( batch_size=64, num_workers=2, persistent_workers=True, drop_last=False, sampler=dict(type='DefaultSampler', shuffle=False), dataset=dict( type='CocoDataset', metainfo=dict(classes=('airplane', ), palette=[ ( 220, 20, 60, ), ]), data_root='/home/safouane/Downloads/benchmark_aircraft/data/', ann_file='val/__coco.json', data_prefix=dict(img='val/'), test_mode=True, pipeline=[ dict(type='LoadImageFromFile', backend_args=None), dict(type='Resize', scale=( 640, 640, ), keep_ratio=True), dict( type='Pad', size=( 640, 640, ), pad_val=dict(img=( 114, 114, 114, ))), dict(type='LoadAnnotations', with_bbox=True), dict( type='PackDetInputs', meta_keys=( 'img_id', 'img_path', 'ori_shape', 'img_shape', 'scale_factor', )), ], backend_args=None)) test_dataloader = dict( batch_size=64, num_workers=2, persistent_workers=True, drop_last=False, sampler=dict(type='DefaultSampler', shuffle=False), dataset=dict( type='CocoDataset', metainfo=dict(classes=('airplane', ), palette=[ ( 220, 20, 60, ), ]), data_root='/home/safouane/Downloads/benchmark_aircraft/data/', ann_file='test/__coco.json', data_prefix=dict(img='test/'), test_mode=True, pipeline=[ dict(type='LoadImageFromFile', backend_args=None), dict(type='Resize', scale=( 640, 640, ), keep_ratio=True), dict( type='Pad', size=( 640, 640, ), pad_val=dict(img=( 114, 114, 114, ))), dict(type='LoadAnnotations', with_bbox=True), dict( type='PackDetInputs', meta_keys=( 'img_id', 'img_path', 'ori_shape', 'img_shape', 'scale_factor', )), ], backend_args=None)) val_evaluator = dict( type='CocoMetric', ann_file='/home/safouane/Downloads/benchmark_aircraft/data/val/__coco.json', metric='bbox', format_only=False, backend_args=None) test_evaluator = dict( type='CocoMetric', ann_file= '/home/safouane/Downloads/benchmark_aircraft/data/test/__coco.json', metric='bbox', format_only=False, backend_args=None) tta_model = dict( type='DetTTAModel', tta_cfg=dict(nms=dict(type='nms', iou_threshold=0.6), max_per_img=100)) img_scales = [ ( 640, 640, ), ( 320, 320, ), ( 960, 960, ), ] tta_pipeline = [ dict(type='LoadImageFromFile', backend_args=None), dict( type='TestTimeAug', transforms=[ [ dict(type='Resize', scale=( 640, 640, ), keep_ratio=True), dict(type='Resize', scale=( 320, 320, ), keep_ratio=True), dict(type='Resize', scale=( 960, 960, ), keep_ratio=True), ], [ dict(type='RandomFlip', prob=1.0), dict(type='RandomFlip', prob=0.0), ], [ dict( type='Pad', size=( 960, 960, ), pad_val=dict(img=( 114, 114, 114, ))), ], [ dict(type='LoadAnnotations', with_bbox=True), ], [ dict( type='PackDetInputs', meta_keys=( 'img_id', 'img_path', 'ori_shape', 'img_shape', 'scale_factor', 'flip', 'flip_direction', )), ], ]), ] model = dict( type='RTMDet', data_preprocessor=dict( type='DetDataPreprocessor', mean=[ 103.53, 116.28, 123.675, ], std=[ 57.375, 57.12, 58.395, ], bgr_to_rgb=False, batch_augments=None), backbone=dict( type='CSPNeXt', arch='P5', expand_ratio=0.5, deepen_factor=0.167, widen_factor=0.375, channel_attention=True, norm_cfg=dict(type='SyncBN'), act_cfg=dict(type='SiLU', inplace=True), init_cfg=dict( type='Pretrained', prefix='backbone.', checkpoint= 'https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-tiny_imagenet_600e.pth' )), neck=dict( type='CSPNeXtPAFPN', in_channels=[ 96, 192, 384, ], out_channels=96, num_csp_blocks=1, expand_ratio=0.5, norm_cfg=dict(type='SyncBN'), act_cfg=dict(type='SiLU', inplace=True)), bbox_head=dict( type='RTMDetSepBNHead', num_classes=1, in_channels=96, stacked_convs=2, feat_channels=96, anchor_generator=dict( type='MlvlPointGenerator', offset=0, strides=[ 8, 16, 32, ]), bbox_coder=dict(type='DistancePointBBoxCoder'), loss_cls=dict( type='QualityFocalLoss', use_sigmoid=True, beta=2.0, loss_weight=1.0), loss_bbox=dict(type='GIoULoss', loss_weight=2.0), with_objectness=False, exp_on_reg=False, share_conv=True, pred_kernel_size=1, norm_cfg=dict(type='SyncBN'), act_cfg=dict(type='SiLU', inplace=True)), train_cfg=dict( assigner=dict(type='DynamicSoftLabelAssigner', topk=13), allowed_border=-1, pos_weight=-1, debug=False), test_cfg=dict( nms_pre=30000, min_bbox_size=0, score_thr=0.001, nms=dict(type='nms', iou_threshold=0.65), max_per_img=300)) train_pipeline_stage2 = [ dict(type='LoadImageFromFile', backend_args=None), dict(type='LoadAnnotations', with_bbox=True), dict( type='RandomResize', scale=( 640, 640, ), ratio_range=( 0.5, 2.0, ), keep_ratio=True), dict(type='RandomCrop', crop_size=( 640, 640, )), dict(type='YOLOXHSVRandomAug'), dict(type='RandomFlip', prob=0.5), dict(type='Pad', size=( 640, 640, ), pad_val=dict(img=( 114, 114, 114, ))), dict(type='PackDetInputs'), ] stage2_num_epochs = 20 base_lr = 0.004 interval = 10 custom_hooks = [ dict( type='EMAHook', ema_type='ExpMomentumEMA', momentum=0.0002, update_buffers=True, priority=49), dict( type='PipelineSwitchHook', switch_epoch=280, switch_pipeline=[ dict(type='LoadImageFromFile', backend_args=None), dict(type='LoadAnnotations', with_bbox=True), dict( type='RandomResize', scale=( 640, 640, ), ratio_range=( 0.5, 2.0, ), keep_ratio=True), dict(type='RandomCrop', crop_size=( 640, 640, )), dict(type='YOLOXHSVRandomAug'), dict(type='RandomFlip', prob=0.5), dict( type='Pad', size=( 640, 640, ), pad_val=dict(img=( 114, 114, 114, ))), dict(type='PackDetInputs'), ]), ] checkpoint = 'https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-tiny_imagenet_600e.pth' launcher = 'none' work_dir = './work_dirs/rtmdet_tiny_8xb32-300e_coco'