signature-detection / README.md
samuellimabraz's picture
feat: update README for english translation
74a660c unverified
metadata
license: apache-2.0
task_categories:
  - object-detection
language:
  - pt
tags:
  - roboflow
  - signature
pretty_name: Handwritten Signature
size_categories:
  - 1K<n<10K
configs:
  - config_name: full
    data_files:
      - split: train
        path: full/train-*
      - split: validation
        path: full/validation-*
      - split: test
        path: full/test-*
    default: true
dataset_info:
  config_name: full
  features:
    - name: image_id
      dtype: int64
    - name: image
      dtype: image
    - name: width
      dtype: int32
    - name: height
      dtype: int32
    - name: objects
      sequence:
        - name: id
          dtype: int64
        - name: area
          dtype: int64
        - name: bbox
          sequence: float32
          length: 4
        - name: category
          dtype:
            class_label:
              names:
                '0': signature
  splits:
    - name: train
      num_bytes: 114346924.72
      num_examples: 1980
    - name: validation
      num_bytes: 18085018
      num_examples: 420
    - name: test
      num_bytes: 18307713
      num_examples: 419
  download_size: 146763157
  dataset_size: 150739655.72

Dataset: Signature Detection

Dataset on HF

This dataset was developed to train models for handwritten signature detection in various types of documents. It combines data from two public datasets (Tobacco800 and signatures-xc8up) with processing and unification performed in Roboflow.

Dataset Components

  1. Tobacco800:

    • Subset of the Complex Document Image Processing (CDIP) Test Collection.
    • Contains scanned images of documents related to the tobacco industry, created by the Illinois Institute of Technology.
  2. signatures-xc8up:

    • Part of Roboflow 100, an Intel initiative.
    • Includes 368 annotated images for handwritten signature detection.

Both were unified to provide a robust and diverse foundation for object detection tasks.

Dataset Details

  • Dataset Split:

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

  • License: Apache 2.0

Preprocessing and Augmentations

  • Preprocessing:

    • Auto-Orientation: Applied
    • Resizing: 640x640 pixels
  • Applied Augmentations:

    • 90° Rotation: Clockwise, counterclockwise, and upside down
    • Rotation: Between -10° and +10°
    • Shearing: ±4° Horizontal, ±3° Vertical
    • Brightness: Between -8% and +8%
    • Exposure: Between -13% and +13%
    • Blur: Up to 1.1 pixels
    • Noise: Up to 0.97% of pixels

These steps were implemented to enhance the model's robustness and generalization ability.


Model

This dataset was used as the foundation for training the model tech4humans/yolov8s-signature-detector, designed to identify handwritten signatures in documents with high precision.

For more details about the model, including metrics, architecture, and usage instructions, visit the Model Card.

Model on HF


How to Use with the Datasets Library

This dataset is available on the Hugging Face Hub and can be loaded directly using the datasets library.

Installing the Library

pip install datasets

Loading the Dataset

from datasets import load_dataset

dataset = load_dataset("samuellimabraz/signature-detection")

# Visualyze the first sample
print(dataset["train"][0])

Use Case Example

import matplotlib.pyplot as plt
import matplotlib.patches as patches
import random
from datasets import load_dataset

dataset = load_dataset("samuellimabraz/signature-detection")

# Randomly select a sample from the test set
sample = dataset["test"][random.randint(0, len(dataset["test"]))]

image = sample["image"]
bboxes = sample["objects"]["bbox"]

fig, ax = plt.subplots(1, figsize=(8, 8))
ax.imshow(image)

for bbox in bboxes:
    x, y, width, height = bbox
    rect = patches.Rectangle(
        (x, y), width, height, linewidth=2, edgecolor="red", facecolor="none"
    )
    ax.add_patch(rect)

plt.axis("off")
plt.show()

License

The dataset is distributed under the Apache 2.0 license. You are free to use, modify, and distribute the dataset as long as you comply with the license terms.


Contact and Information

For more information, questions, and contributions, please contact iag@tech4h.com.br.

📧 Email: iag@tech4h.com.br
🌐 Website: www.tech4.ai
💼 LinkedIn: Tech4Humans

Author

Samuel Lima

Samuel Lima

AI Research Engineer

HuggingFace

Responsibilities in this Project

  • 🔬 Model development and training
  • 📊 Dataset analysis and processing
  • ⚙️ Hyperparameter optimization and performance evaluation
  • 📝 Technical documentation and model card

Developed with ❤️ by Tech4Humans