cmarkea / detr-layout-detection

huggingface.co
Total runs: 459
24-hour runs: 7
7-day runs: 66
30-day runs: -686
Model's Last Updated: February 25 2025
object-detection

Introduction of detr-layout-detection

Model Details of detr-layout-detection

DETR-layout-detection

We present the model cmarkea/detr-layout-detection, which allows extracting different layouts (Text, Picture, Caption, Footnote, etc.) from an image of a document. This is a fine-tuning of the model detr-resnet-50 on the DocLayNet dataset. This model can jointly predict masks and bounding boxes for documentary objects. It is ideal for processing documentary corpora to be ingested into an ODQA system.

This model allows extracting 11 entities, which are: Caption, Footnote, Formula, List-item, Page-footer, Page-header, Picture, Section-header, Table, Text, and Title.

Performance

In this section, we will assess the model's performance by separately considering semantic segmentation and object detection. In both cases, no post-processing was applied after estimation.

For semantic segmentation, we will use the F1-score to evaluate the classification of each pixel. For object detection, we will assess performance based on the Generalized Intersection over Union (GIoU) and the accuracy of the predicted bounding box class. The evaluation is conducted on 500 pages from the PDF evaluation dataset of DocLayNet.

Class f1-score (x100) GIoU (x100) accuracy (x100)
Background 94.27 NA NA
Caption 72.08 67.17 43.45
Footnote 0 67.33 0
Formula 83 72.7 93.92
List-item 73.12 70.62 90.26
Page-footer 85.37 67.66 97.42
Page-header 65.55 71.54 85.24
Picture 77.66 80.92 91.19
Section-header 67.84 69.25 85.85
Table 79.75 81.76 90.13
Text 89.74 79.51 88
Title 48.74 52.04 36.67
Benchmark

Now, let's compare the performance of this model with other models.

Class f1-score (x100) GIoU (x100) accuracy (x100)
cmarkea/detr-layout-detection 89.72 76.42 87.06
cmarkea/dit-base-layout-detection 90.77 56.29 85.26
Direct Use
from transformers import AutoImageProcessor
from transformers.models.detr import DetrForSegmentation

img_proc = AutoImageProcessor.from_pretrained(
    "cmarkea/detr-layout-detection"
)
model = DetrForSegmentation.from_pretrained(
    "cmarkea/detr-layout-detection"
)

with torch.inference_mode():
    input_ids = img_proc(img, return_tensors='pt')
    output = model(**input_ids)

threshold=0.4

segmentation_mask = img_proc.post_process_segmentation(
    out_seg,
    threshold=threshold,
    target_sizes=[img.size[::-1]]
)

bbox_pred = img_proc.post_process_object_detection(
    output,
    threshold=threshold,
    target_sizes=[img.size[::-1]]
)
Citation
@online{DeDetrLay,
  AUTHOR = {Cyrile Delestre},
  URL = {https://huggingface.co/cmarkea/detr-base-layout-detection},
  YEAR = {2024},
  KEYWORDS = {Image Processing ; Transformers ; Layout},
}

Runs of cmarkea detr-layout-detection on huggingface.co

459
Total runs
7
24-hour runs
1
3-day runs
66
7-day runs
-686
30-day runs

More Information About detr-layout-detection huggingface.co Model

More detr-layout-detection license Visit here:

https://choosealicense.com/licenses/apache-2.0

detr-layout-detection huggingface.co

detr-layout-detection huggingface.co is an AI model on huggingface.co that provides detr-layout-detection's model effect (), which can be used instantly with this cmarkea detr-layout-detection model. huggingface.co supports a free trial of the detr-layout-detection model, and also provides paid use of the detr-layout-detection. Support call detr-layout-detection model through api, including Node.js, Python, http.

detr-layout-detection huggingface.co Url

https://huggingface.co/cmarkea/detr-layout-detection

cmarkea detr-layout-detection online free

detr-layout-detection huggingface.co is an online trial and call api platform, which integrates detr-layout-detection's modeling effects, including api services, and provides a free online trial of detr-layout-detection, you can try detr-layout-detection online for free by clicking the link below.

cmarkea detr-layout-detection online free url in huggingface.co:

https://huggingface.co/cmarkea/detr-layout-detection

detr-layout-detection install

detr-layout-detection is an open source model from GitHub that offers a free installation service, and any user can find detr-layout-detection on GitHub to install. At the same time, huggingface.co provides the effect of detr-layout-detection install, users can directly use detr-layout-detection installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

detr-layout-detection install url in huggingface.co:

https://huggingface.co/cmarkea/detr-layout-detection

Url of detr-layout-detection

detr-layout-detection huggingface.co Url

Provider of detr-layout-detection huggingface.co

cmarkea
ORGANIZATIONS

Other API from cmarkea