Fix offset in `get_predicted_polygons_with_confidence()`
There is an 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,
- offset,
+ start_index,
weights,
threshold_method=threshold_method,
threshold_value=threshold_value,
size=(width, height),
)