Replies: 2 comments
-
I think this is normal. I run the same code in the AI Studio, and the log is as following: main.py from paddleocr import PaddleOCR,draw_ocr
ocr = PaddleOCR(lang='japan') # need to run only once to download and load model into memory
img_path = 'img_12.jpg'
result = ocr.ocr(img_path, cls=False)
for idx in range(len(result)):
res = result[idx]
for line in res:
print(line) aistudio@jupyter-57084-6258410:~$ python main.py
[2024/12/10 18:30:15] ppocr DEBUG: Namespace(alpha=1.0, benchmark=False, beta=1.0, cls_batch_num=6, cls_image_shape='3, 48, 192', cls_model_dir='/home/aistudio/.paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer', cls_thresh=0.9, cpu_threads=10, crop_res_save_dir='./output', det=True, det_algorithm='DB', det_box_type='quad', det_db_box_thresh=0.6, det_db_score_mode='fast', det_db_thresh=0.3, det_db_unclip_ratio=1.5, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_east_score_thresh=0.8, det_limit_side_len=960, det_limit_type='max', det_model_dir='/home/aistudio/.paddleocr/whl/det/ml/Multilingual_PP-OCRv3_det_infer', det_pse_box_thresh=0.85, det_pse_min_area=16, det_pse_scale=1, det_pse_thresh=0, det_sast_nms_thresh=0.2, det_sast_score_thresh=0.5, draw_img_save_dir='./inference_results', drop_score=0.5, e2e_algorithm='PGNet', e2e_char_dict_path='./ppocr/utils/ic15_dict.txt', e2e_limit_side_len=768, e2e_limit_type='max', e2e_model_dir=None, e2e_pgnet_mode='fast', e2e_pgnet_score_thresh=0.5, e2e_pgnet_valid_set='totaltext', enable_mkldnn=False, fourier_degree=5, gpu_id=0, gpu_mem=500, help='==SUPPRESS==', image_dir=None, image_orientation=False, ir_optim=True, kie_algorithm='LayoutXLM', label_list=['0', '180'], lang='japan', layout=True, layout_dict_path=None, layout_model_dir=None, layout_nms_threshold=0.5, layout_score_threshold=0.5, max_batch_size=10, max_text_length=25, merge_no_span_structure=True, min_subgraph_size=15, mode='structure', ocr=True, ocr_order_method=None, ocr_version='PP-OCRv4', output='./output', page_num=0, precision='fp32', process_id=0, re_model_dir=None, rec=True, rec_algorithm='SVTR_LCNet', rec_batch_num=6, rec_char_dict_path='/home/aistudio/.data/webide/pip/lib/python3.7/site-packages/paddleocr/ppocr/utils/dict/japan_dict.txt', rec_image_inverse=True, rec_image_shape='3, 48, 320', rec_model_dir='/home/aistudio/.paddleocr/whl/rec/japan/japan_PP-OCRv4_rec_infer', recovery=False, return_word_box=False, save_crop_res=False, save_log_path='./log_output/', scales=[8, 16, 32], ser_dict_path='../train_data/XFUND/class_list_xfun.txt', ser_model_dir=None, show_log=True, sr_batch_num=1, sr_image_shape='3, 32, 128', sr_model_dir=None, structure_version='PP-StructureV2', table=True, table_algorithm='TableAttn', table_char_dict_path=None, table_max_len=488, table_model_dir=None, total_process_num=1, type='ocr', use_angle_cls=False, use_dilation=False, use_gpu=True, use_mp=False, use_npu=False, use_onnx=False, use_pdf2docx_api=False, use_pdserving=False, use_space_char=True, use_tensorrt=False, use_visual_backbone=True, use_xpu=False, vis_font_path='./doc/fonts/simfang.ttf', warmup=False)
[2024/12/10 18:30:24] ppocr DEBUG: dt_boxes num : 75, elapse : 2.5091543197631836
[2024/12/10 18:30:25] ppocr DEBUG: rec_res num : 75, elapse : 1.4642219543457031
[[[448.0, 179.0], [1162.0, 179.0], [1162.0, 219.0], [448.0, 219.0]], ('ACKNOWLEDGEMENTS', 0.8688492774963379)]
[[[399.0, 346.0], [460.0, 346.0], [460.0, 386.0], [399.0, 386.0]], ('We', 0.9998581409454346)]
[[[469.0, 349.0], [582.0, 344.0], [583.0, 382.0], [470.0, 387.0]], ('Would', 0.9906611442565918)]
[[[594.0, 342.0], [661.0, 347.0], [658.0, 387.0], [591.0, 382.0]], ('like', 0.8581578135490417)]
[[[663.0, 348.0], [707.0, 348.0], [707.0, 384.0], [663.0, 384.0]], ('t0', 0.7024626731872559)]
[[[718.0, 346.0], [822.0, 346.0], [822.0, 383.0], [718.0, 383.0]], ('thank', 0.9994527697563171)]
[[[831.0, 345.0], [875.0, 345.0], [875.0, 383.0], [831.0, 383.0]], ('all', 0.8864550590515137)]
[[[884.0, 345.0], [947.0, 345.0], [947.0, 384.0], [884.0, 384.0]], ('the', 0.9983473420143127)]
[[[958.0, 344.0], [1129.0, 350.0], [1128.0, 393.0], [957.0, 387.0]], ('designers', 0.9998689293861389)]
[[[1139.0, 348.0], [1209.0, 348.0], [1209.0, 388.0], [1139.0, 388.0]], ('and', 0.999459445476532)]
[[[636.0, 395.0], [721.0, 391.0], [723.0, 432.0], [639.0, 437.0]], ('who', 0.834391176700592)]
[[[735.0, 398.0], [819.0, 398.0], [819.0, 431.0], [735.0, 431.0]], ('have', 0.9993776082992554)]
[[[833.0, 392.0], [926.0, 397.0], [924.0, 435.0], [831.0, 430.0]], ('been', 0.9997546076774597)]
[[[402.0, 402.0], [626.0, 400.0], [627.0, 431.0], [403.0, 433.0]], ('Contributors', 0.9941883087158203)]
[[[938.0, 400.0], [1088.0, 400.0], [1088.0, 431.0], [938.0, 431.0]], ('Involved', 0.9485199451446533)]
[[[1101.0, 400.0], [1136.0, 400.0], [1136.0, 433.0], [1101.0, 433.0]], ('ín', 0.5144662857055664)]
[[[1145.0, 394.0], [1210.0, 399.0], [1207.0, 439.0], [1142.0, 433.0]], ('the', 0.9993351101875305)]
[[[400.0, 452.0], [602.0, 442.0], [604.0, 480.0], [402.0, 490.0]], ('Production', 0.9584988355636597)]
[[[616.0, 446.0], [658.0, 446.0], [658.0, 483.0], [616.0, 483.0]], ('0f', 0.9157159328460693)]
[[[667.0, 446.0], [737.0, 446.0], [737.0, 484.0], [667.0, 484.0]], ('this', 0.9961860179901123)]
[[[747.0, 448.0], [852.0, 448.0], [852.0, 484.0], [747.0, 484.0]], ('book;', 0.9900836944580078)]
[[[862.0, 447.0], [952.0, 442.0], [954.0, 480.0], [864.0, 485.0]], ('their', 0.997888445854187)]
[[[965.0, 445.0], [1208.0, 448.0], [1207.0, 485.0], [964.0, 481.0]], ('Contributions', 0.9959254860877991)]
[[[401.0, 500.0], [486.0, 500.0], [486.0, 533.0], [401.0, 533.0]], ('have', 0.9995792508125305)]
[[[499.0, 498.0], [591.0, 498.0], [591.0, 534.0], [499.0, 534.0]], ('been', 0.9991582632064819)]
[[[602.0, 496.0], [856.0, 496.0], [856.0, 538.0], [602.0, 538.0]], ('indispensable', 0.9981399178504944)]
[[[868.0, 498.0], [910.0, 498.0], [910.0, 534.0], [868.0, 534.0]], ('t0', 0.6804746389389038)]
[[[919.0, 496.0], [966.0, 496.0], [966.0, 534.0], [919.0, 534.0]], ('its', 0.9990286827087402)]
[[[978.0, 500.0], [1132.0, 500.0], [1132.0, 531.0], [978.0, 531.0]], ('Creation', 0.9995676875114441)]
[[[1150.0, 496.0], [1210.0, 501.0], [1207.0, 537.0], [1147.0, 532.0]], ('We', 0.9994856119155884)]
[[[395.0, 549.0], [510.0, 544.0], [511.0, 582.0], [397.0, 586.0]], ('Would', 0.9098127484321594)]
[[[520.0, 548.0], [595.0, 548.0], [595.0, 586.0], [520.0, 586.0]], ('also', 0.9971821308135986)]
[[[602.0, 546.0], [667.0, 546.0], [667.0, 586.0], [602.0, 586.0]], ('like', 0.8751622438430786)]
[[[677.0, 553.0], [716.0, 553.0], [716.0, 584.0], [677.0, 584.0]], ('to', 0.6922805905342102)]
[[[728.0, 553.0], [864.0, 553.0], [864.0, 590.0], [728.0, 590.0]], ('express', 0.9985255599021912)]
[[[875.0, 553.0], [934.0, 553.0], [934.0, 588.0], [875.0, 588.0]], ('Our', 0.9559428095817566)]
[[[944.0, 551.0], [1109.0, 540.0], [1112.0, 584.0], [947.0, 594.0]], ('gratitude', 0.9993082880973816)]
[[[1122.0, 550.0], [1158.0, 550.0], [1158.0, 586.0], [1122.0, 586.0]], ('to', 0.8712176084518433)]
[[[1169.0, 546.0], [1211.0, 546.0], [1211.0, 586.0], [1169.0, 586.0]], ('all', 0.7641189694404602)]
[[[397.0, 593.0], [465.0, 601.0], [461.0, 641.0], [392.0, 633.0]], ('the', 0.9991509318351746)]
[[[474.0, 602.0], [664.0, 594.0], [665.0, 632.0], [475.0, 640.0]], ('producers', 0.980047345161438)]
[[[676.0, 595.0], [737.0, 595.0], [737.0, 636.0], [676.0, 636.0]], ('for', 0.9184491038322449)]
[[[747.0, 596.0], [836.0, 596.0], [836.0, 634.0], [747.0, 634.0]], ('their', 0.9984073638916016)]
[[[847.0, 593.0], [1041.0, 593.0], [1041.0, 634.0], [847.0, 634.0]], ('invaluable', 0.9987874031066895)]
[[[1054.0, 598.0], [1211.0, 598.0], [1211.0, 639.0], [1054.0, 639.0]], ('Opinions', 0.9326464533805847)]
[[[393.0, 651.0], [465.0, 646.0], [468.0, 684.0], [396.0, 688.0]], ('and', 0.9979880452156067)]
[[[475.0, 650.0], [651.0, 653.0], [651.0, 685.0], [474.0, 681.0]], ('assistance', 0.9994794726371765)]
[[[663.0, 650.0], [870.0, 650.0], [870.0, 691.0], [663.0, 691.0]], ('throughout', 0.9996002316474915)]
[[[878.0, 650.0], [941.0, 650.0], [941.0, 684.0], [878.0, 684.0]], ('this', 0.9970624446868896)]
[[[952.0, 650.0], [1082.0, 650.0], [1082.0, 688.0], [952.0, 688.0]], ('Project.', 0.9890819787979126)]
[[[1094.0, 646.0], [1167.0, 646.0], [1167.0, 684.0], [1094.0, 684.0]], ('And', 0.999886691570282)]
[[[1172.0, 652.0], [1209.0, 652.0], [1209.0, 683.0], [1172.0, 683.0]], ('to', 0.8733319640159607)]
[[[396.0, 696.0], [461.0, 701.0], [458.0, 740.0], [393.0, 735.0]], ('the', 0.9997127056121826)]
[[[465.0, 701.0], [562.0, 705.0], [561.0, 743.0], [463.0, 739.0]], ('many', 0.9946987628936768)]
[[[568.0, 702.0], [681.0, 696.0], [683.0, 734.0], [570.0, 740.0]], ('others', 0.9751121401786804)]
[[[693.0, 700.0], [807.0, 700.0], [807.0, 736.0], [693.0, 736.0]], ('whose', 0.9556367993354797)]
[[[817.0, 705.0], [931.0, 705.0], [931.0, 734.0], [817.0, 734.0]], ('names', 0.9950763583183289)]
[[[934.0, 704.0], [994.0, 699.0], [997.0, 732.0], [936.0, 737.0]], ('are', 0.9981686472892761)]
[[[1003.0, 702.0], [1064.0, 702.0], [1064.0, 734.0], [1003.0, 734.0]], ('not', 0.9824116230010986)]
[[[1065.0, 698.0], [1212.0, 694.0], [1213.0, 731.0], [1066.0, 735.0]], ('Credited', 0.9878785610198975)]
[[[396.0, 748.0], [464.0, 748.0], [464.0, 788.0], [396.0, 788.0]], ('but', 0.9950106739997864)]
[[[469.0, 749.0], [561.0, 756.0], [558.0, 794.0], [466.0, 787.0]], ('have', 0.9998989105224609)]
[[[567.0, 752.0], [667.0, 752.0], [667.0, 789.0], [567.0, 789.0]], ('made', 0.9979819059371948)]
[[[677.0, 752.0], [815.0, 748.0], [816.0, 789.0], [678.0, 793.0]], ('specific', 0.9752350449562073)]
[[[822.0, 753.0], [919.0, 753.0], [919.0, 791.0], [822.0, 791.0]], ('input', 0.9872061014175415)]
[[[926.0, 753.0], [961.0, 753.0], [961.0, 784.0], [926.0, 784.0]], ('1n', 0.5861291885375977)]
[[[971.0, 750.0], [1036.0, 750.0], [1036.0, 784.0], [971.0, 784.0]], ('this', 0.9995046854019165)]
[[[1048.0, 750.0], [1146.0, 750.0], [1146.0, 788.0], [1048.0, 788.0]], ('book,', 0.9974652528762817)]
[[[1157.0, 753.0], [1213.0, 753.0], [1213.0, 788.0], [1157.0, 788.0]], ('we', 0.7877120971679688)]
[[[397.0, 799.0], [504.0, 804.0], [503.0, 843.0], [395.0, 839.0]], ('thank', 0.9987764358520508)]
[[[506.0, 803.0], [578.0, 803.0], [578.0, 845.0], [506.0, 845.0]], ('you', 0.992954432964325)]
[[[579.0, 803.0], [640.0, 803.0], [640.0, 843.0], [579.0, 843.0]], ('for', 0.994827926158905)]
[[[640.0, 807.0], [726.0, 807.0], [726.0, 845.0], [640.0, 845.0]], ('your', 0.9916614294052124)]
[[[735.0, 803.0], [929.0, 803.0], [929.0, 838.0], [735.0, 838.0]], ('Continuous', 0.9704574346542358)]
[[[940.0, 805.0], [1085.0, 805.0], [1085.0, 841.0], [940.0, 841.0]], ('Support.', 0.9692855477333069)]
|
Beta Was this translation helpful? Give feedback.
-
The warnings and logs you are encountering during PaddleOCR execution, such as 1. Explanation of the LogsWarnings:
Debug Messages:
2. Common Causes of Warnings
3. Steps to ResolveStep 1: Verify GPU Compatibility
Step 2: Increase GPU Memory Allocation
Step 3: Disable Debug Logs
Step 4: Use TensorRT for Optimization (Optional)
Step 5: Explicitly Specify GPU ID
Step 6: Check Model Paths
4. Additional TroubleshootingRelated Discussions
Related Issues
5. Cleaned Configuration RecommendationHere’s a cleaned version of your configuration for improved stability: ocr = PaddleOCR(
use_gpu=True,
gpu_id=0,
gpu_mem=1024, # Increased memory allocation
use_tensorrt=False, # Enable if TensorRT is set up
rec_batch_num=4, # Reduce batch size if memory issues occur
show_log=False # Disable debug logs for cleaner output
) 6. ConclusionBy following the steps above, you should be able to resolve the unexpected warnings and improve the stability and performance of your PaddleOCR environment. If the issue persists, consider sharing a minimal reproducible example and double-checking your CUDA/cuDNN setup. Response generated by 🤖 feifei-bot | chatgpt-4o-latest |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🔎 Search before asking
🐛 Bug (问题描述)
I keep getting unexpected GPU and Debug warnings whenever printing Detection + Recognition results
🏃♂️ Environment (运行环境)
OS: Windows 10 Home 22H2
Environment: anaconda
Python: 3.11.2
PaddleOCR: 3.0.0b1
Install: pip
RAM: 8GB DDR4-3200 SO-DIMM
CPU: AMD Ryzen™ 9 4900HS Mobile Processor
CUDA: V12.6.85
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
Beta Was this translation helpful? Give feedback.
All reactions