summaryrefslogtreecommitdiff
path: root/src/text_recognizer/character_predictor.py
diff options
context:
space:
mode:
authoraktersnurra <gustaf.rydholm@gmail.com>2020-09-20 00:14:27 +0200
committeraktersnurra <gustaf.rydholm@gmail.com>2020-09-20 00:14:27 +0200
commite181195a699d7fa237f256d90ab4dedffc03d405 (patch)
tree6d8d50731a7267c56f7bf3ed5ecec3990c0e55a5 /src/text_recognizer/character_predictor.py
parent3b06ef615a8db67a03927576e0c12fbfb2501f5f (diff)
Minor bug fixes etc.
Diffstat (limited to 'src/text_recognizer/character_predictor.py')
-rw-r--r--src/text_recognizer/character_predictor.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/text_recognizer/character_predictor.py b/src/text_recognizer/character_predictor.py
index b733a53..df37e68 100644
--- a/src/text_recognizer/character_predictor.py
+++ b/src/text_recognizer/character_predictor.py
@@ -15,6 +15,7 @@ class CharacterPredictor:
"""Intializes the CharacterModel and load the pretrained weights."""
self.model = CharacterModel(network_fn=network_fn)
self.model.eval()
+ self.model.use_swa_model()
def predict(self, image_or_filename: Union[np.ndarray, str]) -> Tuple[str, float]:
"""Predict on a single images contianing a handwritten character."""