Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dcnv3
Commits
4dba489c
Commit
4dba489c
authored
Feb 24, 2025
by
zhe chen
Browse files
Update _base_ code
parent
3c580b47
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
567 additions
and
0 deletions
+567
-0
detection/configs/_base_/datasets/cityscapes_detection.py
detection/configs/_base_/datasets/cityscapes_detection.py
+56
-0
detection/configs/_base_/datasets/cityscapes_instance.py
detection/configs/_base_/datasets/cityscapes_instance.py
+56
-0
detection/configs/_base_/datasets/coco_panoptic.py
detection/configs/_base_/datasets/coco_panoptic.py
+59
-0
detection/configs/_base_/datasets/deepfashion.py
detection/configs/_base_/datasets/deepfashion.py
+53
-0
detection/configs/_base_/datasets/lvis_v0.5_instance.py
detection/configs/_base_/datasets/lvis_v0.5_instance.py
+24
-0
detection/configs/_base_/datasets/lvis_v1_instance.py
detection/configs/_base_/datasets/lvis_v1_instance.py
+54
-0
detection/configs/_base_/datasets/obj365_detection.py
detection/configs/_base_/datasets/obj365_detection.py
+49
-0
detection/configs/_base_/datasets/openimages_detection.py
detection/configs/_base_/datasets/openimages_detection.py
+65
-0
detection/configs/_base_/datasets/voc0712.py
detection/configs/_base_/datasets/voc0712.py
+55
-0
detection/configs/_base_/datasets/wider_face.py
detection/configs/_base_/datasets/wider_face.py
+63
-0
detection/configs/_base_/schedules/schedule_20e.py
detection/configs/_base_/schedules/schedule_20e.py
+11
-0
detection/configs/_base_/schedules/schedule_2x.py
detection/configs/_base_/schedules/schedule_2x.py
+11
-0
detection/configs/_base_/schedules/schedule_6x.py
detection/configs/_base_/schedules/schedule_6x.py
+11
-0
No files found.
detection/configs/_base_/datasets/cityscapes_detection.py
0 → 100644
View file @
4dba489c
# dataset settings
dataset_type
=
'CityscapesDataset'
data_root
=
'data/cityscapes/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
img_scale
=
[(
2048
,
800
),
(
2048
,
1024
)],
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
2048
,
1024
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
])
]
data
=
dict
(
samples_per_gpu
=
1
,
workers_per_gpu
=
2
,
train
=
dict
(
type
=
'RepeatDataset'
,
times
=
8
,
dataset
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/instancesonly_filtered_gtFine_train.json'
,
img_prefix
=
data_root
+
'leftImg8bit/train/'
,
pipeline
=
train_pipeline
)),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/instancesonly_filtered_gtFine_val.json'
,
img_prefix
=
data_root
+
'leftImg8bit/val/'
,
pipeline
=
test_pipeline
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/instancesonly_filtered_gtFine_test.json'
,
img_prefix
=
data_root
+
'leftImg8bit/test/'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
interval
=
1
,
metric
=
'bbox'
)
detection/configs/_base_/datasets/cityscapes_instance.py
0 → 100644
View file @
4dba489c
# dataset settings
dataset_type
=
'CityscapesDataset'
data_root
=
'data/cityscapes/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
,
with_mask
=
True
),
dict
(
type
=
'Resize'
,
img_scale
=
[(
2048
,
800
),
(
2048
,
1024
)],
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
,
'gt_masks'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
2048
,
1024
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
])
]
data
=
dict
(
samples_per_gpu
=
1
,
workers_per_gpu
=
2
,
train
=
dict
(
type
=
'RepeatDataset'
,
times
=
8
,
dataset
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/instancesonly_filtered_gtFine_train.json'
,
img_prefix
=
data_root
+
'leftImg8bit/train/'
,
pipeline
=
train_pipeline
)),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/instancesonly_filtered_gtFine_val.json'
,
img_prefix
=
data_root
+
'leftImg8bit/val/'
,
pipeline
=
test_pipeline
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/instancesonly_filtered_gtFine_test.json'
,
img_prefix
=
data_root
+
'leftImg8bit/test/'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
metric
=
[
'bbox'
,
'segm'
])
detection/configs/_base_/datasets/coco_panoptic.py
0 → 100644
View file @
4dba489c
# dataset settings
dataset_type
=
'CocoPanopticDataset'
data_root
=
'data/coco/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'LoadPanopticAnnotations'
,
with_bbox
=
True
,
with_mask
=
True
,
with_seg
=
True
),
dict
(
type
=
'Resize'
,
img_scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'SegRescale'
,
scale_factor
=
1
/
4
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
,
'gt_masks'
,
'gt_semantic_seg'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
1333
,
800
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
])
]
data
=
dict
(
samples_per_gpu
=
2
,
workers_per_gpu
=
2
,
train
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/panoptic_train2017.json'
,
img_prefix
=
data_root
+
'train2017/'
,
seg_prefix
=
data_root
+
'annotations/panoptic_train2017/'
,
pipeline
=
train_pipeline
),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/panoptic_val2017.json'
,
img_prefix
=
data_root
+
'val2017/'
,
seg_prefix
=
data_root
+
'annotations/panoptic_val2017/'
,
pipeline
=
test_pipeline
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/panoptic_val2017.json'
,
img_prefix
=
data_root
+
'val2017/'
,
seg_prefix
=
data_root
+
'annotations/panoptic_val2017/'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
interval
=
1
,
metric
=
[
'PQ'
])
detection/configs/_base_/datasets/deepfashion.py
0 → 100644
View file @
4dba489c
# dataset settings
dataset_type
=
'DeepFashionDataset'
data_root
=
'data/DeepFashion/In-shop/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
,
with_mask
=
True
),
dict
(
type
=
'Resize'
,
img_scale
=
(
750
,
1101
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
,
'gt_masks'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
750
,
1101
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
])
]
data
=
dict
(
imgs_per_gpu
=
2
,
workers_per_gpu
=
1
,
train
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/DeepFashion_segmentation_query.json'
,
img_prefix
=
data_root
+
'Img/'
,
pipeline
=
train_pipeline
,
data_root
=
data_root
),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/DeepFashion_segmentation_query.json'
,
img_prefix
=
data_root
+
'Img/'
,
pipeline
=
test_pipeline
,
data_root
=
data_root
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/DeepFashion_segmentation_gallery.json'
,
img_prefix
=
data_root
+
'Img/'
,
pipeline
=
test_pipeline
,
data_root
=
data_root
))
evaluation
=
dict
(
interval
=
5
,
metric
=
[
'bbox'
,
'segm'
])
detection/configs/_base_/datasets/lvis_v0.5_instance.py
0 → 100644
View file @
4dba489c
# dataset settings
_base_
=
'coco_instance.py'
dataset_type
=
'LVISV05Dataset'
data_root
=
'data/lvis_v0.5/'
data
=
dict
(
samples_per_gpu
=
2
,
workers_per_gpu
=
2
,
train
=
dict
(
_delete_
=
True
,
type
=
'ClassBalancedDataset'
,
oversample_thr
=
1e-3
,
dataset
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/lvis_v0.5_train.json'
,
img_prefix
=
data_root
+
'train2017/'
)),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/lvis_v0.5_val.json'
,
img_prefix
=
data_root
+
'val2017/'
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/lvis_v0.5_val.json'
,
img_prefix
=
data_root
+
'val2017/'
))
evaluation
=
dict
(
metric
=
[
'bbox'
,
'segm'
])
detection/configs/_base_/datasets/lvis_v1_instance.py
0 → 100644
View file @
4dba489c
# dataset settings
_base_
=
'coco_instance.py'
dataset_type
=
'LVISV1Dataset'
data_root
=
'data/lvis_v1/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
,
with_mask
=
True
),
dict
(
type
=
'Resize'
,
img_scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
,
'gt_masks'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
1333
,
800
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
])
]
data
=
dict
(
samples_per_gpu
=
2
,
workers_per_gpu
=
2
,
train
=
dict
(
_delete_
=
True
,
type
=
'ClassBalancedDataset'
,
oversample_thr
=
1e-3
,
dataset
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/lvis_v1_train.json'
,
img_prefix
=
data_root
,
pipeline
=
train_pipeline
)),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/lvis_v1_val.json'
,
img_prefix
=
data_root
,
pipeline
=
test_pipeline
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/lvis_v1_minival.json'
,
img_prefix
=
data_root
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
metric
=
[
'bbox'
])
detection/configs/_base_/datasets/obj365_detection.py
0 → 100644
View file @
4dba489c
# dataset settings
dataset_type
=
'Objects365V2Dataset'
data_root
=
'data/Objects365/Obj365_v2/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
img_scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
1333
,
800
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
])
]
data
=
dict
(
samples_per_gpu
=
2
,
workers_per_gpu
=
2
,
train
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/zhiyuan_objv2_train.json'
,
img_prefix
=
data_root
+
'train/'
,
pipeline
=
train_pipeline
),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/zhiyuan_objv2_val.json'
,
img_prefix
=
data_root
+
'val/'
,
pipeline
=
test_pipeline
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/zhiyuan_objv2_val.json'
,
img_prefix
=
data_root
+
'val/'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
interval
=
1
,
metric
=
'bbox'
)
detection/configs/_base_/datasets/openimages_detection.py
0 → 100644
View file @
4dba489c
# dataset settings
dataset_type
=
'OpenImagesDataset'
data_root
=
'data/OpenImages/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
,
denorm_bbox
=
True
),
dict
(
type
=
'Resize'
,
img_scale
=
(
1024
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
1024
,
800
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
],
),
]
data
=
dict
(
samples_per_gpu
=
2
,
workers_per_gpu
=
1
,
# workers_per_gpu > 0 may occur out of memory
train
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/oidv6-train-annotations-bbox.csv'
,
img_prefix
=
data_root
+
'OpenImages/train/'
,
label_file
=
data_root
+
'annotations/class-descriptions-boxable.csv'
,
hierarchy_file
=
data_root
+
'annotations/bbox_labels_600_hierarchy.json'
,
pipeline
=
train_pipeline
),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/validation-annotations-bbox.csv'
,
img_prefix
=
data_root
+
'OpenImages/validation/'
,
label_file
=
data_root
+
'annotations/class-descriptions-boxable.csv'
,
hierarchy_file
=
data_root
+
'annotations/bbox_labels_600_hierarchy.json'
,
meta_file
=
data_root
+
'annotations/validation-image-metas.pkl'
,
image_level_ann_file
=
data_root
+
'annotations/validation-annotations-human-imagelabels-boxable.csv'
,
pipeline
=
test_pipeline
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'annotations/validation-annotations-bbox.csv'
,
img_prefix
=
data_root
+
'OpenImages/validation/'
,
label_file
=
data_root
+
'annotations/class-descriptions-boxable.csv'
,
hierarchy_file
=
data_root
+
'annotations/bbox_labels_600_hierarchy.json'
,
meta_file
=
data_root
+
'annotations/validation-image-metas.pkl'
,
image_level_ann_file
=
data_root
+
'annotations/validation-annotations-human-imagelabels-boxable.csv'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
interval
=
1
,
metric
=
'mAP'
)
detection/configs/_base_/datasets/voc0712.py
0 → 100644
View file @
4dba489c
# dataset settings
dataset_type
=
'VOCDataset'
data_root
=
'data/VOCdevkit/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
img_scale
=
(
1000
,
600
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
1000
,
600
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'Pad'
,
size_divisor
=
32
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
])
]
data
=
dict
(
samples_per_gpu
=
2
,
workers_per_gpu
=
2
,
train
=
dict
(
type
=
'RepeatDataset'
,
times
=
3
,
dataset
=
dict
(
type
=
dataset_type
,
ann_file
=
[
data_root
+
'VOC2007/ImageSets/Main/trainval.txt'
,
data_root
+
'VOC2012/ImageSets/Main/trainval.txt'
],
img_prefix
=
[
data_root
+
'VOC2007/'
,
data_root
+
'VOC2012/'
],
pipeline
=
train_pipeline
)),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'VOC2007/ImageSets/Main/test.txt'
,
img_prefix
=
data_root
+
'VOC2007/'
,
pipeline
=
test_pipeline
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'VOC2007/ImageSets/Main/test.txt'
,
img_prefix
=
data_root
+
'VOC2007/'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
interval
=
1
,
metric
=
'mAP'
)
detection/configs/_base_/datasets/wider_face.py
0 → 100644
View file @
4dba489c
# dataset settings
dataset_type
=
'WIDERFaceDataset'
data_root
=
'data/WIDERFace/'
img_norm_cfg
=
dict
(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
1
,
1
,
1
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
to_float32
=
True
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'PhotoMetricDistortion'
,
brightness_delta
=
32
,
contrast_range
=
(
0.5
,
1.5
),
saturation_range
=
(
0.5
,
1.5
),
hue_delta
=
18
),
dict
(
type
=
'Expand'
,
mean
=
img_norm_cfg
[
'mean'
],
to_rgb
=
img_norm_cfg
[
'to_rgb'
],
ratio_range
=
(
1
,
4
)),
dict
(
type
=
'MinIoURandomCrop'
,
min_ious
=
(
0.1
,
0.3
,
0.5
,
0.7
,
0.9
),
min_crop_size
=
0.3
),
dict
(
type
=
'Resize'
,
img_scale
=
(
300
,
300
),
keep_ratio
=
False
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'RandomFlip'
,
flip_ratio
=
0.5
),
dict
(
type
=
'DefaultFormatBundle'
),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_bboxes'
,
'gt_labels'
]),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiScaleFlipAug'
,
img_scale
=
(
300
,
300
),
flip
=
False
,
transforms
=
[
dict
(
type
=
'Resize'
,
keep_ratio
=
False
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
]),
])
]
data
=
dict
(
samples_per_gpu
=
60
,
workers_per_gpu
=
2
,
train
=
dict
(
type
=
'RepeatDataset'
,
times
=
2
,
dataset
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'train.txt'
,
img_prefix
=
data_root
+
'WIDER_train/'
,
min_size
=
17
,
pipeline
=
train_pipeline
)),
val
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'val.txt'
,
img_prefix
=
data_root
+
'WIDER_val/'
,
pipeline
=
test_pipeline
),
test
=
dict
(
type
=
dataset_type
,
ann_file
=
data_root
+
'val.txt'
,
img_prefix
=
data_root
+
'WIDER_val/'
,
pipeline
=
test_pipeline
))
detection/configs/_base_/schedules/schedule_20e.py
0 → 100644
View file @
4dba489c
# optimizer
optimizer
=
dict
(
type
=
'SGD'
,
lr
=
0.02
,
momentum
=
0.9
,
weight_decay
=
0.0001
)
optimizer_config
=
dict
(
grad_clip
=
None
)
# learning policy
lr_config
=
dict
(
policy
=
'step'
,
warmup
=
'linear'
,
warmup_iters
=
500
,
warmup_ratio
=
0.001
,
step
=
[
16
,
19
])
runner
=
dict
(
type
=
'EpochBasedRunner'
,
max_epochs
=
20
)
detection/configs/_base_/schedules/schedule_2x.py
0 → 100644
View file @
4dba489c
# optimizer
optimizer
=
dict
(
type
=
'SGD'
,
lr
=
0.02
,
momentum
=
0.9
,
weight_decay
=
0.0001
)
optimizer_config
=
dict
(
grad_clip
=
None
)
# learning policy
lr_config
=
dict
(
policy
=
'step'
,
warmup
=
'linear'
,
warmup_iters
=
500
,
warmup_ratio
=
0.001
,
step
=
[
16
,
22
])
runner
=
dict
(
type
=
'EpochBasedRunner'
,
max_epochs
=
24
)
detection/configs/_base_/schedules/schedule_6x.py
0 → 100644
View file @
4dba489c
# optimizer
optimizer
=
dict
(
type
=
'SGD'
,
lr
=
0.02
,
momentum
=
0.9
,
weight_decay
=
0.0001
)
optimizer_config
=
dict
(
grad_clip
=
None
)
# learning policy
lr_config
=
dict
(
policy
=
'step'
,
warmup
=
'linear'
,
warmup_iters
=
2000
,
warmup_ratio
=
0.001
,
step
=
[
62
,
68
])
runner
=
dict
(
type
=
'EpochBasedRunner'
,
max_epochs
=
72
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment