diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 1eebc73f31e6b48a473c20d907ca401ad919fe0b..3d9bdee0ee13af2017deab05e6844a0dd2fb34d3 100644 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -542,7 +542,7 @@ def text_visual(texts, def base64_to_cv2(b64str): import base64 data = base64.b64decode(b64str.encode('utf8')) - data = np.fromstring(data, np.uint8) + data = np.frombuffer(data, np.uint8) data = cv2.imdecode(data, cv2.IMREAD_COLOR) return data