|
4 | 4 | rpn_head=dict(num_proposals=num_proposals),
|
5 | 5 | test_cfg=dict(
|
6 | 6 | _delete_=True, rpn=None, rcnn=dict(max_per_img=num_proposals)))
|
7 |
| -img_norm_cfg = dict( |
8 |
| - mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) |
9 | 7 |
|
10 | 8 | # augmentation strategy originates from DETR.
|
11 | 9 | train_pipeline = [
|
12 |
| - dict(type='LoadImageFromFile'), |
| 10 | + dict( |
| 11 | + type='LoadImageFromFile', |
| 12 | + file_client_args={{_base_.file_client_args}}), |
13 | 13 | dict(type='LoadAnnotations', with_bbox=True),
|
14 |
| - dict(type='RandomFlip', flip_ratio=0.5), |
| 14 | + dict(type='RandomFlip', prob=0.5), |
15 | 15 | dict(
|
16 |
| - type='AutoAugment', |
17 |
| - policies=[[ |
| 16 | + type='RandomChoice', |
| 17 | + transforms=[[ |
18 | 18 | dict(
|
19 |
| - type='Resize', |
20 |
| - img_scale=[(480, 1333), (512, 1333), (544, 1333), (576, 1333), |
21 |
| - (608, 1333), (640, 1333), (672, 1333), (704, 1333), |
22 |
| - (736, 1333), (768, 1333), (800, 1333)], |
23 |
| - multiscale_mode='value', |
| 19 | + type='RandomChoiceResize', |
| 20 | + scales=[(480, 1333), (512, 1333), (544, 1333), (576, 1333), |
| 21 | + (608, 1333), (640, 1333), (672, 1333), (704, 1333), |
| 22 | + (736, 1333), (768, 1333), (800, 1333)], |
24 | 23 | keep_ratio=True)
|
25 | 24 | ],
|
26 |
| - [ |
27 |
| - dict( |
28 |
| - type='Resize', |
29 |
| - img_scale=[(400, 1333), (500, 1333), (600, 1333)], |
30 |
| - multiscale_mode='value', |
31 |
| - keep_ratio=True), |
32 |
| - dict( |
33 |
| - type='RandomCrop', |
34 |
| - crop_type='absolute_range', |
35 |
| - crop_size=(384, 600), |
36 |
| - allow_negative_crop=True), |
37 |
| - dict( |
38 |
| - type='Resize', |
39 |
| - img_scale=[(480, 1333), (512, 1333), (544, 1333), |
40 |
| - (576, 1333), (608, 1333), (640, 1333), |
41 |
| - (672, 1333), (704, 1333), (736, 1333), |
42 |
| - (768, 1333), (800, 1333)], |
43 |
| - multiscale_mode='value', |
44 |
| - override=True, |
45 |
| - keep_ratio=True) |
46 |
| - ]]), |
47 |
| - dict(type='Normalize', **img_norm_cfg), |
48 |
| - dict(type='Pad', size_divisor=32), |
49 |
| - dict(type='DefaultFormatBundle'), |
50 |
| - dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']) |
| 25 | + [ |
| 26 | + dict( |
| 27 | + type='RandomChoiceResize', |
| 28 | + scales=[(400, 1333), (500, 1333), (600, 1333)], |
| 29 | + keep_ratio=True), |
| 30 | + dict( |
| 31 | + type='RandomCrop', |
| 32 | + crop_type='absolute_range', |
| 33 | + crop_size=(384, 600), |
| 34 | + allow_negative_crop=True), |
| 35 | + dict( |
| 36 | + type='RandomChoiceResize', |
| 37 | + scales=[(480, 1333), (512, 1333), (544, 1333), |
| 38 | + (576, 1333), (608, 1333), (640, 1333), |
| 39 | + (672, 1333), (704, 1333), (736, 1333), |
| 40 | + (768, 1333), (800, 1333)], |
| 41 | + keep_ratio=True) |
| 42 | + ]]), |
| 43 | + dict(type='PackDetInputs') |
51 | 44 | ]
|
52 |
| -data = dict(train=dict(pipeline=train_pipeline)) |
| 45 | +train_dataloader = dict(dataset=dict(pipeline=train_pipeline)) |
0 commit comments