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

Function build_post_process

ppocr/postprocess/__init__.py:66–121  ·  view source on GitHub ↗
(config, global_config=None)

Source from the content-addressed store, hash-verified

64
65
66def build_post_process(config, global_config=None):
67 support_dict = [
68 "DBPostProcess",
69 "EASTPostProcess",
70 "SASTPostProcess",
71 "FCEPostProcess",
72 "CTCLabelDecode",
73 "AttnLabelDecode",
74 "ClsPostProcess",
75 "SRNLabelDecode",
76 "PGPostProcess",
77 "DistillationCTCLabelDecode",
78 "TableLabelDecode",
79 "DistillationDBPostProcess",
80 "NRTRLabelDecode",
81 "SARLabelDecode",
82 "SEEDLabelDecode",
83 "VQASerTokenLayoutLMPostProcess",
84 "VQAReTokenLayoutLMPostProcess",
85 "PRENLabelDecode",
86 "DistillationSARLabelDecode",
87 "ViTSTRLabelDecode",
88 "ABINetLabelDecode",
89 "TableMasterLabelDecode",
90 "SPINLabelDecode",
91 "DistillationSerPostProcess",
92 "DistillationRePostProcess",
93 "VLLabelDecode",
94 "PicoDetPostProcess",
95 "CTPostProcess",
96 "RFLLabelDecode",
97 "DRRGPostprocess",
98 "CANLabelDecode",
99 "SATRNLabelDecode",
100 "ParseQLabelDecode",
101 "CPPDLabelDecode",
102 "LaTeXOCRDecode",
103 "UniMERNetDecode",
104 ]
105
106 if config["name"] == "PSEPostProcess":
107 from .pse_postprocess import PSEPostProcess
108
109 support_dict.append("PSEPostProcess")
110
111 config = copy.deepcopy(config)
112 module_name = config.pop("name")
113 if module_name == "None":
114 return
115 if global_config is not None:
116 config.update(global_config)
117 assert module_name in support_dict, Exception(
118 "post process only support {}".format(support_dict)
119 )
120 module_class = eval(module_name)(**config)
121 return module_class

Callers 15

exportFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
__init__Method · 0.90
mainFunction · 0.90
__init__Method · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls 4

popMethod · 0.80
formatMethod · 0.80
evalFunction · 0.50
updateMethod · 0.45

Tested by 1

evalFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…