signature-detection / README.md
samuellimabraz's picture
Update README.md
27278bc verified
---
license: apache-2.0
task_categories:
- object-detection
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**
This dataset was developed to train models for handwritten signature detection in various types of documents. It combines data from two public datasets ([Tobacco800](https://paperswithcode.com/dataset/tobacco-800) and [signatures-xc8up](https://universe.roboflow.com/roboflow-100/signatures-xc8up)) with processing and unification performed in [Roboflow](https://roboflow.com/).
![](./assets/roboflow_ds.png)
## **Project Resources Overview**
| Resource | Links / Badges | Details |
|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Article** | [![Paper page](https://huggingface.co/datasets/huggingface/badges/resolve/main/paper-page-md.svg)](https://huggingface.co/blog/samuellimabraz/signature-detection-model) | A detailed community article covering the full development process of the project |
| **Model Files** | [![HF Model](https://huggingface.co/datasets/huggingface/badges/resolve/main/model-on-hf-md.svg)](https://huggingface.co/tech4humans/yolov8s-signature-detector) | **Available formats:** [![PyTorch](https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?style=flat&logo=PyTorch&logoColor=white)](https://pytorch.org/) [![ONNX](https://img.shields.io/badge/ONNX-005CED.svg?style=flat&logo=ONNX&logoColor=white)](https://onnx.ai/) [![TensorRT](https://img.shields.io/badge/TensorRT-76B900.svg?style=flat&logo=NVIDIA&logoColor=white)](https://developer.nvidia.com/tensorrt) |
| **Dataset – Original** | [![Roboflow](https://app.roboflow.com/images/download-dataset-badge.svg)](https://universe.roboflow.com/tech-ysdkk/signature-detection-hlx8j) | 2,819 document images annotated with signature coordinates |
| **Dataset – Processed** | [![HF Dataset](https://huggingface.co/datasets/huggingface/badges/resolve/main/dataset-on-hf-md.svg)](https://huggingface.co/datasets/tech4humans/signature-detection) | Augmented and pre-processed version (640px) for model training |
| **Notebooks – Model Experiments** | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1wSySw_zwyuv6XSaGmkngI4dwbj-hR4ix) [![W&B Training](https://img.shields.io/badge/W%26B_Training-FFBE00?style=flat&logo=WeightsAndBiases&logoColor=white)](https://api.wandb.ai/links/samuel-lima-tech4humans/30cmrkp8) | Complete training and evaluation pipeline with selection among different architectures (yolo, detr, rt-detr, conditional-detr, yolos) |
| **Notebooks – HP Tuning** | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1wSySw_zwyuv6XSaGmkngI4dwbj-hR4ix) [![W&B HP Tuning](https://img.shields.io/badge/W%26B_HP_Tuning-FFBE00?style=flat&logo=WeightsAndBiases&logoColor=white)](https://api.wandb.ai/links/samuel-lima-tech4humans/31a6zhb1) | Optuna trials for optimizing the precision/recall balance |
| **Inference Server** | [![GitHub](https://img.shields.io/badge/Deploy-ffffff?style=for-the-badge&logo=github&logoColor=black)](https://github.com/tech4ai/t4ai-signature-detect-server) | Complete deployment and inference pipeline with Triton Inference Server<br> [![OpenVINO](https://img.shields.io/badge/OpenVINO-00c7fd?style=flat&logo=intel&logoColor=white)](https://docs.openvino.ai/2025/index.html) [![Docker](https://img.shields.io/badge/Docker-2496ED?logo=docker&logoColor=fff)](https://www.docker.com/) [![Triton](https://img.shields.io/badge/Triton-Inference%20Server-76B900?labelColor=black&logo=nvidia)](https://developer.nvidia.com/triton-inference-server) |
| **Live Demo** | [![HF Space](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-md.svg)](https://huggingface.co/spaces/tech4humans/signature-detection) | Graphical interface with real-time inference<br> [![Gradio](https://img.shields.io/badge/Gradio-FF5722?style=flat&logo=Gradio&logoColor=white)](https://www.gradio.app/) [![Plotly](https://img.shields.io/badge/PLotly-000000?style=flat&logo=plotly&logoColor=white)](https://plotly.com/python/) |
## Dataset Components
1. **[Tobacco800](https://paperswithcode.com/dataset/tobacco-800):**
- 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](https://universe.roboflow.com/roboflow-100/signatures-xc8up):**
- Part of [Roboflow 100](https://rf100.org/), 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 to train the [yolov8s-signature-detector](https://huggingface.co/tech4humans/yolov8s-signature-detector) model for handwritten signature detection. For full technical details including performance metrics and architecture specifications, see the [Model Card](https://huggingface.co/tech4humans/yolov8s-signature-detector).
---
## **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**
```bash
pip install datasets
```
### **Loading the Dataset**
```python
from datasets import load_dataset
dataset = load_dataset("samuellimabraz/signature-detection")
# Visualyze the first sample
print(dataset["train"][0])
```
### **Use Case Example**
```python
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](https://www.apache.org/licenses/LICENSE-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 [email protected].
<div align="center">
<p>
📧 <b>Email:</b> <a href="mailto:[email protected]">[email protected]</a><br>
🌐 <b>Website:</b> <a href="https://www.tech4.ai/">www.tech4.ai</a><br>
💼 <b>LinkedIn:</b> <a href="https://www.linkedin.com/company/tech4humans-hyperautomation/">Tech4Humans</a>
</p>
</div>
## **Author**
<div align="center">
<table>
<tr>
<td align="center" width="140">
<a href="https://huggingface.co/samuellimabraz">
<img src="https://avatars.githubusercontent.com/u/115582014?s=400&u=c149baf46c51fdee45ad5344cf1b360236d90d09&v=4" width="120" alt="Samuel Lima"/>
<h3>Samuel Lima</h3>
</a>
<p><i>AI Research Engineer</i></p>
<p>
<a href="https://huggingface.co/samuellimabraz">
<img src="https://img.shields.io/badge/🤗_HuggingFace-samuellimabraz-orange" alt="HuggingFace"/>
</a>
</p>
</td>
<td width="500">
<h4>Responsibilities in this Project</h4>
<ul>
<li>🔬 Model development and training</li>
<li>📊 Dataset analysis and processing</li>
<li>⚙️ Hyperparameter optimization and performance evaluation</li>
<li>📝 Technical documentation and model card</li>
</ul>
</td>
</tr>
</table>
</div>
---
<div align="center">
<p>Developed with 💜 by <a href="https://www.tech4.ai/">Tech4Humans</a></p>
</div>