From f2191776239e2d57b86212edd235ab70f17c0545 Mon Sep 17 00:00:00 2001 From: eshan1347 Date: Sat, 5 Oct 2024 02:15:21 +0530 Subject: [PATCH] Fix issue #194: added dtype as object inorder to allow creation of array incompatible types, which was causing the error --- craft_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/craft_utils.py b/craft_utils.py index 43c1357..509c962 100755 --- a/craft_utils.py +++ b/craft_utils.py @@ -236,7 +236,7 @@ def getDetBoxes(textmap, linkmap, text_threshold, link_threshold, low_text, poly def adjustResultCoordinates(polys, ratio_w, ratio_h, ratio_net = 2): if len(polys) > 0: - polys = np.array(polys) + polys = np.array(polys, dtype=object) for k in range(len(polys)): if polys[k] is not None: polys[k] *= (ratio_w * ratio_net, ratio_h * ratio_net)