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
ModelZoo
YOLOX_mmcv
Commits
baf20b93
Commit
baf20b93
authored
Dec 22, 2023
by
dlyrm
Browse files
update yolox
parent
ec3f5448
Pipeline
#679
canceled with stages
Changes
1000
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1537 additions
and
0 deletions
+1537
-0
configs/_base_/datasets/dsdl.py
configs/_base_/datasets/dsdl.py
+62
-0
configs/_base_/datasets/isaid_instance.py
configs/_base_/datasets/isaid_instance.py
+59
-0
configs/_base_/datasets/lvis_v0.5_instance.py
configs/_base_/datasets/lvis_v0.5_instance.py
+79
-0
configs/_base_/datasets/lvis_v1_instance.py
configs/_base_/datasets/lvis_v1_instance.py
+22
-0
configs/_base_/datasets/mot_challenge.py
configs/_base_/datasets/mot_challenge.py
+90
-0
configs/_base_/datasets/mot_challenge_det.py
configs/_base_/datasets/mot_challenge_det.py
+66
-0
configs/_base_/datasets/mot_challenge_reid.py
configs/_base_/datasets/mot_challenge_reid.py
+61
-0
configs/_base_/datasets/objects365v1_detection.py
configs/_base_/datasets/objects365v1_detection.py
+74
-0
configs/_base_/datasets/objects365v2_detection.py
configs/_base_/datasets/objects365v2_detection.py
+73
-0
configs/_base_/datasets/openimages_detection.py
configs/_base_/datasets/openimages_detection.py
+81
-0
configs/_base_/datasets/refcoco+.py
configs/_base_/datasets/refcoco+.py
+55
-0
configs/_base_/datasets/refcoco.py
configs/_base_/datasets/refcoco.py
+55
-0
configs/_base_/datasets/refcocog.py
configs/_base_/datasets/refcocog.py
+55
-0
configs/_base_/datasets/semi_coco_detection.py
configs/_base_/datasets/semi_coco_detection.py
+178
-0
configs/_base_/datasets/v3det.py
configs/_base_/datasets/v3det.py
+69
-0
configs/_base_/datasets/voc0712.py
configs/_base_/datasets/voc0712.py
+92
-0
configs/_base_/datasets/wider_face.py
configs/_base_/datasets/wider_face.py
+73
-0
configs/_base_/datasets/youtube_vis.py
configs/_base_/datasets/youtube_vis.py
+66
-0
configs/_base_/default_runtime.py
configs/_base_/default_runtime.py
+24
-0
configs/_base_/models/cascade-mask-rcnn_r50_fpn.py
configs/_base_/models/cascade-mask-rcnn_r50_fpn.py
+203
-0
No files found.
Too many changes to show.
To preserve performance only
1000 of 1000+
files are displayed.
Plain diff
Email patch
configs/_base_/datasets/dsdl.py
0 → 100644
View file @
baf20b93
dataset_type
=
'DSDLDetDataset'
data_root
=
'path to dataset folder'
train_ann
=
'path to train yaml file'
val_ann
=
'path to val yaml file'
backend_args
=
None
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': "s3://open_data/",
# 'data/': "s3://open_data/"
# }))
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
# If you don't have a gt annotation, delete the pipeline
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
,
'instances'
))
]
train_dataloader
=
dict
(
batch_size
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
train_ann
,
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
,
bbox_min_size
=
32
),
pipeline
=
train_pipeline
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
val_ann
,
test_mode
=
True
,
pipeline
=
test_pipeline
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'CocoMetric'
,
metric
=
'bbox'
)
# val_evaluator = dict(type='VOCMetric', metric='mAP', eval_mode='11points')
test_evaluator
=
val_evaluator
configs/_base_/datasets/isaid_instance.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'iSAIDDataset'
data_root
=
'data/iSAID/'
backend_args
=
None
# Please see `projects/iSAID/README.md` for data preparation
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
,
with_mask
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
800
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
800
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
,
with_mask
=
True
),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
))
]
train_dataloader
=
dict
(
batch_size
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'train/instancesonly_filtered_train.json'
,
data_prefix
=
dict
(
img
=
'train/images/'
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
),
pipeline
=
train_pipeline
,
backend_args
=
backend_args
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'val/instancesonly_filtered_val.json'
,
data_prefix
=
dict
(
img
=
'val/images/'
),
test_mode
=
True
,
pipeline
=
test_pipeline
,
backend_args
=
backend_args
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'CocoMetric'
,
ann_file
=
data_root
+
'val/instancesonly_filtered_val.json'
,
metric
=
[
'bbox'
,
'segm'
],
format_only
=
False
,
backend_args
=
backend_args
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/lvis_v0.5_instance.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'LVISV05Dataset'
data_root
=
'data/lvis_v0.5/'
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection/lvis_v0.5/'
# Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection/',
# 'data/': 's3://openmmlab/datasets/detection/'
# }))
backend_args
=
None
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
,
with_mask
=
True
),
dict
(
type
=
'RandomChoiceResize'
,
scales
=
[(
1333
,
640
),
(
1333
,
672
),
(
1333
,
704
),
(
1333
,
736
),
(
1333
,
768
),
(
1333
,
800
)],
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
,
with_mask
=
True
),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
))
]
train_dataloader
=
dict
(
batch_size
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
'ClassBalancedDataset'
,
oversample_thr
=
1e-3
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/lvis_v0.5_train.json'
,
data_prefix
=
dict
(
img
=
'train2017/'
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
),
pipeline
=
train_pipeline
,
backend_args
=
backend_args
)))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/lvis_v0.5_val.json'
,
data_prefix
=
dict
(
img
=
'val2017/'
),
test_mode
=
True
,
pipeline
=
test_pipeline
,
backend_args
=
backend_args
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'LVISMetric'
,
ann_file
=
data_root
+
'annotations/lvis_v0.5_val.json'
,
metric
=
[
'bbox'
,
'segm'
],
backend_args
=
backend_args
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/lvis_v1_instance.py
0 → 100644
View file @
baf20b93
# dataset settings
_base_
=
'lvis_v0.5_instance.py'
dataset_type
=
'LVISV1Dataset'
data_root
=
'data/lvis_v1/'
train_dataloader
=
dict
(
dataset
=
dict
(
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/lvis_v1_train.json'
,
data_prefix
=
dict
(
img
=
''
))))
val_dataloader
=
dict
(
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/lvis_v1_val.json'
,
data_prefix
=
dict
(
img
=
''
)))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
ann_file
=
data_root
+
'annotations/lvis_v1_val.json'
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/mot_challenge.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'MOTChallengeDataset'
data_root
=
'data/MOT17/'
img_scale
=
(
1088
,
1088
)
backend_args
=
None
# data pipeline
train_pipeline
=
[
dict
(
type
=
'UniformRefFrameSample'
,
num_ref_imgs
=
1
,
frame_range
=
10
,
filter_key_img
=
True
),
dict
(
type
=
'TransformBroadcaster'
,
share_random_params
=
True
,
transforms
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadTrackAnnotations'
),
dict
(
type
=
'RandomResize'
,
scale
=
img_scale
,
ratio_range
=
(
0.8
,
1.2
),
keep_ratio
=
True
,
clip_object_border
=
False
),
dict
(
type
=
'PhotoMetricDistortion'
)
]),
dict
(
type
=
'TransformBroadcaster'
,
# different cropped positions for different frames
share_random_params
=
False
,
transforms
=
[
dict
(
type
=
'RandomCrop'
,
crop_size
=
img_scale
,
bbox_clip_border
=
False
)
]),
dict
(
type
=
'TransformBroadcaster'
,
share_random_params
=
True
,
transforms
=
[
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
]),
dict
(
type
=
'PackTrackInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'TransformBroadcaster'
,
transforms
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
img_scale
,
keep_ratio
=
True
),
dict
(
type
=
'LoadTrackAnnotations'
)
]),
dict
(
type
=
'PackTrackInputs'
)
]
# dataloader
train_dataloader
=
dict
(
batch_size
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'TrackImgSampler'
),
# image-based sampling
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
visibility_thr
=-
1
,
ann_file
=
'annotations/half-train_cocoformat.json'
,
data_prefix
=
dict
(
img_path
=
'train'
),
metainfo
=
dict
(
classes
=
(
'pedestrian'
,
)),
pipeline
=
train_pipeline
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
# Now we support two ways to test, image_based and video_based
# if you want to use video_based sampling, you can use as follows
# sampler=dict(type='DefaultSampler', shuffle=False, round_up=False),
sampler
=
dict
(
type
=
'TrackImgSampler'
),
# image-based sampling
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/half-val_cocoformat.json'
,
data_prefix
=
dict
(
img_path
=
'train'
),
test_mode
=
True
,
pipeline
=
test_pipeline
))
test_dataloader
=
val_dataloader
# evaluator
val_evaluator
=
dict
(
type
=
'MOTChallengeMetric'
,
metric
=
[
'HOTA'
,
'CLEAR'
,
'Identity'
])
test_evaluator
=
val_evaluator
configs/_base_/datasets/mot_challenge_det.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'CocoDataset'
data_root
=
'data/MOT17/'
backend_args
=
None
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
,
to_float32
=
True
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'RandomResize'
,
scale
=
(
1088
,
1088
),
ratio_range
=
(
0.8
,
1.2
),
keep_ratio
=
True
,
clip_object_border
=
False
),
dict
(
type
=
'PhotoMetricDistortion'
),
dict
(
type
=
'RandomCrop'
,
crop_size
=
(
1088
,
1088
),
bbox_clip_border
=
False
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1088
,
1088
),
keep_ratio
=
True
),
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
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/half-train_cocoformat.json'
,
data_prefix
=
dict
(
img
=
'train/'
),
metainfo
=
dict
(
classes
=
(
'pedestrian'
,
)),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
),
pipeline
=
train_pipeline
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/half-val_cocoformat.json'
,
data_prefix
=
dict
(
img
=
'train/'
),
metainfo
=
dict
(
classes
=
(
'pedestrian'
,
)),
test_mode
=
True
,
pipeline
=
test_pipeline
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'CocoMetric'
,
ann_file
=
data_root
+
'annotations/half-val_cocoformat.json'
,
metric
=
'bbox'
,
format_only
=
False
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/mot_challenge_reid.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'ReIDDataset'
data_root
=
'data/MOT17/'
backend_args
=
None
# data pipeline
train_pipeline
=
[
dict
(
type
=
'TransformBroadcaster'
,
share_random_params
=
False
,
transforms
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
,
to_float32
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
128
,
256
),
keep_ratio
=
False
,
clip_object_border
=
False
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
]),
dict
(
type
=
'PackReIDInputs'
,
meta_keys
=
(
'flip'
,
'flip_direction'
))
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
,
to_float32
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
128
,
256
),
keep_ratio
=
False
),
dict
(
type
=
'PackReIDInputs'
)
]
# dataloader
train_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
triplet_sampler
=
dict
(
num_ids
=
8
,
ins_per_id
=
4
),
data_prefix
=
dict
(
img_path
=
'reid/imgs'
),
ann_file
=
'reid/meta/train_80.txt'
,
pipeline
=
train_pipeline
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
triplet_sampler
=
None
,
data_prefix
=
dict
(
img_path
=
'reid/imgs'
),
ann_file
=
'reid/meta/val_20.txt'
,
pipeline
=
test_pipeline
))
test_dataloader
=
val_dataloader
# evaluator
val_evaluator
=
dict
(
type
=
'ReIDMetrics'
,
metric
=
[
'mAP'
,
'CMC'
])
test_evaluator
=
val_evaluator
configs/_base_/datasets/objects365v1_detection.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'Objects365V1Dataset'
data_root
=
'data/Objects365/Obj365_v1/'
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection/coco/'
# Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection/',
# 'data/': 's3://openmmlab/datasets/detection/'
# }))
backend_args
=
None
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
# If you don't have a gt annotation, delete the pipeline
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
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/objects365_train.json'
,
data_prefix
=
dict
(
img
=
'train/'
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
),
pipeline
=
train_pipeline
,
backend_args
=
backend_args
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/objects365_val.json'
,
data_prefix
=
dict
(
img
=
'val/'
),
test_mode
=
True
,
pipeline
=
test_pipeline
,
backend_args
=
backend_args
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'CocoMetric'
,
ann_file
=
data_root
+
'annotations/objects365_val.json'
,
metric
=
'bbox'
,
sort_categories
=
True
,
format_only
=
False
,
backend_args
=
backend_args
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/objects365v2_detection.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'Objects365V2Dataset'
data_root
=
'data/Objects365/Obj365_v2/'
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection/coco/'
# Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection/',
# 'data/': 's3://openmmlab/datasets/detection/'
# }))
backend_args
=
None
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
# If you don't have a gt annotation, delete the pipeline
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
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/zhiyuan_objv2_train.json'
,
data_prefix
=
dict
(
img
=
'train/'
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
),
pipeline
=
train_pipeline
,
backend_args
=
backend_args
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/zhiyuan_objv2_val.json'
,
data_prefix
=
dict
(
img
=
'val/'
),
test_mode
=
True
,
pipeline
=
test_pipeline
,
backend_args
=
backend_args
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'CocoMetric'
,
ann_file
=
data_root
+
'annotations/zhiyuan_objv2_val.json'
,
metric
=
'bbox'
,
format_only
=
False
,
backend_args
=
backend_args
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/openimages_detection.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'OpenImagesDataset'
data_root
=
'data/OpenImages/'
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection/coco/'
# Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection/',
# 'data/': 's3://openmmlab/datasets/detection/'
# }))
backend_args
=
None
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
1024
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1024
,
800
),
keep_ratio
=
True
),
# avoid bboxes being resized
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
# TODO: find a better way to collect image_level_labels
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
,
'instances'
,
'image_level_labels'
))
]
train_dataloader
=
dict
(
batch_size
=
2
,
num_workers
=
0
,
# workers_per_gpu > 0 may occur out of memory
persistent_workers
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/oidv6-train-annotations-bbox.csv'
,
data_prefix
=
dict
(
img
=
'OpenImages/train/'
),
label_file
=
'annotations/class-descriptions-boxable.csv'
,
hierarchy_file
=
'annotations/bbox_labels_600_hierarchy.json'
,
meta_file
=
'annotations/train-image-metas.pkl'
,
pipeline
=
train_pipeline
,
backend_args
=
backend_args
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
0
,
persistent_workers
=
False
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/validation-annotations-bbox.csv'
,
data_prefix
=
dict
(
img
=
'OpenImages/validation/'
),
label_file
=
'annotations/class-descriptions-boxable.csv'
,
hierarchy_file
=
'annotations/bbox_labels_600_hierarchy.json'
,
meta_file
=
'annotations/validation-image-metas.pkl'
,
image_level_ann_file
=
'annotations/validation-'
'annotations-human-imagelabels-boxable.csv'
,
pipeline
=
test_pipeline
,
backend_args
=
backend_args
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'OpenImagesMetric'
,
iou_thrs
=
0.5
,
ioa_thrs
=
0.5
,
use_group_of
=
True
,
get_supercategory
=
True
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/refcoco+.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'RefCocoDataset'
data_root
=
'data/coco/'
backend_args
=
None
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'LoadAnnotations'
,
with_mask
=
True
,
with_bbox
=
False
,
with_seg
=
False
,
with_label
=
False
),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
,
'gt_masks'
,
'text'
))
]
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
data_prefix
=
dict
(
img_path
=
'train2014/'
),
ann_file
=
'refcoco+/instances.json'
,
split_file
=
'refcoco+/refs(unc).p'
,
split
=
'val'
,
text_mode
=
'select_first'
,
pipeline
=
test_pipeline
))
test_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
data_prefix
=
dict
(
img_path
=
'train2014/'
),
ann_file
=
'refcoco+/instances.json'
,
split_file
=
'refcoco+/refs(unc).p'
,
split
=
'testA'
,
# or 'testB'
text_mode
=
'select_first'
,
pipeline
=
test_pipeline
))
val_evaluator
=
dict
(
type
=
'RefSegMetric'
,
metric
=
[
'cIoU'
,
'mIoU'
])
test_evaluator
=
val_evaluator
configs/_base_/datasets/refcoco.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'RefCocoDataset'
data_root
=
'data/coco/'
backend_args
=
None
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'LoadAnnotations'
,
with_mask
=
True
,
with_bbox
=
False
,
with_seg
=
False
,
with_label
=
False
),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
,
'gt_masks'
,
'text'
))
]
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
data_prefix
=
dict
(
img_path
=
'train2014/'
),
ann_file
=
'refcoco/instances.json'
,
split_file
=
'refcoco/refs(unc).p'
,
split
=
'val'
,
text_mode
=
'select_first'
,
pipeline
=
test_pipeline
))
test_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
data_prefix
=
dict
(
img_path
=
'train2014/'
),
ann_file
=
'refcoco/instances.json'
,
split_file
=
'refcoco/refs(unc).p'
,
split
=
'testA'
,
# or 'testB'
text_mode
=
'select_first'
,
pipeline
=
test_pipeline
))
val_evaluator
=
dict
(
type
=
'RefSegMetric'
,
metric
=
[
'cIoU'
,
'mIoU'
])
test_evaluator
=
val_evaluator
configs/_base_/datasets/refcocog.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'RefCocoDataset'
data_root
=
'data/coco/'
backend_args
=
None
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'LoadAnnotations'
,
with_mask
=
True
,
with_bbox
=
False
,
with_seg
=
False
,
with_label
=
False
),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
,
'gt_masks'
,
'text'
))
]
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
data_prefix
=
dict
(
img_path
=
'train2014/'
),
ann_file
=
'refcocog/instances.json'
,
split_file
=
'refcocog/refs(umd).p'
,
split
=
'val'
,
text_mode
=
'select_first'
,
pipeline
=
test_pipeline
))
test_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
data_prefix
=
dict
(
img_path
=
'train2014/'
),
ann_file
=
'refcocog/instances.json'
,
split_file
=
'refcocog/refs(umd).p'
,
split
=
'test'
,
text_mode
=
'select_first'
,
pipeline
=
test_pipeline
))
val_evaluator
=
dict
(
type
=
'RefSegMetric'
,
metric
=
[
'cIoU'
,
'mIoU'
])
test_evaluator
=
val_evaluator
configs/_base_/datasets/semi_coco_detection.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'CocoDataset'
data_root
=
'data/coco/'
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection/coco/'
# Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection/',
# 'data/': 's3://openmmlab/datasets/detection/'
# }))
backend_args
=
None
color_space
=
[
[
dict
(
type
=
'ColorTransform'
)],
[
dict
(
type
=
'AutoContrast'
)],
[
dict
(
type
=
'Equalize'
)],
[
dict
(
type
=
'Sharpness'
)],
[
dict
(
type
=
'Posterize'
)],
[
dict
(
type
=
'Solarize'
)],
[
dict
(
type
=
'Color'
)],
[
dict
(
type
=
'Contrast'
)],
[
dict
(
type
=
'Brightness'
)],
]
geometric
=
[
[
dict
(
type
=
'Rotate'
)],
[
dict
(
type
=
'ShearX'
)],
[
dict
(
type
=
'ShearY'
)],
[
dict
(
type
=
'TranslateX'
)],
[
dict
(
type
=
'TranslateY'
)],
]
scale
=
[(
1333
,
400
),
(
1333
,
1200
)]
branch_field
=
[
'sup'
,
'unsup_teacher'
,
'unsup_student'
]
# pipeline used to augment labeled data,
# which will be sent to student model for supervised training.
sup_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'RandomResize'
,
scale
=
scale
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'RandAugment'
,
aug_space
=
color_space
,
aug_num
=
1
),
dict
(
type
=
'FilterAnnotations'
,
min_gt_bbox_wh
=
(
1e-2
,
1e-2
)),
dict
(
type
=
'MultiBranch'
,
branch_field
=
branch_field
,
sup
=
dict
(
type
=
'PackDetInputs'
))
]
# pipeline used to augment unlabeled data weakly,
# which will be sent to teacher model for predicting pseudo instances.
weak_pipeline
=
[
dict
(
type
=
'RandomResize'
,
scale
=
scale
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
,
'flip'
,
'flip_direction'
,
'homography_matrix'
)),
]
# pipeline used to augment unlabeled data strongly,
# which will be sent to student model for unsupervised training.
strong_pipeline
=
[
dict
(
type
=
'RandomResize'
,
scale
=
scale
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'RandomOrder'
,
transforms
=
[
dict
(
type
=
'RandAugment'
,
aug_space
=
color_space
,
aug_num
=
1
),
dict
(
type
=
'RandAugment'
,
aug_space
=
geometric
,
aug_num
=
1
),
]),
dict
(
type
=
'RandomErasing'
,
n_patches
=
(
1
,
5
),
ratio
=
(
0
,
0.2
)),
dict
(
type
=
'FilterAnnotations'
,
min_gt_bbox_wh
=
(
1e-2
,
1e-2
)),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
,
'flip'
,
'flip_direction'
,
'homography_matrix'
)),
]
# pipeline used to augment unlabeled data into different views
unsup_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadEmptyAnnotations'
),
dict
(
type
=
'MultiBranch'
,
branch_field
=
branch_field
,
unsup_teacher
=
weak_pipeline
,
unsup_student
=
strong_pipeline
,
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
dict
(
type
=
'PackDetInputs'
,
meta_keys
=
(
'img_id'
,
'img_path'
,
'ori_shape'
,
'img_shape'
,
'scale_factor'
))
]
batch_size
=
5
num_workers
=
5
# There are two common semi-supervised learning settings on the coco dataset:
# (1) Divide the train2017 into labeled and unlabeled datasets
# by a fixed percentage, such as 1%, 2%, 5% and 10%.
# The format of labeled_ann_file and unlabeled_ann_file are
# instances_train2017.{fold}@{percent}.json, and
# instances_train2017.{fold}@{percent}-unlabeled.json
# `fold` is used for cross-validation, and `percent` represents
# the proportion of labeled data in the train2017.
# (2) Choose the train2017 as the labeled dataset
# and unlabeled2017 as the unlabeled dataset.
# The labeled_ann_file and unlabeled_ann_file are
# instances_train2017.json and image_info_unlabeled2017.json
# We use this configuration by default.
labeled_dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/instances_train2017.json'
,
data_prefix
=
dict
(
img
=
'train2017/'
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
),
pipeline
=
sup_pipeline
,
backend_args
=
backend_args
)
unlabeled_dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/instances_unlabeled2017.json'
,
data_prefix
=
dict
(
img
=
'unlabeled2017/'
),
filter_cfg
=
dict
(
filter_empty_gt
=
False
),
pipeline
=
unsup_pipeline
,
backend_args
=
backend_args
)
train_dataloader
=
dict
(
batch_size
=
batch_size
,
num_workers
=
num_workers
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'GroupMultiSourceSampler'
,
batch_size
=
batch_size
,
source_ratio
=
[
1
,
4
]),
dataset
=
dict
(
type
=
'ConcatDataset'
,
datasets
=
[
labeled_dataset
,
unlabeled_dataset
]))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/instances_val2017.json'
,
data_prefix
=
dict
(
img
=
'val2017/'
),
test_mode
=
True
,
pipeline
=
test_pipeline
,
backend_args
=
backend_args
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'CocoMetric'
,
ann_file
=
data_root
+
'annotations/instances_val2017.json'
,
metric
=
'bbox'
,
format_only
=
False
,
backend_args
=
backend_args
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/v3det.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'V3DetDataset'
data_root
=
'data/V3Det/'
backend_args
=
None
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'RandomChoiceResize'
,
scales
=
[(
1333
,
640
),
(
1333
,
672
),
(
1333
,
704
),
(
1333
,
736
),
(
1333
,
768
),
(
1333
,
800
)],
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1333
,
800
),
keep_ratio
=
True
),
# If you don't have a gt annotation, delete the pipeline
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
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
'ClassBalancedDataset'
,
oversample_thr
=
1e-3
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/v3det_2023_v1_train.json'
,
data_prefix
=
dict
(
img
=
''
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
4
),
pipeline
=
train_pipeline
,
backend_args
=
backend_args
)))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'annotations/v3det_2023_v1_val.json'
,
data_prefix
=
dict
(
img
=
''
),
test_mode
=
True
,
pipeline
=
test_pipeline
,
backend_args
=
backend_args
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
type
=
'CocoMetric'
,
ann_file
=
data_root
+
'annotations/v3det_2023_v1_val.json'
,
metric
=
'bbox'
,
format_only
=
False
,
backend_args
=
backend_args
,
use_mp_eval
=
True
,
proposal_nums
=
[
300
])
test_evaluator
=
val_evaluator
configs/_base_/datasets/voc0712.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'VOCDataset'
data_root
=
'data/VOCdevkit/'
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically Infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection/segmentation/VOCdevkit/'
# Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/segmentation/',
# 'data/': 's3://openmmlab/datasets/segmentation/'
# }))
backend_args
=
None
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
1000
,
600
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
1000
,
600
),
keep_ratio
=
True
),
# avoid bboxes being resized
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
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
'RepeatDataset'
,
times
=
3
,
dataset
=
dict
(
type
=
'ConcatDataset'
,
# VOCDataset will add different `dataset_type` in dataset.metainfo,
# which will get error if using ConcatDataset. Adding
# `ignore_keys` can avoid this error.
ignore_keys
=
[
'dataset_type'
],
datasets
=
[
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'VOC2007/ImageSets/Main/trainval.txt'
,
data_prefix
=
dict
(
sub_data_root
=
'VOC2007/'
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
,
bbox_min_size
=
32
),
pipeline
=
train_pipeline
,
backend_args
=
backend_args
),
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'VOC2012/ImageSets/Main/trainval.txt'
,
data_prefix
=
dict
(
sub_data_root
=
'VOC2012/'
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
min_size
=
32
,
bbox_min_size
=
32
),
pipeline
=
train_pipeline
,
backend_args
=
backend_args
)
])))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'VOC2007/ImageSets/Main/test.txt'
,
data_prefix
=
dict
(
sub_data_root
=
'VOC2007/'
),
test_mode
=
True
,
pipeline
=
test_pipeline
,
backend_args
=
backend_args
))
test_dataloader
=
val_dataloader
# Pascal VOC2007 uses `11points` as default evaluate mode, while PASCAL
# VOC2012 defaults to use 'area'.
val_evaluator
=
dict
(
type
=
'VOCMetric'
,
metric
=
'mAP'
,
eval_mode
=
'11points'
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/wider_face.py
0 → 100644
View file @
baf20b93
# dataset settings
dataset_type
=
'WIDERFaceDataset'
data_root
=
'data/WIDERFace/'
# Example to use different file client
# Method 1: simply set the data root and let the file I/O module
# automatically infer from prefix (not support LMDB and Memcache yet)
# data_root = 's3://openmmlab/datasets/detection/cityscapes/'
# Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
# backend_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/': 's3://openmmlab/datasets/detection/',
# 'data/': 's3://openmmlab/datasets/detection/'
# }))
backend_args
=
None
img_scale
=
(
640
,
640
)
# VGA resolution
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadAnnotations'
,
with_bbox
=
True
),
dict
(
type
=
'Resize'
,
scale
=
img_scale
,
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackDetInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
img_scale
,
keep_ratio
=
True
),
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
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'AspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'train.txt'
,
data_prefix
=
dict
(
img
=
'WIDER_train'
),
filter_cfg
=
dict
(
filter_empty_gt
=
True
,
bbox_min_size
=
17
,
min_size
=
32
),
pipeline
=
train_pipeline
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'val.txt'
,
data_prefix
=
dict
(
img
=
'WIDER_val'
),
test_mode
=
True
,
pipeline
=
test_pipeline
))
test_dataloader
=
val_dataloader
val_evaluator
=
dict
(
# TODO: support WiderFace-Evaluation for easy, medium, hard cases
type
=
'VOCMetric'
,
metric
=
'mAP'
,
eval_mode
=
'11points'
)
test_evaluator
=
val_evaluator
configs/_base_/datasets/youtube_vis.py
0 → 100644
View file @
baf20b93
dataset_type
=
'YouTubeVISDataset'
data_root
=
'data/youtube_vis_2019/'
dataset_version
=
data_root
[
-
5
:
-
1
]
# 2019 or 2021
backend_args
=
None
# dataset settings
train_pipeline
=
[
dict
(
type
=
'UniformRefFrameSample'
,
num_ref_imgs
=
1
,
frame_range
=
100
,
filter_key_img
=
True
),
dict
(
type
=
'TransformBroadcaster'
,
share_random_params
=
True
,
transforms
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'LoadTrackAnnotations'
,
with_mask
=
True
),
dict
(
type
=
'Resize'
,
scale
=
(
640
,
360
),
keep_ratio
=
True
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
]),
dict
(
type
=
'PackTrackInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'TransformBroadcaster'
,
transforms
=
[
dict
(
type
=
'LoadImageFromFile'
,
backend_args
=
backend_args
),
dict
(
type
=
'Resize'
,
scale
=
(
640
,
360
),
keep_ratio
=
True
),
dict
(
type
=
'LoadTrackAnnotations'
,
with_mask
=
True
),
]),
dict
(
type
=
'PackTrackInputs'
)
]
# dataloader
train_dataloader
=
dict
(
batch_size
=
2
,
num_workers
=
2
,
persistent_workers
=
True
,
# sampler=dict(type='TrackImgSampler'), # image-based sampling
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
batch_sampler
=
dict
(
type
=
'TrackAspectRatioBatchSampler'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
dataset_version
=
dataset_version
,
ann_file
=
'annotations/youtube_vis_2019_train.json'
,
data_prefix
=
dict
(
img_path
=
'train/JPEGImages'
),
pipeline
=
train_pipeline
))
val_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
2
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
,
round_up
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
dataset_version
=
dataset_version
,
ann_file
=
'annotations/youtube_vis_2019_valid.json'
,
data_prefix
=
dict
(
img_path
=
'valid/JPEGImages'
),
test_mode
=
True
,
pipeline
=
test_pipeline
))
test_dataloader
=
val_dataloader
configs/_base_/default_runtime.py
0 → 100644
View file @
baf20b93
default_scope
=
'mmdet'
default_hooks
=
dict
(
timer
=
dict
(
type
=
'IterTimerHook'
),
logger
=
dict
(
type
=
'LoggerHook'
,
interval
=
50
),
param_scheduler
=
dict
(
type
=
'ParamSchedulerHook'
),
checkpoint
=
dict
(
type
=
'CheckpointHook'
,
interval
=
1
),
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
=
vis_backends
,
name
=
'visualizer'
)
log_processor
=
dict
(
type
=
'LogProcessor'
,
window_size
=
50
,
by_epoch
=
True
)
log_level
=
'INFO'
load_from
=
None
resume
=
False
configs/_base_/models/cascade-mask-rcnn_r50_fpn.py
0 → 100644
View file @
baf20b93
# model settings
model
=
dict
(
type
=
'CascadeRCNN'
,
data_preprocessor
=
dict
(
type
=
'DetDataPreprocessor'
,
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
bgr_to_rgb
=
True
,
pad_mask
=
True
,
pad_size_divisor
=
32
),
backbone
=
dict
(
type
=
'ResNet'
,
depth
=
50
,
num_stages
=
4
,
out_indices
=
(
0
,
1
,
2
,
3
),
frozen_stages
=
1
,
norm_cfg
=
dict
(
type
=
'BN'
,
requires_grad
=
True
),
norm_eval
=
True
,
style
=
'pytorch'
,
init_cfg
=
dict
(
type
=
'Pretrained'
,
checkpoint
=
'torchvision://resnet50'
)),
neck
=
dict
(
type
=
'FPN'
,
in_channels
=
[
256
,
512
,
1024
,
2048
],
out_channels
=
256
,
num_outs
=
5
),
rpn_head
=
dict
(
type
=
'RPNHead'
,
in_channels
=
256
,
feat_channels
=
256
,
anchor_generator
=
dict
(
type
=
'AnchorGenerator'
,
scales
=
[
8
],
ratios
=
[
0.5
,
1.0
,
2.0
],
strides
=
[
4
,
8
,
16
,
32
,
64
]),
bbox_coder
=
dict
(
type
=
'DeltaXYWHBBoxCoder'
,
target_means
=
[.
0
,
.
0
,
.
0
,
.
0
],
target_stds
=
[
1.0
,
1.0
,
1.0
,
1.0
]),
loss_cls
=
dict
(
type
=
'CrossEntropyLoss'
,
use_sigmoid
=
True
,
loss_weight
=
1.0
),
loss_bbox
=
dict
(
type
=
'SmoothL1Loss'
,
beta
=
1.0
/
9.0
,
loss_weight
=
1.0
)),
roi_head
=
dict
(
type
=
'CascadeRoIHead'
,
num_stages
=
3
,
stage_loss_weights
=
[
1
,
0.5
,
0.25
],
bbox_roi_extractor
=
dict
(
type
=
'SingleRoIExtractor'
,
roi_layer
=
dict
(
type
=
'RoIAlign'
,
output_size
=
7
,
sampling_ratio
=
0
),
out_channels
=
256
,
featmap_strides
=
[
4
,
8
,
16
,
32
]),
bbox_head
=
[
dict
(
type
=
'Shared2FCBBoxHead'
,
in_channels
=
256
,
fc_out_channels
=
1024
,
roi_feat_size
=
7
,
num_classes
=
80
,
bbox_coder
=
dict
(
type
=
'DeltaXYWHBBoxCoder'
,
target_means
=
[
0.
,
0.
,
0.
,
0.
],
target_stds
=
[
0.1
,
0.1
,
0.2
,
0.2
]),
reg_class_agnostic
=
True
,
loss_cls
=
dict
(
type
=
'CrossEntropyLoss'
,
use_sigmoid
=
False
,
loss_weight
=
1.0
),
loss_bbox
=
dict
(
type
=
'SmoothL1Loss'
,
beta
=
1.0
,
loss_weight
=
1.0
)),
dict
(
type
=
'Shared2FCBBoxHead'
,
in_channels
=
256
,
fc_out_channels
=
1024
,
roi_feat_size
=
7
,
num_classes
=
80
,
bbox_coder
=
dict
(
type
=
'DeltaXYWHBBoxCoder'
,
target_means
=
[
0.
,
0.
,
0.
,
0.
],
target_stds
=
[
0.05
,
0.05
,
0.1
,
0.1
]),
reg_class_agnostic
=
True
,
loss_cls
=
dict
(
type
=
'CrossEntropyLoss'
,
use_sigmoid
=
False
,
loss_weight
=
1.0
),
loss_bbox
=
dict
(
type
=
'SmoothL1Loss'
,
beta
=
1.0
,
loss_weight
=
1.0
)),
dict
(
type
=
'Shared2FCBBoxHead'
,
in_channels
=
256
,
fc_out_channels
=
1024
,
roi_feat_size
=
7
,
num_classes
=
80
,
bbox_coder
=
dict
(
type
=
'DeltaXYWHBBoxCoder'
,
target_means
=
[
0.
,
0.
,
0.
,
0.
],
target_stds
=
[
0.033
,
0.033
,
0.067
,
0.067
]),
reg_class_agnostic
=
True
,
loss_cls
=
dict
(
type
=
'CrossEntropyLoss'
,
use_sigmoid
=
False
,
loss_weight
=
1.0
),
loss_bbox
=
dict
(
type
=
'SmoothL1Loss'
,
beta
=
1.0
,
loss_weight
=
1.0
))
],
mask_roi_extractor
=
dict
(
type
=
'SingleRoIExtractor'
,
roi_layer
=
dict
(
type
=
'RoIAlign'
,
output_size
=
14
,
sampling_ratio
=
0
),
out_channels
=
256
,
featmap_strides
=
[
4
,
8
,
16
,
32
]),
mask_head
=
dict
(
type
=
'FCNMaskHead'
,
num_convs
=
4
,
in_channels
=
256
,
conv_out_channels
=
256
,
num_classes
=
80
,
loss_mask
=
dict
(
type
=
'CrossEntropyLoss'
,
use_mask
=
True
,
loss_weight
=
1.0
))),
# model training and testing settings
train_cfg
=
dict
(
rpn
=
dict
(
assigner
=
dict
(
type
=
'MaxIoUAssigner'
,
pos_iou_thr
=
0.7
,
neg_iou_thr
=
0.3
,
min_pos_iou
=
0.3
,
match_low_quality
=
True
,
ignore_iof_thr
=-
1
),
sampler
=
dict
(
type
=
'RandomSampler'
,
num
=
256
,
pos_fraction
=
0.5
,
neg_pos_ub
=-
1
,
add_gt_as_proposals
=
False
),
allowed_border
=
0
,
pos_weight
=-
1
,
debug
=
False
),
rpn_proposal
=
dict
(
nms_pre
=
2000
,
max_per_img
=
2000
,
nms
=
dict
(
type
=
'nms'
,
iou_threshold
=
0.7
),
min_bbox_size
=
0
),
rcnn
=
[
dict
(
assigner
=
dict
(
type
=
'MaxIoUAssigner'
,
pos_iou_thr
=
0.5
,
neg_iou_thr
=
0.5
,
min_pos_iou
=
0.5
,
match_low_quality
=
False
,
ignore_iof_thr
=-
1
),
sampler
=
dict
(
type
=
'RandomSampler'
,
num
=
512
,
pos_fraction
=
0.25
,
neg_pos_ub
=-
1
,
add_gt_as_proposals
=
True
),
mask_size
=
28
,
pos_weight
=-
1
,
debug
=
False
),
dict
(
assigner
=
dict
(
type
=
'MaxIoUAssigner'
,
pos_iou_thr
=
0.6
,
neg_iou_thr
=
0.6
,
min_pos_iou
=
0.6
,
match_low_quality
=
False
,
ignore_iof_thr
=-
1
),
sampler
=
dict
(
type
=
'RandomSampler'
,
num
=
512
,
pos_fraction
=
0.25
,
neg_pos_ub
=-
1
,
add_gt_as_proposals
=
True
),
mask_size
=
28
,
pos_weight
=-
1
,
debug
=
False
),
dict
(
assigner
=
dict
(
type
=
'MaxIoUAssigner'
,
pos_iou_thr
=
0.7
,
neg_iou_thr
=
0.7
,
min_pos_iou
=
0.7
,
match_low_quality
=
False
,
ignore_iof_thr
=-
1
),
sampler
=
dict
(
type
=
'RandomSampler'
,
num
=
512
,
pos_fraction
=
0.25
,
neg_pos_ub
=-
1
,
add_gt_as_proposals
=
True
),
mask_size
=
28
,
pos_weight
=-
1
,
debug
=
False
)
]),
test_cfg
=
dict
(
rpn
=
dict
(
nms_pre
=
1000
,
max_per_img
=
1000
,
nms
=
dict
(
type
=
'nms'
,
iou_threshold
=
0.7
),
min_bbox_size
=
0
),
rcnn
=
dict
(
score_thr
=
0.05
,
nms
=
dict
(
type
=
'nms'
,
iou_threshold
=
0.5
),
max_per_img
=
100
,
mask_thr_binary
=
0.5
)))
Prev
1
2
3
4
5
6
…
50
Next
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