CoolFace
Modelpublic

PaddlePaddle/RT-DETR-L_wireless_table_cell_det_safetensors

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
1likes90downloads
Model Card

RT-DETR-Lwirelesstablecelldet

Introduction

The Table Cell Detection Module is a key component of the table recognition task, responsible for locating and marking each cell region in table images. The performance of this module directly affects the accuracy and efficiency of the entire table recognition process. The Table Cell Detection Module typically outputs bounding boxes for each cell region, which are then passed as input to the table recognition pipeline for further processing.

<table> <tr> <th>Model</th> <th>Top1 Acc(%)</th> <th>GPU Inference Time (ms)<br/>[Regular Mode / High-Performance Mode]</th> <th>CPU Inference Time (ms)<br/>[Regular Mode / High-Performance Mode]</th> <th>Model Storage Size (M)</th> </tr> <tr> <td>RT-DETR-Lwirelesstablecelldet</td> <td>82.7</td> <td>35.00 / 10.45</td> <td>495.51 / 495.51</td> <td>124M</td> </tr> </table>

Note: The accuracy of RT-DETR-Lwirelesstablecelldet comes from the results of joint testing with RT-DETR-Lwiredtablecelldet.

Model Usage

python
import requests
from PIL import Image
from transformers import AutoImageProcessor, AutoModelForObjectDetection

model_path = "PaddlePaddle/RT-DETR-L_wireless_table_cell_det_safetensors"
model = AutoModelForObjectDetection.from_pretrained(model_path)
image_processor = AutoImageProcessor.from_pretrained(model_path)

image = Image.open(requests.get("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/table_recognition.jpg", stream=True).raw)
inputs = image_processor(images=image, return_tensors="pt")

outputs = model(**inputs)
results = image_processor.post_process_object_detection(outputs, target_sizes=[image.size[::-1]])
for result in results:
    for score, label_id, box in zip(result["scores"], result["labels"], result["boxes"]):
        score, label = score.item(), label_id.item()
        box = [round(i, 2) for i in box.tolist()]
        print(f"{model.config.id2label[label]}: {score:.2f} {box}")