Datasets:
Formats:
parquet
Languages:
English
Size:
10K - 100K
ArXiv:
Tags:
fer2013
facial-expression-recognition
emotion-recognition
emotion-detection
computer-vision
deep-learning
License:
Upload README.md with huggingface_hub
Browse files
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 |
-
|
37 |
-
|
38 |
-
|
39 |
-
- name: emotion
|
40 |
-
dtype:
|
41 |
-
|
42 |
-
|
43 |
-
- name: emotion_name
|
44 |
-
dtype: string
|
45 |
-
- name:
|
46 |
-
dtype:
|
47 |
-
- name:
|
48 |
-
dtype:
|
49 |
-
- name:
|
50 |
-
dtype: float32
|
51 |
-
- name:
|
52 |
-
dtype: float32
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
- name:
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
#
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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*
|