请教各位,我在使用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)
加载模型报错 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