andandandand commited on
Commit
1a9b505
·
verified ·
1 Parent(s): 6e09871

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +94 -92
README.md CHANGED
@@ -68,16 +68,14 @@ dataset_summary: '
68
  '
69
  ---
70
 
71
- # Dataset Card for curated-mnist
72
-
73
- <!-- Provide a quick summary of the dataset. -->
74
-
75
 
 
76
 
 
77
 
78
  ![image/png](dataset_preview.webp)
79
 
80
-
81
  This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset with 70000 samples.
82
 
83
  ## Installation
@@ -102,135 +100,139 @@ dataset = load_from_hub("andandandand/curated-mnist")
102
  session = fo.launch_app(dataset)
103
  ```
104
 
105
-
106
- ## Dataset Details
107
-
108
  ### Dataset Description
109
 
110
- <!-- Provide a longer summary of what this dataset is. -->
111
 
 
 
 
 
 
 
 
 
112
 
113
-
114
- - **Curated by:** [More Information Needed]
115
- - **Funded by [optional]:** [More Information Needed]
116
- - **Shared by [optional]:** [More Information Needed]
117
  - **Language(s) (NLP):** en
118
  - **License:** mit
119
 
120
- ### Dataset Sources [optional]
121
-
122
- <!-- Provide the basic links for the dataset. -->
123
 
124
- - **Repository:** [More Information Needed]
125
- - **Paper [optional]:** [More Information Needed]
126
- - **Demo [optional]:** [More Information Needed]
 
 
127
 
128
- ## Uses
129
-
130
- <!-- Address questions around how the dataset is intended to be used. -->
131
 
132
  ### Direct Use
133
 
134
- <!-- This section describes suitable use cases for the dataset. -->
135
-
136
- [More Information Needed]
 
 
 
 
137
 
138
  ### Out-of-Scope Use
139
 
140
- <!-- This section addresses misuse, malicious use, and uses that the dataset will not work well for. -->
141
-
142
- [More Information Needed]
143
 
144
  ## Dataset Structure
145
 
146
- <!-- 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. -->
147
-
148
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
150
- ## Dataset Creation
151
 
152
  ### Curation Rationale
153
 
154
- <!-- Motivation for the creation of this dataset. -->
155
-
156
- [More Information Needed]
157
 
158
- ### Source Data
159
-
160
- <!-- This section describes the source data (e.g. news text and headlines, social media posts, translated sentences, ...). -->
161
 
162
  #### Data Collection and Processing
163
 
164
- <!-- This section describes the data collection and processing process such as data selection criteria, filtering and normalization methods, tools and libraries used, etc. -->
165
-
166
- [More Information Needed]
 
 
 
 
 
 
 
167
 
168
  #### Who are the source data producers?
169
 
170
- <!-- 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. -->
171
-
172
- [More Information Needed]
173
-
174
- ### Annotations [optional]
175
-
176
- <!-- If the dataset contains annotations which are not part of the initial data collection, use this section to describe them. -->
177
-
178
- #### Annotation process
179
 
180
- <!-- 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. -->
181
 
182
- [More Information Needed]
 
 
183
 
184
- #### Who are the annotators?
185
-
186
- <!-- This section describes the people or systems who created the annotations. -->
187
-
188
- [More Information Needed]
189
-
190
- #### Personal and Sensitive Information
191
-
192
- <!-- 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. -->
193
-
194
- [More Information Needed]
195
 
196
  ## Bias, Risks, and Limitations
197
 
198
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
199
-
200
- [More Information Needed]
201
-
202
- ### Recommendations
203
-
204
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
205
-
206
- Users should be made aware of the risks, biases and limitations of the dataset. More information needed for further recommendations.
207
 
208
- ## Citation [optional]
209
-
210
- <!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
211
 
212
  **BibTeX:**
213
 
214
- [More Information Needed]
215
-
216
- **APA:**
217
-
218
- [More Information Needed]
219
-
220
- ## Glossary [optional]
221
-
222
- <!-- If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
223
-
224
- [More Information Needed]
225
-
226
- ## More Information [optional]
227
 
228
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
229
 
230
- ## Dataset Card Authors [optional]
231
 
232
- [More Information Needed]
233
 
234
  ## Dataset Card Contact
235
 
236
- [More Information Needed]
 
68
  '
69
  ---
70
 
71
+ # Dataset Card for CuratedMNIST
 
 
 
72
 
73
+ This dataset is a curated version of the classic MNIST dataset, enriched with model predictions, embeddings, and various analytical fields generated using the [FiftyOne](https://github.com/voxel51/fiftyone) library. It was created as part of the "Image Classification and Dataset Curation with FiftyOne and PyTorch" tutorial to demonstrate practical computer vision workflows.
74
 
75
+ The dataset contains the original 60,000 training and 10,000 test samples, with the training set further split into training (85%) and validation (15%) subsets. It includes predictions from OpenAI's CLIP model (zero-shot), a custom-trained LeNet-5 model, and a final LeNet-5 model that was fine-tuned on an augmented set of challenging samples. This structure makes it ideal for educational purposes, allowing users to explore model comparison, error analysis, and data-centric AI techniques.
76
 
77
  ![image/png](dataset_preview.webp)
78
 
 
79
  This is a [FiftyOne](https://github.com/voxel51/fiftyone) dataset with 70000 samples.
80
 
81
  ## Installation
 
100
  session = fo.launch_app(dataset)
101
  ```
102
 
 
 
 
103
  ### Dataset Description
104
 
105
+ This curated version of MNIST serves as a comprehensive resource for learning and experimenting with image classification workflows. Starting with the original MNIST dataset, this version adds multiple layers of metadata and analysis to each sample. It is designed to accompany a Voxel51 tutorial focused on dataset curation and model evaluation.
106
 
107
+ The key additions include:
108
+ * **Train/Validation/Test Splits:** The original 60,000 training images are split into a training set (51,000 samples) and a validation set (9,000 samples). The original 10,000 test images are maintained as the test set.
109
+ * **Model Predictions:** Each sample in the appropriate split contains predictions from different models:
110
+ * Zero-shot predictions from OpenAI's CLIP (`clip-vit-base32-torch`).
111
+ * Predictions from a baseline LeNet-5 CNN trained from scratch on the training set.
112
+ * Predictions from a retrained LeNet-5 model, fine-tuned on a curated set of misclassified and challenging samples with data augmentation.
113
+ * **Embeddings:** Both image embeddings from CLIP and feature embeddings from the trained LeNet-5 model are included.
114
+ * **Analysis Fields:** FiftyOne's "Brain" methods were used to compute `hardness`, `mistakenness`, `uniqueness`, and `representativeness` scores, enabling deep dives into data quality and model behavior.
115
 
116
+ - **Curated by:** Antonio Rueda-Toicen
117
+ - **Funded by:** Voxel51
 
 
118
  - **Language(s) (NLP):** en
119
  - **License:** mit
120
 
121
+ ### Dataset Sources
 
 
122
 
123
+ - **Repository:** [andandandand/practical-computer-vision](https://github.com/andandandand/practical-computer-vision)
124
+ - **Paper:**
125
+ - For MNIST: [Gradient-Based Learning Applied to Document Recognition](http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf)
126
+ - For CLIP: [Learning Transferable Visual Models From Natural Language Supervision](https://arxiv.org/abs/2103.00020)
127
+ - **Demo:** [Image Classification and Dataset Curation with FiftyOne and PyTorch](https://colab.research.google.com/github/andandandand/practical-computer-vision/blob/main/notebooks/Image_Classification_and_Dataset_Curation_with_FiftyOne_and_PyTorch_Getting_Started.ipynb)
128
 
 
 
 
129
 
130
  ### Direct Use
131
 
132
+ This dataset is primarily intended for educational and research purposes in computer vision and data-centric AI. Suitable uses include:
133
+ * Learning how to load, visualize, and interact with image classification datasets using FiftyOne.
134
+ * Comparing the performance of different classification models (e.g., zero-shot vs. supervised, baseline vs. fine-tuned).
135
+ * Understanding and applying techniques for error analysis, such as identifying hard samples, potential label errors (`mistakenness`), and outliers (`uniqueness`).
136
+ * Exploring the concept of image embeddings for visualization (PCA, UMAP) and similarity search.
137
+ * Practicing data curation workflows, such as identifying problematic samples for augmentation and retraining.
138
+ * Benchmarking new classification algorithms or data augmentation strategies on a well-understood but richly annotated dataset.
139
 
140
  ### Out-of-Scope Use
141
 
142
+ This dataset is not intended for training production-level models for general-purpose digit recognition, as it is based on the relatively simple and constrained MNIST domain (28x28 grayscale images). Models trained on this dataset will not generalize to real-world images of digits with complex backgrounds, colors, or fonts. The dataset should not be used to draw conclusions about model performance on natural images.
 
 
143
 
144
  ## Dataset Structure
145
 
146
+ The dataset contains three splits, identified by the `tags` field on each sample: `train`, `validation`, and `test`.
147
+
148
+ Each sample contains the following fields:
149
+ * `filepath`: The path to the 28x28 grayscale PNG image.
150
+ * `ground_truth`: A `fiftyone.Classification` object containing the ground truth digit label (0-9).
151
+ * `tags`: A list of tags indicating the split (`train`, `validation`, or `test`).
152
+ * `metadata`: A `fiftyone.Metadata` object with image properties like width, height, and size in bytes.
153
+ * `clip_embeddings`: A 512-dimensional vector from the `clip-vit-base32-torch` model. (Test set only)
154
+ * `clip_zero_shot_classification`: A `fiftyone.Classification` object with the zero-shot prediction from CLIP. (Test set only)
155
+ * `lenet_embeddings`: An 84-dimensional feature vector from the penultimate layer of the trained LeNet-5 model. (Train set only)
156
+ * `lenet_classification`: A `fiftyone.Classification` object with the prediction from the baseline LeNet-5 model. (Test set only)
157
+ * `lenet_train_classification`: Predictions from the LeNet-5 model on the training data, used for analysis. (Train set only)
158
+ * `retrained_lenet_classification`: Predictions from the final fine-tuned LeNet-5 model. (Test set only)
159
+ * `hardness`: A float score indicating how challenging the sample was for a model to classify.
160
+ * `mistakenness`: A float score indicating the likelihood of a sample being mislabeled, based on model disagreement with the ground truth.
161
+ * `uniqueness`: A float score measuring how distinct a sample's embedding is from others.
162
+ * `representativeness`: A float score measuring how well a sample's embedding represents its local cluster.
163
 
 
164
 
165
  ### Curation Rationale
166
 
167
+ The primary motivation for creating this dataset was to provide a hands-on, practical resource for a tutorial on modern computer vision workflows. While MNIST is a "solved" problem, its familiarity makes it an excellent canvas for demonstrating advanced techniques. By enriching MNIST with model predictions, embeddings, and analytical scores, the dataset enables users to move beyond simple model training and focus on the iterative process of data curation, model evaluation, and error analysis that is central to building robust machine learning systems.
 
 
168
 
 
 
 
169
 
170
  #### Data Collection and Processing
171
 
172
+ The source data is the Modified National Institute of Standards and Technology (MNIST) dataset. The curation process was performed programmatically as follows:
173
+ 1. The official `train` and `test` splits of MNIST were loaded from the FiftyOne Dataset Zoo.
174
+ 2. The 60,000-sample `train` split was deterministically divided into an 85% training set (51,000 samples) and a 15% validation set (9,000 samples).
175
+ 3. A modern variant of the LeNet-5 architecture was trained from scratch in PyTorch on the new training set, with the best model checkpoint selected based on validation loss.
176
+ 4. The trained LeNet-5 model and a pre-trained `clip-vit-base32-torch` model from the FiftyOne Model Zoo were applied to the test set to generate predictions (`lenet_classification`, `clip_zero_shot_classification`).
177
+ 5. The LeNet-5 model was also run on the training set to identify misclassified samples and samples classified with low confidence.
178
+ 6. Analysis fields (embeddings, hardness, mistakenness, etc.) were computed using FiftyOne Brain methods.
179
+ 7. A subset of problematic training samples (misclassified, unique, highly representative, or low-confidence) were identified for data augmentation.
180
+ 8. The baseline LeNet-5 model was fine-tuned on a new dataset composed of the original training data plus augmented versions of the problematic samples.
181
+ 9. The final, retrained model was applied to the test set to generate `retrained_lenet_classification` predictions.
182
 
183
  #### Who are the source data producers?
184
 
185
+ The original MNIST data was collected by the National Institute of Standards and Technology. The dataset was later processed and popularized by Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. The handwritten digits were sourced from two groups: American Census Bureau employees and American high school students.
 
 
 
 
 
 
 
 
186
 
187
+ ### Annotations
188
 
189
+ The dataset contains two types of annotations:
190
+ 1. **Ground Truth Labels**: These are the original digit labels (0-9) from the MNIST dataset. The annotators were the original writers of the digits (Census Bureau employees and high school students).
191
+ 2. **Model Predictions**: These are generated labels from the CLIP, LeNet-5, and retrained LeNet-5 models. The "annotators" in this case are the machine learning models themselves. These predictions are stored in separate fields and are intended for model evaluation and comparison, not as ground truth.
192
 
193
+ The curation process used `mistakenness` scores to identify samples where the ground truth label is likely incorrect, but these labels were not corrected in order to preserve the original dataset benchmark.
 
 
 
 
 
 
 
 
 
 
194
 
195
  ## Bias, Risks, and Limitations
196
 
197
+ * **Label Noise:** As discussed in the curation notebook and academic literature, the original MNIST dataset contains a small number of ambiguous or incorrectly labeled samples. This dataset's `mistakenness` field helps identify these, but they have not been removed or corrected.
198
+ * **Lack of Diversity:** MNIST consists of small, centered, grayscale handwritten digits. It is not representative of digits in natural scenes ("in the wild"). Models trained on this dataset will perform poorly on other visual domains without significant adaptation.
199
+ * **Demographic Bias:** The handwriting styles are sourced from American Census Bureau employees and high school students from the 1990s. The dataset may not be representative of global handwriting styles or handwriting from different demographic groups.
200
+ * **Model-Specific Biases:** The added predictions and embeddings reflect the specific architectures and training data of the models used (CLIP, LeNet-5). The `lenet_` fields are specific to the model trained in the tutorial and may not generalize to other architectures.
 
 
 
 
 
201
 
202
+ ## Citation
 
 
203
 
204
  **BibTeX:**
205
 
206
+ To cite the original MNIST dataset:
207
+ ```bibtex
208
+ @article{lecun1998gradient,
209
+ title={Gradient-based learning applied to document recognition},
210
+ author={LeCun, Yann and Bottou, L{\'e}on and Bengio, Yoshua and Haffner, Patrick},
211
+ journal={Proceedings of the IEEE},
212
+ volume={86},
213
+ number={11},
214
+ pages={2278--2324},
215
+ year={1998},
216
+ publisher={IEEE}
217
+ }
218
+ ```
219
 
220
+ To cite the CLIP model:
221
+ ```bibtex
222
+ @inproceedings{radford2021learning,
223
+ title={Learning transferable visual models from natural language supervision},
224
+ author={Radford, Alec and Kim, Jong Wook and Hallacy, Chris and Ramesh, Aditya and Goh, Gabriel and Agarwal, Sandhini and Sastry, Girish and Askell, Amanda and Mishkin, Pamela and Clark, Jack and Krueger, Gretchen and Sutskever, Ilya},
225
+ booktitle={International conference on machine learning},
226
+ pages={8748--8763},
227
+ year={2021},
228
+ organization={PMLR}
229
+ }
230
+ ```
231
 
232
+ ## Dataset Card Authors
233
 
234
+ Antonio Rueda-Toicen
235
 
236
  ## Dataset Card Contact
237
 
238
+ [GitHub: andandandand](https://github.com/andandandand)