Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Configs] Totaltext cfgs for DB and FCE #1633

Merged
merged 6 commits into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fcenet configs
  • Loading branch information
gaotongxiao committed Dec 19, 2022
commit 6547bacfdaf1135eb4787f335a9b1e26a9187b3c
10 changes: 10 additions & 0 deletions configs/textdet/fcenet/_base_fcenet_resnet50_fpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
with_bbox=True,
with_label=True,
),
dict(type='FixInvalidPolygon', min_poly_points=4),
dict(type='RemoveIgnored'),
dict(
type='RandomResize',
scale=(800, 800),
Expand All @@ -61,10 +63,15 @@
crop_ratio=0.5,
iter_num=1,
min_area_ratio=0.2),
dict(
type='FixInvalidPolygon',
min_poly_points=4,
prompt='TextDetRandomCropFlipe'),
dict(
type='RandomApply',
transforms=[dict(type='RandomCrop', min_side_ratio=0.3)],
prob=0.8),
dict(type='FixInvalidPolygon', min_poly_points=4, prompt='RandomCrop'),
dict(
type='RandomApply',
transforms=[
Expand All @@ -75,6 +82,7 @@
use_canvas=True)
],
prob=0.5),
dict(type='FixInvalidPolygon', min_poly_points=4, prompt='RandomRotate'),
dict(
type='RandomChoice',
transforms=[[
Expand All @@ -83,7 +91,9 @@
],
dict(type='Resize', scale=800, keep_ratio=False)],
prob=[0.6, 0.4]),
dict(type='FixInvalidPolygon', min_poly_points=4, prompt='RandomChoice'),
dict(type='RandomFlip', prob=0.5, direction='horizontal'),
dict(type='FixInvalidPolygon', min_poly_points=4, prompt='RandomFlip'),
dict(
type='TorchVisionWrapper',
op='ColorJitter',
Expand Down
37 changes: 37 additions & 0 deletions configs/textdet/fcenet/fcenet_resnet50_fpn_1500e_totaltext.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
_base_ = [
'_base_fcenet_resnet50_fpn.py',
'../_base_/datasets/totaltext.py',
'../_base_/default_runtime.py',
'../_base_/schedules/schedule_sgd_base.py',
]

optim_wrapper = dict(optimizer=dict(lr=1e-3, weight_decay=5e-4))
train_cfg = dict(max_epochs=1500)
# learning policy
param_scheduler = [
dict(type='PolyLR', power=0.9, eta_min=1e-7, end=1500),
]

# dataset settings
totaltext_textdet_train = _base_.totaltext_textdet_train
totaltext_textdet_test = _base_.totaltext_textdet_test
totaltext_textdet_train.pipeline = _base_.train_pipeline
totaltext_textdet_test.pipeline = _base_.test_pipeline

train_dataloader = dict(
batch_size=2,
num_workers=2,
persistent_workers=False,
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=totaltext_textdet_train)

val_dataloader = dict(
batch_size=1,
num_workers=1,
persistent_workers=True,
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=totaltext_textdet_test)

test_dataloader = val_dataloader

auto_scale_lr = dict(base_batch_size=8)