MCPcopy
hub / github.com/PaddlePaddle/PaddleOCR / build_transform

Function build_transform

ppocr/modeling/transforms/__init__.py:18–32  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

16
17
18def build_transform(config):
19 from .tps import TPS
20 from .stn import STN_ON
21 from .tsrn import TSRN
22 from .tbsrn import TBSRN
23 from .gaspin_transformer import GA_SPIN_Transformer as GA_SPIN
24
25 support_dict = ["TPS", "STN_ON", "GA_SPIN", "TSRN", "TBSRN"]
26
27 module_name = config.pop("name")
28 assert module_name in support_dict, Exception(
29 "transform only support {}".format(support_dict)
30 )
31 module_class = eval(module_name)(**config)
32 return module_class

Callers 1

__init__Method · 0.90

Calls 3

popMethod · 0.80
formatMethod · 0.80
evalFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…