YOLOv8s Signature Detection (nace-ai internal mirror)

This is an internal nace-ai mirror of the YOLOv8s handwritten-signature detector originally published at tech4humans/yolov8s-signature-detector.

We vendor a single PyTorch checkpoint (yolov8s_signature.pt) here so the signature-detection sidecar that ships in ndi-parse-services (see Dockerfile.signature) can fetch its weights from a single, version-controlled location at pod start instead of having the binary baked into every Docker image. The model itself has not been further fine-tuned by nace-ai β€” it is the upstream weights as published, with attribution and license preserved.

For training methodology, dataset, ablations, and full evaluation results, please see the upstream model card. The relevant sections are reproduced below for convenience, with a small adaptation in the How to Use block so the example points at this private mirror.


Loading from this repository

This repo is private to the nace-ai org. To download the weights you need an HF token with read access to nace-ai:

huggingface-cli login
huggingface-cli download nace-ai/yolov8s-signature-detection yolov8s_signature.pt

Or from Python:

from huggingface_hub import hf_hub_download
from ultralytics import YOLO

model_path = hf_hub_download(
    repo_id="nace-ai/yolov8s-signature-detection",
    filename="yolov8s_signature.pt",
)
model = YOLO(model_path)

The signature service in ndi-parse-services already does this when SIGNATURE_MODEL_HF_REPO is set β€” see src/signature_service.py.

In Kubernetes the signature container reads HF_TOKEN from a Secret and caches the downloaded weights under /root/.cache/huggingface, so the ~22 MB download happens once per node and not on every pod restart.


Files in this repo

File Size Purpose
yolov8s_signature.pt ~21.5 MB PyTorch weights consumed by ultralytics.YOLO(...) and called from signature_service.py.
README.md β€” This card.

We deliberately do not mirror the upstream training artifacts (W&B exports, confusion matrices, training-batch images, ONNX/TensorRT exports). If you need those, go to the upstream repo. Keeping this mirror small keeps git lfs storage cheap and pod cold-start fast.

Provenance

yolov8s_signature.pt in this repo is byte-for-byte identical to the canonical published weights upstream:

Field Value
size 22,515,427 bytes
sha256 789580c242ac6f2543b4c09f083ca8c4ef6f1c598359bd2395febfcbcce99363
≑ upstream tech4humans/yolov8s-signature-detector :: yolov8s.pt
≑ upstream tech4humans/yolov8s-signature-detector :: tune/trial_10/weights/best.pt

Upstream "Trial #10" was the best Optuna hyperparameter trial in their search (reported mAP@0.5 = 95.75%, F1 = 93.36%) and was promoted to the canonical yolov8s.pt at the upstream repo root. We mirror that exact file.

To re-verify locally:

huggingface-cli download nace-ai/yolov8s-signature-detection yolov8s_signature.pt
shasum -a 256 ~/.cache/huggingface/hub/models--nace-ai--yolov8s-signature-detection/snapshots/*/yolov8s_signature.pt
# expect: 789580c242ac6f2543b4c09f083ca8c4ef6f1c598359bd2395febfcbcce99363

Model summary (from upstream)

YOLOv8s fine-tuned for handwritten-signature detection in document images, trained on a unified dataset built from Tobacco800 and signatures-xc8up.

Reported test-set metrics:

Metric Value
Precision 94.74%
Recall 89.72%
mAP@0.5 94.50%
mAP@0.5:0.95 67.35%
F1 92.16%

Training data split:

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

Training infra (upstream): Google Cloud n1-standard-8 with NVIDIA Tesla T4, PyTorch 2.5.1+cu121, Ultralytics 8.3.58, Optuna 4.1.0.

For the full model-selection sweep across YOLOv8 / YOLOv10 / YOLOv11 / DETR variants, the Optuna hyperparameter search results, and the per-trial ablations, see the upstream card and the linked Weights & Biases reports.


How nace-ai uses this model

The signature sidecar in ndi-parse-services exposes a single endpoint:

POST /v1/detect_signatures   (multipart: file=<page image>, conf=<float>, imgsz=<int>)

It runs the YOLOv8s detector on a rendered page image and returns a JSON list of bounding boxes with confidence scores. The proxy service then folds that result into the signature_audit field of the extract_page response so that a single call from the client returns both OCR text and signature locations.

Defaults baked into the sidecar:

  • SIGNATURE_DEFAULT_CONF=0.25
  • SIGNATURE_DEFAULT_IMGSZ=640
  • SIGNATURE_DEVICE=cuda:0

These match the upstream training configuration (640x640, default Ultralytics confidence threshold) and are tuned to favor recall over precision for our audit use case β€” we'd rather flag a false positive than miss a real signature.


License and attribution

Model weights β€” AGPL-3.0

The PyTorch checkpoint mirrored here is derived from the YOLOv8 model by Ultralytics and the fine-tune published by Tech4Humans, both of which are licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). Redistributing or modifying these weights β€” including using them as part of a network service that is offered to third parties β€” requires that the corresponding source code be made available under AGPL-3.0.

This mirror exists for internal nace-ai operational use only. It is not redistributed externally. If you fork it, you inherit AGPL-3.0 obligations.

Code / docs in this card β€” Apache-2.0

The card text added by nace-ai (the parts that are not reproduced from upstream) is licensed under Apache-2.0 to match the upstream code license.

Original authors

Model developed by Samuel Lima at Tech4Humans (upstream author card). All credit for training, dataset curation, and hyperparameter optimization goes to the upstream team. nace-ai's contribution here is limited to vendoring the published checkpoint for production serving.

For questions about the upstream model: iag@tech4h.com.br. For questions about this mirror or the ndi-parse-services integration: internal Slack #ndi-parse-services.

Downloads last month
56
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for nace-ai/yolov8s-signature-detection

Finetuned
(157)
this model