Comments (4)
我这里发现同样的错误,换用paddleocr 2.6后报出如下错误:
[2024/05/08 11:14:55] ppocr DEBUG: Namespace(help='==SUPPRESS==', use_gpu=False, use_xpu=False, ir_optim=True, use_tensorrt=False, min_subgraph_size=15, shape_info_filename=None, precision='fp32', gpu_mem=500, image_dir=None, det_algorithm='DB', det_model_dir='/home/lxh/.paddleocr/whl/det/ch/ch_PP-OCRv3_det_infer', det_limit_side_len=960, det_limit_type='max', det_db_thresh=0.3, det_db_box_thresh=0.6, det_db_unclip_ratio=1.5, max_batch_size=10, use_dilation=False, det_db_score_mode='fast', det_east_score_thresh=0.8, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_sast_score_thresh=0.5, det_sast_nms_thresh=0.2, det_sast_polygon=False, det_pse_thresh=0, det_pse_box_thresh=0.85, det_pse_min_area=16, det_pse_box_type='quad', det_pse_scale=1, scales=[8, 16, 32], alpha=1.0, beta=1.0, fourier_degree=5, det_fce_box_type='poly', rec_algorithm='SVTR_LCNet', rec_model_dir='/home/lxh/.paddleocr/whl/rec/ch/ch_PP-OCRv3_rec_infer', rec_image_shape='3, 48, 320', rec_batch_num=6, max_text_length=25, rec_char_dict_path='/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/ppocr/utils/ppocr_keys_v1.txt', use_space_char=True, vis_font_path='./doc/fonts/simfang.ttf', drop_score=0.5, e2e_algorithm='PGNet', e2e_model_dir=None, e2e_limit_side_len=768, e2e_limit_type='max', e2e_pgnet_score_thresh=0.5, e2e_char_dict_path='./ppocr/utils/ic15_dict.txt', e2e_pgnet_valid_set='totaltext', e2e_pgnet_mode='fast', use_angle_cls=True, cls_model_dir='/home/lxh/.paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer', cls_image_shape='3, 48, 192', label_list=['0', '180'], cls_batch_num=6, cls_thresh=0.9, enable_mkldnn=False, cpu_threads=10, use_pdserving=False, warmup=False, sr_model_dir=None, sr_image_shape='3, 32, 128', sr_batch_num=1, draw_img_save_dir='./inference_results', save_crop_res=False, crop_res_save_dir='./output', use_mp=False, total_process_num=1, process_id=0, benchmark=False, save_log_path='./log_output/', show_log=True, use_onnx=False, output='./output', table_max_len=488, table_algorithm='TableAttn', table_model_dir=None, merge_no_span_structure=True, table_char_dict_path=None, layout_model_dir=None, layout_dict_path=None, layout_score_threshold=0.5, layout_nms_threshold=0.5, kie_algorithm='LayoutXLM', ser_model_dir=None, ser_dict_path='../train_data/XFUND/class_list_xfun.txt', ocr_order_method=None, mode='structure', image_orientation=False, layout=True, table=True, ocr=True, recovery=False, save_pdf=False, lang='ch', det=True, rec=True, type='ocr', ocr_version='PP-OCRv3', structure_version='PP-Structurev2')
Traceback (most recent call last):
File "/home/lxh/dev/paddle-ocr/ocr.py", line 7, in
result = ocr.ocr(img_path, cls=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/paddleocr.py", line 511, in ocr
dt_boxes, rec_res, _ = self.call(img, cls)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/tools/infer/predict_system.py", line 71, in call
dt_boxes, elapse = self.text_detector(img)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/tools/infer/predict_det.py", line 260, in call
post_result = self.postprocess_op(preds, shape_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/ppocr/postprocess/db_postprocess.py", line 240, in call
boxes, scores = self.boxes_from_bitmap(pred[batch_index], mask,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/ppocr/postprocess/db_postprocess.py", line 131, in boxes_from_bitmap
score = self.box_score_fast(pred, points.reshape(-1, 2))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/ppocr/postprocess/db_postprocess.py", line 188, in box_score_fast
xmin = np.clip(np.floor(box[:, 0].min()).astype(np.int), 0, w - 1)
^^^^^^
File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/numpy/init.py", line 324, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module 'numpy' has no attribute 'int'.
np.int
was a deprecated alias for the builtin int
. To avoid this error in existing code, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.int
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?
from paddleocr.
可能是缺少cpu avx指令集,从源码编译下dlib试一下
from paddleocr.
我这里发现同样的错误,换用paddleocr 2.6后报出如下错误: [2024/05/08 11:14:55] ppocr DEBUG: Namespace(help='==SUPPRESS==', use_gpu=False, use_xpu=False, ir_optim=True, use_tensorrt=False, min_subgraph_size=15, shape_info_filename=None, precision='fp32', gpu_mem=500, image_dir=None, det_algorithm='DB', det_model_dir='/home/lxh/.paddleocr/whl/det/ch/ch_PP-OCRv3_det_infer', det_limit_side_len=960, det_limit_type='max', det_db_thresh=0.3, det_db_box_thresh=0.6, det_db_unclip_ratio=1.5, max_batch_size=10, use_dilation=False, det_db_score_mode='fast', det_east_score_thresh=0.8, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_sast_score_thresh=0.5, det_sast_nms_thresh=0.2, det_sast_polygon=False, det_pse_thresh=0, det_pse_box_thresh=0.85, det_pse_min_area=16, det_pse_box_type='quad', det_pse_scale=1, scales=[8, 16, 32], alpha=1.0, beta=1.0, fourier_degree=5, det_fce_box_type='poly', rec_algorithm='SVTR_LCNet', rec_model_dir='/home/lxh/.paddleocr/whl/rec/ch/ch_PP-OCRv3_rec_infer', rec_image_shape='3, 48, 320', rec_batch_num=6, max_text_length=25, rec_char_dict_path='/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/ppocr/utils/ppocr_keys_v1.txt', use_space_char=True, vis_font_path='./doc/fonts/simfang.ttf', drop_score=0.5, e2e_algorithm='PGNet', e2e_model_dir=None, e2e_limit_side_len=768, e2e_limit_type='max', e2e_pgnet_score_thresh=0.5, e2e_char_dict_path='./ppocr/utils/ic15_dict.txt', e2e_pgnet_valid_set='totaltext', e2e_pgnet_mode='fast', use_angle_cls=True, cls_model_dir='/home/lxh/.paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer', cls_image_shape='3, 48, 192', label_list=['0', '180'], cls_batch_num=6, cls_thresh=0.9, enable_mkldnn=False, cpu_threads=10, use_pdserving=False, warmup=False, sr_model_dir=None, sr_image_shape='3, 32, 128', sr_batch_num=1, draw_img_save_dir='./inference_results', save_crop_res=False, crop_res_save_dir='./output', use_mp=False, total_process_num=1, process_id=0, benchmark=False, save_log_path='./log_output/', show_log=True, use_onnx=False, output='./output', table_max_len=488, table_algorithm='TableAttn', table_model_dir=None, merge_no_span_structure=True, table_char_dict_path=None, layout_model_dir=None, layout_dict_path=None, layout_score_threshold=0.5, layout_nms_threshold=0.5, kie_algorithm='LayoutXLM', ser_model_dir=None, ser_dict_path='../train_data/XFUND/class_list_xfun.txt', ocr_order_method=None, mode='structure', image_orientation=False, layout=True, table=True, ocr=True, recovery=False, save_pdf=False, lang='ch', det=True, rec=True, type='ocr', ocr_version='PP-OCRv3', structure_version='PP-Structurev2') Traceback (most recent call last): File "/home/lxh/dev/paddle-ocr/ocr.py", line 7, in result = ocr.ocr(img_path, cls=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/paddleocr.py", line 511, in ocr dt_boxes, rec_res, _ = self.call(img, cls) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/tools/infer/predict_system.py", line 71, in call dt_boxes, elapse = self.text_detector(img) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/tools/infer/predict_det.py", line 260, in call post_result = self.postprocess_op(preds, shape_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/ppocr/postprocess/db_postprocess.py", line 240, in call boxes, scores = self.boxes_from_bitmap(pred[batch_index], mask, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/ppocr/postprocess/db_postprocess.py", line 131, in boxes_from_bitmap score = self.box_score_fast(pred, points.reshape(-1, 2)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/paddleocr/ppocr/postprocess/db_postprocess.py", line 188, in box_score_fast xmin = np.clip(np.floor(box[:, 0].min()).astype(np.int), 0, w - 1) ^^^^^^ File "/home/lxh/anaconda3/envs/paddle/lib/python3.12/site-packages/numpy/init.py", line 324, in getattr raise AttributeError(former_attrs[attr]) AttributeError: module 'numpy' has no attribute 'int'.
np.int
was a deprecated alias for the builtinint
. To avoid this error in existing code, useint
by itself. Doing this will not modify any behavior and is safe. When replacingnp.int
, you may wish to use e.g.np.int64
ornp.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?
这个问题是numpy版本问题,NumPy 1.20后将不使用np.int
from paddleocr.
related: #11597
from paddleocr.
Related Issues (20)
- rec_svtrnet_ch.yml 配置训练的图片,识别报错 HOT 1
- 运行示例代码报错:FatalError: `Segmentation fault` is detected by the operating system. HOT 3
- resnet34 rec模型如何修改ctcloss以改善识别结果
- Android PP-OCRv3 HOT 2
- 按照示例Python代码。进行PDF类型的版面识别报错,但是使用命令行正常 HOT 4
- paddle2onnx现已不支持--input_shape_dict="{'x':[-1,3,x,x}"参数使用 HOT 4
- 打开TensorRT不使用动态Shape的情况下 识别速度越来越慢 HOT 2
- 运行PaddleOCR示例代码报错 TypeError: TextSystem.call() takes from 2 to 3 positional arguments but 4 were given HOT 2
- Cannot run "only" text detection HOT 3
- 自己数据集训练效果很差
- Support to load model in a local directory
- 使用Pyinstaller將PPOCRLabel轉exe後執行發生Missing string id : keyDialogTip
- 使用pyinstaller打包后的程序无法运行
- [branch 2.6.1 & 2.7.1]PyMuPDF install failed(pip install -r requirements.txt) HOT 3
- Crash when using PaddleOCR with CPU on Google Colab HOT 4
- 子图识别截取 HOT 1
- 文本行检测模型,有这样一个问题,某个显示大小下,能检测成整行,太大了会被错误检测分割成多段,这种除了合并外,有没有其它判断方法,让其以最佳大小进行检测? HOT 2
- Some times diacritical sign top of text in different languages are not recognizing by paddle OCR and adding some unwanted spaces to recognized text HOT 1
- 【文档无法打开】无法打开文档中 端侧部署的环境配置文档
- Paddle2ONNX - LodTensorArray is not supported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paddleocr.