abhilash88 commited on
Commit
30566d5
Β·
verified Β·
1 Parent(s): e9f55bb

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +260 -249
README.md CHANGED
@@ -1,249 +1,260 @@
1
- ---
2
- license: mit
3
- task_categories:
4
- - image-classification
5
- - visual-question-answering
6
- - zero-shot-image-classification
7
- tags:
8
- - fer2013
9
- - facial-expression-recognition
10
- - emotion-recognition
11
- - emotion-detection
12
- - computer-vision
13
- - deep-learning
14
- - machine-learning
15
- - psychology
16
- - human-computer-interaction
17
- - affective-computing
18
- - quality-enhanced
19
- - balanced-dataset
20
- - pytorch
21
- - tensorflow
22
- - transformers
23
- - cv
24
- - ai
25
- size_categories:
26
- - 10K<n<100K
27
- language:
28
- - en
29
- pretty_name: "FER2013 Enhanced: Advanced Facial Expression Recognition Dataset"
30
- dataset_info:
31
- features:
32
- - name: sample_id
33
- dtype: string
34
- - name: image
35
- dtype:
36
- array:
37
- shape: [48, 48]
38
- dtype: uint8
39
- - name: emotion
40
- dtype:
41
- class_label:
42
- names: ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral']
43
- - name: emotion_name
44
- dtype: string
45
- - name: quality_score
46
- dtype: float32
47
- - name: brightness
48
- dtype: float32
49
- - name: contrast
50
- dtype: float32
51
- - name: sample_weight
52
- dtype: float32
53
- splits:
54
- - name: train
55
- num_bytes: 1000000
56
- num_examples: 25000
57
- - name: validation
58
- num_bytes: 200000
59
- num_examples: 5400
60
- - name: test
61
- num_bytes: 200000
62
- num_examples: 5400
63
- download_size: 50000000
64
- dataset_size: 1400000
65
- viewer: true
66
- ---
67
-
68
- # FER2013 Enhanced: Advanced Facial Expression Recognition Dataset
69
-
70
- *The most comprehensive and quality-enhanced version of the famous FER2013 dataset for state-of-the-art emotion recognition research and applications.*
71
-
72
- ## 🎯 Dataset Overview
73
-
74
- **FER2013 Enhanced** is a significantly improved version of the landmark FER2013 facial expression recognition dataset. This enhanced version provides AI-powered quality assessment, balanced data splits, comprehensive metadata, and multi-format support for modern machine learning workflows.
75
-
76
- ### πŸš€ Why Choose FER2013 Enhanced?
77
-
78
- - **🎯 Superior Quality**: AI-powered quality scoring eliminates poor samples
79
- - **βš–οΈ Balanced Training**: Stratified splits with sample weights for optimal learning
80
- - **πŸ“Š Rich Features**: 15+ metadata features including brightness, contrast, edge content
81
- - **πŸ“¦ Multiple Formats**: CSV, JSON, Parquet, and native HuggingFace Datasets
82
- - **πŸ‹οΈ Production Ready**: Complete with validation, documentation, and ML integration
83
- - **πŸ” Research Grade**: Comprehensive quality metrics for academic and commercial use
84
-
85
- ### πŸ“ˆ Dataset Statistics
86
-
87
- - **Total Samples**: 35,887 high-quality images
88
- - **Training Set**: 25,117 samples
89
- - **Validation Set**: 5,380 samples
90
- - **Test Set**: 5,390 samples
91
- - **Image Resolution**: 48Γ—48 pixels (grayscale)
92
- - **Emotion Classes**: 7 distinct facial expressions
93
- - **Quality Score**: 0.436 average (0-1 scale)
94
-
95
- ## 🎭 Emotion Classes
96
-
97
- | Emotion | Count | Percentage |
98
- |---------|-------|------------|
99
- | Angry | 4,953 | 13.8% |
100
- | Disgust | 547 | 1.5% |
101
- | Fear | 5,121 | 14.3% |
102
- | Happy | 8,989 | 25.0% |
103
- | Sad | 6,077 | 16.9% |
104
- | Surprise | 4,002 | 11.2% |
105
- | Neutral | 6,198 | 17.3% |
106
-
107
-
108
- ## πŸ”§ Quick Start
109
-
110
- ### Installation and Loading
111
-
112
- ```python
113
- # Install required packages
114
- pip install datasets torch torchvision transformers
115
-
116
- # Load the dataset
117
- from datasets import load_dataset
118
-
119
- dataset = load_dataset("abhilash88/fer2013-enhanced")
120
-
121
- # Access splits
122
- train_data = dataset["train"]
123
- validation_data = dataset["validation"]
124
- test_data = dataset["test"]
125
-
126
- print(f"Training samples: {len(train_data):,}")
127
- print(f"Features: {train_data.features}")
128
- ```
129
-
130
- ### Basic Usage Example
131
-
132
- ```python
133
- import numpy as np
134
- import matplotlib.pyplot as plt
135
-
136
- # Get a sample
137
- sample = train_data[0]
138
-
139
- # Display image and info
140
- image = sample["image"]
141
- emotion = sample["emotion_name"]
142
- quality = sample["quality_score"]
143
-
144
- plt.figure(figsize=(6, 4))
145
- plt.imshow(image, cmap='gray')
146
- plt.title(f'Emotion: {emotion.capitalize()} | Quality: {quality:.3f}')
147
- plt.axis('off')
148
- plt.show()
149
-
150
- print(f"Sample ID: {sample['sample_id']}")
151
- print(f"Emotion: {emotion} (class {sample['emotion']})")
152
- print(f"Quality Score: {quality:.3f}")
153
- print(f"Brightness: {sample['brightness']:.1f}")
154
- print(f"Contrast: {sample['contrast']:.1f}")
155
- ```
156
-
157
- ### Enhanced Features
158
-
159
- Each sample includes the original FER2013 data plus these enhancements:
160
-
161
- ```python
162
- {
163
- 'sample_id': 'fer2013_000001', # Unique identifier
164
- 'emotion': 3, # Emotion label (0-6)
165
- 'emotion_name': 'happy', # Human-readable emotion
166
- 'pixels': '50 36 17 ...', # Original pixel string
167
- 'image_base64': 'iVBORw0KGgoAAAANS...', # Base64 PNG (JSON only)
168
- 'quality_score': 0.753, # AI-computed quality (0-1)
169
- 'brightness': 127.5, # Average pixel brightness
170
- 'contrast': 45.2, # Pixel standard deviation
171
- 'sample_weight': 1.24, # Class balancing weight
172
- 'edge_score': 0.234, # Edge content measure
173
- 'focus_score': 0.456, # Image sharpness
174
- 'brightness_score': 0.789, # Brightness balance
175
- 'pixel_mean': 127.5, # Pixel statistics
176
- 'pixel_std': 45.2,
177
- 'pixel_min': 0,
178
- 'pixel_max': 255
179
- }
180
- ```
181
-
182
- ### Emotion Labels
183
-
184
- - 0: **Angry** - Expressions of anger, frustration, irritation
185
- - 1: **Disgust** - Expressions of disgust, revulsion, distaste
186
- - 2: **Fear** - Expressions of fear, anxiety, worry
187
- - 3: **Happy** - Expressions of happiness, joy, contentment
188
- - 4: **Sad** - Expressions of sadness, sorrow, melancholy
189
- - 5: **Surprise** - Expressions of surprise, astonishment, shock
190
- - 6: **Neutral** - Neutral expressions, no clear emotion
191
-
192
- ## πŸ“Š Quality Assessment Methodology
193
-
194
- ### Quality Score Components
195
-
196
- Each image receives a comprehensive quality assessment:
197
-
198
- 1. **Edge Content Analysis (30% weight)**
199
- - Sobel gradient magnitude calculation
200
- - Measures facial feature clarity and definition
201
- - Higher scores indicate clearer facial boundaries
202
-
203
- 2. **Contrast Evaluation (30% weight)**
204
- - Pixel intensity standard deviation
205
- - Assesses visual distinction and dynamic range
206
- - Optimal contrast improves feature discrimination
207
-
208
- 3. **Focus/Sharpness Measurement (25% weight)**
209
- - Laplacian variance calculation
210
- - Detects blur and image sharpness
211
- - Critical for fine-grained emotion detection
212
-
213
- 4. **Brightness Balance (15% weight)**
214
- - Distance from optimal brightness range
215
- - Ensures proper illumination conditions
216
- - Prevents over/under-exposure issues
217
-
218
- ## 🎯 Citation
219
-
220
- If you use FER2013 Enhanced in your research, please cite:
221
-
222
- ```bibtex
223
- @dataset{fer2013_enhanced_2025,
224
- title={FER2013 Enhanced: Advanced Facial Expression Recognition Dataset},
225
- author={Enhanced by abhilash88},
226
- year={2025},
227
- publisher={Hugging Face},
228
- url={https://huggingface.co/datasets/abhilash88/fer2013-enhanced}
229
- }
230
-
231
- @inproceedings{goodfellow2013challenges,
232
- title={Challenges in representation learning: A report on three machine learning contests},
233
- author={Goodfellow, Ian J and Erhan, Dumitru and Carrier, Pierre Luc and Courville, Aaron and Mehri, Soroush and Raiko, Tapani and others},
234
- booktitle={Neural Information Processing Systems Workshop},
235
- year={2013}
236
- }
237
- ```
238
-
239
- ## πŸ“„ License
240
-
241
- This enhanced dataset is released under the **MIT License**.
242
-
243
- ---
244
-
245
- **🎭 Ready to build the next generation of emotion recognition systems?**
246
-
247
- *Start with `pip install datasets` and `from datasets import load_dataset`*
248
-
249
- *Last updated: 13 July 2025*
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - image-classification
5
+ - visual-question-answering
6
+ - zero-shot-image-classification
7
+ tags:
8
+ - fer2013
9
+ - facial-expression-recognition
10
+ - emotion-recognition
11
+ - emotion-detection
12
+ - computer-vision
13
+ - deep-learning
14
+ - machine-learning
15
+ - psychology
16
+ - human-computer-interaction
17
+ - affective-computing
18
+ - quality-enhanced
19
+ - balanced-dataset
20
+ - pytorch
21
+ - tensorflow
22
+ - transformers
23
+ - cv
24
+ - ai
25
+ size_categories:
26
+ - 10K<n<100K
27
+ language:
28
+ - en
29
+ pretty_name: "FER2013 Enhanced: Advanced Facial Expression Recognition Dataset"
30
+ dataset_info:
31
+ features:
32
+ - name: sample_id
33
+ dtype: string
34
+ - name: image
35
+ dtype:
36
+ _type: Array2D
37
+ shape: [48, 48]
38
+ dtype: uint8
39
+ - name: emotion
40
+ dtype:
41
+ _type: ClassLabel
42
+ names: ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral']
43
+ - name: emotion_name
44
+ dtype: string
45
+ - name: pixels
46
+ dtype: string
47
+ - name: usage
48
+ dtype: string
49
+ - name: quality_score
50
+ dtype: float32
51
+ - name: brightness
52
+ dtype: float32
53
+ - name: contrast
54
+ dtype: float32
55
+ - name: sample_weight
56
+ dtype: float32
57
+ - name: pixel_mean
58
+ dtype: float32
59
+ - name: pixel_std
60
+ dtype: float32
61
+ - name: pixel_min
62
+ dtype: uint8
63
+ - name: pixel_max
64
+ dtype: uint8
65
+ - name: edge_score
66
+ dtype: float32
67
+ - name: focus_score
68
+ dtype: float32
69
+ - name: brightness_score
70
+ dtype: float32
71
+ splits:
72
+ - name: train
73
+ num_bytes: 15000000
74
+ num_examples: 25117
75
+ - name: validation
76
+ num_bytes: 3200000
77
+ num_examples: 5380
78
+ - name: test
79
+ num_bytes: 3200000
80
+ num_examples: 5390
81
+ download_size: 80000000
82
+ dataset_size: 21400000
83
+ viewer: true
84
+ ---
85
+
86
+ # FER2013 Enhanced: Advanced Facial Expression Recognition Dataset
87
+
88
+ *The most comprehensive and quality-enhanced version of the famous FER2013 dataset for state-of-the-art emotion recognition research and applications.*
89
+
90
+ ## 🎯 Dataset Overview
91
+
92
+ **FER2013 Enhanced** is a significantly improved version of the landmark FER2013 facial expression recognition dataset. This enhanced version provides AI-powered quality assessment, balanced data splits, comprehensive metadata, and multi-format support for modern machine learning workflows.
93
+
94
+ ### πŸš€ Why Choose FER2013 Enhanced?
95
+
96
+ - **🎯 Superior Quality**: AI-powered quality scoring eliminates poor samples
97
+ - **βš–οΈ Balanced Training**: Stratified splits with sample weights for optimal learning
98
+ - **πŸ“Š Rich Features**: 15+ metadata features including brightness, contrast, edge content
99
+ - **πŸ“¦ Multiple Formats**: CSV, JSON, Parquet, and native HuggingFace Datasets
100
+ - **πŸ‹οΈ Production Ready**: Complete with validation, documentation, and ML integration
101
+ - **πŸ” Research Grade**: Comprehensive quality metrics for academic and commercial use
102
+
103
+ ### πŸ“ˆ Dataset Statistics
104
+
105
+ - **Total Samples**: 35,887 high-quality images
106
+ - **Training Set**: 25,117 samples
107
+ - **Validation Set**: 5,380 samples
108
+ - **Test Set**: 5,390 samples
109
+ - **Image Resolution**: 48Γ—48 pixels (grayscale)
110
+ - **Emotion Classes**: 7 distinct facial expressions
111
+ - **Quality Score**: 0.436 average (0-1 scale)
112
+
113
+ ## 🎭 Emotion Classes
114
+
115
+ | Emotion | Count | Percentage |
116
+ |---------|-------|------------|
117
+ | Angry | 4,953 | 13.8% |
118
+ | Disgust | 547 | 1.5% |
119
+ | Fear | 5,121 | 14.3% |
120
+ | Happy | 8,989 | 25.0% |
121
+ | Sad | 6,077 | 16.9% |
122
+ | Surprise | 4,002 | 11.2% |
123
+ | Neutral | 6,198 | 17.3% |
124
+
125
+
126
+ ## πŸ”§ Quick Start
127
+
128
+ ### Installation and Loading
129
+
130
+ ```python
131
+ # Install required packages
132
+ pip install datasets torch torchvision transformers
133
+
134
+ # Load the dataset
135
+ from datasets import load_dataset
136
+
137
+ dataset = load_dataset("abhilash88/fer2013-enhanced")
138
+
139
+ # Access splits
140
+ train_data = dataset["train"]
141
+ validation_data = dataset["validation"]
142
+ test_data = dataset["test"]
143
+
144
+ print(f"Training samples: {len(train_data):,}")
145
+ print(f"Features: {train_data.features}")
146
+ ```
147
+
148
+ ### Basic Usage Example
149
+
150
+ ```python
151
+ import numpy as np
152
+ import matplotlib.pyplot as plt
153
+
154
+ # Get a sample
155
+ sample = train_data[0]
156
+
157
+ # Display image and info
158
+ image = sample["image"]
159
+ emotion = sample["emotion_name"]
160
+ quality = sample["quality_score"]
161
+
162
+ plt.figure(figsize=(6, 4))
163
+ plt.imshow(image, cmap='gray')
164
+ plt.title(f'Emotion: {emotion.capitalize()} | Quality: {quality:.3f}')
165
+ plt.axis('off')
166
+ plt.show()
167
+
168
+ print(f"Sample ID: {sample['sample_id']}")
169
+ print(f"Emotion: {emotion} (class {sample['emotion']})")
170
+ print(f"Quality Score: {quality:.3f}")
171
+ print(f"Brightness: {sample['brightness']:.1f}")
172
+ print(f"Contrast: {sample['contrast']:.1f}")
173
+ ```
174
+
175
+ ### Enhanced Features
176
+
177
+ Each sample includes the original FER2013 data plus these enhancements:
178
+
179
+ ```python
180
+ {
181
+ 'sample_id': 'fer2013_000001', # Unique identifier
182
+ 'emotion': 3, # Emotion label (0-6)
183
+ 'emotion_name': 'happy', # Human-readable emotion
184
+ 'pixels': '50 36 17 ...', # Original pixel string
185
+ 'image_base64': 'iVBORw0KGgoAAAANS...', # Base64 PNG (JSON only)
186
+ 'quality_score': 0.753, # AI-computed quality (0-1)
187
+ 'brightness': 127.5, # Average pixel brightness
188
+ 'contrast': 45.2, # Pixel standard deviation
189
+ 'sample_weight': 1.24, # Class balancing weight
190
+ 'edge_score': 0.234, # Edge content measure
191
+ 'focus_score': 0.456, # Image sharpness
192
+ 'brightness_score': 0.789, # Brightness balance
193
+ 'pixel_mean': 127.5, # Pixel statistics
194
+ 'pixel_std': 45.2,
195
+ 'pixel_min': 0,
196
+ 'pixel_max': 255
197
+ }
198
+ ```
199
+
200
+ ### Emotion Labels
201
+
202
+ - 0: **Angry** - Expressions of anger, frustration, irritation
203
+ - 1: **Disgust** - Expressions of disgust, revulsion, distaste
204
+ - 2: **Fear** - Expressions of fear, anxiety, worry
205
+ - 3: **Happy** - Expressions of happiness, joy, contentment
206
+ - 4: **Sad** - Expressions of sadness, sorrow, melancholy
207
+ - 5: **Surprise** - Expressions of surprise, astonishment, shock
208
+ - 6: **Neutral** - Neutral expressions, no clear emotion
209
+
210
+ ## πŸ“Š Quality Assessment Methodology
211
+
212
+ ### Quality Score Components
213
+
214
+ Each image receives a comprehensive quality assessment:
215
+
216
+ 1. **Edge Content Analysis (30% weight)**
217
+ - Sobel gradient magnitude calculation
218
+ - Measures facial feature clarity and definition
219
+ - Higher scores indicate clearer facial boundaries
220
+
221
+ 2. **Contrast Evaluation (30% weight)**
222
+ - Pixel intensity standard deviation
223
+ - Assesses visual distinction and dynamic range
224
+ - Optimal contrast improves feature discrimination
225
+
226
+ 3. **Focus/Sharpness Measurement (25% weight)**
227
+ - Laplacian variance calculation
228
+ - Detects blur and image sharpness
229
+ - Critical for fine-grained emotion detection
230
+
231
+ 4. **Brightness Balance (15% weight)**
232
+ - Distance from optimal brightness range
233
+ - Ensures proper illumination conditions
234
+ - Prevents over/under-exposure issues
235
+
236
+ ## 🎯 Citation
237
+
238
+ If you use FER2013 Enhanced in your research, please cite:
239
+
240
+ ```bibtex
241
+ @dataset{fer2013_enhanced_2025,
242
+ title={FER2013 Enhanced: Advanced Facial Expression Recognition Dataset},
243
+ author={Enhanced by abhilash88},
244
+ year={2025},
245
+ publisher={Hugging Face},
246
+ url={https://huggingface.co/datasets/abhilash88/fer2013-enhanced}
247
+ }
248
+ ```
249
+
250
+ ## πŸ“„ License
251
+
252
+ This enhanced dataset is released under the **MIT License**.
253
+
254
+ ---
255
+
256
+ **🎭 Ready to build the next generation of emotion recognition systems?**
257
+
258
+ *Start with `pip install datasets` and `from datasets import load_dataset`*
259
+
260
+ *Last updated: 13 July 2025*