DocLayout-YOLO: Enhancing Document Layout Analysis through Diverse Synthetic Data and Global-to-Local Adaptive Perception
Paper
•
2410.12628
•
Published
•
41
Document layout detection model. Paper: DocLayout-YOLO
titleplain_textabandonfigurefigure_captiontabletable_captiontable_footnoteisolate_formulaformula_captionpip install anyformat-doclayout
from anyformat.doclayout import DocLayoutModel, download_converted
# Download weights from this repo
weights = download_converted("docstructbench")
# Run inference
model = DocLayoutModel(weights)
results = model.predict("document.png")
for det in results:
print(f"{det['class_name']}: {det['confidence']:.2f}")