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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
+
"id": "6f315eb9",
|
7 |
+
"metadata": {},
|
8 |
+
"outputs": [
|
9 |
+
{
|
10 |
+
"name": "stdout",
|
11 |
+
"output_type": "stream",
|
12 |
+
"text": [
|
13 |
+
"WARNING:tensorflow:From C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.\n",
|
14 |
+
"\n"
|
15 |
+
]
|
16 |
+
}
|
17 |
+
],
|
18 |
+
"source": [
|
19 |
+
"from keras.utils import to_categorical\n",
|
20 |
+
"from keras.preprocessing.image import load_img\n",
|
21 |
+
"from keras.models import Sequential\n",
|
22 |
+
"from keras.layers import Dense, Conv2D, Dropout, Flatten, MaxPooling2D\n",
|
23 |
+
"import os\n",
|
24 |
+
"import pandas as pd\n",
|
25 |
+
"import numpy as np"
|
26 |
+
]
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"cell_type": "code",
|
30 |
+
"execution_count": 2,
|
31 |
+
"id": "935ca020",
|
32 |
+
"metadata": {},
|
33 |
+
"outputs": [],
|
34 |
+
"source": [
|
35 |
+
"TRAIN_DIR = 'train/'\n",
|
36 |
+
"TEST_DIR = 'test/'"
|
37 |
+
]
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"cell_type": "code",
|
41 |
+
"execution_count": 3,
|
42 |
+
"id": "332e0c3d",
|
43 |
+
"metadata": {},
|
44 |
+
"outputs": [],
|
45 |
+
"source": [
|
46 |
+
"def createdataframe(dir):\n",
|
47 |
+
" image_paths = []\n",
|
48 |
+
" labels = []\n",
|
49 |
+
" for label in os.listdir(dir):\n",
|
50 |
+
" for imagename in os.listdir(os.path.join(dir,label)):\n",
|
51 |
+
" image_paths.append(os.path.join(dir,label,imagename))\n",
|
52 |
+
" labels.append(label)\n",
|
53 |
+
" print(label, \"completed\")\n",
|
54 |
+
" return image_paths,labels"
|
55 |
+
]
|
56 |
+
},
|
57 |
+
{
|
58 |
+
"cell_type": "code",
|
59 |
+
"execution_count": 4,
|
60 |
+
"id": "01a141b2",
|
61 |
+
"metadata": {},
|
62 |
+
"outputs": [
|
63 |
+
{
|
64 |
+
"name": "stdout",
|
65 |
+
"output_type": "stream",
|
66 |
+
"text": [
|
67 |
+
"angry completed\n",
|
68 |
+
"disgust completed\n",
|
69 |
+
"fear completed\n",
|
70 |
+
"happy completed\n",
|
71 |
+
"neutral completed\n",
|
72 |
+
"sad completed\n",
|
73 |
+
"surprise completed\n"
|
74 |
+
]
|
75 |
+
}
|
76 |
+
],
|
77 |
+
"source": [
|
78 |
+
"train = pd.DataFrame()\n",
|
79 |
+
"train['image'], train['label'] = createdataframe(TRAIN_DIR)"
|
80 |
+
]
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"cell_type": "code",
|
84 |
+
"execution_count": 5,
|
85 |
+
"id": "c511fc80",
|
86 |
+
"metadata": {},
|
87 |
+
"outputs": [
|
88 |
+
{
|
89 |
+
"name": "stdout",
|
90 |
+
"output_type": "stream",
|
91 |
+
"text": [
|
92 |
+
" image label\n",
|
93 |
+
"0 train/angry\\Training_10118481.jpg angry\n",
|
94 |
+
"1 train/angry\\Training_10120469.jpg angry\n",
|
95 |
+
"2 train/angry\\Training_10131352.jpg angry\n",
|
96 |
+
"3 train/angry\\Training_10161559.jpg angry\n",
|
97 |
+
"4 train/angry\\Training_1021836.jpg angry\n",
|
98 |
+
"... ... ...\n",
|
99 |
+
"28704 train/surprise\\Training_99916297.jpg surprise\n",
|
100 |
+
"28705 train/surprise\\Training_99924420.jpg surprise\n",
|
101 |
+
"28706 train/surprise\\Training_99937001.jpg surprise\n",
|
102 |
+
"28707 train/surprise\\Training_99951755.jpg surprise\n",
|
103 |
+
"28708 train/surprise\\Training_99984132.jpg surprise\n",
|
104 |
+
"\n",
|
105 |
+
"[28709 rows x 2 columns]\n"
|
106 |
+
]
|
107 |
+
}
|
108 |
+
],
|
109 |
+
"source": [
|
110 |
+
"print(train)"
|
111 |
+
]
|
112 |
+
},
|
113 |
+
{
|
114 |
+
"cell_type": "code",
|
115 |
+
"execution_count": 6,
|
116 |
+
"id": "b3513e60",
|
117 |
+
"metadata": {},
|
118 |
+
"outputs": [
|
119 |
+
{
|
120 |
+
"name": "stdout",
|
121 |
+
"output_type": "stream",
|
122 |
+
"text": [
|
123 |
+
"angry completed\n",
|
124 |
+
"disgust completed\n",
|
125 |
+
"fear completed\n",
|
126 |
+
"happy completed\n",
|
127 |
+
"neutral completed\n",
|
128 |
+
"sad completed\n",
|
129 |
+
"surprise completed\n"
|
130 |
+
]
|
131 |
+
}
|
132 |
+
],
|
133 |
+
"source": [
|
134 |
+
"test = pd.DataFrame()\n",
|
135 |
+
"test['image'], test['label'] = createdataframe(TEST_DIR)"
|
136 |
+
]
|
137 |
+
},
|
138 |
+
{
|
139 |
+
"cell_type": "code",
|
140 |
+
"execution_count": 7,
|
141 |
+
"id": "ebf2655c",
|
142 |
+
"metadata": {},
|
143 |
+
"outputs": [
|
144 |
+
{
|
145 |
+
"name": "stdout",
|
146 |
+
"output_type": "stream",
|
147 |
+
"text": [
|
148 |
+
" image label\n",
|
149 |
+
"0 test/angry\\PrivateTest_10131363.jpg angry\n",
|
150 |
+
"1 test/angry\\PrivateTest_10304478.jpg angry\n",
|
151 |
+
"2 test/angry\\PrivateTest_1054527.jpg angry\n",
|
152 |
+
"3 test/angry\\PrivateTest_10590091.jpg angry\n",
|
153 |
+
"4 test/angry\\PrivateTest_1109992.jpg angry\n",
|
154 |
+
"... ... ...\n",
|
155 |
+
"7173 test/surprise\\PublicTest_98089595.jpg surprise\n",
|
156 |
+
"7174 test/surprise\\PublicTest_98567249.jpg surprise\n",
|
157 |
+
"7175 test/surprise\\PublicTest_98972870.jpg surprise\n",
|
158 |
+
"7176 test/surprise\\PublicTest_99242645.jpg surprise\n",
|
159 |
+
"7177 test/surprise\\PublicTest_99446963.jpg surprise\n",
|
160 |
+
"\n",
|
161 |
+
"[7178 rows x 2 columns]\n",
|
162 |
+
"0 test/angry\\PrivateTest_10131363.jpg\n",
|
163 |
+
"1 test/angry\\PrivateTest_10304478.jpg\n",
|
164 |
+
"2 test/angry\\PrivateTest_1054527.jpg\n",
|
165 |
+
"3 test/angry\\PrivateTest_10590091.jpg\n",
|
166 |
+
"4 test/angry\\PrivateTest_1109992.jpg\n",
|
167 |
+
" ... \n",
|
168 |
+
"7173 test/surprise\\PublicTest_98089595.jpg\n",
|
169 |
+
"7174 test/surprise\\PublicTest_98567249.jpg\n",
|
170 |
+
"7175 test/surprise\\PublicTest_98972870.jpg\n",
|
171 |
+
"7176 test/surprise\\PublicTest_99242645.jpg\n",
|
172 |
+
"7177 test/surprise\\PublicTest_99446963.jpg\n",
|
173 |
+
"Name: image, Length: 7178, dtype: object\n"
|
174 |
+
]
|
175 |
+
}
|
176 |
+
],
|
177 |
+
"source": [
|
178 |
+
"print(test)\n",
|
179 |
+
"print(test['image'])"
|
180 |
+
]
|
181 |
+
},
|
182 |
+
{
|
183 |
+
"cell_type": "code",
|
184 |
+
"execution_count": 8,
|
185 |
+
"id": "0a2560d4",
|
186 |
+
"metadata": {},
|
187 |
+
"outputs": [],
|
188 |
+
"source": [
|
189 |
+
"from tqdm.notebook import tqdm"
|
190 |
+
]
|
191 |
+
},
|
192 |
+
{
|
193 |
+
"cell_type": "code",
|
194 |
+
"execution_count": 9,
|
195 |
+
"id": "cc33ae75",
|
196 |
+
"metadata": {},
|
197 |
+
"outputs": [],
|
198 |
+
"source": [
|
199 |
+
"def extract_features(images):\n",
|
200 |
+
" features = []\n",
|
201 |
+
" for image in tqdm(images):\n",
|
202 |
+
" img = load_img(image,grayscale = True )\n",
|
203 |
+
" img = np.array(img)\n",
|
204 |
+
" features.append(img)\n",
|
205 |
+
" features = np.array(features)\n",
|
206 |
+
" features = features.reshape(len(features),48,48,1)\n",
|
207 |
+
" return features\n",
|
208 |
+
" "
|
209 |
+
]
|
210 |
+
},
|
211 |
+
{
|
212 |
+
"cell_type": "code",
|
213 |
+
"execution_count": 10,
|
214 |
+
"id": "8f225635",
|
215 |
+
"metadata": {},
|
216 |
+
"outputs": [
|
217 |
+
{
|
218 |
+
"data": {
|
219 |
+
"application/vnd.jupyter.widget-view+json": {
|
220 |
+
"model_id": "fde4e5ad7d6348eb84d8cc1db55a7ce9",
|
221 |
+
"version_major": 2,
|
222 |
+
"version_minor": 0
|
223 |
+
},
|
224 |
+
"text/plain": [
|
225 |
+
" 0%| | 0/28709 [00:00<?, ?it/s]"
|
226 |
+
]
|
227 |
+
},
|
228 |
+
"metadata": {},
|
229 |
+
"output_type": "display_data"
|
230 |
+
},
|
231 |
+
{
|
232 |
+
"name": "stderr",
|
233 |
+
"output_type": "stream",
|
234 |
+
"text": [
|
235 |
+
"C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\utils\\image_utils.py:409: UserWarning: grayscale is deprecated. Please use color_mode = \"grayscale\"\n",
|
236 |
+
" warnings.warn(\n"
|
237 |
+
]
|
238 |
+
}
|
239 |
+
],
|
240 |
+
"source": [
|
241 |
+
"train_features = extract_features(train['image']) "
|
242 |
+
]
|
243 |
+
},
|
244 |
+
{
|
245 |
+
"cell_type": "code",
|
246 |
+
"execution_count": 11,
|
247 |
+
"id": "3a1aeb79",
|
248 |
+
"metadata": {},
|
249 |
+
"outputs": [
|
250 |
+
{
|
251 |
+
"data": {
|
252 |
+
"application/vnd.jupyter.widget-view+json": {
|
253 |
+
"model_id": "4c3223b79e024df2984d83dde895a82f",
|
254 |
+
"version_major": 2,
|
255 |
+
"version_minor": 0
|
256 |
+
},
|
257 |
+
"text/plain": [
|
258 |
+
" 0%| | 0/7178 [00:00<?, ?it/s]"
|
259 |
+
]
|
260 |
+
},
|
261 |
+
"metadata": {},
|
262 |
+
"output_type": "display_data"
|
263 |
+
}
|
264 |
+
],
|
265 |
+
"source": [
|
266 |
+
"test_features = extract_features(test['image'])"
|
267 |
+
]
|
268 |
+
},
|
269 |
+
{
|
270 |
+
"cell_type": "code",
|
271 |
+
"execution_count": 12,
|
272 |
+
"id": "cee402d1",
|
273 |
+
"metadata": {},
|
274 |
+
"outputs": [],
|
275 |
+
"source": [
|
276 |
+
"x_train = train_features/255.0\n",
|
277 |
+
"x_test = test_features/255.0"
|
278 |
+
]
|
279 |
+
},
|
280 |
+
{
|
281 |
+
"cell_type": "code",
|
282 |
+
"execution_count": 13,
|
283 |
+
"id": "f0748fb7",
|
284 |
+
"metadata": {},
|
285 |
+
"outputs": [],
|
286 |
+
"source": [
|
287 |
+
"from sklearn.preprocessing import LabelEncoder"
|
288 |
+
]
|
289 |
+
},
|
290 |
+
{
|
291 |
+
"cell_type": "code",
|
292 |
+
"execution_count": 14,
|
293 |
+
"id": "7123f988",
|
294 |
+
"metadata": {},
|
295 |
+
"outputs": [
|
296 |
+
{
|
297 |
+
"data": {
|
298 |
+
"text/html": [
|
299 |
+
"<style>#sk-container-id-1 {color: black;}#sk-container-id-1 pre{padding: 0;}#sk-container-id-1 div.sk-toggleable {background-color: white;}#sk-container-id-1 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-container-id-1 label.sk-toggleable__label-arrow:before {content: \"▸\";float: left;margin-right: 0.25em;color: #696969;}#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-container-id-1 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-container-id-1 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-container-id-1 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: \"▾\";}#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-container-id-1 div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-container-id-1 div.sk-estimator:hover {background-color: #d4ebff;}#sk-container-id-1 div.sk-parallel-item::after {content: \"\";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-serial::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: 0;}#sk-container-id-1 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;position: relative;}#sk-container-id-1 div.sk-item {position: relative;z-index: 1;}#sk-container-id-1 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;position: relative;}#sk-container-id-1 div.sk-item::before, #sk-container-id-1 div.sk-parallel-item::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: -1;}#sk-container-id-1 div.sk-parallel-item {display: flex;flex-direction: column;z-index: 1;position: relative;background-color: white;}#sk-container-id-1 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-container-id-1 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-container-id-1 div.sk-parallel-item:only-child::after {width: 0;}#sk-container-id-1 div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;}#sk-container-id-1 div.sk-label label {font-family: monospace;font-weight: bold;display: inline-block;line-height: 1.2em;}#sk-container-id-1 div.sk-label-container {text-align: center;}#sk-container-id-1 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-container-id-1 div.sk-text-repr-fallback {display: none;}</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>LabelEncoder()</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" checked><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label sk-toggleable__label-arrow\">LabelEncoder</label><div class=\"sk-toggleable__content\"><pre>LabelEncoder()</pre></div></div></div></div></div>"
|
300 |
+
],
|
301 |
+
"text/plain": [
|
302 |
+
"LabelEncoder()"
|
303 |
+
]
|
304 |
+
},
|
305 |
+
"execution_count": 14,
|
306 |
+
"metadata": {},
|
307 |
+
"output_type": "execute_result"
|
308 |
+
}
|
309 |
+
],
|
310 |
+
"source": [
|
311 |
+
"le = LabelEncoder()\n",
|
312 |
+
"le.fit(train['label'])"
|
313 |
+
]
|
314 |
+
},
|
315 |
+
{
|
316 |
+
"cell_type": "code",
|
317 |
+
"execution_count": 15,
|
318 |
+
"id": "6ea40e28",
|
319 |
+
"metadata": {},
|
320 |
+
"outputs": [],
|
321 |
+
"source": [
|
322 |
+
"y_train = le.transform(train['label'])\n",
|
323 |
+
"y_test = le.transform(test['label'])"
|
324 |
+
]
|
325 |
+
},
|
326 |
+
{
|
327 |
+
"cell_type": "code",
|
328 |
+
"execution_count": 16,
|
329 |
+
"id": "8c46b932",
|
330 |
+
"metadata": {},
|
331 |
+
"outputs": [],
|
332 |
+
"source": [
|
333 |
+
"y_train = to_categorical(y_train,num_classes = 7)\n",
|
334 |
+
"y_test = to_categorical(y_test,num_classes = 7)"
|
335 |
+
]
|
336 |
+
},
|
337 |
+
{
|
338 |
+
"cell_type": "code",
|
339 |
+
"execution_count": 17,
|
340 |
+
"id": "f9dde192",
|
341 |
+
"metadata": {},
|
342 |
+
"outputs": [
|
343 |
+
{
|
344 |
+
"name": "stdout",
|
345 |
+
"output_type": "stream",
|
346 |
+
"text": [
|
347 |
+
"WARNING:tensorflow:From C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\backend.py:873: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
|
348 |
+
"\n",
|
349 |
+
"WARNING:tensorflow:From C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\layers\\pooling\\max_pooling2d.py:161: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.\n",
|
350 |
+
"\n"
|
351 |
+
]
|
352 |
+
}
|
353 |
+
],
|
354 |
+
"source": [
|
355 |
+
"model = Sequential()\n",
|
356 |
+
"# convolutional layers\n",
|
357 |
+
"model.add(Conv2D(128, kernel_size=(3,3), activation='relu', input_shape=(48,48,1)))\n",
|
358 |
+
"model.add(MaxPooling2D(pool_size=(2,2)))\n",
|
359 |
+
"model.add(Dropout(0.4))\n",
|
360 |
+
"\n",
|
361 |
+
"model.add(Conv2D(256, kernel_size=(3,3), activation='relu'))\n",
|
362 |
+
"model.add(MaxPooling2D(pool_size=(2,2)))\n",
|
363 |
+
"model.add(Dropout(0.4))\n",
|
364 |
+
"\n",
|
365 |
+
"model.add(Conv2D(512, kernel_size=(3,3), activation='relu'))\n",
|
366 |
+
"model.add(MaxPooling2D(pool_size=(2,2)))\n",
|
367 |
+
"model.add(Dropout(0.4))\n",
|
368 |
+
"\n",
|
369 |
+
"model.add(Conv2D(512, kernel_size=(3,3), activation='relu'))\n",
|
370 |
+
"model.add(MaxPooling2D(pool_size=(2,2)))\n",
|
371 |
+
"model.add(Dropout(0.4))\n",
|
372 |
+
"\n",
|
373 |
+
"model.add(Flatten())\n",
|
374 |
+
"# fully connected layers\n",
|
375 |
+
"model.add(Dense(512, activation='relu'))\n",
|
376 |
+
"model.add(Dropout(0.4))\n",
|
377 |
+
"model.add(Dense(256, activation='relu'))\n",
|
378 |
+
"model.add(Dropout(0.3))\n",
|
379 |
+
"# output layer\n",
|
380 |
+
"model.add(Dense(7, activation='softmax'))"
|
381 |
+
]
|
382 |
+
},
|
383 |
+
{
|
384 |
+
"cell_type": "code",
|
385 |
+
"execution_count": 18,
|
386 |
+
"id": "13dfea4e",
|
387 |
+
"metadata": {},
|
388 |
+
"outputs": [
|
389 |
+
{
|
390 |
+
"name": "stdout",
|
391 |
+
"output_type": "stream",
|
392 |
+
"text": [
|
393 |
+
"WARNING:tensorflow:From C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\optimizers\\__init__.py:309: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.\n",
|
394 |
+
"\n"
|
395 |
+
]
|
396 |
+
}
|
397 |
+
],
|
398 |
+
"source": [
|
399 |
+
"model.compile(optimizer = 'adam', loss = 'categorical_crossentropy', metrics = 'accuracy' )"
|
400 |
+
]
|
401 |
+
},
|
402 |
+
{
|
403 |
+
"cell_type": "code",
|
404 |
+
"execution_count": 19,
|
405 |
+
"id": "b0510b4b",
|
406 |
+
"metadata": {},
|
407 |
+
"outputs": [
|
408 |
+
{
|
409 |
+
"name": "stdout",
|
410 |
+
"output_type": "stream",
|
411 |
+
"text": [
|
412 |
+
"Epoch 1/10\n",
|
413 |
+
"WARNING:tensorflow:From C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\utils\\tf_utils.py:492: The name tf.ragged.RaggedTensorValue is deprecated. Please use tf.compat.v1.ragged.RaggedTensorValue instead.\n",
|
414 |
+
"\n",
|
415 |
+
"WARNING:tensorflow:From C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\engine\\base_layer_utils.py:384: The name tf.executing_eagerly_outside_functions is deprecated. Please use tf.compat.v1.executing_eagerly_outside_functions instead.\n",
|
416 |
+
"\n",
|
417 |
+
"225/225 [==============================] - 131s 575ms/step - loss: 1.8224 - accuracy: 0.2477 - val_loss: 1.8187 - val_accuracy: 0.2471\n",
|
418 |
+
"Epoch 2/10\n",
|
419 |
+
"225/225 [==============================] - 132s 589ms/step - loss: 1.7875 - accuracy: 0.2541 - val_loss: 1.7035 - val_accuracy: 0.2885\n",
|
420 |
+
"Epoch 3/10\n",
|
421 |
+
"225/225 [==============================] - 131s 584ms/step - loss: 1.6936 - accuracy: 0.3138 - val_loss: 1.5651 - val_accuracy: 0.3780\n",
|
422 |
+
"Epoch 4/10\n",
|
423 |
+
"225/225 [==============================] - 121s 540ms/step - loss: 1.5549 - accuracy: 0.3860 - val_loss: 1.4168 - val_accuracy: 0.4505\n",
|
424 |
+
"Epoch 5/10\n",
|
425 |
+
"225/225 [==============================] - 121s 538ms/step - loss: 1.4721 - accuracy: 0.4243 - val_loss: 1.3776 - val_accuracy: 0.4592\n",
|
426 |
+
"Epoch 6/10\n",
|
427 |
+
"225/225 [==============================] - 121s 538ms/step - loss: 1.4140 - accuracy: 0.4533 - val_loss: 1.3053 - val_accuracy: 0.5013\n",
|
428 |
+
"Epoch 7/10\n",
|
429 |
+
"225/225 [==============================] - 121s 537ms/step - loss: 1.3719 - accuracy: 0.4747 - val_loss: 1.2842 - val_accuracy: 0.5107\n",
|
430 |
+
"Epoch 8/10\n",
|
431 |
+
"225/225 [==============================] - 120s 534ms/step - loss: 1.3447 - accuracy: 0.4832 - val_loss: 1.2323 - val_accuracy: 0.5270\n",
|
432 |
+
"Epoch 9/10\n",
|
433 |
+
"225/225 [==============================] - 121s 537ms/step - loss: 1.3110 - accuracy: 0.5013 - val_loss: 1.2227 - val_accuracy: 0.5383\n",
|
434 |
+
"Epoch 10/10\n",
|
435 |
+
"225/225 [==============================] - 121s 538ms/step - loss: 1.2950 - accuracy: 0.5043 - val_loss: 1.1886 - val_accuracy: 0.5467\n"
|
436 |
+
]
|
437 |
+
},
|
438 |
+
{
|
439 |
+
"data": {
|
440 |
+
"text/plain": [
|
441 |
+
"<keras.src.callbacks.History at 0x244d34a3190>"
|
442 |
+
]
|
443 |
+
},
|
444 |
+
"execution_count": 19,
|
445 |
+
"metadata": {},
|
446 |
+
"output_type": "execute_result"
|
447 |
+
}
|
448 |
+
],
|
449 |
+
"source": [
|
450 |
+
"model.fit(x= x_train,y = y_train, batch_size = 128, epochs = 10, validation_data = (x_test,y_test)) "
|
451 |
+
]
|
452 |
+
},
|
453 |
+
{
|
454 |
+
"cell_type": "code",
|
455 |
+
"execution_count": 20,
|
456 |
+
"id": "ebf1eee6",
|
457 |
+
"metadata": {},
|
458 |
+
"outputs": [
|
459 |
+
{
|
460 |
+
"name": "stderr",
|
461 |
+
"output_type": "stream",
|
462 |
+
"text": [
|
463 |
+
"C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\engine\\training.py:3103: UserWarning: You are saving your model as an HDF5 file via `model.save()`. This file format is considered legacy. We recommend using instead the native Keras format, e.g. `model.save('my_model.keras')`.\n",
|
464 |
+
" saving_api.save_model(\n"
|
465 |
+
]
|
466 |
+
}
|
467 |
+
],
|
468 |
+
"source": [
|
469 |
+
"model_json = model.to_json()\n",
|
470 |
+
"with open(\"emotiondetector.json\",'w') as json_file:\n",
|
471 |
+
" json_file.write(model_json)\n",
|
472 |
+
"model.save(\"emotiondetector.h5\")"
|
473 |
+
]
|
474 |
+
},
|
475 |
+
{
|
476 |
+
"cell_type": "code",
|
477 |
+
"execution_count": 21,
|
478 |
+
"id": "053f5a39",
|
479 |
+
"metadata": {},
|
480 |
+
"outputs": [],
|
481 |
+
"source": [
|
482 |
+
"from keras.models import model_from_json"
|
483 |
+
]
|
484 |
+
},
|
485 |
+
{
|
486 |
+
"cell_type": "code",
|
487 |
+
"execution_count": 22,
|
488 |
+
"id": "afaf64b7",
|
489 |
+
"metadata": {},
|
490 |
+
"outputs": [],
|
491 |
+
"source": [
|
492 |
+
"json_file = open(\"emotiondetector.json\", \"r\")\n",
|
493 |
+
"model_json = json_file.read()\n",
|
494 |
+
"json_file.close()\n",
|
495 |
+
"model = model_from_json(model_json)\n",
|
496 |
+
"model.load_weights(\"emotiondetector.h5\")"
|
497 |
+
]
|
498 |
+
},
|
499 |
+
{
|
500 |
+
"cell_type": "code",
|
501 |
+
"execution_count": 23,
|
502 |
+
"id": "f27961d7",
|
503 |
+
"metadata": {},
|
504 |
+
"outputs": [],
|
505 |
+
"source": [
|
506 |
+
"label = ['angry','disgust','fear','happy','neutral','sad','surprise']"
|
507 |
+
]
|
508 |
+
},
|
509 |
+
{
|
510 |
+
"cell_type": "code",
|
511 |
+
"execution_count": 24,
|
512 |
+
"id": "a5a8caa2",
|
513 |
+
"metadata": {},
|
514 |
+
"outputs": [],
|
515 |
+
"source": [
|
516 |
+
"def ef(image):\n",
|
517 |
+
" img = load_img(image,grayscale = True )\n",
|
518 |
+
" feature = np.array(img)\n",
|
519 |
+
" feature = feature.reshape(1,48,48,1)\n",
|
520 |
+
" return feature/255.0\n",
|
521 |
+
" "
|
522 |
+
]
|
523 |
+
},
|
524 |
+
{
|
525 |
+
"cell_type": "code",
|
526 |
+
"execution_count": 25,
|
527 |
+
"id": "0b457b7e",
|
528 |
+
"metadata": {},
|
529 |
+
"outputs": [
|
530 |
+
{
|
531 |
+
"name": "stdout",
|
532 |
+
"output_type": "stream",
|
533 |
+
"text": [
|
534 |
+
"original image is of sad\n",
|
535 |
+
"1/1 [==============================] - 0s 119ms/step\n",
|
536 |
+
"model prediction is angry\n"
|
537 |
+
]
|
538 |
+
},
|
539 |
+
{
|
540 |
+
"name": "stderr",
|
541 |
+
"output_type": "stream",
|
542 |
+
"text": [
|
543 |
+
"C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\utils\\image_utils.py:409: UserWarning: grayscale is deprecated. Please use color_mode = \"grayscale\"\n",
|
544 |
+
" warnings.warn(\n"
|
545 |
+
]
|
546 |
+
}
|
547 |
+
],
|
548 |
+
"source": [
|
549 |
+
"image = 'train/sad/Training_1369050.jpg'\n",
|
550 |
+
"print(\"original image is of sad\")\n",
|
551 |
+
"img = ef(image)\n",
|
552 |
+
"pred = model.predict(img)\n",
|
553 |
+
"pred_label = label[pred.argmax()]\n",
|
554 |
+
"print(\"model prediction is \",pred_label)"
|
555 |
+
]
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"cell_type": "code",
|
559 |
+
"execution_count": 26,
|
560 |
+
"id": "9309ab81",
|
561 |
+
"metadata": {},
|
562 |
+
"outputs": [],
|
563 |
+
"source": [
|
564 |
+
"import matplotlib.pyplot as plt\n",
|
565 |
+
"%matplotlib inline"
|
566 |
+
]
|
567 |
+
},
|
568 |
+
{
|
569 |
+
"cell_type": "code",
|
570 |
+
"execution_count": 27,
|
571 |
+
"id": "84c37c5b",
|
572 |
+
"metadata": {},
|
573 |
+
"outputs": [
|
574 |
+
{
|
575 |
+
"name": "stdout",
|
576 |
+
"output_type": "stream",
|
577 |
+
"text": [
|
578 |
+
"original image is of sad\n",
|
579 |
+
"1/1 [==============================] - 0s 23ms/step\n",
|
580 |
+
"model prediction is angry\n"
|
581 |
+
]
|
582 |
+
},
|
583 |
+
{
|
584 |
+
"name": "stderr",
|
585 |
+
"output_type": "stream",
|
586 |
+
"text": [
|
587 |
+
"C:\\Users\\Hussnain Khalid\\anaconda3\\Lib\\site-packages\\keras\\src\\utils\\image_utils.py:409: UserWarning: grayscale is deprecated. Please use color_mode = \"grayscale\"\n",
|
588 |
+
" warnings.warn(\n"
|
589 |
+
]
|
590 |
+
},
|
591 |
+
{
|
592 |
+
"data": {
|
593 |
+
"text/plain": [
|
594 |
+
"<matplotlib.image.AxesImage at 0x244f1935050>"
|
595 |
+
]
|
596 |
+
},
|
597 |
+
"execution_count": 27,
|
598 |
+
"metadata": {},
|
599 |
+
"output_type": "execute_result"
|
600 |
+
},
|
601 |
+
{
|
602 |
+
"data": {
|
603 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAGeCAYAAAA9hL66AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAx/UlEQVR4nO3df2xV933/8bf5YWPj3z/wxWCIkzghKYISklC2rrAmeGJVlC6aNC1VlW2t1BQSxcofaSl/1K1UnPAHohMtW7YqizQxKrVNmz/WDE9tzCaUyRAQFFYCwQETMI7B2MY2Buzz/SNfuzb4vF9cH9jngp8PyX/gtz/nnnvuOffNtd/v886KoigyAAACmBZ6BwAAUxdJCAAQDEkIABAMSQgAEAxJCAAQDEkIABAMSQgAEAxJCAAQDEkIABDMjNA7cL3h4WE7c+aMFRQUWFZWVujdAQCkKYoi6+3ttaqqKps2TXzWiW6TH/3oR9E999wT5eTkRI888ki0e/fum1rX1tYWmRlffPHFF193+FdbW5t8z78tn4R++tOfWn19vf34xz+2P/7jP7Z//Md/tLVr19qRI0dswYIF7tqCggIzM/vNb35j+fn5E/6M9wnp2rVr7vZzcnLceFdXlxu/evVqbOz48ePu2t7eXjd+7Nix2Fh7e7u79s/+7M/c+OzZs2Nj6pgVFha68aKiIjfu6enpcePq07AXHxoactcODw+7cXVcLly4EBvr7+931w4MDLjxWbNmxcbKysrctYp6Xt5rotaqY+r9r3jk2o+jzgVv36ZPn55o25G4xebMmTNjY+o959KlS27cO8+6u7v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VYm2GpnglcWr2/P//ve/d+NHjhyJjVVXV7trH3jgATeuynIvX74cG1PjFBTvuKiy24GBATeuypHvueeeSW9bPW+vJF9tW8W9knpViqzKqFXZuze6wztPzJK1X6j9SjrOxDvmHR0dsTH1nMfikxAAIBiSEAAgGJIQACAYkhAAIBiSEAAgGJIQACAYkhAAIJiM7RPq6+uL7Yfw+nFUn1B5ebkb/+ijj9z47RzloGr6PapfwOsFUrfQV70EqifA6ydQj/3JJ5+48c9+9rOxsc985jPuWvV6qH1L0telen16enpiY6rnRY1TUCMRvF4fdS5cunRp0ttWvTrz5s1z494x80YSmOmesLKyMjfuPW/1eqiRId65ovqy1HmoegC99d57jnpO4/bhpn/SzBobG+2xxx6zgoICmzNnjn35y1+2o0ePjvuZKIqsoaHBqqqqLDc311avXm2HDx9O52EAAFNEWkmoubnZ1q9fb++99541NTXZtWvXrK6uzvr6+kZ/ZvPmzbZlyxbbtm2btbS0WCqVsjVr1sj/fQEApp60fh33zjvvjPv3G2+8YXPmzLF9+/bZF77wBYuiyLZu3WobN260Z555xszM3nzzTausrLQdO3bYN77xjVu35wCAO16iwoSR33WWlpaamVlra6u1t7dbXV3d6M/k5OTYqlWrbM+ePRNuY3Bw0Hp6esZ9AQCmhkknoSiK7OWXX7bPf/7ztnjxYjMza29vNzOzysrKcT9bWVk5GrteY2OjFRUVjX6pm04CAO4ek05CL7zwgh08eND+7d/+7YbY9ZURURTFVkts2LDBuru7R7/UXa4BAHePSZVov/jii/b222/b7t27bf78+aPfHymPbm9vt7lz545+v6Oj44ZPRyO8kQ0AgLtbWkkoiiJ78cUX7a233rJ3333XampqxsVramoslUpZU1OTLVu2zMw+7Z1pbm621157La0d6+joiE1OXm28qntX/RmqV8dLmEn7gLxtFxYWumtVn5DXx1BSUuKu7erqShT3ZsicO3fOXav6IB555JHYmPr74t69e924N4PJzMb9R+t66lxQs6eS9Ix5s21u5rG9WUbea2mme5i881T9Kl6d40nmCSmq/+nChQuxMTWvS81J8vZdnSdqXtf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ShRF9vLLL9vnP/95W7x4sZlxzDyHDh2ylStX2uXLly0/P9/eeuste/jhh0ffNDlm4+3cudPef/99a2lpuSHGeTZexiahEddPRIyiSE5JxB9w/Cb2wgsv2MGDB+2///u/b4hxzG704IMP2oEDB+zixYv285//3J577jlrbm4ejXPM/qCtrc1eeukl27Vrl82aNSv25zhmn8rYX8eVl5fb9OnTb/jU09HRccP/IHCjVCplZsbxm8CLL75ob7/9tv32t78dN7uKYxYvOzvb7r//fnv00UetsbHRli5daj/84Q85ZhPYt2+fdXR02PLly23GjBk2Y8YMa25utr//+7+3GTNmjB4XjtmnMjYJZWdn2/Lly62pqWnc95uamuyP/uiPAu3VnaOmpsZSqdS443flyhVrbm6esscviiJ74YUX7Be/+IX95je/sZqamnFxjtnNi6LIBgcHOWYTeOKJJ+zQoUN24MCB0a9HH33UvvKVr9iBAwfs3nvv5ZiNFa4mQtu5c2c0c+bM6Cc/+Ul05MiRqL6+Ppo9e3b00Ucfhd61jNDb2xvt378/2r9/f2Rm0ZYtW6L9+/dHJ0+ejKIoil599dWoqKgo+sUvfhEdOnQo+uu//uto7ty5UU9PT+A9D+Ob3/xmVFRUFL377rvR2bNnR7/6+/tHf4ZjdqMNGzZEu3fvjlpbW6ODBw9G3/nOd6Jp06ZFu3btiqKIY3YzxlbHRRHHbKyMTkJRFEU/+tGPooULF0bZ2dnRI488MlpOiyj67W9/G5nZDV/PPfdcFEWfloJ+97vfjVKpVJSTkxN94QtfiA4dOhR2pwOa6FiZWfTGG2+M/gzH7EZ/93d/N3oNVlRURE888cRoAooijtnNuD4Jccz+gHlCAIBgMvZvQgCAux9JCAAQDEkIABAMSQgAEAxJCAAQDEkIABAMSQgAEAxJCAAQDEkIABAMSQgAEAxJCAAQzP8Dml5mHL/jzFUAAAAASUVORK5CYII=",
|
604 |
+
"text/plain": [
|
605 |
+
"<Figure size 640x480 with 1 Axes>"
|
606 |
+
]
|
607 |
+
},
|
608 |
+
"metadata": {},
|
609 |
+
"output_type": "display_data"
|
610 |
+
}
|
611 |
+
],
|
612 |
+
"source": [
|
613 |
+
"image = 'train/sad/Training_1369050.jpg'\n",
|
614 |
+
"print(\"original image is of sad\")\n",
|
615 |
+
"img = ef(image)\n",
|
616 |
+
"pred = model.predict(img)\n",
|
617 |
+
"pred_label = label[pred.argmax()]\n",
|
618 |
+
"print(\"model prediction is \",pred_label)\n",
|
619 |
+
"plt.imshow(img.reshape(48,48),cmap='gray')"
|
620 |
+
]
|
621 |
+
},
|
622 |
+
{
|
623 |
+
"cell_type": "code",
|
624 |
+
"execution_count": 28,
|
625 |
+
"id": "8773828e",
|
626 |
+
"metadata": {},
|
627 |
+
"outputs": [
|
628 |
+
{
|
629 |
+
"name": "stdout",
|
630 |
+
"output_type": "stream",
|
631 |
+
"text": [
|
632 |
+
"original image is of fear\n",
|
633 |
+
"1/1 [==============================] - 0s 22ms/step\n",
|
634 |
+
"model prediction is sad\n"
|
635 |
+
]
|
636 |
+
},
|
637 |
+
{
|
638 |
+
"data": {
|
639 |
+
"text/plain": [
|
640 |
+
"<matplotlib.image.AxesImage at 0x244f198fa90>"
|
641 |
+
]
|
642 |
+
},
|
643 |
+
"execution_count": 28,
|
644 |
+
"metadata": {},
|
645 |
+
"output_type": "execute_result"
|
646 |
+
},
|
647 |
+
{
|
648 |
+
"data": {
|
649 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAGeCAYAAAA9hL66AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAwU0lEQVR4nO3df2xV933/8Zf5dbHxj2ADNg6QuMIhixhRSrqIrg0sKZZYlaXLP9NSVdkvKSkkCsof6Sh/1Js0nPAHohNttmxVFmli9I81Xf9YMyytMZsQk6FhYaSNlNUBE3AcDNjGJqYx5/tHv7gYuO8X1wf2ucDzIfmP+u1z7zmfc85955b3+7wrsiz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+8JdouHl3Hbk1GR0fDeLS9K992JdguHl0L0XpfjLn7QJIqsmv5q/9Dx44d0+LFi1PvBgAgp97eXi1atCj8m7JLQhcuXNDx48dVU1OjiooKDQ0NafHixert7VVtbW3q3bspsGalY81Kx5qV7nZZsyzLNDw8rObmZvvtuez+77hp06ZdNXPW1tbe0iftRmDNSsealY41K93tsGZ1dXXX9HcUJgAAkiEJAQCSKfskVCgU9K1vfcvOrsevsWalY81Kx5qVjjW7UtkVJgAAbh9l/00IAHDrIgkBAJIhCQEAkiEJAQCSIQkBAJIp+yT03e9+Vy0tLZo9e7ZWrlyp//iP/0i9S2Vjz549euyxx9Tc3KyKigr98Ic/nBTPskzt7e1qbm5WZWWl1qxZo8OHD6fZ2TLQ0dGhz33uc6qpqdGCBQv0la98Re+9996kv2HNrvTKK69oxYoVE13+q1at0o9//OOJOGsW6+joUEVFhTZu3DjxO9bs18o6CX3/+9/Xxo0btXnzZr399tv64he/qHXr1uno0aOpd60sjIyM6P7779eOHTuuGt+6dau2bdumHTt2qLu7W01NTVq7dq2Gh4f/j/e0PHR1dWnDhg3at2+fOjs79emnn6qtrU0jIyMTf8OaXWnRokV66aWXtH//fu3fv1+PPPKIHn/88YkPTdasuO7ubr366qtasWLFpN+zZpfIythv/dZvZc8888yk3917773Zn//5nyfao/IlKXvjjTcm/veFCxeypqam7KWXXpr43SeffJLV1dVlf/M3f5NgD8tPf39/Jinr6urKsow1K8XcuXOzv//7v2fNAsPDw1lra2vW2dmZrV69Onv++eezLOM6u1zZfhM6f/68Dhw4oLa2tkm/b2tr0969exPt1c2jp6dHfX19k9avUCho9erVrN//Nzg4KEmqr6+XxJpdi/Hxce3atUsjIyNatWoVaxbYsGGDvvzlL+tLX/rSpN+zZpOV3VO0Lzp58qTGx8fV2Ng46feNjY3q6+tLtFc3j4trdLX1O3LkSIpdKitZlumFF17QF77wBS1fvlwSaxY5dOiQVq1apU8++UTV1dV64403dN999018aLJmk+3atUs//elP1d3dfUWM62yysk1CF10+iTHLstxTRm8nrN/VPfvss3rnnXf0n//5n1fEWLMrLVu2TAcPHtSZM2f0z//8z3rqqafU1dU1EWfNfq23t1fPP/+8du/erdmzZxf9O9bsV8r2/46bN2+epk+ffsW3nv7+/iv+CwJXampqkiTW7yqee+45/ehHP9JPfvKTSbOrWLPiZs2apaVLl+rBBx9UR0eH7r//fn37299mza7iwIED6u/v18qVKzVjxgzNmDFDXV1d+uu//mvNmDFjYl1Ys18p2yQ0a9YsrVy5Up2dnZN+39nZqc9//vOJ9urm0dLSoqampknrd/78eXV1dd2265dlmZ599ln94Ac/0L//+7+rpaVlUpw1u3ZZlmlsbIw1u4pHH31Uhw4d0sGDByd+HnzwQX31q1/VwYMH9ZnPfIY1u1S6mghv165d2cyZM7Pvfe972bvvvptt3LgxmzNnTvbBBx+k3rWyMDw8nL399tvZ22+/nUnKtm3blr399tvZkSNHsizLspdeeimrq6vLfvCDH2SHDh3K/vAP/zBbuHBhNjQ0lHjP0/j617+e1dXVZW+99VZ24sSJiZ/R0dGJv2HNrrRp06Zsz549WU9PT/bOO+9k3/zmN7Np06Zlu3fvzrKMNbsWl1bHZRlrdqmyTkJZlmXf+c53srvuuiubNWtW9tnPfnainBZZ9pOf/CSTdMXPU089lWXZr0pBv/Wtb2VNTU1ZoVDIHn744ezQoUNpdzqhq62VpOy1116b+BvW7Ep/8id/MnEPzp8/P3v00UcnElCWsWbX4vIkxJr9GvOEAADJlO2/CQEAbn0kIQBAMiQhAEAyJCEAQDIkIQBAMiQhAEAyJCEAQDIkIQBAMiQhAEAyJCEAQDIkIQBAMv8PhwBP1aRdFZkAAAAASUVORK5CYII=",
|
650 |
+
"text/plain": [
|
651 |
+
"<Figure size 640x480 with 1 Axes>"
|
652 |
+
]
|
653 |
+
},
|
654 |
+
"metadata": {},
|
655 |
+
"output_type": "display_data"
|
656 |
+
}
|
657 |
+
],
|
658 |
+
"source": [
|
659 |
+
"image = 'train/fear/Training_10133194.jpg'\n",
|
660 |
+
"print(\"original image is of fear\")\n",
|
661 |
+
"img = ef(image)\n",
|
662 |
+
"pred = model.predict(img)\n",
|
663 |
+
"pred_label = label[pred.argmax()]\n",
|
664 |
+
"print(\"model prediction is \",pred_label)\n",
|
665 |
+
"plt.imshow(img.reshape(48,48),cmap='gray')"
|
666 |
+
]
|
667 |
+
},
|
668 |
+
{
|
669 |
+
"cell_type": "code",
|
670 |
+
"execution_count": 52,
|
671 |
+
"id": "096c4183",
|
672 |
+
"metadata": {},
|
673 |
+
"outputs": [],
|
674 |
+
"source": [
|
675 |
+
" # import the necessary packages\n",
|
676 |
+
"from os import path\n",
|
677 |
+
"\n",
|
678 |
+
"# define the base path to the emotion dataset\n",
|
679 |
+
"BASE_PATH = \"/raid/datasets/fer2013\"\n",
|
680 |
+
"# use the base path to define the path to the input emotions file\n",
|
681 |
+
"INPUT_PATH = path.sep.join([BASE_PATH, \"fer2013/fer2013.csv\"])\n"
|
682 |
+
]
|
683 |
+
},
|
684 |
+
{
|
685 |
+
"cell_type": "code",
|
686 |
+
"execution_count": 53,
|
687 |
+
"id": "f46f46f8",
|
688 |
+
"metadata": {},
|
689 |
+
"outputs": [],
|
690 |
+
"source": [
|
691 |
+
"# define the number of classes (set to 6 if you are ignoring the\n",
|
692 |
+
"# \"disgust\" class)\n",
|
693 |
+
"# NUM_CLASSES = 7\n",
|
694 |
+
"NUM_CLASSES = 6"
|
695 |
+
]
|
696 |
+
},
|
697 |
+
{
|
698 |
+
"cell_type": "code",
|
699 |
+
"execution_count": 54,
|
700 |
+
"id": "5b37209e",
|
701 |
+
"metadata": {},
|
702 |
+
"outputs": [],
|
703 |
+
"source": [
|
704 |
+
"# define the path to the output training, validation, and testing\n",
|
705 |
+
"# HDF5 files\n",
|
706 |
+
"TRAIN_HDF5 = path.sep.join([BASE_PATH, \"hdf5/train.hdf5\"])\n",
|
707 |
+
"VAL_HDF5 = path.sep.join([BASE_PATH, \"hdf5/val.hdf5\"])\n",
|
708 |
+
"TEST_HDF5 = path.sep.join([BASE_PATH, \"hdf5/test.hdf5\"])"
|
709 |
+
]
|
710 |
+
},
|
711 |
+
{
|
712 |
+
"cell_type": "code",
|
713 |
+
"execution_count": 55,
|
714 |
+
"id": "83080066",
|
715 |
+
"metadata": {},
|
716 |
+
"outputs": [],
|
717 |
+
"source": [
|
718 |
+
"# define the batch size\n",
|
719 |
+
"BATCH_SIZE = 128\n",
|
720 |
+
"# define the path to where output logs will be stored\n",
|
721 |
+
"OUTPUT_PATH = path.sep.join([BASE_PATH, \"output\"])\n"
|
722 |
+
]
|
723 |
+
}
|
724 |
+
],
|
725 |
+
"metadata": {
|
726 |
+
"kernelspec": {
|
727 |
+
"display_name": "Python 3 (ipykernel)",
|
728 |
+
"language": "python",
|
729 |
+
"name": "python3"
|
730 |
+
},
|
731 |
+
"language_info": {
|
732 |
+
"codemirror_mode": {
|
733 |
+
"name": "ipython",
|
734 |
+
"version": 3
|
735 |
+
},
|
736 |
+
"file_extension": ".py",
|
737 |
+
"mimetype": "text/x-python",
|
738 |
+
"name": "python",
|
739 |
+
"nbconvert_exporter": "python",
|
740 |
+
"pygments_lexer": "ipython3",
|
741 |
+
"version": "3.11.5"
|
742 |
+
}
|
743 |
+
},
|
744 |
+
"nbformat": 4,
|
745 |
+
"nbformat_minor": 5
|
746 |
+
}
|
emotiondetector.h5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:522409cb582a90d4f9c735153a8dcf7ac051718ef98959739704b09fc92e26c3
|
3 |
+
size 50860496
|
emotiondetector.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"class_name": "Sequential", "config": {"name": "sequential", "layers": [{"module": "keras.layers", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 48, 48, 1], "dtype": "float32", "sparse": false, "ragged": false, "name": "conv2d_input"}, "registered_name": null}, {"module": "keras.layers", "class_name": "Conv2D", "config": {"name": "conv2d", "trainable": true, "dtype": "float32", "batch_input_shape": [null, 48, 48, 1], "filters": 128, "kernel_size": [3, 3], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "relu", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 48, 48, 1]}}, {"module": "keras.layers", "class_name": "MaxPooling2D", "config": {"name": "max_pooling2d", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}, "registered_name": null, "build_config": {"input_shape": [null, 46, 46, 128]}}, {"module": "keras.layers", "class_name": "Dropout", "config": {"name": "dropout", "trainable": true, "dtype": "float32", "rate": 0.4, "noise_shape": null, "seed": null}, "registered_name": null, "build_config": {"input_shape": [null, 23, 23, 128]}}, {"module": "keras.layers", "class_name": "Conv2D", "config": {"name": "conv2d_1", "trainable": true, "dtype": "float32", "filters": 256, "kernel_size": [3, 3], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "relu", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 23, 23, 128]}}, {"module": "keras.layers", "class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_1", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}, "registered_name": null, "build_config": {"input_shape": [null, 21, 21, 256]}}, {"module": "keras.layers", "class_name": "Dropout", "config": {"name": "dropout_1", "trainable": true, "dtype": "float32", "rate": 0.4, "noise_shape": null, "seed": null}, "registered_name": null, "build_config": {"input_shape": [null, 10, 10, 256]}}, {"module": "keras.layers", "class_name": "Conv2D", "config": {"name": "conv2d_2", "trainable": true, "dtype": "float32", "filters": 512, "kernel_size": [3, 3], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "relu", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 10, 10, 256]}}, {"module": "keras.layers", "class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_2", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}, "registered_name": null, "build_config": {"input_shape": [null, 8, 8, 512]}}, {"module": "keras.layers", "class_name": "Dropout", "config": {"name": "dropout_2", "trainable": true, "dtype": "float32", "rate": 0.4, "noise_shape": null, "seed": null}, "registered_name": null, "build_config": {"input_shape": [null, 4, 4, 512]}}, {"module": "keras.layers", "class_name": "Conv2D", "config": {"name": "conv2d_3", "trainable": true, "dtype": "float32", "filters": 512, "kernel_size": [3, 3], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "relu", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 4, 4, 512]}}, {"module": "keras.layers", "class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_3", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}, "registered_name": null, "build_config": {"input_shape": [null, 2, 2, 512]}}, {"module": "keras.layers", "class_name": "Dropout", "config": {"name": "dropout_3", "trainable": true, "dtype": "float32", "rate": 0.4, "noise_shape": null, "seed": null}, "registered_name": null, "build_config": {"input_shape": [null, 1, 1, 512]}}, {"module": "keras.layers", "class_name": "Flatten", "config": {"name": "flatten", "trainable": true, "dtype": "float32", "data_format": "channels_last"}, "registered_name": null, "build_config": {"input_shape": [null, 1, 1, 512]}}, {"module": "keras.layers", "class_name": "Dense", "config": {"name": "dense", "trainable": true, "dtype": "float32", "units": 512, "activation": "relu", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 512]}}, {"module": "keras.layers", "class_name": "Dropout", "config": {"name": "dropout_4", "trainable": true, "dtype": "float32", "rate": 0.4, "noise_shape": null, "seed": null}, "registered_name": null, "build_config": {"input_shape": [null, 512]}}, {"module": "keras.layers", "class_name": "Dense", "config": {"name": "dense_1", "trainable": true, "dtype": "float32", "units": 256, "activation": "relu", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 512]}}, {"module": "keras.layers", "class_name": "Dropout", "config": {"name": "dropout_5", "trainable": true, "dtype": "float32", "rate": 0.3, "noise_shape": null, "seed": null}, "registered_name": null, "build_config": {"input_shape": [null, 256]}}, {"module": "keras.layers", "class_name": "Dense", "config": {"name": "dense_2", "trainable": true, "dtype": "float32", "units": 7, "activation": "softmax", "use_bias": true, "kernel_initializer": {"module": "keras.initializers", "class_name": "GlorotUniform", "config": {"seed": null}, "registered_name": null}, "bias_initializer": {"module": "keras.initializers", "class_name": "Zeros", "config": {}, "registered_name": null}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "registered_name": null, "build_config": {"input_shape": [null, 256]}}]}, "keras_version": "2.15.0", "backend": "tensorflow"}
|