开发者社区 > ModelScope模型即服务 > 计算机视觉 > 正文

使用OCR报错

请教各位,我在使用OCR时, ocr_recognition = pipeline(Tasks.ocr_recognition, model='damo/cv_convnextTiny_ocr-recognition-document_damo')

报错如下:

2022-11-06 13:32:22,622 - modelscope - INFO - loading model from C:\Users\XXX.cache\modelscope\hub\damo\cv_convnextTiny_ocr-recognition-document_damo\pytorch_model.pt Traceback (most recent call last): File "D:\anaconda3\envs\modelscope\lib\site-packages\modelscope\utils\registry.py", line 211, in build_from_cfg return obj_cls(**args) File "D:\anaconda3\envs\modelscope\lib\site-packages\modelscope\pipelines\cv\ocr_recognition_pipeline.py", line 53, in init lines = f.readlines() UnicodeDecodeError: 'gbk' codec can't decode byte 0xa8 in position 2: illegal multibyte sequence

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File " ", line 1, in File "D:\anaconda3\envs\modelscope\lib\site-packages\modelscope\pipelines\builder.py", line 325, in pipeline return build_pipeline(cfg, task_name=task) File "D:\anaconda3\envs\modelscope\lib\site-packages\modelscope\pipelines\builder.py", line 243, in build_pipeline cfg, PIPELINES, group_key=task_name, default_args=default_args) File "D:\anaconda3\envs\modelscope\lib\site-packages\modelscope\utils\registry.py", line 214, in build_from_cfg raise type(e)(f'{obj_cls. name}: {e}') TypeError: function takes exactly 5 arguments (1 given)

展开
收起
1195226563099391 2022-11-06 14:04:15 791 0
1 条回答
写回答
取消 提交回答
  • 加载模型报错 loading model from C:\Users\XXX.cache\modelscope\hub\damo\cv_convnextTiny_ocr-recognition-document_damo\pytorch_model.pt

    'gbk' codec can't decode byte 0xa8 in position 2: illegal multibyte sequence

    2022-11-06 14:45:09
    赞同 1 展开评论 打赏

包含图像分类、图像生成、人体人脸识别、动作识别、目标分割、视频生成、卡通画、视觉评价、三维视觉等多个领域

热门讨论

热门文章

相关电子书

更多
阿里云智能-印刷文字识别OCR-产品介绍 立即下载
阿里巴巴读光OCR 立即下载
印刷文字识别算法设计与在线服务 立即下载