mapo80 commited on
Commit
4a16161
·
verified ·
1 Parent(s): 68a088d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +69 -154
README.md CHANGED
@@ -4,12 +4,13 @@ task_categories:
4
  - object-detection
5
  tags:
6
  - stamp-detection
7
- - yolo
8
  - document-analysis
 
 
9
  - computer-vision
10
- pretty_name: Stamp Detection Dataset
11
  size_categories:
12
- - 10K<n<100K
13
  dataset_info:
14
  features:
15
  - name: image
@@ -18,96 +19,91 @@ dataset_info:
18
  dtype: string
19
  splits:
20
  - name: train
21
- num_examples: 20857
22
  - name: validation
23
- num_examples: 3059
24
  - name: test
25
- num_examples: 3059
26
  ---
27
 
28
- # Stamp Detection Dataset
29
 
30
- A large-scale, unified dataset for detecting stamps on scanned documents using YOLO-based object detection models.
 
 
 
31
 
32
  ## Overview
33
 
34
  | Parameter | Value |
35
  |-----------|-------|
36
- | **Task** | Object Detection |
37
- | **Classes** | 1 `stamp` (class id 0) |
38
- | **Total images** | **26,975** |
39
- | **Positive images** | 21,037 (with stamp annotations) |
40
- | **Negative images** | 5,938 (background, no stamps) |
41
- | **Total bounding boxes** | 35,777 |
42
- | **Annotation format** | YOLO txt (`class x_center y_center width height`, normalized 0–1) |
43
- | **Dataset size** | ~6 GB |
44
-
45
- ## Download
46
-
47
- The dataset is distributed as **zip archives** (one per split):
48
-
49
- ```bash
50
- # Download all splits
51
- wget https://huggingface.co/datasets/mapo80/stamps/resolve/main/train.zip
52
- wget https://huggingface.co/datasets/mapo80/stamps/resolve/main/val.zip
53
- wget https://huggingface.co/datasets/mapo80/stamps/resolve/main/test.zip
54
-
55
- # Unzip into a single directory
56
- mkdir stamps-dataset && cd stamps-dataset
57
- unzip ../train.zip
58
- unzip ../val.zip
59
- unzip ../test.zip
60
-
61
- # Download config
62
- wget https://huggingface.co/datasets/mapo80/stamps/resolve/main/dataset.yaml
63
- ```
64
 
65
  ## Splits
66
 
67
  | Split | Total Images | Positive | Negative | Bounding Boxes |
68
- |-------|-------------|----------|----------|---------------|
69
- | Train | 20,857 | 16,503 | 4,354 | 28,101 |
70
- | Val | 3,059 | 2,268 | 791 | 3,851 |
71
- | Test | 3,059 | 2,266 | 793 | 3,825 |
72
- | **Total** | **26,975** | **21,037** | **5,938** | **35,777** |
73
 
74
- Negative (background) images are documents **without stamps** — they have empty `.txt` label files. These help reduce false positives during training. The negative ratio is ~22%, sourced from RVL-CDIP, Tobacco3482, and FUNSD.
75
 
76
- ## Directory Structure
 
 
 
 
 
77
 
78
- After unzipping:
79
 
80
- ```
81
- stamps-dataset/
82
- ├── images/
83
- │ ├── train/ # 20,857 images
84
- │ ├── val/ # 3,059 images
85
- │ └── test/ # 3,059 images
86
- ├── labels/
87
- │ ├── train/ # 20,857 label files (.txt)
88
- │ ├── val/ # 3,059 label files
89
- │ └── test/ # 3,059 label files
90
- └── dataset.yaml # YOLO config file
91
- ```
92
 
93
- ## Annotation Format
 
 
 
94
 
95
- Standard YOLO format — one `.txt` file per image:
96
 
97
- ```
98
- 0 0.5234 0.4123 0.1456 0.1987
99
- 0 0.7812 0.6543 0.0874 0.1125
100
- ```
 
 
 
 
 
 
 
 
 
 
 
 
101
 
102
- Each line: `class_id x_center y_center width height` (all values normalized 0–1). Empty files = negative images (no stamps present).
103
 
104
- ## Usage with YOLO
 
 
 
 
 
105
 
106
- ```python
107
- from ultralytics import YOLO
108
 
109
- model = YOLO("yolov9s.pt")
110
- results = model.train(data="dataset.yaml", imgsz=320, epochs=300)
 
111
  ```
112
 
113
  ## `dataset.yaml`
@@ -123,89 +119,8 @@ names:
123
  - stamp
124
  ```
125
 
126
- ## Dataset Creation Pipeline
127
-
128
- 1. **Download** from Roboflow Universe (API), Kaggle (API)
129
- 2. **Convert** heterogeneous formats (binary masks, multi-class labels) unified YOLO single-class
130
- 3. **Merge** with stratified 80/10/10 split by source dataset
131
- 4. **Deduplicate** using perceptual hashing (phash 16-bit) — removed 2,112 duplicates
132
- 5. **Validate** bounding boxes (min area ≥ 0.1%, aspect ratio ≤ 10, within image bounds) — removed 393 invalid entries
133
- 6. **Add negatives** from RVL-CDIP, Tobacco3482, FUNSD document datasets
134
-
135
- ## Source Datasets
136
-
137
- ### Roboflow Universe (CC BY 4.0)
138
-
139
- | # | Dataset | Author | Used Images | Link |
140
- |---|---------|--------|------------|------|
141
- | 1 | Stamp Detection | Stampa | 1,271 | [universe.roboflow.com/stampa/stamp-detection-4jhgg](https://universe.roboflow.com/stampa/stamp-detection-4jhgg) |
142
- | 2 | Stamp Detection | JSam | 4,539 | [universe.roboflow.com/jsam/stamp-detection-okgih](https://universe.roboflow.com/jsam/stamp-detection-okgih) |
143
- | 3 | Stamp Recognition | Stamp Project | 4,488 | [universe.roboflow.com/stamp-project/stamp-recognition-sdoan](https://universe.roboflow.com/stamp-project/stamp-recognition-sdoan/dataset/2) |
144
- | 4 | Stamp | class | 2,289 | [universe.roboflow.com/class-cemy0/stamp-wnh42](https://universe.roboflow.com/class-cemy0/stamp-wnh42) |
145
- | 5 | Stamp Detection | shujing liang | 2,341 | [universe.roboflow.com/shujing-liang/stamp-detection-f3yka](https://universe.roboflow.com/shujing-liang/stamp-detection-f3yka) |
146
- | 6 | YOLO-Stamp | Detect and Classify | 1,400 | [universe.roboflow.com/detect-and-classify/yolo-stamp-6jf5w](https://universe.roboflow.com/detect-and-classify/yolo-stamp-6jf5w) |
147
- | 7 | stamp-individual | swp | 2,992 | [universe.roboflow.com/swp-3jks1/stamp-individual](https://universe.roboflow.com/swp-3jks1/stamp-individual) |
148
- | 8 | stamp-shape | swp | 3,000 | [universe.roboflow.com/swp-3jks1/stamp-shape](https://universe.roboflow.com/swp-3jks1/stamp-shape/dataset/4) |
149
- | 9 | Stamp Detectation | Marcos | 427 | [universe.roboflow.com/marcos-7aslt/stamp-detectation](https://universe.roboflow.com/marcos-7aslt/stamp-detectation) |
150
- | 10 | Detect Postage Stamp | jackwild | 395 | [universe.roboflow.com/jackwildgooglecom/detect-postage-stamp](https://universe.roboflow.com/jackwildgooglecom/detect-postage-stamp) |
151
-
152
- ### Kaggle
153
-
154
- | # | Dataset | Author | Used Images | License | Link |
155
- |---|---------|--------|------------|---------|------|
156
- | 11 | StaVer (Stamp Verification) | Rachael Tatman / DFKI | 400 | Free access | [kaggle.com/datasets/rtatman/stamp-verification-staver-dataset](https://www.kaggle.com/datasets/rtatman/stamp-verification-staver-dataset) |
157
-
158
- ### Negative/Background Sources
159
-
160
- | # | Dataset | Used Images | License | Link |
161
- |---|---------|------------|---------|------|
162
- | 12 | RVL-CDIP | 1,060 | Free for research | [huggingface.co/datasets/chainyo/rvl-cdip](https://huggingface.co/datasets/chainyo/rvl-cdip) |
163
- | 13 | Tobacco3482 | 11 | Free | [kaggle.com/datasets/patrickaudriaz/tobacco3482jpg](https://www.kaggle.com/datasets/patrickaudriaz/tobacco3482jpg) |
164
- | 14 | FUNSD | 199 | Free for research | [huggingface.co/datasets/nielsr/funsd](https://huggingface.co/datasets/nielsr/funsd) |
165
-
166
- ## Licenses
167
-
168
- The majority of this dataset is licensed under **CC BY 4.0** (Roboflow Universe sources). Other sources are freely available for research.
169
-
170
- | Source | License |
171
- |--------|---------|
172
- | Roboflow Universe (10 datasets) | **CC BY 4.0** |
173
- | StaVer (Kaggle) | Free access |
174
- | RVL-CDIP | Free for research |
175
- | Tobacco3482 | Free |
176
- | FUNSD | Free for research |
177
-
178
- ### Attribution (CC BY 4.0)
179
-
180
- This dataset uses data from the following Roboflow Universe authors:
181
- - **Stampa** — Stamp Detection
182
- - **JSam** — Stamp Detection
183
- - **Stamp Project** — Stamp Recognition
184
- - **class** — Stamp Dataset
185
- - **shujing liang** — Stamp Detection
186
- - **DETECT AND CLASSIFY** — YOLO-Stamp
187
- - **swp** — stamp-individual, stamp-shape
188
- - **Marcos** — Stamp Detectation
189
- - **jackwildgooglecom** — Detect Postage Stamp
190
-
191
- ## Citations
192
-
193
- ```bibtex
194
- @inproceedings{micenkova2011stamp,
195
- title={Stamp detection in color document images},
196
- author={Micenkova, Barbora and van Beusekom, Joost},
197
- booktitle={International Conference on Document Analysis and Recognition (ICDAR)},
198
- pages={1125--1129},
199
- year={2011},
200
- organization={IEEE}
201
- }
202
-
203
- @inproceedings{harley2015rvlcdip,
204
- title={Evaluation of Deep Convolutional Nets for Document Image Classification and Retrieval},
205
- author={Harley, Adam W. and Ufkes, Alex and Derpanis, Konstantinos G.},
206
- booktitle={International Conference on Document Analysis and Recognition (ICDAR)},
207
- pages={991--995},
208
- year={2015},
209
- organization={IEEE}
210
- }
211
- ```
 
4
  - object-detection
5
  tags:
6
  - stamp-detection
 
7
  - document-analysis
8
+ - object-detection
9
+ - yolo
10
  - computer-vision
11
+ pretty_name: Clean Core Stamp Detection Dataset
12
  size_categories:
13
+ - 1K<n<10K
14
  dataset_info:
15
  features:
16
  - name: image
 
19
  dtype: string
20
  splits:
21
  - name: train
22
+ num_examples: 6283
23
  - name: validation
24
+ num_examples: 785
25
  - name: test
26
+ num_examples: 786
27
  ---
28
 
29
+ # Clean Core Stamp Detection Dataset
30
 
31
+ A cleaned document-stamp detection dataset built from curated raw sources only.
32
+ This version replaces the previous `mapo80/stamps` release and removes noisy or
33
+ off-target sources such as postage stamps, shape/identity datasets, corrupted
34
+ multi-class remaps, and duplicated negatives.
35
 
36
  ## Overview
37
 
38
  | Parameter | Value |
39
  |-----------|-------|
40
+ | Task | Object detection |
41
+ | Classes | 1 (`stamp`, class id 0) |
42
+ | Total images | 7854 |
43
+ | Positive images | 6608 |
44
+ | Negative images | 1246 |
45
+ | Total bounding boxes | 12659 |
46
+ | Annotation format | YOLO txt (`class x_center y_center width height`) |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  ## Splits
49
 
50
  | Split | Total Images | Positive | Negative | Bounding Boxes |
51
+ |-------|-------------:|---------:|---------:|---------------:|
52
+ | Train | 6283 | 5287 | 996 | 10046 |
53
+ | Val | 785 | 660 | 125 | 1298 |
54
+ | Test | 786 | 661 | 125 | 1315 |
 
55
 
56
+ ## What Changed
57
 
58
+ - Kept only in-scope document stamp sources
59
+ - Filtered `stamp_detection_stampa` to the raw `stamp` class only
60
+ - Removed postage-stamp, shape, identity, and corrupted mixed-class sources
61
+ - Rebuilt negatives from `RVL-CDIP` and `FUNSD`
62
+ - Dropped severe negative outliers (blank pages, almost-black pages, heavily degraded scans)
63
+ - Rebuilt train/val/test from scratch from `data/raw`
64
 
65
+ ## Included Sources
66
 
67
+ ### Positive sources
 
 
 
 
 
 
 
 
 
 
 
68
 
69
+ - `stamp_detection_jsam`: 4385 images
70
+ - `yolo_stamp_classify`: 1397 images
71
+ - `stamp_detectation_marcos`: 365 images
72
+ - `stamp_detection_stampa` (filtered): 461 images
73
 
74
+ ### Negative sources
75
 
76
+ - `neg_rvl_cdip`: 1048 images
77
+ - `neg_funsd`: 198 images
78
+
79
+ ## Excluded Source Families
80
+
81
+ - `detect_postage_stamp`
82
+ - `stamp_class`
83
+ - `stamp_shape`
84
+ - `stamp_individual`
85
+ - `stamp_recognition`
86
+ - `stamp_detection_shujing`
87
+ - `stamp_warisara`
88
+ - `staver_yolo`
89
+ - `neg_tobacco3482`
90
+
91
+ ## Directory Structure
92
 
93
+ The repository stores the dataset as zip archives:
94
 
95
+ ```text
96
+ train.zip
97
+ val.zip
98
+ test.zip
99
+ dataset.yaml
100
+ ```
101
 
102
+ Each zip contains:
 
103
 
104
+ ```text
105
+ images/<split>/
106
+ labels/<split>/
107
  ```
108
 
109
  ## `dataset.yaml`
 
119
  - stamp
120
  ```
121
 
122
+ ## Notes
123
+
124
+ - Empty label files are valid negatives
125
+ - This benchmark is intentionally narrower and cleaner than the previous release
126
+ - It is optimized for document-level stamp detection, not postage stamps or stamp classification