|
"config": "optimizer = dict(\n type='SGD',\n lr=0.01,\n momentum=0.9,\n weight_decay=0.0005,\n nesterov=True,\n paramwise_cfg=dict(norm_decay_mult=0.0, bias_decay_mult=0.0))\noptimizer_config = dict(grad_clip=None)\nlr_config = dict(\n policy='YOLOX',\n warmup='exp',\n by_epoch=False,\n warmup_by_epoch=True,\n warmup_ratio=1,\n warmup_iters=5,\n num_last_epochs=15,\n min_lr_ratio=0.05)\nrunner = dict(type='EpochBasedRunner', max_epochs=300)\ncheckpoint_config = dict(interval=10)\nlog_config = dict(interval=50, hooks=[dict(type='TextLoggerHook')])\ncustom_hooks = [\n dict(type='YOLOXModeSwitchHook', num_last_epochs=15, priority=48),\n dict(type='SyncNormHook', num_last_epochs=15, interval=10, priority=48),\n dict(\n type='ExpMomentumEMAHook',\n resume_from=None,\n momentum=0.0001,\n priority=49)\n]\ndist_params = dict(backend='nccl')\nlog_level = 'INFO'\nload_from = None\nresume_from = None\nworkflow = [('train', 1)]\nimg_scale = (640, 640)\nmodel = dict(\n type='YOLOX',\n input_size=(640, 640),\n random_size_range=(15, 25),\n random_size_interval=10,\n backbone=dict(type='CSPDarknet', deepen_factor=1.0, widen_factor=1.0),\n neck=dict(\n type='YOLOXPAFPN',\n in_channels=[256, 512, 1024],\n out_channels=256,\n num_csp_blocks=3),\n bbox_head=dict(\n type='YOLOXHead', num_classes=80, in_channels=256, feat_channels=256),\n train_cfg=dict(assigner=dict(type='SimOTAAssigner', center_radius=2.5)),\n test_cfg=dict(score_thr=0.01, nms=dict(type='nms', iou_threshold=0.65)))\ndata_root = 'data/coco/'\ndataset_type = 'CocoDataset'\ntrain_pipeline = [\n dict(type='Mosaic', img_scale=(640, 640), pad_val=114.0),\n dict(\n type='RandomAffine', scaling_ratio_range=(0.1, 2),\n border=(-320, -320)),\n dict(\n type='MixUp',\n img_scale=(640, 640),\n ratio_range=(0.8, 1.6),\n pad_val=114.0),\n dict(type='YOLOXHSVRandomAug'),\n dict(type='RandomFlip', flip_ratio=0.5),\n dict(type='Resize', img_scale=(640, 640), keep_ratio=True),\n dict(\n type='Pad',\n pad_to_square=True,\n pad_val=dict(img=(114.0, 114.0, 114.0))),\n dict(type='FilterAnnotations', min_gt_bbox_wh=(1, 1), keep_empty=False),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])\n]\ntrain_dataset = dict(\n type='MultiImageMixDataset',\n dataset=dict(\n type='CocoDataset',\n ann_file='data/coco/annotations/instances_train2017.json',\n img_prefix='data/coco/train2017/',\n pipeline=[\n dict(\n type='LoadImageFromFile',\n file_client_args=dict(\n backend='petrel',\n path_mapping=dict({\n '.data/coco/':\n 's3://openmmlab/datasets/detection/coco/',\n 'data/coco/':\n 's3://openmmlab/datasets/detection/coco/'\n }))),\n dict(type='LoadAnnotations', with_bbox=True)\n ],\n filter_empty_gt=False),\n pipeline=[\n dict(type='Mosaic', img_scale=(640, 640), pad_val=114.0),\n dict(\n type='RandomAffine',\n scaling_ratio_range=(0.1, 2),\n border=(-320, -320)),\n dict(\n type='MixUp',\n img_scale=(640, 640),\n ratio_range=(0.8, 1.6),\n pad_val=114.0),\n dict(type='YOLOXHSVRandomAug'),\n dict(type='RandomFlip', flip_ratio=0.5),\n dict(type='Resize', img_scale=(640, 640), keep_ratio=True),\n dict(\n type='Pad',\n pad_to_square=True,\n pad_val=dict(img=(114.0, 114.0, 114.0))),\n dict(\n type='FilterAnnotations', min_gt_bbox_wh=(1, 1), keep_empty=False),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])\n ])\ntest_pipeline = [\n dict(\n type='LoadImageFromFile',\n file_client_args=dict(\n backend='petrel',\n path_mapping=dict({\n '.data/coco/':\n 's3://openmmlab/datasets/detection/coco/',\n 'data/coco/':\n 's3://openmmlab/datasets/detection/coco/'\n }))),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(640, 640),\n flip=False,\n transforms=[\n dict(type='Resize', keep_ratio=True),\n dict(type='RandomFlip'),\n dict(\n type='Pad',\n pad_to_square=True,\n pad_val=dict(img=(114.0, 114.0, 114.0))),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n]\ndata = dict(\n samples_per_gpu=8,\n workers_per_gpu=4,\n persistent_workers=True,\n train=dict(\n type='MultiImageMixDataset',\n dataset=dict(\n type='CocoDataset',\n ann_file='data/coco/annotations/instances_train2017.json',\n img_prefix='data/coco/train2017/',\n pipeline=[\n dict(\n type='LoadImageFromFile',\n file_client_args=dict(\n backend='petrel',\n path_mapping=dict({\n '.data/coco/':\n 's3://openmmlab/datasets/detection/coco/',\n 'data/coco/':\n 's3://openmmlab/datasets/detection/coco/'\n }))),\n dict(type='LoadAnnotations', with_bbox=True)\n ],\n filter_empty_gt=False),\n pipeline=[\n dict(type='Mosaic', img_scale=(640, 640), pad_val=114.0),\n dict(\n type='RandomAffine',\n scaling_ratio_range=(0.1, 2),\n border=(-320, -320)),\n dict(\n type='MixUp',\n img_scale=(640, 640),\n ratio_range=(0.8, 1.6),\n pad_val=114.0),\n dict(type='YOLOXHSVRandomAug'),\n dict(type='RandomFlip', flip_ratio=0.5),\n dict(type='Resize', img_scale=(640, 640), keep_ratio=True),\n dict(\n type='Pad',\n pad_to_square=True,\n pad_val=dict(img=(114.0, 114.0, 114.0))),\n dict(\n type='FilterAnnotations',\n min_gt_bbox_wh=(1, 1),\n keep_empty=False),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])\n ]),\n val=dict(\n type='CocoDataset',\n ann_file='data/coco/annotations/instances_val2017.json',\n img_prefix='data/coco/val2017/',\n pipeline=[\n dict(\n type='LoadImageFromFile',\n file_client_args=dict(\n backend='petrel',\n path_mapping=dict({\n '.data/coco/':\n 's3://openmmlab/datasets/detection/coco/',\n 'data/coco/':\n 's3://openmmlab/datasets/detection/coco/'\n }))),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(640, 640),\n flip=False,\n transforms=[\n dict(type='Resize', keep_ratio=True),\n dict(type='RandomFlip'),\n dict(\n type='Pad',\n pad_to_square=True,\n pad_val=dict(img=(114.0, 114.0, 114.0))),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ]),\n test=dict(\n type='CocoDataset',\n ann_file='data/coco/annotations/instances_val2017.json',\n img_prefix='data/coco/val2017/',\n pipeline=[\n dict(\n type='LoadImageFromFile',\n file_client_args=dict(\n backend='petrel',\n path_mapping=dict({\n '.data/coco/':\n 's3://openmmlab/datasets/detection/coco/',\n 'data/coco/':\n 's3://openmmlab/datasets/detection/coco/'\n }))),\n dict(\n type='MultiScaleFlipAug',\n img_scale=(640, 640),\n flip=False,\n transforms=[\n dict(type='Resize', keep_ratio=True),\n dict(type='RandomFlip'),\n dict(\n type='Pad',\n pad_to_square=True,\n pad_val=dict(img=(114.0, 114.0, 114.0))),\n dict(type='DefaultFormatBundle'),\n dict(type='Collect', keys=['img'])\n ])\n ]))\nmax_epochs = 300\nnum_last_epochs = 15\ninterval = 10\nevaluation = dict(\n save_best='auto', interval=10, dynamic_intervals=[(285, 1)], metric='bbox')\nwork_dir = '/mnt/lustre/share_data/huanghaian/work_dir/yolox_l_1124'\ngpu_ids = range(0, 8)\n", |