[Config] Fix DRRG (#1189)

* [Config] Fix drrg

* fix drrg
This commit is contained in:
Tong Gao 2022-07-25 19:12:10 +08:00 committed by GitHub
parent 2b476bd8c0
commit e00d4f377b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 18 deletions

View File

@ -1,9 +1,3 @@
preprocess_cfg = dict(
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
to_rgb=True,
pad_size_divisor=32)
model = dict(
type='DRRG',
backbone=dict(
@ -24,4 +18,10 @@ model = dict(
text_region_thr=0.3,
center_region_thr=0.4,
module_loss=dict(type='DRRGModuleLoss'),
postprocessor=dict(type='DRRGPostprocessor', link_thr=0.80)))
postprocessor=dict(type='DRRGPostprocessor', link_thr=0.80)),
data_preprocessor=dict(
type='TextDetDataPreprocessor',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
bgr_to_rgb=True,
pad_size_divisor=32))

View File

@ -1,15 +1,14 @@
_base_ = [
'drrg_r50_fpn_unet.py',
'../../_base_/det_datasets/icdar2015.py',
'../../_base_/default_runtime.py',
'../../_base_/det_datasets/ctw1500.py',
'../../_base_/textdet_default_runtime.py',
'../../_base_/schedules/schedule_sgd_1200e.py',
]
# dataset settings
train_list = {{_base_.train_list}}
test_list = {{_base_.test_list}}
train_list = [_base_.ic15_det_train]
test_list = [_base_.ic15_det_test]
file_client_args = dict(backend='disk')
default_hooks = dict(checkpoint=dict(type='CheckpointHook', interval=20), )
train_pipeline = [
dict(
@ -30,7 +29,7 @@ train_pipeline = [
type='RandomResize',
scale=(800, 800),
ratio_range=(0.75, 2.5),
resize_cfg=dict(type='Resize', keep_ratio=True)),
keep_ratio=True),
dict(
type='TextDetRandomCropFlip',
crop_ratio=0.5,
@ -90,9 +89,5 @@ val_dataloader = dict(
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=dict(
type='ConcatDataset', datasets=test_list, pipeline=test_pipeline))
test_dataloader = val_dataloader
val_evaluator = dict(type='HmeanIOUMetric')
test_evaluator = val_evaluator
visualizer = dict(type='TextDetLocalVisualizer', name='visualizer')