Skip to main content

A simplified and faster implementation of doclayout-yolo for document layout inference

Project description

DocLayout-YOLO-Slim

This library is just a lightweight slim version of the original doclayout-yolo library focued on inference of the models that were developed by OpenDataLab.

Installation

From PyPI (Coming Soon)

pip install doclayout-yolo-slim

From Source

git clone https://github.com/yourusername/doclayout-yolo-slim.git
cd doclayout-yolo-slim
pip install -e .

Using uv

uv add doclayout-yolo-slim

Quick Start

from doclayout_yolo_slim.models import YOLOv10

# Load the model
model = YOLOv10(model="doclayout_yolo_docsynth300k_imgsz1600.pt")

# Run inference
results = model.predict("path/to/your/image.png")
print(results)

Model Files

You'll need the pre-trained model file with original library. The example uses doclayout_yolo_docsynth300k_imgsz1600.pt which should be placed in your project directory or specify the full path.

Requirements

  • Python >= 3.11
  • PyTorch >= 2.7.1
  • OpenCV >= 4.11.0
  • NumPy >= 2.3.1
  • Other dependencies listed in pyproject.toml

Performance

This slim implementation offers:

  • Reduced memory usage
  • Faster inference times
  • Smaller package size
  • Simplified codebase for easier maintenance

License

This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

  • Based on the original ultralytics YOLO implementation
  • Inspired by doclayout-yolo for document layout analysis
  • Optimized for production use cases requiring speed and efficiency

Changelog

v0.1.0

  • Initial release
  • Simplified YOLOv10 implementation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doclayout_yolo_slim-0.1.0.tar.gz (182.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doclayout_yolo_slim-0.1.0-py3-none-any.whl (152.1 kB view details)

Uploaded Python 3

File details

Details for the file doclayout_yolo_slim-0.1.0.tar.gz.

File metadata

  • Download URL: doclayout_yolo_slim-0.1.0.tar.gz
  • Upload date:
  • Size: 182.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for doclayout_yolo_slim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 560d74fa8b69b970ac58a9027a4aa19714572e9fc0c1516e78d16e258edaf676
MD5 9ff726617467ccab993fe2e59900187b
BLAKE2b-256 3ad6466c11a531df600f23075d144aeb6d84f25de3c25adf0a7ada1975c024fa

See more details on using hashes here.

File details

Details for the file doclayout_yolo_slim-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for doclayout_yolo_slim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdf3ebffdd4c86b5f7ada82f6f91d1c9e479995acedfc0f856fb9ff15f9b9957
MD5 aa5a880de116714c38c659c41689387d
BLAKE2b-256 093cb473145d20307f82e7801be74087a1dd6deac8596ad7a6752b436305a732

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page