Skip to content

Commit

Permalink
优化xfund数据集的config_generator命名,使config_generator目录结构更清晰
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNuNu committed Mar 30, 2023
1 parent deb96cc commit 443e979
Show file tree
Hide file tree
Showing 20 changed files with 208 additions and 213 deletions.
4 changes: 2 additions & 2 deletions configs/re/_base_/datasets/xfund_zh.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
xfund_zh_re_data_root = 'data/xfund/zh'

xfund_zh_re_train = dict(
type='REDataset',
type='XFUNDREDataset',
data_root=xfund_zh_re_data_root,
ann_file='re_train.json',
pipeline=None)

xfund_zh_re_test = dict(
type='REDataset',
type='XFUNDREDataset',
data_root=xfund_zh_re_data_root,
ann_file='re_test.json',
test_mode=True,
Expand Down
4 changes: 2 additions & 2 deletions configs/ser/_base_/datasets/xfund_zh.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
xfund_zh_ser_data_root = 'data/xfund/zh'

xfund_zh_ser_train = dict(
type='SERDataset',
type='XFUNDSERDataset',
data_root=xfund_zh_ser_data_root,
ann_file='ser_train.json',
pipeline=None)

xfund_zh_ser_test = dict(
type='SERDataset',
type='XFUNDSERDataset',
data_root=xfund_zh_ser_data_root,
ann_file='ser_test.json',
test_mode=True,
Expand Down
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/de/re.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
_base_.train_preparer.packer.type = 'REPacker'
_base_.test_preparer.packer.type = 'REPacker'

config_generator = dict(type='REConfigGenerator')
config_generator = dict(type='XFUNDREConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/de/ser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
)

delete = ['annotations'] + [f'{lang}_{split}' for split in ['train', 'val']]
config_generator = dict(type='SERConfigGenerator')
config_generator = dict(type='XFUNDSERConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/es/re.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
_base_.train_preparer.packer.type = 'REPacker'
_base_.test_preparer.packer.type = 'REPacker'

config_generator = dict(type='REConfigGenerator')
config_generator = dict(type='XFUNDREConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/es/ser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
)

delete = ['annotations'] + [f'{lang}_{split}' for split in ['train', 'val']]
config_generator = dict(type='SERConfigGenerator')
config_generator = dict(type='XFUNDSERConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/fr/re.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
_base_.train_preparer.packer.type = 'REPacker'
_base_.test_preparer.packer.type = 'REPacker'

config_generator = dict(type='REConfigGenerator')
config_generator = dict(type='XFUNDREConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/fr/ser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
)

delete = ['annotations'] + [f'{lang}_{split}' for split in ['train', 'val']]
config_generator = dict(type='SERConfigGenerator')
config_generator = dict(type='XFUNDSERConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/it/re.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
_base_.train_preparer.packer.type = 'REPacker'
_base_.test_preparer.packer.type = 'REPacker'

config_generator = dict(type='REConfigGenerator')
config_generator = dict(type='XFUNDREConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/it/ser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
)

delete = ['annotations'] + [f'{lang}_{split}' for split in ['train', 'val']]
config_generator = dict(type='SERConfigGenerator')
config_generator = dict(type='XFUNDSERConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/ja/re.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
_base_.train_preparer.packer.type = 'REPacker'
_base_.test_preparer.packer.type = 'REPacker'

config_generator = dict(type='REConfigGenerator')
config_generator = dict(type='XFUNDREConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/ja/ser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
)

delete = ['annotations'] + [f'{lang}_{split}' for split in ['train', 'val']]
config_generator = dict(type='SERConfigGenerator')
config_generator = dict(type='XFUNDSERConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/pt/re.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
_base_.train_preparer.packer.type = 'REPacker'
_base_.test_preparer.packer.type = 'REPacker'

config_generator = dict(type='REConfigGenerator')
config_generator = dict(type='XFUNDREConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/pt/ser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
)

delete = ['annotations'] + [f'{lang}_{split}' for split in ['train', 'val']]
config_generator = dict(type='SERConfigGenerator')
config_generator = dict(type='XFUNDSERConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/zh/re.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
_base_.train_preparer.packer.type = 'REPacker'
_base_.test_preparer.packer.type = 'REPacker'

config_generator = dict(type='REConfigGenerator')
config_generator = dict(type='XFUNDREConfigGenerator')
2 changes: 1 addition & 1 deletion dataset_zoo/xfund/zh/ser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
)

delete = ['annotations'] + [f'{lang}_{split}' for split in ['train', 'val']]
config_generator = dict(type='SERConfigGenerator')
config_generator = dict(type='XFUNDSERConfigGenerator')
6 changes: 3 additions & 3 deletions mmocr/datasets/preparers/config_generators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .base import BaseDatasetConfigGenerator
from .re_config_generator import REConfigGenerator
from .ser_config_generator import SERConfigGenerator
from .textdet_config_generator import TextDetConfigGenerator
from .textrecog_config_generator import TextRecogConfigGenerator
from .textspotting_config_generator import TextSpottingConfigGenerator
from .xfund_config_generator import (XFUNDREConfigGenerator,
XFUNDSERConfigGenerator)

__all__ = [
'BaseDatasetConfigGenerator', 'TextDetConfigGenerator',
'TextRecogConfigGenerator', 'TextSpottingConfigGenerator',
'SERConfigGenerator', 'REConfigGenerator'
'XFUNDSERConfigGenerator', 'XFUNDREConfigGenerator'
]
96 changes: 0 additions & 96 deletions mmocr/datasets/preparers/config_generators/re_config_generator.py

This file was deleted.

96 changes: 0 additions & 96 deletions mmocr/datasets/preparers/config_generators/ser_config_generator.py

This file was deleted.

Loading

0 comments on commit 443e979

Please sign in to comment.