Datasets:
Tasks:
Image Classification
Modalities:
Image
Formats:
parquet
Size:
10K - 100K
Tags:
image-classification
computer-vision
imagewoof
imagenet
confidence-calibration
temperature-scaling
License:
Add dataset card
Browse files
README.md
CHANGED
|
@@ -1,42 +1,232 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
dataset_info:
|
| 3 |
config_name: 320px
|
| 4 |
features:
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
splits:
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
- name: test
|
| 29 |
-
num_bytes: 50738640.13545431
|
| 30 |
-
num_examples: 1965
|
| 31 |
-
download_size: 334043328
|
| 32 |
-
dataset_size: 334116340.168
|
| 33 |
-
configs:
|
| 34 |
-
- config_name: 320px
|
| 35 |
-
data_files:
|
| 36 |
-
- split: train
|
| 37 |
-
path: 320px/train-*
|
| 38 |
-
- split: validation
|
| 39 |
-
path: 320px/validation-*
|
| 40 |
-
- split: test
|
| 41 |
-
path: 320px/test-*
|
| 42 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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- imagenet
|
| 10 |
+
- confidence-calibration
|
| 11 |
+
- temperature-scaling
|
| 12 |
+
pretty_name: ImageWoof 320px with Fixed Validation and Test Splits
|
| 13 |
+
size_categories:
|
| 14 |
+
- 10K<n<100K
|
| 15 |
+
configs:
|
| 16 |
+
- config_name: 320px
|
| 17 |
+
data_files:
|
| 18 |
+
- split: train
|
| 19 |
+
path: 320px/train-*
|
| 20 |
+
- split: validation
|
| 21 |
+
path: 320px/validation-*
|
| 22 |
+
- split: test
|
| 23 |
+
path: 320px/test-*
|
| 24 |
dataset_info:
|
| 25 |
config_name: 320px
|
| 26 |
features:
|
| 27 |
+
- name: image
|
| 28 |
+
dtype: image
|
| 29 |
+
- name: label
|
| 30 |
+
dtype:
|
| 31 |
+
class_label:
|
| 32 |
+
names:
|
| 33 |
+
- Shih-Tzu
|
| 34 |
+
- Rhodesian ridgeback
|
| 35 |
+
- Beagle
|
| 36 |
+
- English foxhound
|
| 37 |
+
- Border terrier
|
| 38 |
+
- Australian terrier
|
| 39 |
+
- Golden retriever
|
| 40 |
+
- Old English sheepdog
|
| 41 |
+
- Samoyed
|
| 42 |
+
- Dingo
|
| 43 |
splits:
|
| 44 |
+
- name: train
|
| 45 |
+
num_examples: 9025
|
| 46 |
+
- name: validation
|
| 47 |
+
num_examples: 1964
|
| 48 |
+
- name: test
|
| 49 |
+
num_examples: 1965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
---
|
| 51 |
+
|
| 52 |
+
# ImageWoof 320px with Fixed Validation and Test Splits
|
| 53 |
+
|
| 54 |
+
## Dataset Description
|
| 55 |
+
|
| 56 |
+
This dataset is a reproducible, Parquet-based version of the `320px` configuration of [frgfm/imagewoof](https://huggingface.co/datasets/frgfm/imagewoof). ImageWoof is a subset of ten dog-breed classes from ImageNet designed to be more difficult than broad-category image-classification benchmarks.
|
| 57 |
+
|
| 58 |
+
This version is intended for image classification and confidence-calibration experiments. It introduces two changes to the source dataset:
|
| 59 |
+
|
| 60 |
+
1. It corrects the source `ClassLabel` metadata so every numeric label matches its ImageNet synset and breed name.
|
| 61 |
+
2. It divides the original validation set into fixed, stratified validation and test splits.
|
| 62 |
+
|
| 63 |
+
The images and numeric labels are inherited unchanged from the source dataset. Only label metadata and split assignment were modified.
|
| 64 |
+
|
| 65 |
+
## Dataset Sources
|
| 66 |
+
|
| 67 |
+
- **Source dataset:** [frgfm/imagewoof](https://huggingface.co/datasets/frgfm/imagewoof)
|
| 68 |
+
- **Original project:** [fastai/imagenette](https://github.com/fastai/imagenette)
|
| 69 |
+
- **Image source:** ImageNet
|
| 70 |
+
- **Configuration:** `320px`
|
| 71 |
+
- **License declared by the source dataset:** Apache License 2.0
|
| 72 |
+
|
| 73 |
+
## Dataset Structure
|
| 74 |
+
|
| 75 |
+
Each example contains:
|
| 76 |
+
|
| 77 |
+
```python
|
| 78 |
+
{
|
| 79 |
+
"image": PIL.Image.Image,
|
| 80 |
+
"label": int,
|
| 81 |
+
}
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
The `label` feature is a `ClassLabel` with ten breed names.
|
| 85 |
+
|
| 86 |
+
### Splits
|
| 87 |
+
|
| 88 |
+
| Split | Examples | Intended use |
|
| 89 |
+
|---|---:|---|
|
| 90 |
+
| `train` | 9,025 | Model training and training-only preprocessing statistics |
|
| 91 |
+
| `validation` | 1,964 | Model selection, early stopping, and calibration fitting |
|
| 92 |
+
| `test` | 1,965 | Final evaluation only |
|
| 93 |
+
| **Total** | **12,954** | |
|
| 94 |
+
|
| 95 |
+
The source training split remains unchanged. The source validation split contained 3,929 examples and was divided using a stratified 50/50 split with seed `42`.
|
| 96 |
+
|
| 97 |
+
## Label Metadata Correction
|
| 98 |
+
|
| 99 |
+
The source dataset stores numeric labels in ImageNet synset order, but its original `ClassLabel.names` list uses a different order. This causes displayed breed names to disagree with the images even though the underlying image-to-ID assignments are correct.
|
| 100 |
+
|
| 101 |
+
This version preserves every numeric label and assigns the following corrected metadata:
|
| 102 |
+
|
| 103 |
+
| Label ID | ImageNet synset | Correct class name | Source metadata name |
|
| 104 |
+
|---:|---|---|---|
|
| 105 |
+
| 0 | `n02086240` | Shih-Tzu | Australian terrier |
|
| 106 |
+
| 1 | `n02087394` | Rhodesian ridgeback | Border terrier |
|
| 107 |
+
| 2 | `n02088364` | Beagle | Samoyed |
|
| 108 |
+
| 3 | `n02089973` | English foxhound | Beagle |
|
| 109 |
+
| 4 | `n02093754` | Border terrier | Shih-Tzu |
|
| 110 |
+
| 5 | `n02096294` | Australian terrier | English foxhound |
|
| 111 |
+
| 6 | `n02099601` | Golden retriever | Rhodesian ridgeback |
|
| 112 |
+
| 7 | `n02105641` | Old English sheepdog | Dingo |
|
| 113 |
+
| 8 | `n02111889` | Samoyed | Golden retriever |
|
| 114 |
+
| 9 | `n02115641` | Dingo | Old English sheepdog |
|
| 115 |
+
|
| 116 |
+
## Class Distribution
|
| 117 |
+
|
| 118 |
+
| ID | Class | Train | Validation | Test | Total |
|
| 119 |
+
|---:|---|---:|---:|---:|---:|
|
| 120 |
+
| 0 | Shih-Tzu | 941 | 204 | 205 | 1,350 |
|
| 121 |
+
| 1 | Rhodesian ridgeback | 942 | 204 | 204 | 1,350 |
|
| 122 |
+
| 2 | Beagle | 932 | 209 | 209 | 1,350 |
|
| 123 |
+
| 3 | English foxhound | 580 | 112 | 112 | 804 |
|
| 124 |
+
| 4 | Border terrier | 949 | 201 | 200 | 1,350 |
|
| 125 |
+
| 5 | Australian terrier | 943 | 203 | 204 | 1,350 |
|
| 126 |
+
| 6 | Golden retriever | 949 | 201 | 200 | 1,350 |
|
| 127 |
+
| 7 | Old English sheepdog | 928 | 211 | 211 | 1,350 |
|
| 128 |
+
| 8 | Samoyed | 921 | 214 | 215 | 1,350 |
|
| 129 |
+
| 9 | Dingo | 940 | 205 | 205 | 1,350 |
|
| 130 |
+
|
| 131 |
+
English foxhound contains fewer examples than the other classes. Users should consider this imbalance when interpreting aggregate classification and calibration metrics.
|
| 132 |
+
|
| 133 |
+
## Dataset Creation
|
| 134 |
+
|
| 135 |
+
### Split Procedure
|
| 136 |
+
|
| 137 |
+
The fixed held-out splits were created from the source validation split with:
|
| 138 |
+
|
| 139 |
+
```python
|
| 140 |
+
validation_test = source["validation"].train_test_split(
|
| 141 |
+
test_size=0.5,
|
| 142 |
+
seed=42,
|
| 143 |
+
stratify_by_column="label",
|
| 144 |
+
)
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
+
The resulting `validation_test["train"]` split became `validation`, and `validation_test["test"]` became `test`. Publishing these assignments as Parquet removes dependence on future library behavior and ensures that all experiments use the same examples.
|
| 148 |
+
|
| 149 |
+
### Preprocessing
|
| 150 |
+
|
| 151 |
+
The source `320px` configuration resizes the shorter side of each image to 320 pixels while preserving its aspect ratio. Images are not guaranteed to be square.
|
| 152 |
+
|
| 153 |
+
No additional resizing, cropping, augmentation, or pixel normalization was applied while creating this dataset.
|
| 154 |
+
|
| 155 |
+
### Training-Set Channel Statistics
|
| 156 |
+
|
| 157 |
+
Pixel-weighted RGB statistics were calculated from the complete training split after converting images to RGB and scaling values to `[0, 1]`:
|
| 158 |
+
|
| 159 |
+
```python
|
| 160 |
+
mean = (0.485513, 0.455452, 0.393252)
|
| 161 |
+
std = (0.259905, 0.252752, 0.261519)
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
These values may be useful when training a model from scratch. Models initialized with pretrained ImageNet weights should generally use the preprocessing and normalization specified by those weights, such as `weights.transforms()` in `torchvision`.
|
| 165 |
+
|
| 166 |
+
## Usage
|
| 167 |
+
|
| 168 |
+
```python
|
| 169 |
+
from datasets import load_dataset
|
| 170 |
+
|
| 171 |
+
dataset = load_dataset(
|
| 172 |
+
"leandrodevai/imagewoof-320px-calibration",
|
| 173 |
+
"320px",
|
| 174 |
+
)
|
| 175 |
+
|
| 176 |
+
train_dataset = dataset["train"]
|
| 177 |
+
validation_dataset = dataset["validation"]
|
| 178 |
+
test_dataset = dataset["test"]
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
For calibration experiments:
|
| 182 |
+
|
| 183 |
+
1. Train the classifier on `train`.
|
| 184 |
+
2. Fit temperature scaling or another post-hoc calibrator on `validation`.
|
| 185 |
+
3. Report classification and calibration metrics once on `test`.
|
| 186 |
+
|
| 187 |
+
The test split should not be used for architecture selection, hyperparameter tuning, early stopping, or calibrator fitting.
|
| 188 |
+
|
| 189 |
+
## Intended Uses
|
| 190 |
+
|
| 191 |
+
This dataset is suitable for:
|
| 192 |
+
|
| 193 |
+
- supervised dog-breed image classification;
|
| 194 |
+
- confidence calibration and reliability-diagram experiments;
|
| 195 |
+
- evaluation of expected calibration error, negative log-likelihood, and Brier score;
|
| 196 |
+
- post-hoc calibration methods such as temperature scaling;
|
| 197 |
+
- controlled comparisons between pretrained and from-scratch training strategies.
|
| 198 |
+
|
| 199 |
+
## Limitations
|
| 200 |
+
|
| 201 |
+
- The dataset contains only ten dog breeds and does not represent general image classification.
|
| 202 |
+
- English foxhound is substantially underrepresented relative to the other classes.
|
| 203 |
+
- Images inherit ImageNet collection biases, including correlations between breeds, backgrounds, framing, and photographic style.
|
| 204 |
+
- Breed labels describe visual categories and should not be interpreted as guarantees about an individual animal's pedigree.
|
| 205 |
+
- The validation and test sets originate from the same source split and should not be interpreted as independent data-collection domains.
|
| 206 |
+
- Calibration results on this dataset may not transfer to other datasets, domain shifts, corruptions, or deployment settings.
|
| 207 |
+
|
| 208 |
+
## Personal and Sensitive Information
|
| 209 |
+
|
| 210 |
+
The primary subjects are dogs. As with the source ImageNet data, some images may incidentally contain people, locations, text, or other contextual information. No additional personal information was added during preparation.
|
| 211 |
+
|
| 212 |
+
## Licensing
|
| 213 |
+
|
| 214 |
+
The source Hugging Face dataset declares the Apache License 2.0. This derivative preserves that declaration. Users are responsible for verifying that their intended use complies with the source dataset, ImageNet terms, and any rights associated with individual images.
|
| 215 |
+
|
| 216 |
+
## Citation
|
| 217 |
+
|
| 218 |
+
If this dataset is useful, cite the original ImageWoof project:
|
| 219 |
+
|
| 220 |
+
```bibtex
|
| 221 |
+
@software{Howard_Imagewoof_2019,
|
| 222 |
+
title = {Imagewoof: a subset of 10 classes from Imagenet that aren't so easy to classify},
|
| 223 |
+
author = {Jeremy Howard},
|
| 224 |
+
year = {2019},
|
| 225 |
+
month = {March},
|
| 226 |
+
publisher = {GitHub},
|
| 227 |
+
url = {https://github.com/fastai/imagenette#imagewoof}
|
| 228 |
+
}
|
| 229 |
+
```
|
| 230 |
+
|
| 231 |
+
When reporting experiments, also document that this fixed-split derivative uses a stratified 50/50 division of the original validation split with seed `42` and corrected ImageNet-synset label metadata.
|
| 232 |
+
|