You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/tutorials/config.md
+66-65Lines changed: 66 additions & 65 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,71 +181,72 @@ model = dict(
181
181
loss_mask=dict( # Config of loss function for the mask branch.
182
182
type='CrossEntropyLoss', # Type of loss used for segmentation
183
183
use_mask=True, # Whether to only train the mask in the correct class.
184
-
loss_weight=1.0)))) # Loss weight of mask branch.
185
-
train_cfg =dict( # Config of training hyperparameters for rpn and rcnn
186
-
rpn=dict( # Training config of rpn
187
-
assigner=dict( # Config of assigner
188
-
type='MaxIoUAssigner', # Type of assigner, MaxIoUAssigner is used for many common detectors. Refer to https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/bbox/assigners/max_iou_assigner.py#L10 for more details.
189
-
pos_iou_thr=0.7, # IoU >= threshold 0.7 will be taken as positive samples
190
-
neg_iou_thr=0.3, # IoU < threshold 0.3 will be taken as negative samples
191
-
min_pos_iou=0.3, # The minimal IoU threshold to take boxes as positive samples
192
-
match_low_quality=True, # Whether to match the boxes under low quality (see API doc for more details).
193
-
ignore_iof_thr=-1), # IoF threshold for ignoring bboxes
194
-
sampler=dict( # Config of positive/negative sampler
195
-
type='RandomSampler', # Type of sampler, PseudoSampler and other samplers are also supported. Refer to https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/bbox/samplers/random_sampler.py#L8 for implementation details.
196
-
num=256, # Number of samples
197
-
pos_fraction=0.5, # The ratio of positive samples in the total samples.
198
-
neg_pos_ub=-1, # The upper bound of negative samples based on the number of positive samples.
199
-
add_gt_as_proposals=False), # Whether add GT as proposals after sampling.
200
-
allowed_border=-1, # The border allowed after padding for valid anchors.
201
-
pos_weight=-1, # The weight of positive samples during training.
202
-
debug=False), # Whether to set the debug mode
203
-
rpn_proposal=dict( # The config to generate proposals during training
204
-
nms_across_levels=False, # Whether to do NMS for boxes across levels. Only work in `GARPNHead`, naive rpn does not support do nms cross levels.
205
-
nms_pre=2000, # The number of boxes before NMS
206
-
nms_post=1000, # The number of boxes to be kept by NMS, Only work in `GARPNHead`.
207
-
max_per_img=1000, # The number of boxes to be kept after NMS.
208
-
nms=dict( # Config of NMS
209
-
type='nms', # Type of NMS
210
-
iou_threshold=0.7# NMS threshold
211
-
),
212
-
min_bbox_size=0), # The allowed minimal box size
213
-
rcnn=dict( # The config for the roi heads.
214
-
assigner=dict( # Config of assigner for second stage, this is different for that in rpn
215
-
type='MaxIoUAssigner', # Type of assigner, MaxIoUAssigner is used for all roi_heads for now. Refer to https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/bbox/assigners/max_iou_assigner.py#L10 for more details.
216
-
pos_iou_thr=0.5, # IoU >= threshold 0.5 will be taken as positive samples
217
-
neg_iou_thr=0.5, # IoU < threshold 0.5 will be taken as negative samples
218
-
min_pos_iou=0.5, # The minimal IoU threshold to take boxes as positive samples
219
-
match_low_quality=False, # Whether to match the boxes under low quality (see API doc for more details).
220
-
ignore_iof_thr=-1), # IoF threshold for ignoring bboxes
221
-
sampler=dict(
222
-
type='RandomSampler', # Type of sampler, PseudoSampler and other samplers are also supported. Refer to https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/bbox/samplers/random_sampler.py#L8 for implementation details.
223
-
num=512, # Number of samples
224
-
pos_fraction=0.25, # The ratio of positive samples in the total samples.
225
-
neg_pos_ub=-1, # The upper bound of negative samples based on the number of positive samples.
226
-
add_gt_as_proposals=True
227
-
), # Whether add GT as proposals after sampling.
228
-
mask_size=28, # Size of mask
229
-
pos_weight=-1, # The weight of positive samples during training.
230
-
debug=False)) # Whether to set the debug mode
231
-
test_cfg =dict( # Config for testing hyperparameters for rpn and rcnn
232
-
rpn=dict( # The config to generate proposals during testing
233
-
nms_across_levels=False, # Whether to do NMS for boxes across levels. Only work in `GARPNHead`, naive rpn does not support do nms cross levels.
234
-
nms_pre=1000, # The number of boxes before NMS
235
-
nms_post=1000, # The number of boxes to be kept by NMS, Only work in `GARPNHead`.
236
-
max_per_img=1000, # The number of boxes to be kept after NMS.
237
-
nms=dict( # Config of NMS
238
-
type='nms', #Type of NMS
239
-
iou_threshold=0.7# NMS threshold
240
-
),
241
-
min_bbox_size=0), # The allowed minimal box size
242
-
rcnn=dict( # The config for the roi heads.
243
-
score_thr=0.05, # Threshold to filter out boxes
244
-
nms=dict( # Config of NMS in the second stage
245
-
type='nms', # Type of NMS
246
-
iou_thr=0.5), # NMS threshold
247
-
max_per_img=100, # Max number of detections of each image
248
-
mask_thr_binary=0.5)) # Threshold of mask prediction
184
+
loss_weight=1.0))), # Loss weight of mask branch.
185
+
train_cfg=dict( # Config of training hyperparameters for rpn and rcnn
186
+
rpn=dict( # Training config of rpn
187
+
assigner=dict( # Config of assigner
188
+
type='MaxIoUAssigner', # Type of assigner, MaxIoUAssigner is used for many common detectors. Refer to https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/bbox/assigners/max_iou_assigner.py#L10 for more details.
189
+
pos_iou_thr=0.7, # IoU >= threshold 0.7 will be taken as positive samples
190
+
neg_iou_thr=0.3, # IoU < threshold 0.3 will be taken as negative samples
191
+
min_pos_iou=0.3, # The minimal IoU threshold to take boxes as positive samples
192
+
match_low_quality=True, # Whether to match the boxes under low quality (see API doc for more details).
193
+
ignore_iof_thr=-1), # IoF threshold for ignoring bboxes
194
+
sampler=dict( # Config of positive/negative sampler
195
+
type='RandomSampler', # Type of sampler, PseudoSampler and other samplers are also supported. Refer to https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/bbox/samplers/random_sampler.py#L8 for implementation details.
196
+
num=256, # Number of samples
197
+
pos_fraction=0.5, # The ratio of positive samples in the total samples.
198
+
neg_pos_ub=-1, # The upper bound of negative samples based on the number of positive samples.
199
+
add_gt_as_proposals=False), # Whether add GT as proposals after sampling.
200
+
allowed_border=-1, # The border allowed after padding for valid anchors.
201
+
pos_weight=-1, # The weight of positive samples during training.
202
+
debug=False), # Whether to set the debug mode
203
+
rpn_proposal=dict( # The config to generate proposals during training
204
+
nms_across_levels=False, # Whether to do NMS for boxes across levels. Only work in `GARPNHead`, naive rpn does not support do nms cross levels.
205
+
nms_pre=2000, # The number of boxes before NMS
206
+
nms_post=1000, # The number of boxes to be kept by NMS, Only work in `GARPNHead`.
207
+
max_per_img=1000, # The number of boxes to be kept after NMS.
208
+
nms=dict( # Config of NMS
209
+
type='nms', # Type of NMS
210
+
iou_threshold=0.7# NMS threshold
211
+
),
212
+
min_bbox_size=0), # The allowed minimal box size
213
+
rcnn=dict( # The config for the roi heads.
214
+
assigner=dict( # Config of assigner for second stage, this is different for that in rpn
215
+
type='MaxIoUAssigner', # Type of assigner, MaxIoUAssigner is used for all roi_heads for now. Refer to https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/bbox/assigners/max_iou_assigner.py#L10 for more details.
216
+
pos_iou_thr=0.5, # IoU >= threshold 0.5 will be taken as positive samples
217
+
neg_iou_thr=0.5, # IoU < threshold 0.5 will be taken as negative samples
218
+
min_pos_iou=0.5, # The minimal IoU threshold to take boxes as positive samples
219
+
match_low_quality=False, # Whether to match the boxes under low quality (see API doc for more details).
220
+
ignore_iof_thr=-1), # IoF threshold for ignoring bboxes
221
+
sampler=dict(
222
+
type='RandomSampler', # Type of sampler, PseudoSampler and other samplers are also supported. Refer to https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/bbox/samplers/random_sampler.py#L8 for implementation details.
223
+
num=512, # Number of samples
224
+
pos_fraction=0.25, # The ratio of positive samples in the total samples.
225
+
neg_pos_ub=-1, # The upper bound of negative samples based on the number of positive samples.
226
+
add_gt_as_proposals=True
227
+
), # Whether add GT as proposals after sampling.
228
+
mask_size=28, # Size of mask
229
+
pos_weight=-1, # The weight of positive samples during training.
230
+
debug=False)), # Whether to set the debug mode
231
+
test_cfg=dict( # Config for testing hyperparameters for rpn and rcnn
232
+
rpn=dict( # The config to generate proposals during testing
233
+
nms_across_levels=False, # Whether to do NMS for boxes across levels. Only work in `GARPNHead`, naive rpn does not support do nms cross levels.
234
+
nms_pre=1000, # The number of boxes before NMS
235
+
nms_post=1000, # The number of boxes to be kept by NMS, Only work in `GARPNHead`.
236
+
max_per_img=1000, # The number of boxes to be kept after NMS.
237
+
nms=dict( # Config of NMS
238
+
type='nms', #Type of NMS
239
+
iou_threshold=0.7# NMS threshold
240
+
),
241
+
min_bbox_size=0), # The allowed minimal box size
242
+
rcnn=dict( # The config for the roi heads.
243
+
score_thr=0.05, # Threshold to filter out boxes
244
+
nms=dict( # Config of NMS in the second stage
245
+
type='nms', # Type of NMS
246
+
iou_thr=0.5), # NMS threshold
247
+
max_per_img=100, # Max number of detections of each image
248
+
mask_thr_binary=0.5))) # Threshold of mask prediction
249
+
249
250
dataset_type ='CocoDataset'# Dataset type, this will be used to define the dataset
250
251
data_root ='data/coco/'# Root path of data
251
252
img_norm_cfg =dict( # Image normalization config to normalize the input images
0 commit comments