Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文档内容提取样例运行错误 #195

Open
SmartFive opened this issue Dec 10, 2024 · 4 comments
Open

文档内容提取样例运行错误 #195

SmartFive opened this issue Dec 10, 2024 · 4 comments

Comments

@SmartFive
Copy link

SmartFive commented Dec 10, 2024

运行文档内容提取项目样例,python project/pdf2markdown/scripts/run_project.py --config project/pdf2markdown/configs/pdf2markdown.yaml出现以下报错,请问是什么原因。debug出现xmin大于xmax,ymin大于ymax,image为None等错误。

运行输出:
/home/wangyuting/anaconda3/envs/pdf-extract-kit/lib/python3.10/site-packages/torchtext/data/init.py:4: UserWarning:
/!\ IMPORTANT WARNING ABOUT TORCHTEXT STATUS /!
Torchtext is deprecated and the last released version will be 0.18 (this one). You can silence this warning by calling the following at the beginnign of your scripts: import torchtext; torchtext.disable_torchtext_deprecation_warning()
warnings.warn(torchtext._TORCHTEXT_DEPRECATION_MSG)
import tensorrt_llm failed, if do not use tensorrt, ignore this message
CustomVisionEncoderDecoderModel init
VariableUnimerNetModel init
VariableUnimerNetPatchEmbeddings init
VariableUnimerNetModel init
VariableUnimerNetPatchEmbeddings init
CustomMBartForCausalLM init
CustomMBartDecoder init
[2024/12/10 07:57:26] ppocr DEBUG: Namespace(help='==SUPPRESS==', use_gpu=True, use_xpu=False, use_npu=False, ir_optim=True, use_tensorrt=False, min_subgraph_size=15, precision='fp32', gpu_mem=500, gpu_id=0, image_dir=None, page_num=0, det_algorithm='DB', det_model_dir='models/OCR/PaddleOCR/det/ch_PP-OCRv4_det', det_limit_side_len=960, det_limit_type='max', det_box_type='quad', det_db_thresh=0.3, det_db_box_thresh=0.3, 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_pse_thresh=0, det_pse_box_thresh=0.85, det_pse_min_area=16, det_pse_scale=1, scales=[8, 16, 32], alpha=1.0, beta=1.0, fourier_degree=5, rec_algorithm='SVTR_LCNet', rec_model_dir='models/OCR/PaddleOCR/rec/ch_PP-OCRv4_rec', rec_image_inverse=True, rec_image_shape='3, 48, 320', rec_batch_num=6, max_text_length=25, rec_char_dict_path='/home/wangyuting/anaconda3/envs/pdf-extract-kit/lib/python3.10/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=False, cls_model_dir='/home/wangyuting/.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, re_model_dir=None, use_visual_backbone=True, 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, use_pdf2docx_api=False, invert=False, binarize=False, alphacolor=(255, 255, 255), lang='ch', det=True, rec=True, type='ocr', ocr_version='PP-OCRv4', structure_version='PP-StructureV2')
formula nums: 244 mfr time: 151.7
[2024/12/10 08:01:09] ppocr WARNING: Since the angle classifier is not initialized, it will not be used during the forward process


C++ Traceback (most recent call last):

0 paddle::AnalysisPredictor::ZeroCopyRun()
1 paddle::framework::NaiveExecutor::Run()
2 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, phi::Place const&)
3 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, phi::Place const&) const
4 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, phi::Place const&, paddle::framework::RuntimeContext*) const
5 void phi::KernelImpl<void ()(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&, paddle::optionalphi::DenseTensor const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::string const&, std::vector<int, std::allocator > const&, int, std::string const&, std::string const&, std::vector<int, std::allocator > const&, bool, int, float, phi::DenseTensor, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >), &(void phi::fusion::FusedConv2dAddActKernel<float, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&, paddle::optionalphi::DenseTensor const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::string const&, std::vector<int, std::allocator > const&, int, std::string const&, std::string const&, std::vector<int, std::allocator > const&, bool, int, float, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >))>::KernelCallHelper<paddle::optionalphi::DenseTensor const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::string const&, std::vector<int, std::allocator > const&, int, std::string const&, std::string const&, std::vector<int, std::allocator > const&, bool, int, float, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >, phi::TypeTag >::Compute<1, 3, 0, 0, phi::GPUContext const, phi::DenseTensor const, phi::DenseTensor const, phi::DenseTensor const>(phi::KernelContext*, phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&)
6 void phi::fusion::FusedConv2dAddActKernel<float, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&, paddle::optionalphi::DenseTensor const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::string const&, std::vector<int, std::allocator > const&, int, std::string const&, std::string const&, std::vector<int, std::allocator > const&, bool, int, float, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >)
7 phi::fusion::(anonymous namespace)::CudnnConvDescManager::GetCudnnCacheInfo(std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, phi::DataType, int, cudnnDataType_t, cudnnTensorFormat_t, std::function<void (cudnnConvolutionFwdAlgo_t*, unsigned long*, cudnnTensorStruct*, cudnnFilterStruct*, cudnnTensorStruct*, cudnnConvolutionStruct*)> const&, std::string const&, double)
8 phi::fusion::FusedConv2dAddActKernel<float, phi::GPUContext>(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&, paddle::optionalphi::DenseTensor const&, std::vector<int, std::allocator > const&, std::vector<int, std::allocator > const&, std::string const&, std::vector<int, std::allocator > const&, int, std::string const&, std::string const&, std::vector<int, std::allocator > const&, bool, int, float, phi::DenseTensor*, std::vector<phi::DenseTensor*, std::allocatorphi::DenseTensor* >)::{lambda(cudnnConvolutionFwdAlgo_t*, unsigned long*, cudnnTensorStruct*, cudnnFilterStruct*, cudnnTensorStruct*, cudnnConvolutionStruct*)#2}::operator()(cudnnConvolutionFwdAlgo_t*, unsigned long*, cudnnTensorStruct*, cudnnFilterStruct*, cudnnTensorStruct*, cudnnConvolutionStruct*) const


Error Message Summary:

FatalError: Erroneous arithmetic operation is detected by the operating system.
[TimeInfo: *** Aborted at 1733817670 (unix time) try "date -d @1733817670" if you are using GNU date ***]
[SignalInfo: *** SIGFPE (@0x7f9b109050c6) received by PID 3747002 (TID 0x7f9f5bf9f740) from PID 277893318 ***]

Floating point exception (core dumped)

@SmartFive
Copy link
Author

参考教程配置了环境并下载了模型,运行公式检测样例结果如下,与展示结果差距较大,请问是什么原因。
image
wikipedia_sce_MFD

@SmartFive SmartFive changed the title 样例运行错误 文档内容提取样例运行错误 Dec 10, 2024
@wufan-tb
Copy link
Collaborator

具体运行的命令是哪个呢

@SmartFive
Copy link
Author

具体运行的命令是哪个呢

这两个运行命令
python project/pdf2markdown/scripts/run_project.py --config project/pdf2markdown/configs/pdf2markdown.yaml
python scripts/formula_detection.py --config configs/formula_detection.yaml

@myhloli
Copy link
Collaborator

myhloli commented Dec 11, 2024

参考教程配置了环境并下载了模型,运行公式检测样例结果如下,与展示结果差距较大,请问是什么原因。

image

wikipedia_sce_MFD

这个一般是cuda版本,显卡驱动版本,torch版本中的某个或多个与显卡型号和系统版本不兼容导致的,可以把这些信息都列出来看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants