Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bezier_to_polygon -> bezier2polygon #1739

Merged
merged 1 commit into from
Feb 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/dataset_converters/common/curvedsyntext_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import mmengine
import numpy as np

from mmocr.utils import bezier_to_polygon, sort_points
from mmocr.utils import bezier2polygon, sort_points

# The default dictionary used by CurvedSynthText
dict95 = [
Expand Down Expand Up @@ -38,7 +38,7 @@ def digit2text(rec):
def modify_annotation(ann, num_sample, start_img_id=0, start_ann_id=0):
ann['text'] = digit2text(ann.pop('rec'))
# Get hide egmentation points
polygon_pts = bezier_to_polygon(ann['bezier_pts'], num_sample=num_sample)
polygon_pts = bezier2polygon(ann['bezier_pts'], num_sample=num_sample)
ann['segmentation'] = np.asarray(sort_points(polygon_pts)).reshape(
1, -1).tolist()
ann['image_id'] += start_img_id
Expand Down