Downloads · 30 days
0
ori-ron/yolov8s-signature-detector
yolov8s-signature-detector is a object detection model from ori-ron. Use it when you need objects located in an image. It is set up for ultralytics. The card lists the license as agpl-3.0.
This repository presents a YOLOv8s-based model, fine-tuned to detect handwritten signatures in document images.
Downloads · 30 days
0
Access
Public
Updated Oct 20, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md19.1 KB · 93%
From the Hugging Face model README
This repository presents a YOLOv8s-based model, fine-tuned to detect handwritten signatures in document images.
The training utilized a dataset built from two public datasets: Tobacco800 and signatures-xc8up, unified and processed in Roboflow.
Dataset Summary:

The training process involved the following steps:
Various object detection models were evaluated to identify the best balance between precision, recall, and inference time.
| Metric | rtdetr-l | yolos-base | yolos-tiny | conditional-detr-resnet-50 | detr-resnet-50 | yolov8x | yolov8l | yolov8m | yolov8s | yolov8n | yolo11x | yolo11l | yolo11m | yolo11s | yolo11n | yolov10x | yolov10l | yolov10b | yolov10m | yolov10s | yolov10n |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Inference Time - CPU (ms) | 583.608 | 1706.49 | 265.346 | 476.831 | 425.649 | 1259.47 | 871.329 | 401.183 | 216.6 | 110.442 | 1016.68 | 518.147 | 381.652 | 179.792 | 106.656 | 821.183 | 580.767 | 473.109 | 320.12 | 150.076 | 73.8596 |
| mAP50 | 0.92709 | 0.901154 | 0.869814 | 0.936524 | 0.88885 | 0.794237 | 0.800312 | 0.875322 | 0.874721 | 0.816089 | 0.667074 | 0.707409 | 0.809557 | 0.835605 | 0.813799 | 0.681023 | 0.726802 | 0.789835 | 0.787688 | 0.663877 | 0.734332 |
| mAP50-95 | 0.622364 | 0.583569 | 0.469064 | 0.653321 | 0.579428 | 0.552919 | 0.593976 | 0.665495 | 0.65457 | 0.623963 | 0.482289 | 0.499126 | 0.600797 | 0.638849 | 0.617496 | 0.474535 | 0.522654 | 0.578874 | 0.581259 | 0.473857 | 0.552704 |

conditional-detr-resnet-50 (0.936524)yolov8m (0.665495)yolov10n (73.8596 ms)Detailed experiments are available on Weights & Biases.
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.

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.

| Metric | Base Model | Best Trial (#10) | Difference |
|---|---|---|---|
| mAP50 | 87.47% | 95.75% | +8.28% |
| mAP50-95 | 65.46% | 66.26% | +0.81% |
| Precision | 97.23% | 95.61% | -1.63% |
| Recall | 76.16% | 91.21% | +15.05% |
| F1-score | 85.42% | 93.36% | +7.94% |
After hyperparameter tuning of the YOLOv8s model, the best model achieved the following results on the test set:
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:
yolov8s.pt (PyTorch format)yolov8s.onnx (ONNX format)yolov8s.engine (TensorRT format)pip install ultralytics supervision huggingface_hub
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.
pip install -U ultralytics "huggingface_hub[cli]"
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.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.
You can explore the model and test real-time inference in the Hugging Face Spaces demo, built with Gradio and ONNXRuntime.
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.
<table> <tr> <td> <a href="https://github.com/triton-inference-server/server"><img src="https://img.shields.io/badge/Triton-Inference%20Server-76B900?style=for-the-badge&labelColor=black&logo=nvidia" alt="Triton Badge" /></a> </td> <td> <a href="https://github.com/tech4ai/t4ai-signature-detect-server"><img src="https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white" alt="GitHub Badge" /></a> </td> </tr> </table>The model was trained and tuned using a Jupyter Notebook environment.
Training was performed on a Google Cloud Platform n1-standard-8 instance with the following specifications:
For more details, please refer to the full license texts:
For further information, questions, or contributions, contact us at [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>