Skip to content

Commit

Permalink
[Transforms] SVTR transforms (#1645)
Browse files Browse the repository at this point in the history
* rec transforms

* fix

* ut

* update docs

* fix

* new name

* fix
  • Loading branch information
gaotongxiao committed Jan 6, 2023
1 parent d679691 commit b0557c2
Show file tree
Hide file tree
Showing 5 changed files with 576 additions and 7 deletions.
7 changes: 6 additions & 1 deletion docs/en/api/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ TextDet Transforms
:template: classtemplate.rst

BoundedScaleAspectJitter
FixInvalidPolygon
RandomFlip
SourceImagePad
ShortScaleAspectJitter
Expand All @@ -50,6 +49,10 @@ TextRecog Transforms
:nosignatures:
:template: classtemplate.rst

TextRecogGeneralAug
CropHeight
ImageContentJitter
ReversePixels
PyramidRescale
PadToWidth
RescaleToHeight
Expand All @@ -66,6 +69,8 @@ OCR Transforms
RandomCrop
RandomRotate
Resize
FixInvalidPolygon
RemoveIgnored



Expand Down
7 changes: 6 additions & 1 deletion docs/zh_cn/api/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ TextDet Transforms
:template: classtemplate.rst

BoundedScaleAspectJitter
FixInvalidPolygon
RandomFlip
SourceImagePad
ShortScaleAspectJitter
Expand All @@ -50,6 +49,10 @@ TextRecog Transforms
:nosignatures:
:template: classtemplate.rst

TextRecogGeneralAug
CropHeight
ImageContentJitter
ReversePixels
PyramidRescale
PadToWidth
RescaleToHeight
Expand All @@ -66,6 +69,8 @@ OCR Transforms
RandomCrop
RandomRotate
Resize
FixInvalidPolygon
RemoveIgnored



Expand Down
7 changes: 5 additions & 2 deletions mmocr/datasets/transforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
from .textdet_transforms import (BoundedScaleAspectJitter, RandomFlip,
ShortScaleAspectJitter, SourceImagePad,
TextDetRandomCrop, TextDetRandomCropFlip)
from .textrecog_transforms import PadToWidth, PyramidRescale, RescaleToHeight
from .textrecog_transforms import (CropHeight, ImageContentJitter, PadToWidth,
PyramidRescale, RescaleToHeight,
ReversePixels, TextRecogGeneralAug)
from .wrappers import ConditionApply, ImgAugWrapper, TorchVisionWrapper

__all__ = [
Expand All @@ -20,5 +22,6 @@
'ShortScaleAspectJitter', 'RandomFlip', 'BoundedScaleAspectJitter',
'PackKIEInputs', 'LoadKIEAnnotations', 'FixInvalidPolygon', 'MMDet2MMOCR',
'MMOCR2MMDet', 'LoadImageFromLMDB', 'LoadImageFromFile',
'LoadImageFromNDArray', 'RemoveIgnored', 'ConditionApply'
'LoadImageFromNDArray', 'CropHeight', 'TextRecogGeneralAug',
'ImageContentJitter', 'ReversePixels', 'RemoveIgnored', 'ConditionApply'
]
Loading

0 comments on commit b0557c2

Please sign in to comment.