diff --git a/tools/infer/utility.py b/tools/infer/utility.py index d27aec63edd2fb5c0240ff0254ce1057b62162b0..bc095baa29e18ff6e97522bd2bfd1639fe7e79dd 100644 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -587,7 +587,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