AB
AiBoss
project

MinerU - An open-source intelligent data extraction tool developed by OpenDataLab

MinerU is an open-source intelligent data extraction tool developed by the OpenDataLab team at the Shanghai Artificial Intelligence Laboratory. It focuses on the efficient parsing and extraction of complex PDF documents. MinerU can extract data from multi-modal PDF documents containing images, formulas, tables, and other elements...

What is MinerU?

MinerU is an open-source intelligent data extraction tool developed by the OpenDataLab team at the Shanghai Artificial Intelligence Laboratory. It focuses on the efficient parsing and extraction of complex PDF documents. MinerU can convert multimodal PDF documents containing images, formulas, tables, and other elements into easily analyzable Markdown format. It supports content extraction from web pages and ebooks, improving the efficiency of AI corpus preparation. MinerU features a high-precision PDF model parsing toolchain, supports multiple input models, automatically identifies garbled characters, preserves document structure, converts formulas to LaTeX, and is suitable for multiple fields such as academia, finance, and law. It supports both CPU and GPU, is compatible with Windows/Linux/Mac platforms, and boasts excellent performance.

MinerU's main functions

  • PDF to Markdown conversionConvert PDF documents containing various content types into a structured Markdown format for easier editing and analysis.
  • Multimodal content processingIt can recognize and process various content in PDFs, including images, formulas, tables, and text.
  • Structure and formatting preservedDuring the conversion process, the original document's structure and formatting, such as headings, paragraphs, and lists, are preserved.
  • Formula recognition and conversionSpecifically designed for mathematical formulas, it can recognize and convert them into LaTeX format, facilitating academic communication and technical documentation.
  • Removal of interfering elementsAutomatically removes non-content elements such as headers, footers, footnotes, and page numbers to purify document information.
  • Garbled character recognition and processingAutomatically identifies and corrects garbled characters in PDF documents, improving the accuracy of information extraction.
  • High-quality parsing toolchainIt integrates advanced PDF parsing tools, including layout detection, formula detection, and optical character recognition (OCR), ensuring high accuracy of extraction results.

MinerU's technical principles

  • PDF document classification and preprocessingBefore processing PDF documents, MinerU first categorizes the documents, identifies their type (such as text, layered, or scanned PDF), and performs corresponding preprocessing, such as detecting garbled characters and identifying whether the document is scanned.
  • Model analysis and content extraction:
    • Layout detectionUsing deep learning-based models, such as LayoutLMv3, to perform region detection and identify different regions in a document, such as images, tables, headings, and text.
    • Formula detectionIt uses a self-developed model based on YOLOv8 to identify mathematical formulas in documents and distinguish between inline formulas and cross-line formulas.
    • Formula recognitionIt uses its self-developed UniMERNet model to identify and parse mathematical formulas, converting them into LaTeX format.
    • Optical Character Recognition (OCR)Use OCR technologies such as PaddleOCR to recognize the text content in a document.
  • Pipeline treatmentThe data obtained from model analysis is input into the processing pipeline for post-processing, including:
    • Determine the block-level order.
    • Delete useless elements.
    • The content is sorted and assembled according to the layout to ensure the smoothness of the main text.
    • Perform operations such as coordinate repair, high IOU processing, merging image and table descriptions, formula replacement, icon dumping, and layout sorting.
  • Output in multiple formatsThe processed document information can be converted into a unified intermediate format (middle-json) and output in different formats as needed, such as Layout, Span, Markdown, or Content list.
  • PDF extraction result quality inspectionThe entire process was evaluated using a manually annotated PDF self-test dataset to ensure optimized extraction results. Visual quality control tools were used for manual quality checks and annotation, providing feedback to the model training to further improve its capabilities.

MinerU's project address

Application scenarios of MinerU

  • academic researchResearchers can extract key information from academic papers and journals, including text, formulas, and charts, to support literature reviews and data analysis.
  • Legal document processingLegal professionals can use MinerU to extract terms and evidence from contracts, legal opinions, and other legal documents, improving their work efficiency.
  • Technical document managementEngineers and technical authors can extract technical specifications and operating procedures from technical manuals and product documents, which facilitates knowledge management and technology dissemination.
  • Knowledge Management and Information RetrievalEnterprises and organizations can use MinerU to extract information from their internal document repositories, build knowledge bases, and improve the efficiency of information retrieval.
  • Data mining and Natural Language Processing (NLP)Data scientists and NLP researchers can use the data extracted by MinerU to train and optimize machine learning models.