diff --git a/CHANGELOG.md b/CHANGELOG.md index b6057f9..4684022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ Changelog ========= +v0.2.2 (2023-08-17) +------------------- +* Bugfix in `TesseractDetectorRecognizer` + v0.2.1 (2023-08-16) ------------------- * `recognize_bbox` and `recognize_bboxes` methods are added in `AbstractTextRecognizer` diff --git a/VERSION b/VERSION index 7dff5b8..f477849 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.1 \ No newline at end of file +0.2.2 \ No newline at end of file diff --git a/dedocutils/text_detection_recognition/tesseract_detector_recognizer.py b/dedocutils/text_detection_recognition/tesseract_detector_recognizer.py index fbce753..0f854c1 100644 --- a/dedocutils/text_detection_recognition/tesseract_detector_recognizer.py +++ b/dedocutils/text_detection_recognition/tesseract_detector_recognizer.py @@ -31,9 +31,9 @@ def detect_recognize(self, image: np.ndarray, parameters: Optional[dict] = None) assert len(words) == len(left) == len(top) == len(width) == len(height), "Number of words and their coordinates should be equal" text_with_bbox_list = [] - for w, x, y, w, h, level in zip(words, left, top, width, height, levels): + for word, x, y, w, h, level in zip(words, left, top, width, height, levels): if level == 5: - twb = TextWithBBox(text=w, bbox=BBox(x_top_left=x, y_top_left=y, width=w, height=h)) + twb = TextWithBBox(text=word, bbox=BBox(x_top_left=x, y_top_left=y, width=w, height=h)) text_with_bbox_list.append(twb) return text_with_bbox_list