File size: 3,372 Bytes
6731f94
061a1c3
 
 
 
 
 
 
 
616fad3
061a1c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6731f94
061a1c3
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

# ✍️ Handwritten Signature Classifier

### AI-powered handwritten signature recognition for document processing

An image-classification model designed to distinguish handwritten signatures from non-signature content in scanned documents and document images.

Built on the **MobileNetV3-Small** architecture, this model is intended for efficient inference and integration into automated document-processing workflows.

---

## πŸš€ Overview

The model classifies an input image into one of two categories:

| Class | Description |
|---|---|
| `SIGNATURE` | Handwritten signature or signature-like handwriting |
| `NOT_SIGNATURE` | Non-signature document content, such as printed text, dates, numbers, and other visual elements |

Its primary purpose is to help document-processing systems identify genuine signature regions and reduce false-positive detections.

## 🧠 Model Architecture

- **Architecture:** MobileNetV3-Small
- **Base Model:** `qualcomm/MobileNet-v3-Small`
- **Task:** Binary image classification
- **Framework:** Transformers
- **Input:** RGB image
- **Output:** Class probabilities and predicted label
- **Classes:** SIGNATURE / NOT_SIGNATURE

MobileNetV3-Small provides a lightweight architecture suitable for resource-constrained environments and desktop inference.

## πŸ“š Training Dataset

**Dataset:** [`AmjadKha/HandWrittenSigntureDataset`](https://huggingface.co/datasets/AmjadKha/HandWrittenSigntureDataset)

The model uses a handwritten signature dataset for training and evaluation.

Supported document languages:
- English
- Arabic

## πŸ“Š Evaluation Metrics

The model is evaluated using the following metrics:

| Metric | Purpose |
|---|---|
| Accuracy | Measures overall classification correctness |
| Precision | Measures how many predicted signatures are actually signatures |
| Recall | Measures how many actual signatures are detected |
| F1-score | Balances precision and recall |

> Actual evaluation scores should be added after testing on a separate held-out test dataset.

## βš™οΈ Installation

```bash
pip install transformers torch pillow
```

## πŸ’» Usage

```python
from transformers import pipeline

classifier = pipeline(
    "image-classification",
    model="AmjadKha/YOUR-MODEL-REPOSITORY"
)

results = classifier("signature.png")

for result in results:
    print(result["label"], result["score"])
```

Replace `YOUR-MODEL-REPOSITORY` with the actual Hugging Face model repository name.

## 🏦 Intended Applications

- Banking document processing
- Signature verification workflows
- Account-opening documentation
- Customer onboarding documents
- Automated document classification
- PDF signature-region filtering
- Intelligent document processing (IDP)

## ⚠️ Limitations

- Classification does not establish the legal authenticity of a signature.
- Handwritten names and initials may resemble signatures.
- Performance depends on image quality, resolution, and training-data diversity.
- The model should be evaluated on representative documents before production deployment.
- It should be combined with signature detection and verification mechanisms for high-assurance workflows.

## πŸ“„ License

Apache License 2.0.

## πŸ‘¨β€πŸ’» Author

**Amjad Khaliliah**

Hugging Face: [@AmjadKha](https://huggingface.co/AmjadKha)

---

*Lightweight computer vision for intelligent document processing.*