You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable")
TypeError: Object of type float32 is not JSON serializable
经排查发现是此处漏掉了score的类型转换,此处的score类型是np.float32无法序列化
for _one in res:
_one['position'] = _one['position'].tolist()
_one['score'] = float(_one['score']) #此处score也要加上转换
if 'cropped_img' in _one:
_one.pop('cropped_img')
The text was updated successfully, but these errors were encountered:
当使用 scripts/flask-serve.py 脚本部署 rec_model_name='ch_PP-OCRv3' 的http服务时会出现如下错误
经排查发现是此处漏掉了score的类型转换,此处的score类型是np.float32无法序列化
The text was updated successfully, but these errors were encountered: