OSError: cannot open resource
Created by: cheeryoung79
做作业:十分钟掌握PaddleOCR使用时
运行# 快速运行
!export PYTHONPATH=. && python tools/infer/predict_system.py --use_gpu=False --image_dir="./doc/imgs/11.jpg"
--det_model_dir="./inference/det/" --rec_model_dir="./inference/rec/"时
报以下错误:
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Predict time of ./doc/imgs/11.jpg: 2.334s
48, 0.846
专福12样式与主盟的成用·""""""68, 0.576
068, 0.580
第4章文档美化秘技, 0.894
会专题8在WOrd中盘用阳像, 0.665
颜如行创建白定义行丽杆式?, 0.504
第5家文档编排秘技, 0.837
71, 0.742
营如仔通装围州的亮度、对比度和他和皮?, 0.501
知何设员特球的用片效果?·一, 0.514
774, 0.739
.75, 0.684
爱如得让图片自动业部?, 0.538
76, 0.970
会专器14文格视围·, 0.597
76, 0.996
5, 0.769
专专赠9在WOrd中应用艺米字, 0.673
176, 0.752
78, 0.842
专专照15分页特与分节特·, 0.714
Traceback (most recent call last):
File "tools/infer/predict_system.py", line 134, in
image, boxes, txts, scores, draw_txt=True, drop_score=0.5)
File "/home/aistudio/tools/infer/utility.py", line 166, in draw_ocr
"./doc/simfang.ttf", font_size, encoding="utf-8")
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/PIL/ImageFont.py", line 640, in truetype
return freetype(font)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/PIL/ImageFont.py", line 637, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/PIL/ImageFont.py", line 186, in init
font, size, index, encoding, layout_engine=layout_engine
OSError: cannot open resource