maryzhang commited on
Commit
437e543
·
verified ·
1 Parent(s): 07e3c85

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +204 -28
README.md CHANGED
@@ -1,10 +1,43 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  dataset_info:
3
  features:
4
  - name: image
5
  dtype: image
6
  - name: label
7
  dtype: int32
 
8
  splits:
9
  - name: original
10
  num_bytes: 469379.0
@@ -14,32 +47,175 @@ dataset_info:
14
  num_examples: 320
15
  download_size: 27483853
16
  dataset_size: 27482557.0
17
- configs:
18
- - config_name: default
19
- data_files:
20
- - split: original
21
- path: data/original-*
22
- - split: augmented
23
- path: data/augmented-*
24
  ---
25
- # Asian vs Western Food Image Dataset with Augmentations
26
- This dataset contains food images for binary classification between Asian and Western cuisine styles.
27
-
28
- ## Dataset Structure
29
- - **original**: 40 original food images (224x224 pixels)
30
- - **augmented**: 320 synthetic samples generated using image augmentation techniques
31
-
32
- ## Features
33
- - `image`: Food image (PIL Image, 224x224 RGB)
34
- - `label`: Binary classification (int32)
35
- - 0: Western cuisine
36
- - 1: Asian cuisine
37
-
38
- ## Augmentation Techniques Used
39
- Image augmentations were applied to create 8x synthetic samples:
40
- - **Random cropping**: Scale 0.7-1.0 with aspect ratio preservation
41
- - **Rotation**: ±15 degrees random rotation
42
- - **Flipping**: Horizontal (50%) and vertical (10%) flips
43
- - **Color jittering**: Brightness, contrast, saturation, and hue adjustments
44
- - **RandAugment**: Advanced augmentation with magnitude 7
45
- - **Random erasing**: 20% probability for occlusion robustness
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ license: cc-by-4.0
5
+ tags:
6
+ - image-classification
7
+ - food
8
+ - cuisine-classification
9
+ - binary-classification
10
+ - computer-vision
11
+ - augmented-dataset
12
+ - cmu-24679
13
+ annotations_creators:
14
+ - expert-generated
15
+ language_creators:
16
+ - found
17
+ pretty_name: Asian vs Western Food Classification Dataset
18
+ size_categories:
19
+ - n<1K
20
+ source_datasets:
21
+ - original
22
+ task_categories:
23
+ - image-classification
24
+ task_ids:
25
+ - multi-class-image-classification
26
+ paperswithcode_id: null
27
+ configs:
28
+ - config_name: default
29
+ data_files:
30
+ - split: original
31
+ path: data/original-*
32
+ - split: augmented
33
+ path: data/augmented-*
34
  dataset_info:
35
  features:
36
  - name: image
37
  dtype: image
38
  - name: label
39
  dtype: int32
40
+ config_name: default
41
  splits:
42
  - name: original
43
  num_bytes: 469379.0
 
47
  num_examples: 320
48
  download_size: 27483853
49
  dataset_size: 27482557.0
 
 
 
 
 
 
 
50
  ---
51
+
52
+ # Asian vs Western Food Classification Dataset
53
+
54
+ ## Dataset Summary
55
+
56
+ **Purpose**: This dataset was created for binary classification of food images into Asian or Western cuisine categories, developed as part of CMU 24-679 coursework to explore computer vision techniques in food recognition.
57
+
58
+ **Quick Stats**:
59
+ - 360 total images (40 original + 320 augmented)
60
+ - Binary classification task
61
+ - 224x224 RGB images
62
+ - Balanced classes (~50% each category)
63
+
64
+ **Contact**: [email protected]
65
+
66
+ ## Sample Contact Sheet
67
+
68
+ *Sample grid showing 4 Asian cuisine images (top row) and 4 Western cuisine images (bottom row) from the original dataset*
69
+
70
+ ## Dataset Composition
71
+
72
+ ### Features
73
+ - `image`: PIL Image object (224x224 RGB)
74
+ - `label`: Integer (0=Western, 1=Asian)
75
+
76
+ ### Class Distribution
77
+ | Cuisine Type | Original | Augmented | Label |
78
+ |-------------|----------|-----------|-------|
79
+ | Western | 20 | 160 | 0 |
80
+ | Asian | 20 | 160 | 1 |
81
+
82
+ ### Data Splits
83
+ - **original**: 40 hand-collected food images
84
+ - **augmented**: 320 synthetically augmented images (8x augmentation per original)
85
+
86
+ ## Data Collection Process
87
+
88
+ ### Collection Methodology
89
+ Images were collected between January-February 2025 using:
90
+ - Personal photography of restaurant meals
91
+ - Home-cooked dishes from both culinary traditions
92
+ - Mobile phone cameras (various models)
93
+ - Natural lighting conditions when possible
94
+
95
+ ### Selection Criteria
96
+ - Clear food presentation
97
+ - Distinctive cuisine characteristics
98
+ - No people or identifying information in frame
99
+ - Variety in dish types (appetizers, mains, desserts)
100
+ - Representative of common dishes from each cuisine
101
+
102
+ ## Preprocessing and Augmentation
103
+
104
+ ### Preprocessing Pipeline
105
+ 1. Resize to 224x224 pixels (bilinear interpolation)
106
+ 2. Convert to RGB format
107
+ 3. Normalize pixel values to [0, 255]
108
+
109
+ ### Augmentation Techniques
110
+ Each original image generated 7 augmented variants using:
111
+ - **Geometric**: RandomResizedCrop (0.7-1.0), RandomRotation (±15°), RandomHorizontalFlip (p=0.5)
112
+ - **Color**: ColorJitter (brightness=0.2, contrast=0.2, saturation=0.15, hue=0.05)
113
+ - **Advanced**: RandAugment (num_ops=2, magnitude=7), RandomErasing (p=0.2)
114
+
115
+ ## Labels and Annotation
116
+
117
+ ### Labeling Schema
118
+ - **0**: Western cuisine (European, American dishes)
119
+ - **1**: Asian cuisine (East Asian, Southeast Asian dishes)
120
+
121
+ ### Annotation Process
122
+ - Manual labeling by dataset creator
123
+ - Verification based on known cuisine origins
124
+ - Edge cases resolved by primary ingredients and cooking methods
125
+
126
+ ## Intended Use and Limitations
127
+
128
+ ### Intended Use Cases
129
+ - Educational projects in computer vision
130
+ - Binary food classification research
131
+ - Transfer learning experiments
132
+ - Baseline model development
133
+
134
+ ### Limitations
135
+ - Small dataset size requires transfer learning for good performance
136
+ - Binary classification oversimplifies cuisine diversity
137
+ - May not generalize to fusion cuisine or ambiguous dishes
138
+ - Limited to common dishes, not comprehensive of all cuisine varieties
139
+ - Potential bias toward restaurant-style presentation
140
+
141
+ ### Out-of-Scope Uses
142
+ - Commercial food recognition systems
143
+ - Medical or dietary assessment applications
144
+ - Fine-grained cuisine classification (regional variations)
145
+ - Production deployment without additional training data
146
+
147
+ ## Ethical Considerations
148
+
149
+ ### Representation
150
+ - Effort made to balance representation between cuisine types
151
+ - Acknowledges that binary classification may perpetuate oversimplified cultural categories
152
+ - "Asian" and "Western" are broad categorizations that don't capture cuisine diversity
153
+
154
+ ### Privacy
155
+ - No personally identifiable information included
156
+ - No restaurant branding or identifying markers
157
+ - Images taken in public settings or personal kitchens
158
+
159
+ ### Cultural Sensitivity
160
+ - Dataset created for educational purposes
161
+ - Users should be aware of cultural simplification in binary categorization
162
+ - Not intended to make value judgments about cuisine types
163
+
164
+ ## AI Usage Disclosure
165
+
166
+ ### AI-Assisted Components
167
+ - **Augmentation code**: Partially generated using AI assistance for transform pipeline
168
+ - **Documentation**: README structure and sections refined with AI assistance
169
+ - **Data collection**: All images are original, not AI-generated
170
+ - **Labels**: Manually assigned, not AI-generated
171
+
172
+ ### Human Oversight
173
+ - All images personally collected and verified
174
+ - Labels manually reviewed for accuracy
175
+ - Augmentation parameters tuned based on empirical testing
176
+ - Final dataset curated and quality-checked by human creator
177
+
178
+ ## Usage Example
179
+
180
+ ```python
181
+ from datasets import load_dataset
182
+ from torchvision import transforms
183
+
184
+ # Load dataset
185
+ dataset = load_dataset("maryzhang/hw1-24679-image-dataset")
186
+
187
+ # Setup transforms
188
+ transform = transforms.Compose([
189
+ transforms.ToTensor(),
190
+ transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
191
+ ])
192
+
193
+ # Access data
194
+ sample = dataset['original'][0]
195
+ image, label = sample['image'], sample['label']
196
+ cuisine = "Asian" if label == 1 else "Western"
197
+
198
+ print(f"Sample cuisine type: {cuisine}")
199
+ ```
200
+
201
+ ## Citation
202
+
203
+ ```bibtex
204
+ @dataset{zhang2025food,
205
+ author = {Mary Zhang},
206
+ title = {Asian vs Western Food Classification Dataset},
207
+ year = {2025},
208
+ publisher = {Hugging Face},
209
+ note = {CMU 24-679 Homework 1},
210
+ url = {https://huggingface.co/datasets/maryzhang/hw1-24679-image-dataset}
211
+ }
212
+ ```
213
+
214
+ ## License
215
+
216
+ This dataset is released under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license.
217
+
218
+ ## Contact
219
+
220
+ Dataset created by Mary Zhang for CMU 24-679.
221
+ For questions or issues, please use the [discussion forum](https://huggingface.co/datasets/maryzhang/hw1-24679-image-dataset/discussions) on Hugging Face.