MCPcopy
hub / github.com/JaidedAI/EasyOCR / construct_model

Method construct_model

easyocr/DBNet/DBNet.py:161–174  ·  view source on GitHub ↗

Contruct text detection model based on the configuration in .yaml file. Parameters ---------- config : dict Configuration dictionary. Returns ------- None.

(self, config)

Source from the content-addressed store, hash-verified

159 self.model.eval()
160
161 def construct_model(self, config):
162 '''
163 Contruct text detection model based on the configuration in .yaml file.
164
165 Parameters
166 ----------
167 config : dict
168 Configuration dictionary.
169
170 Returns
171 -------
172 None.
173 '''
174 self.model = Configurable.construct_class_from_config(config).structure.builder.build(self.device)
175
176 def initialize_model(self, model_config, weight_path):
177 '''

Callers 1

initialize_modelMethod · 0.95

Calls 2

buildMethod · 0.45

Tested by

no test coverage detected