/ Модель

Характеристики

Параметры
6,3 млн
Архитектура
table-transformer · dense
Базовая модель
table-transformer-detection
Библиотека
transformers
Опубликована
24 ноя 2024

table-transformer-detection-ifrs

Поиск объектовИзображение → bounding_boxes3 профессии

Дообученная модель Table Transformer для обнаружения обычных и повёрнутых таблиц в сканах финансовых документов IFRS.

19скачиваний за 30 дней5лайковвеса обновлены15 дек 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Модель apkonsta/table-transformer-detection-ifrs — дообученная версия Table Transformer от автора apkonsta для обнаружения таблиц в PDF-документах и сканах по стандартам МСФО (IFRS). Она основана на microsoft/table-transformer-detection и использует архитектуру Table Transformer для детекции объектов. Модель обучена на 2359 сканах IFRS, в том числе для поиска таблиц без границ; распознаёт два класса: обычные и повёрнутые таблицы. Репозиторий содержит веса safetensors и рассчитан на использование с библиотекой Transformers.

Модель подходит для нахождения областей таблиц на страницах финансовой отчётности перед последующим извлечением их структуры и содержимого. Она выдаёт рамки объектов, а не распознанный текст или готовые табличные данные. Специализация на документах IFRS и сканах с таблицами без границ может ограничивать качество на других типах документов; сведения о лицензии в предоставленных источниках отсутствуют.

Сценарии применения

  • поиск таблиц в сканах финансовой отчётности по МСФО
  • обнаружение таблиц без границ в PDF-документах
  • нахождение повёрнутых таблиц на страницах документов
  • подготовка областей таблиц к последующему извлечению данных

Ограничения

Модель обучена на сканах IFRS и может хуже работать с документами других типов. Она определяет области таблиц, но сама не извлекает их текст и структуру; лицензия в предоставленных источниках не указана.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Card for Model ID

This repository contains a fine-tuned version of the Table Transformer model, specifically adapted for detecting tables in IFRS (International Financial Reporting Standards) PDFs. The model is based on the Table Transformer architecture, which is designed to extract tables from unstructured documents such as PDFs and images.

Model Details

Base Model: microsoft/table-transformer-detection
Library: transformers
Training Data: The model was trained on a dataset consisting of 2359 IFRS scans, with a focus on detecting tables without borders.
Classes: The model is trained to detect two classes: 0 - table (regular tables) and 1 - table_rotated (rotated tables).

Example Image

model image

Usage

from transformers import DetrForObjectDetection, DetrImageProcessor
from PIL import Image
import torch

# Load the image processor and model
# DetrImageProcessor is used to preprocess the images before feeding them to the model
image_processor = DetrImageProcessor()

# Load the pre-trained TableTransformer model for object detection
# This model is specifically trained for detecting tables in IFRS documents
model = TableTransformerForObjectDetection.from_pretrained(
    "apkonsta/table-transformer-detection-ifrs",
)

# Prepare the image
# Open the image file and convert it to RGB format
image = Image.open("path/to/your/ifrs_pdf_page.png").convert("RGB")

# Table detection threshold
# Set a threshold for detecting tables; only detections with a confidence score above this threshold will be considered
TD_th = 0.5

# Preprocess the image using the image processor
# The image is encoded into a format that the model can understand
encoding = image_processor(image, return_tensors="pt")

# Perform inference without computing gradients (saves memory and computations)
with torch.no_grad():
    outputs = model(**encoding)

# Get the probabilities for each detected object
# The softmax function is applied to the logits to get probabilities
probas = outputs.logits.softmax(-1)[0, :, :-1]

# Keep only the detections with a confidence score above the threshold
keep = probas.max(-1).values > TD_th

# Get the target sizes for post-processing
# The target sizes are the dimensions of the original image
target_sizes = torch.tensor(image.size[::-1]).unsqueeze(0)

# Post-process the model outputs to get the final bounding boxes
# The bounding boxes are scaled back to the original image size
postprocessed_outputs = image_processor.post_process(outputs, target_sizes)
bboxes_scaled = postprocessed_outputs[0]["boxes"][keep]

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · object-detection

Можно запустить

Подбираем GPU…

Класс архитектуры
TableTransformerForObjectDetection
Ревизия весов
997e0dd

0 моделей