Spaces:
Runtime error
Runtime error
update application file
Browse files
configs/_base_/faster-rcnn_r50_fpn_1x_coco.py
CHANGED
|
@@ -168,71 +168,52 @@ test_pipeline = [
|
|
| 168 |
|
| 169 |
evaluation = dict(interval=1, metric='bbox')
|
| 170 |
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
'
|
| 183 |
-
|
| 184 |
-
]
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
paramwise_cfg=dict(
|
| 221 |
-
norm_decay_mult=0, bias_decay_mult=0, bypass_duplicate=True))
|
| 222 |
-
|
| 223 |
-
default_hooks = dict(
|
| 224 |
-
checkpoint=dict(
|
| 225 |
-
interval=5,
|
| 226 |
-
max_keep_ckpts=2, # only keep latest 2 checkpoints
|
| 227 |
-
save_best='auto'
|
| 228 |
-
),
|
| 229 |
-
logger=dict(type='LoggerHook', interval=5))
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
# load COCO pre-trained weight
|
| 233 |
-
|
| 234 |
-
# load_from = './work_dirs/faster-rcnn_r50_fpn_organoid/best_coco_bbox_mAP_epoch_12.pth'
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=max_epochs, val_interval=1)
|
| 238 |
-
visualizer = dict(vis_backends=[dict(type='LocalVisBackend'),dict(type='TensorboardVisBackend')])
|
|
|
|
| 168 |
|
| 169 |
evaluation = dict(interval=1, metric='bbox')
|
| 170 |
|
| 171 |
+
# dataset settings
|
| 172 |
+
dataset_type = 'CocoDataset'
|
| 173 |
+
data_root = 'data/'
|
| 174 |
+
img_norm_cfg = dict(
|
| 175 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 176 |
+
train_pipeline = [
|
| 177 |
+
dict(type='LoadImageFromFile'),
|
| 178 |
+
dict(type='LoadAnnotations', with_bbox=True),
|
| 179 |
+
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
|
| 180 |
+
dict(type='RandomFlip', flip_ratio=0.5),
|
| 181 |
+
dict(type='Normalize', **img_norm_cfg),
|
| 182 |
+
dict(type='Pad', size_divisor=32),
|
| 183 |
+
dict(type='DefaultFormatBundle'),
|
| 184 |
+
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
|
| 185 |
+
]
|
| 186 |
+
test_pipeline = [
|
| 187 |
+
dict(type='LoadImageFromFile'),
|
| 188 |
+
dict(
|
| 189 |
+
type='MultiScaleFlipAug',
|
| 190 |
+
img_scale=(1333, 800),
|
| 191 |
+
flip=False,
|
| 192 |
+
transforms=[
|
| 193 |
+
dict(type='Resize', keep_ratio=True),
|
| 194 |
+
dict(type='RandomFlip'),
|
| 195 |
+
dict(type='Normalize', **img_norm_cfg),
|
| 196 |
+
dict(type='Pad', size_divisor=32),
|
| 197 |
+
dict(type='ImageToTensor', keys=['img']),
|
| 198 |
+
dict(type='Collect', keys=['img']),
|
| 199 |
+
])
|
| 200 |
+
]
|
| 201 |
+
data = dict(
|
| 202 |
+
samples_per_gpu=2,
|
| 203 |
+
workers_per_gpu=2,
|
| 204 |
+
train=dict(
|
| 205 |
+
type=dataset_type,
|
| 206 |
+
ann_file=data_root + 'train.json',
|
| 207 |
+
img_prefix=data_root + 'train/',
|
| 208 |
+
pipeline=train_pipeline),
|
| 209 |
+
val=dict(
|
| 210 |
+
type=dataset_type,
|
| 211 |
+
ann_file=data_root + 'val.json',
|
| 212 |
+
img_prefix=data_root + 'val/',
|
| 213 |
+
pipeline=test_pipeline),
|
| 214 |
+
test=dict(
|
| 215 |
+
type=dataset_type,
|
| 216 |
+
ann_file=data_root + 'val.json',
|
| 217 |
+
img_prefix=data_root + 'val/',
|
| 218 |
+
pipeline=test_pipeline))
|
| 219 |
+
evaluation = dict(interval=1, metric='bbox')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|