I am using this function
def data_uri_to_cv2_img(uri): encoded_data = uri.split(\',\')[1] nparr = np.frombuffer(base64.b64decode(encoded_data), np.uin