Giter VIP home page Giter VIP logo

Comments (4)

weifang74 avatar weifang74 commented on June 18, 2024

我这里发现同样的错误,换用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.

Sunting78 avatar Sunting78 commented on June 18, 2024

可能是缺少cpu avx指令集,从源码编译下dlib试一下

from paddleocr.

Sunting78 avatar Sunting78 commented on June 18, 2024

我这里发现同样的错误,换用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'?

这个问题是numpy版本问题,NumPy 1.20后将不使用np.int

from paddleocr.

jzhang533 avatar jzhang533 commented on June 18, 2024

related: #11597

from paddleocr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.