Skip to content
Snippets Groups Projects

Re-fix offset in get_predicted_polygons_with_confidence()

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -115,7 +115,6 @@ def get_predicted_polygons_with_confidence(
polygons = []
start_index = 0
for text_piece, confidence in zip(text_list, confidence_list):
start_index += len(text_piece) + offset
polygon, _ = get_polygon(
text_piece,
max_value,
@@ -125,6 +124,7 @@ def get_predicted_polygons_with_confidence(
threshold_value=threshold_value,
size=(width, height),
)
start_index += len(text_piece) + offset
polygon["text"] = text_piece
polygon["text_confidence"] = confidence
polygons.append(polygon)
Loading