yolov8m table extraction

Providerkeremberke
Categoryobject-detection
Licenseagpl-3.0
Downloads1.8K
Stars0

Overview

The yolov8m table extraction model is a medium-sized object detection weights set optimized specifically for identifying and bounding tabular structures within documents and images. Unlike general-purpose OCR, this model focuses on the spatial localization of tables, making it an ideal preprocessing step for document AI pipelines. Developers can integrate it into workflows to isolate tables before passing them to specialized parsing tools like Table Transformer or PaddleOCR. By leveraging the YOLOv8 architecture, it offers a strong balance between inference speed and mean Average Precision (mAP), ensuring reliable detection even in complex layouts without the heavy computational overhead of larger transformer-based detectors.

Highlights

  • Fast, real-time table localization using YOLOv8m architecture
  • Ideal preprocessing for structured document data extraction
  • Optimized balance between detection accuracy and inference latency
  • Easy integration into existing computer vision pipelines
  • AGPL-3.0 licensed for flexible developer implementation

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("keremberke/yolov8m-table-extraction")
tokenizer = AutoTokenizer.from_pretrained("keremberke/yolov8m-table-extraction")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download keremberke/yolov8m-table-extraction

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download keremberke/yolov8m-table-extraction config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('keremberke/yolov8m-table-extraction')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/keremberke/yolov8m-table-extraction

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/keremberke/yolov8m-table-extraction

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('keremberke/yolov8m-table-extraction')
tokenizer = AutoTokenizer.from_pretrained('keremberke/yolov8m-table-extraction')

Model Download

We recommend downloading the model via the ModelScope CLI or SDK.

Guidance:Before downloading, install ModelScope with:

Guidance
pip install modelscope

CLI Download

Download the full repository

Download the full repository
modelscope download --model keremberke/yolov8m-table-extraction

Download a single file to a local folder (e.g. README.md into ./dir)

Download a single file to a local folder (e.g. README.md into ./dir)
modelscope download --model keremberke/yolov8m-table-extraction README.md --local_dir ./dir

See the docs for more CLI options

SDK Download

SDK Download
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('keremberke/yolov8m-table-extraction')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://www.modelscope.cn/keremberke/yolov8m-table-extraction.git

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/keremberke/yolov8m-table-extraction.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook Quickstart

Install the ModelScope library

Install the ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

Load the model and run inference

Load the model and run inference
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

p = pipeline('text-generation', 'keremberke/yolov8m-table-extraction')

Full Documentation

来源: HuggingFace

---
tags:

  • ultralyticsplus

  • yolov8

  • ultralytics

  • yolo

  • vision

  • object-detection

  • pytorch

  • awesome-yolov8-models

library_name: ultralytics
library_version: 8.0.21
inference: false
datasets:
  • keremberke/table-extraction

model-index:
  • name: keremberke/yolov8m-table-extraction

results:
- task:
type: object-detection
dataset:
type: keremberke/table-extraction
name: table-extraction
split: validation
metrics:
- type: precision
value: 0.95194
name: [email protected](box)
license: agpl-3.0
---

<div align="center">
<img width="640" alt="keremberke/yolov8m-table-extraction" src="https://huggingface.co/keremberke/yolov8m-table-extraction/resolve/main/thumbnail.jpg">
</div>

Supported Labels

code
['bordered', 'borderless']

How to use

bash
pip install ultralyticsplus==0.0.23 ultralytics==8.0.21
  • Load model and perform prediction:
python
from ultralyticsplus import YOLO, render_result

load model

model = YOLO('keremberke/yolov8m-table-extraction')

set model parameters

model.overrides['conf'] = 0.25 # NMS confidence threshold model.overrides['iou'] = 0.45 # NMS IoU threshold model.overrides['agnostic_nms'] = False # NMS class-agnostic model.overrides['max_det'] = 1000 # maximum number of detections per image

set image

image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'

perform inference

results = model.predict(image)

observe results

print(results[0].boxes) render = render_result(model=model, image=image, result=results[0]) render.show()

More models available at: awesome-yolov8-models

Join our Telegram