Skip to content

服务器自部署OCR模型并使用的SDK构造流水线问题 #211

Description

@zpf0430

我在服务器上部署OCR模型,4月16日开源的模型,并使用官方的文档,在服务器启动sdk服务,使用pipeline进行解析
1.该sdk是否支持直接传入文件链接,我在使用post请求时,传入文件的url,会sdk的log会出现Skipping source (unit 0): Error loading image 'https://xxxxxx/ocr_model_test/%E6%89%8B%E5%86%99%E8%A1%8C%E4%B9%A6.png': Invalid image source: https://xxxxx/ocr_model_test/%E6%89%8B%E5%86%99%E8%A1%8C%E4%B9%A6.png报错
2.我使用官方python脚本调用时,从本地上传图片文件没有问题,但是上传pdf是会出现乱码,原因是把pdf解析成base64,_load_image 只识别 data:image 前缀,不认识 data:application/pdf。PDF 的 base64 数据被当成图片尝试解码,要么直接报错被跳过,要么被 PIL 错误解释产生乱码。
我想了解,是我调用的问题,还是该sdk不支持直接传pdf进行解析,需要我们自己先渲染成图片,然后在送入流水线进行解析

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions