- 28 Oct, 2024 1 commit
-
-
icecraft authored
-
- 27 Oct, 2024 2 commits
-
-
myhloli authored
- Modify the logic for splitting wide blocks exceeding 0.4 page width - Remove the specific case for blocks exceeding 0.25 page width - Add comments to explain the reasoning behind different splitting strategies
-
myhloli authored
- Update model download instructions for versions 0.9.x and later - Simplify demo scripts by removing unnecessary model configuration - Add visualization function to draw bounding boxes - Update CLI help message with new URL
-
- 26 Oct, 2024 1 commit
-
-
myhloli authored
- Add support for drawing bounding boxes of table and image sub-blocks - Implement sorting of table blocks based on type order - Update bounding box drawing for text and title blocks - Refactor code to handle different block types and their sub-blocks
-
- 25 Oct, 2024 7 commits
-
-
myhloli authored
-
myhloli authored
-
icecraft authored
-
myhloli authored
- Lower the Y-axis overlap threshold for merging spans into lines from0.6 to 0.5 - Reduce the unclip ratio for OCR detection from 2.4 to 1.8
-
myhloli authored
- Split image and table blocks into separate categories - Add group_id to image and table blocks- Update block processing logic to handle new categories - Modify layout splitting and span filling to accommodate new block types - Adjust block indexing and sorting to consider new structures
-
icecraft authored
-
icecraft authored
-
- 24 Oct, 2024 3 commits
- 23 Oct, 2024 1 commit
-
-
myhloli authored
- Add new layout model option: DocLayout-YOLO - Implement model initialization and prediction for DocLayout-YOLO - Update configuration options to include new model- Modify existing code to support both LayoutLMv3 and DocLayout-YOLO models - Update Gradio app to support more Custom Switch
-
- 21 Oct, 2024 2 commits
-
-
myhloli authored
- Modified the condition to include List and Index block types- This change enhances the function's capability to process different paragraph types
-
myhloli authored
- Adjust the threshold for identifying index blocks from 3 lines to 2 lines - Add a new function __is_list_group to detect if a group of blocks is a list - Modify the paragraph merging logic to handle list groups differently
-
- 18 Oct, 2024 1 commit
-
-
myhloli authored
- Remove unused parameters parse_type and lang from various functions - Simplify function calls by removing unnecessary arguments - Update related files to reflect these changes
-
- 17 Oct, 2024 1 commit
-
-
myhloli authored
- Remove unused functions such as split_long_words, ocr_mk_mm_markdown_with_para, etc. - Simplify ocr_mk_markdown_with_para_core_v2 by removing unnecessary language detection and word splitting logic- Remove wordninja dependency from requirements - Update ocr_model_init to include additional parameters for OCR model configuration
-
- 15 Oct, 2024 4 commits
-
-
myhloli authored
- Update list block detection logic to require at least 2 numeric start lines - Ensure the number of numeric start lines matches the number of end lines - Remove detection of non-border starting lines for simplicity
-
myhloli authored
-
myhloli authored
Increased the threshold for filling spans in blocks from 0.3 to 0.5 to improve the accuracy of block formation. This change helps refine the grouping of spans into blocks, potentially enhancing the overall structure and readability of the PDF content.
-
myhloli authored
- Combine __is_list_block() and __is_index_block() into a single function __is_list_or_index_block() - Simplify block type determination logic - Remove redundant code and improve readability - Optimize block merging process
-
- 14 Oct, 2024 2 commits
-
-
myhloli authored
Add List and Index to the list of block types being processed in the draw_bbox.py file. This inclusion ensures that these block types are handled similarly to other text-containing blocks, improving the overall document processing accuracy and consistency.
-
myhloli authored
- Add detection for list and index blocks in OCR processing- Implement merging of list and index blocks across pages - Update block types to include list and index categories - Adjust text merging logic to handle new block types - Modify layout drawing to distinguish list and index blocks
-
- 10 Oct, 2024 2 commits
-
-
myhloli authored
-
myhloli authored
- Reintegrate para_split_v3 into the pdf_parse_union_core_v2 process - Add support for specifying page range in doc_analyze_by_custom_model - Implement garbage collection and memory cleaning after processing - Refine image loading from PDF, including handling out-of-range pages
-
- 08 Oct, 2024 5 commits
-
-
myhloli authored
- Add function to get local LayoutReader model directory- Check and use local model directory if available - Fall back to online model if local directory not found - Update model initialization to support local path - Refactor model loading in singleton class
-
icecraft authored
-
icecraft authored
-
myhloli authored
- Introduce a conditional memory cleanup step in the PDF extraction process - Assess available GPU memory before deciding to perform memory cleanup- Log the time taken for garbage collection when it occurs - This optimization helps to balance performance and resource utilization
-
myhloli authored
feat: add arXiv paper link to header and adjust PDF parsing logic- Add arXiv paper link to the header template for easy access to the latest research paper. - Modify the PDF parsing logic to handle edge cases more accurately, particularly in determining the number of lines in a block based on its height.
-
- 06 Oct, 2024 1 commit
-
-
myhloli authored
- Enhance timing output precision to two decimal places for better readability- Calculate and log document analysis speed in pages per second - Optimize logging for YOLO and table recognition processes - Remove unnecessary comments and improve code efficiency
-
- 30 Sep, 2024 1 commit
-
-
myhloli authored
-
- 29 Sep, 2024 2 commits
-
-
myhloli authored
- Insert lines into blocks based on median line height- Calculate block index using line indices median - Remove virtual line information for table and image blocks - Enhance line sorting algorithm for different block types - Add line height calculation function
-
myhloli authored
The clean_memory function has been removed from pdf_parse_union_core_v2.py due to it not being used. This change streamlines the code and prevents potential confusion regarding its purpose.
-
- 28 Sep, 2024 3 commits
-
-
myhloli authored
Update import statements in `pdf_parse_union_core_v2.py` to directly import `prepare_inputs`, `boxes2inputs`, and `parse_logits` from `magic_pdf.model.v3.helpers` instead of from `magic_pdf.model.v3`. This change streamlines the imports, making the code more readable and maintaining a cleaner approach to modular design.
-
myhloli authored
Adapt import statements in `pdf_parse_union_core_v2.py` to reflect the updated packagestructure, changing from the `magic_pdf.v3.helpers` module to the `magic_pdf.model.v3` module. This ensures compatibility with the revised directory layout.
-
myhloli authored
Blocks without lines are now correctly indexed even when they contain textual content rendered as images. The sorting logic has been updated to accommodate this scenario. Additionally, the LayoutLMv3 model initialization has been enhanced to utilize bfloat16 precision on devices that support it, offering potential performance benefits on supported hardware.
-
- 27 Sep, 2024 1 commit
-
-
myhloli authored
Removed redundant sorting of lines by model and optimized calculation of block indexes by using a single pass through the sorted lines. This change simplifies the code and potentially improves performance by reducing the number of sortingoperations and unnecessary iterations over blocks without lines.
-