/ Модель

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

Размер весов
179 МБ
Лицензия
AGPL 3.0
Базовая модель
YOLOv8
Библиотека
ultralytics
Опубликована
3 янв 2025

yolov8s-signature-detector

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

YOLOv8s Signature Detector — модель компьютерного зрения, разработанная tech4humans на базе Ultralytics YOLOv8s и дообученная для обнаружения рукописных подписей на изображениях документов.

2 772скачиваний за 30 дней81лайквеса обновлены5 апр 2025

Бенчмарки

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

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

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

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

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

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

Она решает задачу object detection: определяет наличие подписей и их координаты, поэтому подходит для автоматической обработки документов, предварительной проверки заполнения форм и построения сервисов извлечения областей с подписями.

Модель обучалась на наборе tech4humans/signature-detection, включающем 2 819 размеченных изображений документов; для обучения использовалась аугментированная и предварительно обработанная версия с размером изображения 640 пикселей. Доступны форматы PyTorch, ONNX и TensorRT, что упрощает развёртывание в разных вычислительных средах. По результатам на тестовой выборке модель показала mAP@0.5 0,94499, mAP@0.5:0.95 0,6735, precision 0,947396, recall 0,897216 и F1 0,921623.

Сильные стороны модели — высокая точность обнаружения и наличие подготовленных форматов для производительного инференса. Ограничения связаны с узкой специализацией на рукописных подписях в документных изображениях: README не подтверждает качество на других типах изображений, языках, форматах документов или сценариях, а также не приводит сведения о количестве параметров, требованиях к оборудованию и задержке инференса. Модель распространяется по лицензии AGPL-3.0, поэтому условия её использования и распространения следует учитывать при интеграции в закрытые или коммерческие продукты.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

YOLOv8s - Handwritten Signature Detection

This repository presents a YOLOv8s-based model, fine-tuned to detect handwritten signatures in document images.

ResourceLinks / BadgesDetails
ArticlePaper pageA detailed community article covering the full development process of the project
Model FilesHF ModelAvailable formats: PyTorch ONNX TensorRT
Dataset – OriginalRoboflow2,819 document images annotated with signature coordinates
Dataset – ProcessedHF DatasetAugmented and pre-processed version (640px) for model training
Notebooks – Model ExperimentsColab W&B TrainingComplete training and evaluation pipeline with selection among different architectures (yolo, detr, rt-detr, conditional-detr, yolos)
Notebooks – HP TuningColab W&B HP TuningOptuna trials for optimizing the precision/recall balance
Inference ServerGitHubComplete deployment and inference pipeline with Triton Inference Server OpenVINO Docker Triton
Live DemoHF SpaceGraphical interface with real-time inference Gradio Plotly

Dataset

The training utilized a dataset built from two public datasets: Tobacco800 and signatures-xc8up, unified and processed in Roboflow.

Dataset Summary:

  • Training: 1,980 images (70%)
  • Validation: 420 images (15%)
  • Testing: 419 images (15%)
  • Format: COCO JSON
  • Resolution: 640x640 pixels

Roboflow Dataset


Training Process

The training process involved the following steps:

1. Model Selection:

Various object detection models were evaluated to identify the best balance between precision, recall, and inference time.

Metricrtdetr-lyolos-baseyolos-tinyconditional-detr-resnet-50detr-resnet-50yolov8xyolov8lyolov8myolov8syolov8nyolo11xyolo11lyolo11myolo11syolo11nyolov10xyolov10lyolov10byolov10myolov10syolov10n
Inference Time - CPU (ms)583.6081706.49265.346476.831425.6491259.47871.329401.183216.6110.4421016.68518.147381.652179.792106.656821.183580.767473.109320.12150.07673.8596
mAP500.927090.9011540.8698140.9365240.888850.7942370.8003120.8753220.8747210.8160890.6670740.7074090.8095570.8356050.8137990.6810230.7268020.7898350.7876880.6638770.734332
mAP50-950.6223640.5835690.4690640.6533210.5794280.5529190.5939760.6654950.654570.6239630.4822890.4991260.6007970.6388490.6174960.4745350.5226540.5788740.5812590.4738570.552704

Model Selection

Highlights:

  • Best mAP50: conditional-detr-resnet-50 (0.936524)
  • Best mAP50-95: yolov8m (0.665495)
  • Fastest Inference Time: yolov10n (73.8596 ms)

Detailed experiments are available on Weights & Biases.

2. Hyperparameter Tuning:

The YOLOv8s model, which demonstrated a good balance of inference time, precision, and recall, was selected for hyperparameter tuning.

Optuna was used for 20 optimization trials. The hyperparameter tuning used the following parameter configuration:

    dropout = trial.suggest_float("dropout", 0.0, 0.5, step=0.1)
    lr0 = trial.suggest_float("lr0", 1e-5, 1e-1, log=True)
    box = trial.suggest_float("box", 3.0, 7.0, step=1.0)
    cls = trial.suggest_float("cls", 0.5, 1.5, step=0.2)
    opt = trial.suggest_categorical("optimizer", ["AdamW", "RMSProp"])

Results can be visualized here: Hypertuning Experiment.

Hypertuning Sweep

3. Evaluation:

The models were evaluated on the test set at the end of training in ONNX (CPU) and TensorRT (GPU - T4) formats. Performance metrics included precision, recall, mAP50, and mAP50-95.

Trials

Results Comparison:

MetricBase ModelBest Trial (#10)Difference
mAP5087.47%95.75%+8.28%
mAP50-9565.46%66.26%+0.81%
Precision97.23%95.61%-1.63%
Recall76.16%91.21%+15.05%
F1-score85.42%93.36%+7.94%

Results

After hyperparameter tuning of the YOLOv8s model, the best model achieved the following results on the test set:

  • Precision: 94.74%
  • Recall: 89.72%
  • mAP@50: 94.50%
  • mAP@50-95: 67.35%
  • Inference Time:
    • ONNX Runtime (CPU): 171.56 ms
    • TensorRT (GPU - T4): 7.657 ms

How to Use

The YOLOv8s model can be used via CLI or Python code using the Ultralytics library. Alternatively, it can be used directly with ONNX Runtime or TensorRT.

The final weights are available in the main directory of the repository:

Python Code

  • Dependencies
pip install ultralytics supervision huggingface_hub
  • Inference
import cv2
import supervision as sv

from huggingface_hub import hf_hub_download
from ultralytics import YOLO

model_path = hf_hub_download(
  repo_id="tech4humans/yolov8s-signature-detector", 
  filename="yolov8s.pt"
)

model = YOLO(model_path)

image_path = "/path/to/your/image.jpg"
image = cv2.imread(image_path)

results = model(image_path)

detections = sv.Detections.from_ultralytics(results[0])

box_annotator = sv.BoxAnnotator()
annotated_image = box_annotator.annotate(scene=image, detections=detections)

cv2.imshow("Detections", annotated_image)
cv2.waitKey(0)
cv2.destroyAllWindows()

Ensure the paths to the image and model files are correct.

CLI

  • Dependencies
pip install -U ultralytics "huggingface_hub[cli]"
  • Inference
huggingface-cli download tech4humans/yolov8s-signature-detector yolov8s.pt
yolo predict model=yolov8s.pt source=caminho/para/imagem.jpg

Parameters:

  • model: Path to the model weights file.
  • source: Path to the image or directory of images for detection.

ONNX Runtime

For optimized inference, you can find the inference code using onnxruntime and OpenVINO Execution Provider in the handler.py file and on the Hugging Face Space here.


Demo

You can explore the model and test real-time inference in the Hugging Face Spaces demo, built with Gradio and ONNXRuntime.

Open in Spaces


🔗 Inference with Triton Server

If you want to deploy this signature detection model in a production environment, check out our inference server repository based on the NVIDIA Triton Inference Server.


Infrastructure

Software

The model was trained and tuned using a Jupyter Notebook environment.

  • Operating System: Ubuntu 22.04
  • Python: 3.10.12
  • PyTorch: 2.5.1+cu121
  • Ultralytics: 8.3.58
  • Roboflow: 1.1.50
  • Optuna: 4.1.0
  • ONNX Runtime: 1.20.1
  • TensorRT: 10.7.0

Hardware

Training was performed on a Google Cloud Platform n1-standard-8 instance with the following specifications:

  • CPU: 8 vCPUs
  • GPU: NVIDIA Tesla T4

License

Model Weights (Fine-Tuned Model) – AGPL-3.0

  • License: GNU Affero General Public License v3.0 (AGPL-3.0)
  • Usage: The fine-tuned model weights, derived from the YOLOv8 model by Ultralytics, are licensed under AGPL-3.0. This requires that any modifications or derivative works of these model weights also be distributed under AGPL-3.0, and if the model is used as part of a network service, the corresponding source must be made available.

Code, Training, Deployment, and Data – Apache 2.0

  • License: Apache License 2.0
  • Usage: All additional materials—including training scripts, deployment code, usage instructions, and associated data—are licensed under the Apache 2.0 license.

For more details, please refer to the full license texts:


Contact and Information

For further information, questions, or contributions, contact us at iag@tech4h.com.br.

Author


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

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

GPU в ailist

Универсальный рантайм · ultralytics

Нельзя запустить

Модели Ultralytics YOLO требуют отдельного рантайма.

Ревизия весов
d2847a9

0 моделей