Re-fix offset in get_predicted_polygons_with_confidence()
There is another issue with the offset when calling get_polygon()
in get_predicted_polygons_with_confidence()
.
As a result, the polygon coordinates are not correct.
for text_piece, confidence in zip(text_list, confidence_list):
- start_index += len(text_piece) + offset
polygon, _ = get_polygon(
text_piece,
max_value,
start_index,
weights,
threshold_method=threshold_method,
threshold_value=threshold_value,
size=(width, height),
)
+ start_index += len(text_piece) + offset