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

fix benchmark det_r50_vd_pse_v2_0 train error #14239

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ppocr/data/imaug/iaa_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,5 +208,5 @@ def __call__(self, data):
new_poly = transformed_keypoints[idx : idx + length]
new_polys.append(np.array([kp[:2] for kp in new_poly]))
idx += length
data["polys"] = new_polys
data["polys"] = np.array(new_polys)
return data
4 changes: 3 additions & 1 deletion tests/test_iaa_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def test_iaa_augment_default(sample_image, sample_polys):
assert isinstance(
transformed_data["image"], np.ndarray
), "Image should be a numpy array"
assert isinstance(transformed_data["polys"], list), "Polys should be a list"
assert isinstance(
transformed_data["polys"], np.ndarray
), "Polys should be a numpy array"
assert transformed_data["image"].ndim == 3, "Image should be 3-dimensional"

# Verify that the polygons have been transformed
Expand Down