harpreetsahota commited on
Commit
450bf21
·
verified ·
1 Parent(s): c3c6c19

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +188 -89
README.md CHANGED
@@ -11,18 +11,21 @@ tags:
11
  - fiftyone
12
  - image
13
  - image-classification
14
- dataset_summary: '
 
 
15
 
16
 
17
 
18
 
19
- This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset with 3482 samples.
 
20
 
21
 
22
  ## Installation
23
 
24
 
25
- If you haven''t already, install FiftyOne:
26
 
27
 
28
  ```bash
@@ -44,9 +47,10 @@ dataset_summary: '
44
 
45
  # Load the dataset
46
 
47
- # Note: other available arguments include ''max_samples'', etc
48
 
49
- dataset = load_from_hub("harpreetsahota/scanned-images-dataset-for-ocr-and-vlm-finetuning")
 
50
 
51
 
52
  # Launch the App
@@ -54,19 +58,16 @@ dataset_summary: '
54
  session = fo.launch_app(dataset)
55
 
56
  ```
57
-
58
- '
59
  ---
60
 
61
  # Dataset Card for scanned_images_dataset
62
 
63
- <!-- Provide a quick summary of the dataset. -->
64
-
65
-
66
 
67
 
68
 
69
- This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset with 3482 samples.
70
 
71
  ## Installation
72
 
@@ -84,7 +85,7 @@ from fiftyone.utils.huggingface import load_from_hub
84
 
85
  # Load the dataset
86
  # Note: other available arguments include 'max_samples', etc
87
- dataset = load_from_hub("harpreetsahota/scanned-images-dataset-for-ocr-and-vlm-finetuning")
88
 
89
  # Launch the App
90
  session = fo.launch_app(dataset)
@@ -95,130 +96,228 @@ session = fo.launch_app(dataset)
95
 
96
  ### Dataset Description
97
 
98
- <!-- Provide a longer summary of what this dataset is. -->
99
-
100
-
101
 
102
- - **Curated by:** [More Information Needed]
103
- - **Funded by [optional]:** [More Information Needed]
104
- - **Shared by [optional]:** [More Information Needed]
105
- - **Language(s) (NLP):** en
106
- - **License:** [More Information Needed]
107
 
108
- ### Dataset Sources [optional]
 
 
 
109
 
110
- <!-- Provide the basic links for the dataset. -->
111
 
112
- - **Repository:** [More Information Needed]
113
- - **Paper [optional]:** [More Information Needed]
114
- - **Demo [optional]:** [More Information Needed]
115
 
116
  ## Uses
117
 
118
- <!-- Address questions around how the dataset is intended to be used. -->
119
-
120
  ### Direct Use
121
 
122
- <!-- This section describes suitable use cases for the dataset. -->
123
 
124
- [More Information Needed]
 
 
 
 
 
 
 
 
125
 
126
  ### Out-of-Scope Use
127
 
128
- <!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
129
-
130
- [More Information Needed]
 
131
 
132
  ## Dataset Structure
133
 
134
- <!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  ## Dataset Creation
139
 
140
  ### Curation Rationale
141
 
142
- <!-- Motivation for the creation of this dataset. -->
143
-
144
- [More Information Needed]
145
 
146
  ### Source Data
147
 
148
- <!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
149
-
150
  #### Data Collection and Processing
151
 
152
- <!-- This section describes the data collection and processing process such as data selection criteria, filtering and normalization methods, tools and libraries used, etc. -->
153
-
154
- [More Information Needed]
155
-
156
- #### Who are the source data producers?
157
-
158
- <!-- This section describes the people or systems who originally created the data. It should also include self-reported demographic or identity information for the source data creators if this information is available. -->
159
-
160
- [More Information Needed]
161
 
162
- ### Annotations [optional]
 
 
 
 
163
 
164
- <!-- If the dataset contains annotations which are not part of the initial data collection, use this section to describe them. -->
 
 
 
 
 
 
 
 
 
 
 
 
 
165
 
166
- #### Annotation process
167
 
168
- <!-- This section describes the annotation process such as annotation tools used in the process, the amount of data annotated, annotation guidelines provided to the annotators, interannotator statistics, annotation validation, etc. -->
169
 
170
- [More Information Needed]
171
 
172
- #### Who are the annotators?
173
 
174
- <!-- This section describes the people or systems who created the annotations. -->
175
 
176
- [More Information Needed]
 
 
 
 
177
 
178
  #### Personal and Sensitive Information
179
 
180
- <!-- State whether the dataset contains data that might be considered personal, sensitive, or private (e.g., data that reveals addresses, uniquely identifiable names or aliases, racial or ethnic origins, sexual orientations, religious beliefs, political opinions, financial or health data, etc.). If efforts were made to anonymize the data, describe the anonymization process. -->
 
 
 
 
 
181
 
182
- [More Information Needed]
 
 
 
 
183
 
184
  ## Bias, Risks, and Limitations
185
 
186
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
187
 
188
- [More Information Needed]
 
 
 
 
 
 
 
189
 
190
  ### Recommendations
191
 
192
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
193
-
194
- Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations.
195
-
196
- ## Citation [optional]
197
-
198
- <!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
199
-
200
- **BibTeX:**
201
-
202
- [More Information Needed]
203
-
204
- **APA:**
205
-
206
- [More Information Needed]
207
-
208
- ## Glossary [optional]
209
-
210
- <!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
211
-
212
- [More Information Needed]
213
-
214
- ## More Information [optional]
215
-
216
- [More Information Needed]
217
-
218
- ## Dataset Card Authors [optional]
219
 
220
- [More Information Needed]
 
 
 
 
 
 
 
 
 
221
 
222
  ## Dataset Card Contact
223
 
224
- [More Information Needed]
 
11
  - fiftyone
12
  - image
13
  - image-classification
14
+ - ocr
15
+ - visual-document-retrieval
16
+ dataset_summary: >
17
 
18
 
19
 
20
 
21
+ This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset with 3482
22
+ samples.
23
 
24
 
25
  ## Installation
26
 
27
 
28
+ If you haven't already, install FiftyOne:
29
 
30
 
31
  ```bash
 
47
 
48
  # Load the dataset
49
 
50
+ # Note: other available arguments include 'max_samples', etc
51
 
52
+ dataset =
53
+ load_from_hub("Voxel51/scanned-images-dataset-for-ocr-and-vlm-finetuning")
54
 
55
 
56
  # Launch the App
 
58
  session = fo.launch_app(dataset)
59
 
60
  ```
61
+ license: mit
 
62
  ---
63
 
64
  # Dataset Card for scanned_images_dataset
65
 
66
+ ![image/png](scanned_documents.gif)
 
 
67
 
68
 
69
 
70
+ This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset containing **3,482 scanned document images** across 10 diverse document categories. Designed for OCR training and Vision-Language Model (VLM) fine-tuning, this dataset features real-world scanned documents with varied layouts, scanning quality, and document types.
71
 
72
  ## Installation
73
 
 
85
 
86
  # Load the dataset
87
  # Note: other available arguments include 'max_samples', etc
88
+ dataset = load_from_hub("Voxel51/scanned-images-dataset-for-ocr-and-vlm-finetuning")
89
 
90
  # Launch the App
91
  session = fo.launch_app(dataset)
 
96
 
97
  ### Dataset Description
98
 
99
+ This dataset is a curated collection of scanned document images representing 10 common document types found in office, academic, and professional settings. The images exhibit real-world characteristics including varied scanning quality, different layouts, mixed content types (text, tables, images), and both printed and handwritten text.
 
 
100
 
101
+ The dataset is particularly valuable for:
102
+ - Training OCR models on diverse document layouts
103
+ - Fine-tuning Vision-Language Models for document understanding
104
+ - Developing document classification systems
105
+ - Testing robustness to real-world scanning artifacts and quality variations
106
 
107
+ - **Original Source:** [Kaggle - Scanned Images Dataset for OCR and VLM finetuning](https://www.kaggle.com/datasets/suvroo/scanned-images-dataset-for-ocr-and-vlm-finetuning)
108
+ - **Curated by:** suvroo (original), Harpreet Sahota (FiftyOne port)
109
+ - **Language(s):** English (primary), with potential multilingual content
110
+ - **License:** Original license from Kaggle source
111
 
112
+ ### Dataset Sources
113
 
114
+ - **Original Repository:** [Kaggle Dataset](https://www.kaggle.com/datasets/suvroo/scanned-images-dataset-for-ocr-and-vlm-finetuning)
115
+ - **Dataset Download:** [GTS.AI Mirror](https://gts.ai/dataset-download/scanned-images-dataset-for-ocr-and-vlm-finetuning/)
 
116
 
117
  ## Uses
118
 
 
 
119
  ### Direct Use
120
 
121
+ This dataset is suitable for:
122
 
123
+ - **OCR Model Training**: Train text extraction on real-world scanned documents with varied quality
124
+ - **Document Classification**: Develop models to classify documents by type (email, memo, form, etc.)
125
+ - **Vision-Language Model Fine-tuning**: Adapt VLMs for document understanding tasks
126
+ - **Layout Analysis**: Detect and understand document structure (headers, paragraphs, tables)
127
+ - **Document Quality Assessment**: Train models to handle various scanning qualities
128
+ - **Multi-column Text Recognition**: Practice on complex layouts (news articles, scientific papers)
129
+ - **Form Understanding**: Extract structured information from forms and tables
130
+ - **Handwriting Recognition**: Some documents contain handwritten elements
131
+ - **Real-world OCR Benchmarking**: Evaluate model performance on authentic scanned documents
132
 
133
  ### Out-of-Scope Use
134
 
135
+ - **Privacy-Sensitive Applications**: Documents may contain personally identifiable information
136
+ - **Production Document Processing**: Without text annotations, this dataset is primarily for classification and pre-training
137
+ - **Language-Specific OCR**: While primarily English, multilingual content may be present but not systematically labeled
138
+ - **High-Precision Applications**: Scanning artifacts and quality variations may limit use in applications requiring perfect text extraction
139
 
140
  ## Dataset Structure
141
 
142
+ ### FiftyOne Schema
143
+
144
+ Each sample in the dataset has the following structure:
145
+
146
+ ```python
147
+ {
148
+ 'id': str, # Unique sample ID
149
+ 'media_type': 'image', # Always 'image'
150
+ 'filepath': str, # Absolute path to document image
151
+ 'tags': [], # Empty list (no tags)
152
+ 'metadata': { # Image metadata
153
+ 'size_bytes': int, # File size (typically 200KB-800KB)
154
+ 'mime_type': 'image/jpeg', # MIME type
155
+ 'width': int, # Image width (varies, typically 1200-2500px)
156
+ 'height': int, # Image height (varies, typically 1500-3200px)
157
+ 'num_channels': 1, # Grayscale (1 channel)
158
+ },
159
+ 'ground_truth': { # Document classification label
160
+ 'id': str, # Label ID
161
+ 'tags': [], # Empty list
162
+ 'label': str, # Document category (see below)
163
+ 'confidence': None, # Not applicable
164
+ 'logits': None, # Not applicable
165
+ }
166
+ }
167
+ ```
168
 
169
+ ### Document Categories
170
+
171
+ The dataset contains 10 document categories with the following distribution:
172
+
173
+ | Category | Count | Description |
174
+ |----------|-------|-------------|
175
+ | **Email** | 599 | Email correspondence and communications |
176
+ | **Memo** | 620 | Internal memorandums and office notes |
177
+ | **Letter** | 567 | Formal and informal letters |
178
+ | **Form** | 431 | Forms, applications, and structured documents |
179
+ | **Report** | 265 | Business and technical reports |
180
+ | **Scientific** | 261 | Scientific papers and research documents |
181
+ | **ADVE** (Advertisement) | 230 | Advertisements and promotional materials |
182
+ | **Note** | 201 | Handwritten and typed notes |
183
+ | **News** | 188 | News articles and clippings |
184
+ | **Resume** | 120 | Résumés and CVs |
185
+ | **Total** | **3,482** | |
186
+
187
+ ### Image Characteristics
188
+
189
+ - **Format**: JPEG
190
+ - **Color Mode**: Grayscale (1 channel)
191
+ - **Resolution**: Varies (typically 72 DPI)
192
+ - **Typical Dimensions**: 1200-2500 × 1500-3200 pixels
193
+ - **File Size**: 200KB - 800KB per image
194
+ - **Orientation**: Mostly portrait, some landscape
195
+
196
+ ### Document Features
197
+
198
+ The scanned documents exhibit:
199
+ - **Multi-column layouts** (news articles, scientific papers)
200
+ - **Tables and forms** with structured data
201
+ - **Mixed content** (text, images, logos)
202
+ - **Varied text styles** (printed, handwritten, typewritten)
203
+ - **Real scanning artifacts** (skew, noise, shadows, folds)
204
+ - **Different scanning qualities** (low to high resolution)
205
+ - **Multiple fonts and sizes**
206
+ - **Headers, footers, and page numbers**
207
 
208
  ## Dataset Creation
209
 
210
  ### Curation Rationale
211
 
212
+ This dataset was created to provide a diverse collection of real-world scanned documents for training and evaluating OCR systems and Vision-Language Models. The variety in document types, layouts, and scanning quality makes it valuable for developing robust document understanding systems that can handle real-world conditions.
 
 
213
 
214
  ### Source Data
215
 
 
 
216
  #### Data Collection and Processing
217
 
218
+ The dataset consists of scanned images from various document types commonly found in professional and academic settings. Documents were scanned at varying quality levels to represent real-world scenarios.
 
 
 
 
 
 
 
 
219
 
220
+ This FiftyOne port was created by:
221
+ 1. Downloading the original dataset from Kaggle
222
+ 2. Organizing images into 10 category directories
223
+ 3. Using FiftyOne's `ImageClassificationDirectoryTree` format to import with automatic label assignment
224
+ 4. Computing metadata for all images (dimensions, file size, color channels)
225
 
226
+ The directory structure maps directly to classification labels:
227
+ ```
228
+ scanned-images-dataset-for-ocr-and-vlm-finetuning/
229
+ ├── ADVE/ (230 images)
230
+ ├── Email/ (599 images)
231
+ ├── Form/ (431 images)
232
+ ├── Letter/ (567 images)
233
+ ├── Memo/ (620 images)
234
+ ├── News/ (188 images)
235
+ ├── Note/ (201 images)
236
+ ├── Report/ (265 images)
237
+ ├── Resume/ (120 images)
238
+ └── Scientific/ (261 images)
239
+ ```
240
 
241
+ #### Who are the source data producers?
242
 
243
+ The documents appear to be collected from various sources representing typical office, business, and academic materials. Specific provenance information is not available from the original dataset.
244
 
245
+ ### Annotations
246
 
247
+ #### Annotation Process
248
 
249
+ The dataset includes **document type classification labels** derived from the directory structure. Each image is labeled with one of 10 document categories based on its location in the folder hierarchy.
250
 
251
+ **No text-level annotations** (OCR transcriptions, bounding boxes, or entity labels) are included. The dataset is designed for:
252
+ - Document classification tasks
253
+ - Pre-training OCR and VLM models
254
+ - Layout analysis research
255
+ - Unsupervised or self-supervised learning
256
 
257
  #### Personal and Sensitive Information
258
 
259
+ ⚠️ **Privacy Warning**: This dataset contains scanned documents that may include:
260
+ - Personal names and addresses
261
+ - Email addresses and contact information
262
+ - Company names and business information
263
+ - Academic affiliations
264
+ - Potentially sensitive correspondence
265
 
266
+ Users should:
267
+ - Review documents before use in production systems
268
+ - Implement appropriate privacy safeguards
269
+ - Consider anonymization or redaction for sensitive applications
270
+ - Comply with relevant privacy regulations (GDPR, CCPA, etc.)
271
 
272
  ## Bias, Risks, and Limitations
273
 
274
+ ### Known Limitations
275
 
276
+ - **No Text Annotations**: Dataset lacks OCR transcriptions, making it unsuitable for supervised text extraction training without additional annotation
277
+ - **Language Bias**: Primarily English documents; limited representation of other languages
278
+ - **Domain Coverage**: May not represent all document types (e.g., forms from specific industries)
279
+ - **Quality Variation**: Scanning quality varies significantly, which could impact model training if not handled properly
280
+ - **Imbalanced Categories**: Category sizes range from 120 (Resume) to 620 (Memo) samples
281
+ - **Privacy Concerns**: Contains potentially identifiable information without systematic anonymization
282
+ - **Temporal Bias**: Document styles and formats may reflect specific time periods
283
+ - **Geographic Bias**: Document formats may be specific to certain regions
284
 
285
  ### Recommendations
286
 
287
+ - **Use for Classification or Pre-training**: Best suited for document type classification or unsupervised pre-training
288
+ - **Combine with Annotated Datasets**: For OCR training, combine with datasets that include text annotations
289
+ - **Privacy Review**: Audit documents for sensitive information before deployment
290
+ - **Augment for Balance**: Apply data augmentation or resampling to address class imbalance
291
+ - **Quality Filtering**: Consider filtering or stratifying by scan quality for specific applications
292
+ - **Validate on Target Domain**: Test on your specific document types before production use
293
+ - **Consider Licensing**: Verify usage rights for your specific application
294
+
295
+ ## Citation
296
+
297
+ If you use this dataset, please cite:
298
+
299
+ **Original Dataset:**
300
+ ```bibtex
301
+ @misc{scanned-images-ocr-vlm,
302
+ author = {suvroo},
303
+ title = {Scanned Images Dataset for OCR and VLM finetuning},
304
+ year = {2024},
305
+ publisher = {Kaggle},
306
+ url = {https://www.kaggle.com/datasets/suvroo/scanned-images-dataset-for-ocr-and-vlm-finetuning}
307
+ }
308
+ ```
 
 
 
 
 
309
 
310
+ **FiftyOne Port:**
311
+ ```bibtex
312
+ @misc{scanned-images-ocr-vlm-fiftyone,
313
+ author = {Harpreet Sahota},
314
+ title = {Scanned Images Dataset for OCR and VLM finetuning (FiftyOne)},
315
+ year = {2026},
316
+ publisher = {Hugging Face},
317
+ url = {https://huggingface.co/datasets/voxel51/scanned-images-dataset-for-ocr-and-vlm-finetuning}
318
+ }
319
+ ```
320
 
321
  ## Dataset Card Contact
322
 
323
+ For questions or issues with this FiftyOne port, please open an issue on the Hugging Face dataset repository.