Skip to content

Commit

Permalink
fix benchmark det_r50_vd_pse_v2_0 train error
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatV committed Nov 16, 2024
1 parent 7bbda2b commit d9a43c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit d9a43c5

Please sign in to comment.