├── .idea
├── crowd-analytics.iml
├── misc.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── Issues.txt
├── LICENSE
├── README.md
├── algo
├── Xval.txt
├── api.py
├── bored.txt
├── camera.py
├── graph.py
├── graphx.txt
├── graphy.txt
├── int_vision_training
├── main.py
├── ml.py
├── ml_mobile.py
├── play.py
├── pool.py
├── smile.txt
├── test.txt
└── yval.txt
├── graph.png
├── newTrain
├── Xval.txt
├── analysis.txt
├── api.py
├── happy.txt
└── yval.txt
├── range
├── Issues.txt
├── analysed.txt
├── analyze.py
├── meta-chart.jpeg
└── test.py
└── testImages
├── attentive.jpeg
├── bored.jpeg
└── serious.jpg
/.idea/crowd-analytics.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
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 |
94 |
95 |
96 |
97 | video
98 | size
99 | img
100 | func
101 | put
102 | start
103 | graphX
104 | imwrite
105 | score
106 | predi
107 | frame_
108 | 640
109 | cap.set
110 | gamma
111 | que.p
112 | graph
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 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 | 1524676707297
357 |
358 |
359 | 1524676707297
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 |
859 |
860 |
861 |
862 |
863 |
864 |
865 |
866 |
867 |
868 |
869 |
870 |
871 |
872 |
873 |
874 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
886 |
887 |
888 |
889 |
890 |
891 |
892 |
893 |
894 |
895 |
896 |
897 |
898 |
899 |
900 |
901 |
902 |
903 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 |
912 |
913 |
914 |
915 |
916 |
917 |
918 |
919 |
920 |
921 |
922 |
923 |
924 |
925 |
926 |
927 |
928 |
--------------------------------------------------------------------------------
/Issues.txt:
--------------------------------------------------------------------------------
1 | Check for yawn (Can be done with AWS or custom training for surprise)
2 |
3 | Training images stats:
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Abhijeet Singh
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 | The Japanese Female Facial Expression (JAFFE) Database
24 | Michael J. Lyons, Shigeru Akemastu, Miyuki Kamachi, Jiro Gyoba.
25 | Coding Facial Expressions with Gabor Wavelets, 3rd IEEE International Conference on Automatic Face and Gesture Recognition, pp. 200-205 (1998).
26 |
27 | The University of Milano Bicocca 3D Face Database
28 | A. Colombo, C. Cusano, and R. Schettini, “UMB-DB: A Database of Partially Occluded 3D
29 | Faces,” in Proc. ICCV 2011 Workshops, pp. 2113-2119, 2011.
30 |
31 | The Karolinska Directed Emotional Faces (KDEF) Stimulus Set
32 | E.Lundqvist, D., Flykt, A., & Öhman, A. (1998). The Karolinska Directed Emotional Faces - KDEF, CD ROM from Department of Clinical Neuroscience, Psychology section, Karolinska Institutet, ISBN 91-630-7164-9.
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # INT-Vision
2 | Crowd analysis tool
3 |
4 | INT-Vision (Interest Vision) is a desktop software to analyse productivity of multiple human subjects simultaneously based on emotions and gestures. It can be easily deployed on any device with a digital camera and both real-time and graph analysis results can be seen on the desktop with the click of a button.
5 |
6 | Possible applications:
7 | - In schools/coachings to analyse interest of students in a particular lecture at various points of time.
8 | - In offices to analyse productivity of employees.
9 | - In workshops/seminars to analyse the interest of audience in the presented content.
10 |
11 | This serves as an AI enhanced surveillance system and eliminates the need for feedback or human monitoring.
12 |
13 | How to use:
14 | 1. Navigate to the algo folder.
15 | ```shell
16 | cd algo
17 | ```
18 | 2. Run main file using Python.
19 | ```shell
20 | python3 main.py
21 | ```
22 | 3. Press "Start Webcam" to start analysis using default laptop/PC camera. Press Esc key to stop recording. Wait for processing to finish.
23 | 4. Press "Start Video" to see analysed video with blue boxes indicating interested subjected and red boxes indicating disengaged, sleepy or bored subjects.
24 | 5. Press "Show Graph" to see a graph of interest level of people versus time.
25 |
--------------------------------------------------------------------------------
/algo/api.py:
--------------------------------------------------------------------------------
1 | import os
2 | import requests
3 | import numpy as np
4 |
5 | # free, 20 calls/min, limit 30K calls/month
6 | # subscription_key = "bf5951c5f4934e2e90bc11c48ffb57fa"
7 | # premium, 10 calls/sec, no limit, 66 INR / 1000 calls
8 | subscription_key = "02726400482345229652709041c698ba"
9 | assert subscription_key
10 |
11 | face_api_url = 'https://southeastasia.api.cognitive.microsoft.com/face/v1.0/detect'
12 |
13 | headers = { 'Ocp-Apim-Subscription-Key': subscription_key, "Content-Type": "application/octet-stream"}
14 | params = {
15 | 'returnFaceId': 'false',
16 | 'returnFaceLandmarks': 'false',
17 | 'returnFaceAttributes': 'emotion,smile,headPose'
18 | }
19 |
20 | X = np.empty((0, 8), float)
21 | y = np.empty((0, 1), float)
22 |
23 |
24 | test_folder_name = "bored"
25 | test_file = "bored.txt"
26 |
27 | # remove previous test file
28 | open(test_file,'w')
29 | # writes azure analysed values of files in txt file
30 | def analyse(fname,ara):
31 |
32 | with open(test_file,'a') as myfile:
33 | #myfile.write("anger\tcontempt\tdisgust\tfear\thappiness\tneutral\tsadness\tsurprise\troll\n")
34 | myfile.write("anger=" + str(ara[0]) + " ")
35 | myfile.write("contempt=" + str(ara[1]) + " ")
36 | myfile.write("disgust=" + str(ara[2]) + " ")
37 | myfile.write("fear=" + str(ara[3]) + " ")
38 | myfile.write("happiness=" + str(ara[4])+ " ")
39 | myfile.write("neutral=" + str(ara[5]) + " ")
40 | myfile.write("sadness=" + str(ara[6]) + " ")
41 | myfile.write("surprise=" + str(ara[7]) + " ")
42 | #myfile.write("roll=" + str(ara[8]))
43 | myfile.write("\n")
44 | myfile.write(str(fname)+"\n\n")
45 |
46 | # this is criteria for error
47 | if(False):
48 | shutil.move("/home/abhijeet/Documents/github/crowd-analytics/newTrain/" + test_folder_name + "/" + str(fname),
49 | "/home/abhijeet/Documents/github/crowd-analytics/newTrain/errors/" + str(fname))
50 |
51 |
52 | # dataset folder
53 | indir = '/home/abhijeet/Documents/github/crowd-analytics/algo/'
54 |
55 | progress = 0
56 | for dirs,dirlist,filenames in os.walk("."):
57 | print(dirs)
58 |
59 | for filename in filenames:
60 | print(filename)
61 | if filename.endswith(".jpeg") or filename.endswith(".jpg") or filename.endswith(".png") or filename.endswith(".JPG") or filename.endswith(".PNG") or filename.endswith(".JPEG"):
62 | print("taken " + filename)
63 | # print(os.path.join(directory, filename))
64 | # image_data = open(indir + '/' + filename, "rb").read()
65 | image_data = open(indir + '/' + dirs.split('/')[1]+'/'+filename, "rb").read()
66 |
67 | response = requests.post(face_api_url, params=params, headers=headers, data=image_data)
68 | response.raise_for_status()
69 | analysis = response.json()
70 |
71 | if analysis:
72 | print("Face detected and done ", progress, "%, analysing", dirs, "currently")
73 |
74 | for i in analysis:
75 |
76 | #print(i)
77 | dic = []
78 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["anger"])
79 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["contempt"])
80 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["disgust"])
81 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["fear"])
82 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["happiness"])
83 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["neutral"])
84 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["sadness"])
85 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["surprise"])
86 | #dic.insert(len(dic), i["faceAttributes"]["smile"])
87 | #dic.insert(len(dic), abs(i["faceAttributes"]["headPose"]["roll"]))
88 |
89 | # convert list to numpy array
90 | arr = np.array(dic)
91 |
92 | # insert next row to main numpy array
93 | X = np.vstack([X, arr])
94 |
95 |
96 | # analyse particular folder
97 | if str(dirs[2:]) == test_folder_name:
98 | analyse(filename, arr)
99 | # print(dirs)
100 | # print("---",dirs[2:],"----")
101 | # print(type(dirs))
102 |
103 | if str(dirs[2:]) == "bored" or str(dirs[2:]) == "openmouth" or str(dirs[2:]) == "sad":
104 | y = np.insert(y, len(y), 1)
105 | else:
106 | y = np.insert(y, len(y), -1)
107 |
108 | # increment value = 100 / no. of directories
109 | progress += 6.66
110 |
111 | #print(X)
112 | #print(y)
113 |
114 | np.savetxt('Xval.txt', X, fmt='%f')
115 | np.savetxt('yval.txt', y, fmt='%d')
--------------------------------------------------------------------------------
/algo/bored.txt:
--------------------------------------------------------------------------------
1 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.516 sadness=0.484 surprise=0.0
2 | 1.jpg
3 |
4 | anger=0.0 contempt=0.279 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.715 sadness=0.005 surprise=0.0
5 | 16.jpeg
6 |
7 | anger=0.0 contempt=0.015 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.314 sadness=0.671 surprise=0.0
8 | nch.jpg
9 |
10 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.002 sadness=0.0 surprise=0.998
11 | BM21SUS.JPG
12 |
13 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.002 neutral=0.718 sadness=0.28 surprise=0.0
14 | Young-man-cant-wake-up.jpg
15 |
16 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.001 happiness=0.001 neutral=0.938 sadness=0.055 surprise=0.001
17 | download (4).jpg
18 |
19 | anger=0.0 contempt=0.089 disgust=0.023 fear=0.0 happiness=0.0 neutral=0.084 sadness=0.804 surprise=0.0
20 | bored-kid.jpg
21 |
22 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.821 sadness=0.175 surprise=0.0
23 | BM33NES.JPG
24 |
25 | anger=0.0 contempt=0.016 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.968 sadness=0.015 surprise=0.0
26 | 13.jpeg
27 |
28 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.997 sadness=0.001 surprise=0.0
29 | 76762917.jpg
30 |
31 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.981 sadness=0.019 surprise=0.0
32 | 76762917.jpg
33 |
34 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.925 sadness=0.075 surprise=0.0
35 | 76762917.jpg
36 |
37 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.487 sadness=0.512 surprise=0.0
38 | sad-bored-young-couple-with-flour-on-their-faces-kneading-dough-on-G1MB6C.jpg
39 |
40 | anger=0.0 contempt=0.001 disgust=0.001 fear=0.0 happiness=0.003 neutral=0.869 sadness=0.126 surprise=0.0
41 | sad-bored-young-couple-with-flour-on-their-faces-kneading-dough-on-G1MB6C.jpg
42 |
43 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.992 sadness=0.008 surprise=0.0
44 | qut8.png
45 |
46 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.592 sadness=0.408 surprise=0.0
47 | outt11.png
48 |
49 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.061 neutral=0.932 sadness=0.005 surprise=0.0
50 | wut7.png
51 |
52 | anger=0.0 contempt=0.201 disgust=0.001 fear=0.0 happiness=0.012 neutral=0.364 sadness=0.421 surprise=0.0
53 | out23.png
54 |
55 | anger=0.021 contempt=0.001 disgust=0.001 fear=0.0 happiness=0.0 neutral=0.973 sadness=0.004 surprise=0.0
56 | ouut4.png
57 |
58 | anger=0.0 contempt=0.005 disgust=0.0 fear=0.001 happiness=0.0 neutral=0.899 sadness=0.003 surprise=0.092
59 | BF12AFS.JPG
60 |
61 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.971 sadness=0.028 surprise=0.0
62 | o-CELEBRITY-BITCH-FACE-facebook.jpg
63 |
64 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.955 sadness=0.041 surprise=0.001
65 | eut8.png
66 |
67 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.87 sadness=0.129 surprise=0.0
68 | AM30NES.JPG
69 |
70 | anger=0.0 contempt=0.005 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.981 sadness=0.013 surprise=0.0
71 | 17.jpeg
72 |
73 | anger=0.001 contempt=0.0 disgust=0.001 fear=0.0 happiness=0.359 neutral=0.034 sadness=0.001 surprise=0.605
74 | download (1).jpg
75 |
76 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.365 sadness=0.632 surprise=0.0
77 | images (4).jpg
78 |
79 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.985 sadness=0.013 surprise=0.0
80 | 11.jpg
81 |
82 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.878 sadness=0.121 surprise=0.0
83 | images.jpeg
84 |
85 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.06 sadness=0.939 surprise=0.0
86 | bored-asian-woman-student-overworked-computer-young-pretty-chinese-tired-over-worked-her-laptop-wearing-black-shirt-white-39103934.jpg
87 |
88 | anger=0.055 contempt=0.002 disgust=0.007 fear=0.0 happiness=0.0 neutral=0.114 sadness=0.821 surprise=0.0
89 | 26.jpg
90 |
91 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.307 sadness=0.693 surprise=0.0
92 | out19.png
93 |
94 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.007 neutral=0.991 sadness=0.001 surprise=0.0
95 | ouyyt9.png
96 |
97 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.415 sadness=0.585 surprise=0.0
98 | outt8.png
99 |
100 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.922 sadness=0.078 surprise=0.0
101 | AF15NES.JPG
102 |
103 | anger=0.206 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.786 sadness=0.002 surprise=0.002
104 | ouyuyyt13.png
105 |
106 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.816 sadness=0.181 surprise=0.0
107 | images (6).jpg
108 |
109 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.998 sadness=0.002 surprise=0.0
110 | 6x9HgMV9.jpg
111 |
112 | anger=0.002 contempt=0.002 disgust=0.003 fear=0.002 happiness=0.001 neutral=0.945 sadness=0.012 surprise=0.033
113 | cce148b0ba8904b977cce3d13e0624df--sherlock-moriarty-sherlock-benedict.jpg
114 |
115 | anger=0.051 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.947 sadness=0.001 surprise=0.0
116 | ouyuyyt5.png
117 |
118 | anger=0.002 contempt=0.002 disgust=0.002 fear=0.001 happiness=0.0 neutral=0.97 sadness=0.021 surprise=0.003
119 | black-male-headshot-gunter-nezhoda.jpg
120 |
121 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.001 happiness=0.0 neutral=0.066 sadness=0.929 surprise=0.003
122 | bored-teen-girl-sitting-making-faces-k-uhd-native-video-70198817.jpg
123 |
124 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.961 sadness=0.039 surprise=0.0
125 | UY.FE2.153.tiff.png
126 |
127 | anger=0.32 contempt=0.018 disgust=0.001 fear=0.0 happiness=0.0 neutral=0.658 sadness=0.003 surprise=0.001
128 | ouyuyyt12.png
129 |
130 | anger=0.0 contempt=0.004 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.891 sadness=0.105 surprise=0.0
131 | AM05NES.JPG
132 |
133 | anger=0.431 contempt=0.01 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.555 sadness=0.002 surprise=0.002
134 | ouyuyyt11.png
135 |
136 | anger=0.001 contempt=0.027 disgust=0.001 fear=0.002 happiness=0.001 neutral=0.7 sadness=0.267 surprise=0.002
137 | student-resting-head-on-desk-in-classroom-143071599-5a6940c2ae9ab8001acfcdb9.jpg
138 |
139 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.013 neutral=0.984 sadness=0.0 surprise=0.0
140 | student-resting-head-on-desk-in-classroom-143071599-5a6940c2ae9ab8001acfcdb9.jpg
141 |
142 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.08 neutral=0.917 sadness=0.0 surprise=0.0
143 | student-resting-head-on-desk-in-classroom-143071599-5a6940c2ae9ab8001acfcdb9.jpg
144 |
145 | anger=0.366 contempt=0.014 disgust=0.001 fear=0.001 happiness=0.0 neutral=0.615 sadness=0.002 surprise=0.002
146 | ouyuyyt10.png
147 |
148 | anger=0.0 contempt=0.047 disgust=0.001 fear=0.0 happiness=0.001 neutral=0.762 sadness=0.188 surprise=0.001
149 | eut3.png
150 |
151 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.745 sadness=0.255 surprise=0.0
152 | out6.png
153 |
154 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.994 sadness=0.006 surprise=0.0
155 | 19.jpg
156 |
157 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.973 sadness=0.024 surprise=0.0
158 | obama-bored.jpg
159 |
160 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.391 sadness=0.609 surprise=0.0
161 | outt7.png
162 |
163 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.515 sadness=0.485 surprise=0.0
164 | outt4.png
165 |
166 | anger=0.001 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.902 sadness=0.007 surprise=0.09
167 | ouyyt6.png
168 |
169 | anger=0.0 contempt=0.011 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.216 sadness=0.773 surprise=0.0
170 | KA.DI1.42.tiff.png
171 |
172 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.5 sadness=0.5 surprise=0.0
173 | outt14.png
174 |
175 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.825 sadness=0.174 surprise=0.0
176 | 32.jpeg
177 |
178 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.219 sadness=0.781 surprise=0.0
179 | out18.png
180 |
181 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.1 neutral=0.894 sadness=0.004 surprise=0.0
182 | obama-bored1.jpg
183 |
184 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.033 neutral=0.963 sadness=0.002 surprise=0.0
185 | 10abe19aa702bc98e9b7f1d2e564e429--beards.jpg
186 |
187 | anger=0.0 contempt=0.036 disgust=0.0 fear=0.0 happiness=0.013 neutral=0.914 sadness=0.036 surprise=0.0
188 | eut7.png
189 |
190 | anger=0.036 contempt=0.004 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.954 sadness=0.006 surprise=0.0
191 | ouyuyyt4.png
192 |
193 | anger=0.0 contempt=0.008 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.981 sadness=0.011 surprise=0.0
194 | out10.png
195 |
196 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.994 sadness=0.006 surprise=0.0
197 | 61358009-plan-rapproché-du-visage-ennuyé-aux-cheveux-longs-et-aux-yeux-bleus-au-fond-du-mur-de-briques.jpg
198 |
199 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.993 sadness=0.007 surprise=0.0
200 | qut9.png
201 |
202 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.654 sadness=0.346 surprise=0.0
203 | outt12.png
204 |
205 | anger=0.0 contempt=0.039 disgust=0.0 fear=0.0 happiness=0.003 neutral=0.894 sadness=0.063 surprise=0.0
206 | download (5).jpg
207 |
208 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.927 sadness=0.073 surprise=0.0
209 | 55-31155-mos-who27s-terrorist-sal-photo-1460545946.jpg
210 |
211 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.996 sadness=0.004 surprise=0.0
212 | 15.jpeg
213 |
214 | anger=0.002 contempt=0.129 disgust=0.002 fear=0.0 happiness=0.001 neutral=0.304 sadness=0.562 surprise=0.0
215 | AM21AFS.JPG
216 |
217 | anger=0.0 contempt=0.014 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.907 sadness=0.079 surprise=0.0
218 | KR.AN2.84.tiff.png
219 |
220 | anger=0.0 contempt=0.004 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.85 sadness=0.145 surprise=0.0
221 | out8.png
222 |
223 | anger=0.0 contempt=0.009 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.697 sadness=0.294 surprise=0.0
224 | index.jpeg
225 |
226 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.835 sadness=0.164 surprise=0.0
227 | download (6).jpg
228 |
229 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.974 sadness=0.026 surprise=0.0
230 | 12.jpeg
231 |
232 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.995 sadness=0.004 surprise=0.0
233 | AM33NES.JPG
234 |
235 | anger=0.001 contempt=0.013 disgust=0.0 fear=0.0 happiness=0.019 neutral=0.876 sadness=0.092 surprise=0.0
236 | 30.jpeg
237 |
238 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.992 sadness=0.007 surprise=0.0
239 | AM21NES.JPG
240 |
241 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.998 sadness=0.002 surprise=0.0
242 | 9.jpeg
243 |
244 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.3 sadness=0.0 surprise=0.7
245 | 9.jpeg
246 |
247 | anger=0.002 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.993 sadness=0.005 surprise=0.0
248 | images (7).jpg
249 |
250 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.488 sadness=0.512 surprise=0.0
251 | 25.jpeg
252 |
253 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.945 sadness=0.055 surprise=0.0
254 | UY.AN2.147.tiff.png
255 |
256 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.909 sadness=0.089 surprise=0.001
257 | 61807903-sleepy-man-with-beard-and-plaid-shirt-snores-with-his-eyes-closed-against-a-white-background.jpg
258 |
259 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.605 sadness=0.395 surprise=0.0
260 | outt15.png
261 |
262 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.947 sadness=0.051 surprise=0.002
263 | UY.FE3.154.tiff.png
264 |
265 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.952 sadness=0.045 surprise=0.001
266 | eut6.png
267 |
268 | anger=0.41 contempt=0.006 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.582 sadness=0.001 surprise=0.001
269 | ouyuyyt14.png
270 |
271 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.575 sadness=0.425 surprise=0.0
272 | outt3.png
273 |
274 | anger=0.0 contempt=0.01 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.962 sadness=0.027 surprise=0.0
275 | rut3.png
276 |
277 | anger=0.001 contempt=0.055 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.932 sadness=0.011 surprise=0.0
278 | 18.jpeg
279 |
280 | anger=0.0 contempt=0.026 disgust=0.0 fear=0.0 happiness=0.047 neutral=0.899 sadness=0.027 surprise=0.001
281 | out1.png
282 |
283 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.968 sadness=0.031 surprise=0.0
284 | images (3).jpg
285 |
286 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.994 sadness=0.003 surprise=0.0
287 | qut7.png
288 |
289 | anger=0.058 contempt=0.002 disgust=0.0 fear=0.001 happiness=0.0 neutral=0.93 sadness=0.007 surprise=0.002
290 | ouyuyyt3.png
291 |
292 | anger=0.001 contempt=0.005 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.889 sadness=0.104 surprise=0.0
293 | 143916963.jpg
294 |
295 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.861 sadness=0.137 surprise=0.0
296 | AF10NES.JPG
297 |
298 | anger=0.02 contempt=0.011 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.96 sadness=0.009 surprise=0.0
299 | ouut3.png
300 |
301 | anger=0.01 contempt=0.023 disgust=0.002 fear=0.0 happiness=0.001 neutral=0.905 sadness=0.059 surprise=0.0
302 | 6.jpeg
303 |
304 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.988 sadness=0.012 surprise=0.0
305 | 000019_0026_M_NE_F.ppm.png
306 |
307 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.892 sadness=0.108 surprise=0.0
308 | 000001_0190_F_NE_F.ppm.png
309 |
310 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.851 sadness=0.149 surprise=0.0
311 | download.jpeg
312 |
313 | anger=0.056 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.914 sadness=0.027 surprise=0.001
314 | ouyuyyt15.png
315 |
316 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.814 sadness=0.185 surprise=0.0
317 | 13.jpg
318 |
319 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.999 sadness=0.0 surprise=0.0
320 | 13.jpg
321 |
322 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.626 sadness=0.37 surprise=0.001
323 | 5.jpg
324 |
325 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.991 sadness=0.009 surprise=0.0
326 | 20.jpeg
327 |
328 | anger=0.029 contempt=0.107 disgust=0.155 fear=0.003 happiness=0.002 neutral=0.198 sadness=0.505 surprise=0.0
329 | wut2.png
330 |
331 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.996 sadness=0.003 surprise=0.001
332 | unmotivated-lethargic-middle-aged-man-with-a-goatee-beard-looking-GT8AHK.jpg
333 |
334 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=1.0 sadness=0.0 surprise=0.0
335 | 17-signs-you-were-born-with-resting-sadface-2-21585-1422383665-22_dblbig.jpg
336 |
337 | anger=0.001 contempt=0.16 disgust=0.001 fear=0.0 happiness=0.004 neutral=0.731 sadness=0.102 surprise=0.0
338 | 27.jpeg
339 |
340 | anger=0.022 contempt=0.003 disgust=0.011 fear=0.004 happiness=0.0 neutral=0.916 sadness=0.015 surprise=0.029
341 | ouyuyyt2.png
342 |
343 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.798 sadness=0.201 surprise=0.0
344 | fe0abf4928dfc075429868e0f414392ce01a08e6_hq.jpg
345 |
346 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.999 sadness=0.001 surprise=0.0
347 | Kayehasaneutralhairexpression.jpg
348 |
349 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.986 sadness=0.011 surprise=0.001
350 | eut10.png
351 |
352 | anger=0.001 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.407 sadness=0.59 surprise=0.0
353 | 7.jpeg
354 |
355 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.993 sadness=0.007 surprise=0.0
356 | AF20NES.JPG
357 |
358 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.002 happiness=0.0 neutral=0.946 sadness=0.003 surprise=0.049
359 | ouut1.png
360 |
361 | anger=0.006 contempt=0.007 disgust=0.001 fear=0.0 happiness=0.0 neutral=0.246 sadness=0.74 surprise=0.0
362 | very-serious-look-5216614.jpg
363 |
364 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.671 sadness=0.003 surprise=0.324
365 | stand2.jpg
366 |
367 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.91 sadness=0.088 surprise=0.0
368 | out4.png
369 |
370 | anger=0.001 contempt=0.348 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.567 sadness=0.084 surprise=0.0
371 | index2.jpeg
372 |
373 | anger=0.081 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.909 sadness=0.008 surprise=0.001
374 | ouyuyyt16.png
375 |
376 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.853 sadness=0.146 surprise=0.0
377 | outt13.png
378 |
379 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.972 sadness=0.028 surprise=0.0
380 | NM.AN3.106.tiff.png
381 |
382 | anger=0.658 contempt=0.0 disgust=0.006 fear=0.039 happiness=0.003 neutral=0.001 sadness=0.054 surprise=0.239
383 | download (2).jpg
384 |
385 | anger=0.0 contempt=0.046 disgust=0.0 fear=0.0 happiness=0.02 neutral=0.924 sadness=0.009 surprise=0.0
386 | 6.jpg
387 |
388 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.003 neutral=0.95 sadness=0.046 surprise=0.0
389 | images (1).jpeg
390 |
391 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.998 sadness=0.002 surprise=0.0
392 | qut2.png
393 |
394 | anger=0.0 contempt=0.01 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.76 sadness=0.229 surprise=0.0
395 | out15.png
396 |
397 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.942 sadness=0.055 surprise=0.0
398 | 001440_0013_F_BO_F.ppm.png
399 |
400 | anger=0.0 contempt=0.028 disgust=0.0 fear=0.0 happiness=0.005 neutral=0.823 sadness=0.143 surprise=0.0
401 | eut2.png
402 |
403 | anger=0.0 contempt=0.134 disgust=0.001 fear=0.0 happiness=0.006 neutral=0.293 sadness=0.566 surprise=0.0
404 | out22.png
405 |
406 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.031 sadness=0.968 surprise=0.0
407 | images (2).jpg
408 |
409 | anger=0.888 contempt=0.0 disgust=0.009 fear=0.004 happiness=0.001 neutral=0.001 sadness=0.074 surprise=0.023
410 | images (1).jpg
411 |
412 | anger=0.0 contempt=0.173 disgust=0.001 fear=0.0 happiness=0.005 neutral=0.425 sadness=0.396 surprise=0.0
413 | out21.png
414 |
415 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.003 happiness=0.0 neutral=0.036 sadness=0.96 surprise=0.0
416 | AF34AFS.JPG
417 |
418 | anger=0.0 contempt=0.128 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.4 sadness=0.471 surprise=0.0
419 | stock-photo-businessman-with-bored-expression-111300356.jpg
420 |
421 | anger=0.0 contempt=0.141 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.832 sadness=0.026 surprise=0.0
422 | download.jpg
423 |
424 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.633 sadness=0.367 surprise=0.0
425 | 525491805.jpg
426 |
427 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.923 sadness=0.076 surprise=0.0
428 | 3.jpeg
429 |
430 | anger=0.052 contempt=0.007 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.94 sadness=0.0 surprise=0.0
431 | Nawaz-z.jpg
432 |
433 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.982 sadness=0.016 surprise=0.001
434 | stock-photo-dozy-bearded-middle-aged-man-early-in-the-morning-standing-with-his-head-tilted-to-the-side-and-469706852.jpg
435 |
436 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.881 sadness=0.116 surprise=0.0
437 | 28.jpeg
438 |
439 | anger=0.0 contempt=0.1 disgust=0.0 fear=0.0 happiness=0.01 neutral=0.875 sadness=0.014 surprise=0.0
440 | out12.png
441 |
442 | anger=0.003 contempt=0.004 disgust=0.002 fear=0.0 happiness=0.0 neutral=0.804 sadness=0.187 surprise=0.0
443 | 2.jpg
444 |
445 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.867 sadness=0.132 surprise=0.0
446 | 001455_0193_M_BO_F.ppm.png
447 |
448 | anger=0.006 contempt=0.003 disgust=0.005 fear=0.153 happiness=0.002 neutral=0.665 sadness=0.053 surprise=0.114
449 | ouyyt7.png
450 |
451 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.18 sadness=0.82 surprise=0.0
452 | boy-with-bored-expression-on-face-portrait-CWP0WG.jpg
453 |
454 | anger=0.152 contempt=0.0 disgust=0.001 fear=0.024 happiness=0.629 neutral=0.0 sadness=0.002 surprise=0.192
455 | 75993056-headshot-of-young-bored-black-man-yawning-isolated-on-light-background-facial-expressions-feelings-b.jpg
456 |
457 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.684 sadness=0.316 surprise=0.0
458 | out17.png
459 |
460 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.012 neutral=0.982 sadness=0.003 surprise=0.0
461 | rut11.png
462 |
463 | anger=0.0 contempt=0.157 disgust=0.0 fear=0.0 happiness=0.398 neutral=0.441 sadness=0.003 surprise=0.0
464 | 7e0dd7baa7758e6589c7511c4f8ebdb4--ginger-beard-facial-expressions.jpg
465 |
466 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.694 sadness=0.305 surprise=0.0
467 | UY.FE1.152.tiff.png
468 |
469 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.886 sadness=0.114 surprise=0.0
470 | 56295e0a1400002b003c8f19.jpeg
471 |
472 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.998 sadness=0.002 surprise=0.0
473 | NM.AN2.105.tiff.png
474 |
475 | anger=0.0 contempt=0.047 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.737 sadness=0.215 surprise=0.0
476 | out16.png
477 |
478 | anger=0.0 contempt=0.006 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.013 sadness=0.981 surprise=0.0
479 | man_face_look_boredom_bored_dirtekt_t_shirt_eyes-1343973.jpg
480 |
481 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.991 sadness=0.008 surprise=0.0
482 | 22.jpeg
483 |
484 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=1.0 sadness=0.0 surprise=0.0
485 | AF34NES.JPG
486 |
487 | anger=0.001 contempt=0.018 disgust=0.001 fear=0.0 happiness=0.001 neutral=0.489 sadness=0.49 surprise=0.0
488 | KL.AN1.167.tiff.png
489 |
490 | anger=0.0 contempt=0.021 disgust=0.0 fear=0.002 happiness=0.003 neutral=0.912 sadness=0.061 surprise=0.001
491 | 21.jpeg
492 |
493 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.589 sadness=0.411 surprise=0.0
494 | outt2.png
495 |
496 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.513 sadness=0.487 surprise=0.0
497 | outt9.png
498 |
499 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.811 sadness=0.188 surprise=0.0
500 | AM32NES.JPG
501 |
502 | anger=0.275 contempt=0.0 disgust=0.013 fear=0.014 happiness=0.006 neutral=0.08 sadness=0.068 surprise=0.544
503 | download (3).jpg
504 |
505 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.995 sadness=0.004 surprise=0.0
506 | Backcomb_16907531-c6a8-49f4-9b11-e61084825a02.jpg
507 |
508 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.894 sadness=0.106 surprise=0.0
509 | rut1.png
510 |
511 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.867 sadness=0.129 surprise=0.001
512 | AM20NES.JPG
513 |
514 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.891 sadness=0.107 surprise=0.0
515 | BF31NES.JPG
516 |
517 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.866 sadness=0.133 surprise=0.0
518 | 9.jpg
519 |
520 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.223 sadness=0.776 surprise=0.0
521 | BF04AFS.JPG
522 |
523 | anger=0.002 contempt=0.002 disgust=0.005 fear=0.001 happiness=0.0 neutral=0.658 sadness=0.014 surprise=0.317
524 | AM02AFS.JPG
525 |
526 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.958 sadness=0.041 surprise=0.0
527 | 000034_0027_M_BO_F.ppm.png
528 |
529 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.006 happiness=0.0 neutral=0.825 sadness=0.005 surprise=0.164
530 | AF12AFS.JPG
531 |
532 | anger=0.001 contempt=0.031 disgust=0.001 fear=0.0 happiness=0.001 neutral=0.791 sadness=0.174 surprise=0.001
533 | out7.png
534 |
535 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.45 sadness=0.55 surprise=0.0
536 | outt10.png
537 |
538 | anger=0.0 contempt=0.005 disgust=0.0 fear=0.0 happiness=0.005 neutral=0.852 sadness=0.138 surprise=0.0
539 | images.jpg
540 |
541 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.665 sadness=0.332 surprise=0.0
542 | out13.png
543 |
544 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.99 sadness=0.01 surprise=0.0
545 | download (1).jpeg
546 |
547 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.905 sadness=0.094 surprise=0.0
548 | sleeping-tired-man-at-work-portrait_b3ze2n3nmg_thumbnail-full07.png
549 |
550 | anger=0.001 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.992 sadness=0.006 surprise=0.0
551 | ouut2.png
552 |
553 | anger=0.0 contempt=0.046 disgust=0.0 fear=0.0 happiness=0.002 neutral=0.656 sadness=0.296 surprise=0.0
554 | 11.jpeg
555 |
556 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.999 sadness=0.001 surprise=0.0
557 | 11.jpeg
558 |
559 | anger=0.0 contempt=0.004 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.956 sadness=0.006 surprise=0.033
560 | eut16.png
561 |
562 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.999 sadness=0.0 surprise=0.0
563 | 5.jpeg
564 |
565 | anger=0.001 contempt=0.13 disgust=0.001 fear=0.0 happiness=0.002 neutral=0.832 sadness=0.033 surprise=0.001
566 | bored-woman-stock-image-3552270.jpg
567 |
568 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.009 neutral=0.99 sadness=0.0 surprise=0.0
569 | qut18.png
570 |
571 | anger=0.323 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.673 sadness=0.001 surprise=0.001
572 | ouyuyyt19.png
573 |
574 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.565 sadness=0.435 surprise=0.0
575 | 000004_0190_F_AN_F.ppm.png
576 |
577 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.585 sadness=0.001 surprise=0.414
578 | ouyyt8.png
579 |
580 | anger=0.0 contempt=0.012 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.958 sadness=0.029 surprise=0.0
581 | outt1.png
582 |
583 | anger=0.001 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.004 neutral=0.903 sadness=0.088 surprise=0.0
584 | tut1.png
585 |
586 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.985 sadness=0.015 surprise=0.0
587 | qut1.png
588 |
589 | anger=0.304 contempt=0.016 disgust=0.001 fear=0.0 happiness=0.0 neutral=0.665 sadness=0.013 surprise=0.001
590 | ouyuyyt9.png
591 |
592 | anger=0.0 contempt=0.025 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.704 sadness=0.27 surprise=0.0
593 | eut4.png
594 |
595 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.027 neutral=0.966 sadness=0.006 surprise=0.0
596 | rut12.png
597 |
598 | anger=0.0 contempt=0.005 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.984 sadness=0.009 surprise=0.001
599 | eut1.png
600 |
601 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.964 sadness=0.033 surprise=0.0
602 | eut9.png
603 |
604 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.34 sadness=0.66 surprise=0.0
605 | out20.png
606 |
607 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.969 sadness=0.031 surprise=0.0
608 | 001450_0193_M_NE_F.ppm.png
609 |
610 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.797 sadness=0.202 surprise=0.0
611 | 10.jpeg
612 |
613 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.933 sadness=0.067 surprise=0.0
614 | 000006_0190_F_BO_F.ppm.png
615 |
616 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.823 sadness=0.177 surprise=0.0
617 | download (7).jpg
618 |
619 | anger=0.0 contempt=0.399 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.592 sadness=0.009 surprise=0.0
620 | index3.jpeg
621 |
622 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.849 sadness=0.15 surprise=0.0
623 | bored-in-the-dark-1435870.jpg
624 |
625 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.004 neutral=0.996 sadness=0.001 surprise=0.0
626 | qut19.png
627 |
628 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.995 sadness=0.005 surprise=0.0
629 | images4.jpeg
630 |
631 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.006 neutral=0.981 sadness=0.013 surprise=0.0
632 | rut6.png
633 |
634 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.916 sadness=0.083 surprise=0.0
635 | BF15NES.JPG
636 |
637 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.015 sadness=0.985 surprise=0.0
638 | Bored-1.jpg
639 |
640 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.01 neutral=0.983 sadness=0.006 surprise=0.0
641 | rut10.png
642 |
643 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.995 sadness=0.003 surprise=0.001
644 | qut6.png
645 |
646 | anger=0.101 contempt=0.001 disgust=0.0 fear=0.001 happiness=0.0 neutral=0.89 sadness=0.005 surprise=0.002
647 | ouyuyyt8.png
648 |
649 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.566 sadness=0.434 surprise=0.0
650 | outt5.png
651 |
652 | anger=0.001 contempt=0.03 disgust=0.002 fear=0.0 happiness=0.001 neutral=0.384 sadness=0.582 surprise=0.0
653 | KL.AN2.168.tiff.png
654 |
655 | anger=0.0 contempt=0.004 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.806 sadness=0.189 surprise=0.0
656 | out14.png
657 |
658 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.859 sadness=0.14 surprise=0.0
659 | UY.AN1.146.tiff.png
660 |
661 | anger=0.0 contempt=0.006 disgust=0.0 fear=0.0 happiness=0.002 neutral=0.956 sadness=0.037 surprise=0.0
662 | deb891ee24906866d9b7e9b487052384.jpg
663 |
664 | anger=0.052 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.945 sadness=0.001 surprise=0.001
665 | ouyuyyt7.png
666 |
667 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.961 sadness=0.037 surprise=0.0
668 | tut2.png
669 |
670 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.89 sadness=0.11 surprise=0.0
671 | BM32NES.JPG
672 |
673 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.003 neutral=0.991 sadness=0.003 surprise=0.002
674 | ouyyt2.png
675 |
676 | anger=0.0 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.997 sadness=0.001 surprise=0.0
677 | rut7.png
678 |
679 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=1.0 sadness=0.0 surprise=0.0
680 | NM.AN1.104.tiff.png
681 |
682 | anger=0.324 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.671 sadness=0.001 surprise=0.001
683 | ouyuyyt17.png
684 |
685 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.99 sadness=0.001 surprise=0.007
686 | 23.jpeg
687 |
688 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.541 sadness=0.459 surprise=0.0
689 | outt6.png
690 |
691 | anger=0.0 contempt=0.004 disgust=0.0 fear=0.001 happiness=0.0 neutral=0.931 sadness=0.064 surprise=0.001
692 | BM27NES.JPG
693 |
694 | anger=0.016 contempt=0.009 disgust=0.0 fear=0.001 happiness=0.0 neutral=0.951 sadness=0.023 surprise=0.0
695 | man-bored-expression-26178496.jpg
696 |
697 | anger=0.019 contempt=0.002 disgust=0.003 fear=0.004 happiness=0.0 neutral=0.944 sadness=0.009 surprise=0.02
698 | ouyuyyt1.png
699 |
700 | anger=0.006 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.992 sadness=0.002 surprise=0.0
701 | ouyuyyt6.png
702 |
703 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.807 sadness=0.192 surprise=0.0
704 | BM30NES.JPG
705 |
706 | anger=0.291 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.704 sadness=0.002 surprise=0.0
707 | ouyuyyt18.png
708 |
709 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.938 sadness=0.062 surprise=0.0
710 | BF19NES.JPG
711 |
712 | anger=0.001 contempt=0.009 disgust=0.0 fear=0.001 happiness=0.003 neutral=0.965 sadness=0.018 surprise=0.001
713 | out11.png
714 |
715 | anger=0.0 contempt=0.011 disgust=0.0 fear=0.0 happiness=0.014 neutral=0.973 sadness=0.002 surprise=0.0
716 | out2.png
717 |
718 | anger=0.0 contempt=0.014 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.405 sadness=0.58 surprise=0.0
719 | 7.jpg
720 |
721 |
--------------------------------------------------------------------------------
/algo/camera.py:
--------------------------------------------------------------------------------
1 | # import cv2
2 | # cam = cv2.VideoCapture(0)
3 | # s, im = cam.read() # captures image
4 | # for i in range(10000000):
5 | # cv2.imshow("Test Picture", im) # displays captured image
6 | # cv2.imwrite("test.bmp",im) # writes image test.bmp to disk
7 |
8 | import cv2
9 | import os
10 |
11 | #capture from camera at location 0
12 | cap = cv2.VideoCapture(0)
13 | #set the width and height, and UNSUCCESSFULLY set the exposure time
14 | cap.set(3,1280)
15 | cap.set(4,1024)
16 | cap.set(15, 0.1)
17 |
18 | while True:
19 | ret, img = cap.read()
20 | img = cv2.flip(img, 1)
21 | cv2.imshow("input", img)
22 | #cv2.imshow("thresholded", imgray*thresh2)
23 |
24 | cv2.imwrite("test.bmp", img) # writes image test.bmp to disk
25 | print("haaye haaye")
26 | os.remove("test.bmp")
27 | key = cv2.waitKey(10)
28 | if key == 27: # Esc key
29 | break
30 |
31 |
32 | cv2.destroyAllWindows()
33 | cv2.VideoCapture(0).release()
--------------------------------------------------------------------------------
/algo/graph.py:
--------------------------------------------------------------------------------
1 | import matplotlib.pyplot as plt
2 | import numpy as np
3 | from scipy.interpolate import spline
4 |
5 | # load y-axis values from graphy.txt
6 | y = np.loadtxt('graphy.txt', dtype=int)
7 | # load x-axis values from graphx.txt
8 | x = np.loadtxt('graphx.txt', dtype=int)
9 |
10 | # convert epoch values to seconds
11 | temp = x[0]
12 | for i in range(len(x)):
13 | # print(i)
14 | x[i] -= temp
15 |
16 | # the number (eg. 300) represents number of points to make between x.min() and x.max()
17 | xnew = np.linspace(x.min(), x.max(), 50)
18 | ynew = spline(x, y, xnew)
19 |
20 | # plot graph
21 | plt.ylabel('Number of interested audience')
22 | plt.xlabel('Time (sec)')
23 | plt.plot(xnew, ynew)
24 | plt.savefig('../graph.png')
25 | plt.show()
--------------------------------------------------------------------------------
/algo/graphx.txt:
--------------------------------------------------------------------------------
1 | 1528607667
2 | 1528607668
3 | 1528607669
4 | 1528607671
5 | 1528607672
6 | 1528607673
7 | 1528607675
8 | 1528607676
9 | 1528607677
10 | 1528607679
11 | 1528607680
12 | 1528607682
13 | 1528607683
14 | 1528607685
15 | 1528607686
16 | 1528607687
17 | 1528607689
18 | 1528607690
19 | 1528607691
20 | 1528607693
21 | 1528607694
22 | 1528607695
23 | 1528607697
24 | 1528607698
25 | 1528607699
26 | 1528607701
27 | 1528607702
28 | 1528607703
29 | 1528607705
30 | 1528607706
31 | 1528607708
32 | 1528607709
33 | 1528607711
34 | 1528607712
35 | 1528607714
36 | 1528607715
37 | 1528607717
38 | 1528607719
39 | 1528607720
40 | 1528607721
41 | 1528607723
42 | 1528607724
43 | 1528607726
44 | 1528607727
45 | 1528607728
46 | 1528607730
47 | 1528607731
48 | 1528607732
49 | 1528607734
50 | 1528607735
51 | 1528607736
52 | 1528607738
53 | 1528607739
54 | 1528607741
55 | 1528607742
56 | 1528607743
57 | 1528607745
58 | 1528607746
59 | 1528607748
60 | 1528607749
61 | 1528607750
62 | 1528607752
63 | 1528607753
64 | 1528607754
65 | 1528607756
66 | 1528607757
67 | 1528607759
68 | 1528607760
69 | 1528607761
70 | 1528607763
71 | 1528607764
72 | 1528607765
73 | 1528607767
74 | 1528607768
75 |
--------------------------------------------------------------------------------
/algo/graphy.txt:
--------------------------------------------------------------------------------
1 | 1
2 | 1
3 | 1
4 | 1
5 | 2
6 | 1
7 | 1
8 | 2
9 | 2
10 | 2
11 | 1
12 | 2
13 | 2
14 | 2
15 | 1
16 | 1
17 | 1
18 | 1
19 | 3
20 | 3
21 | 2
22 | 2
23 | 2
24 | 2
25 | 3
26 | 2
27 | 3
28 | 2
29 | 2
30 | 1
31 | 1
32 | 2
33 | 1
34 | 0
35 | 1
36 | 2
37 | 0
38 | 0
39 | 0
40 | 0
41 | 0
42 | 1
43 | 1
44 | 1
45 | 0
46 | 0
47 | 0
48 | 0
49 | 0
50 | 0
51 | 0
52 | 0
53 | 0
54 | 1
55 | 0
56 | 0
57 | 1
58 | 1
59 | 2
60 | 1
61 | 1
62 | 0
63 | 0
64 | 0
65 | 2
66 | 0
67 | 1
68 | 2
69 | 1
70 | 1
71 | 2
72 | 1
73 | 1
74 | 1
75 |
--------------------------------------------------------------------------------
/algo/int_vision_training:
--------------------------------------------------------------------------------
1 | /home/abhijeet/Documents/Machine Learning/int_vision_training
--------------------------------------------------------------------------------
/algo/main.py:
--------------------------------------------------------------------------------
1 | import multiprocessing
2 | import os
3 | import tkinter as tk
4 | from tkinter import *
5 |
6 | def call_ml():
7 | os.system('python3 ml.py')
8 | def call_mobile_ml():
9 | os.system('python3 ml_mobile.py')
10 | def play_video():
11 | os.system('python3 play.py')
12 | def show_graph():
13 | os.system('python3 graph.py')
14 |
15 | if __name__ == "__main__":
16 | # -------configure window
17 | root = tk.Tk()
18 | var1 = StringVar()
19 |
20 | label1 = Message( root, textvariable=var1, relief=RAISED,aspect=150,width=2000,pady=50,padx=800,bg='light sea green',font=("Helvetica", 30, "bold") )
21 |
22 | var1.set("INT-Vision")
23 | label1.pack()
24 | root.geometry("%dx%d+%d+0" % (1000, 1000,500))
25 |
26 | startbutton=tk.Button(root,width=15,height=2,text='WEBCAM START',command=call_ml)
27 | startbutton.place(x=100,y=100)
28 | #stopbutton=tk.Button(root,width=10,height=1,text='STOP', command=stoprecording)
29 | startbutton.pack()
30 | #stopbutton.pack()
31 | bu=tk.Button(root,width=15,height=2,text='MOBILE CAM START',command=call_mobile_ml)
32 | bu.place(x=100,y=100)
33 | #stopbutton=tk.Button(root,width=10,height=1,text='STOP', command=stoprecording)
34 | bu.pack()
35 | bu1=tk.Button(root,width=15,height=2,text='PLAY VIDEO',command=play_video)
36 | bu1.place(x=100,y=100)
37 | #stopbutton=tk.Button(root,width=10,height=1,text='STOP', command=stoprecording)
38 | bu1.pack()
39 | bu2=tk.Button(root,width=15,height=2,text='SHOW GRAPH',command=show_graph)
40 | bu2.place(x=100,y=100)
41 | #stopbutton=tk.Button(root,width=10,height=1,text='STOP', command=stoprecording)
42 | bu2.pack()
43 |
44 |
45 | var2=StringVar()
46 | label2 = Message( root, textvariable=var2, relief=RAISED,aspect=150,width=2000,pady=50,padx=800,bg='light sea green',font=("Helvetica", 30, "bold"), )
47 | var2.set("Red shows Disengaged and Blue shows Engaged")
48 | label2.pack(side=BOTTOM)
49 |
50 |
51 | # -------begin
52 | root.mainloop()
53 |
--------------------------------------------------------------------------------
/algo/ml.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import os
3 | import requests
4 | from sklearn import svm
5 | import cv2
6 | import time
7 | import threading
8 |
9 | # check for Python version to decide which queue module to import
10 | import sys
11 | is_py2 = sys.version[0] == '2'
12 | if is_py2:
13 | from Queue import Queue
14 | else:
15 | from queue import Queue
16 |
17 | # creating arrays to save in graphx and graphy text files
18 | graphXarr = np.empty((0, 1), int)
19 | graphYarr = np.empty((0, 1), int)
20 |
21 | open('test.txt','w')
22 | with open('test.txt','a') as myfile:
23 | myfile.write("anger contempt disgust fear happiness neutral sadness surprise roll\n")
24 |
25 | # create queue to store video frames
26 | que = Queue()
27 | array_rec = []
28 | yhatf=2
29 | w1=-1
30 | t1=-1
31 | l1=-1
32 | h1=-1
33 |
34 | cap = cv2.VideoCapture(0)
35 | exit = 0
36 |
37 | def waste_facerec(img , array_rec):
38 | for rec in array_rec:
39 | w1 = rec["w1"]
40 | t1 = rec["t1"]
41 | h1 = rec["h1"]
42 | l1 = rec["l1"]
43 | yhatf = rec["yhat"]
44 |
45 | if yhatf > 0:
46 | cv2.rectangle(img, (l1, t1), (l1 + w1, t1 + h1), (0, 0, 255), 2)
47 | else:
48 | cv2.rectangle(img, (l1, t1), (l1 + w1, t1 + h1), (255, 0, 0), 2)
49 | return img
50 |
51 | def facerec(img):
52 | print("w1=", w1, "t1=", t1, "l1=", l1, "h1=", h1)
53 | if yhatf > 0:
54 | # if bored, then red rectangle
55 | with open('test.txt','a') as myfile:
56 | myfile.write("bored\n")
57 |
58 | cv2.rectangle(img, (l1, t1), (l1 + w1, t1 + h1), (0, 0, 255), 2)
59 | else:
60 | # blue rectangle
61 | with open('test.txt','a') as myfile:
62 | myfile.write("not bored\n")
63 |
64 | cv2.rectangle(img, (l1, t1), (l1 + w1, t1 + h1), (255, 0, 0), 2)
65 | return img
66 |
67 | def writeframe(img):
68 | for i in range(6):
69 | out.write(img)
70 |
71 | # function to increase opencv frame brightness
72 | def adjust_gamma(image, gamma=1.0):
73 |
74 | invGamma = 1.0 / gamma
75 | table = np.array([((i / 255.0) ** invGamma) * 255
76 | for i in np.arange(0, 256)]).astype("uint8")
77 |
78 | return cv2.LUT(image, table)
79 |
80 | def showframe():
81 | global cap
82 |
83 | # set the width and height, and UNSUCCESSFULLY set the exposure time
84 | cap.set(3, 1280)
85 | cap.set(4, 1024)
86 | cap.set(15, 0.1)
87 |
88 | while True:
89 | ret, img = cap.read()
90 |
91 | img = cv2.flip(img, 1)
92 |
93 | #increase brightness
94 | gamma = 1.8
95 | img = adjust_gamma(img, gamma=gamma)
96 |
97 |
98 | # frame show function
99 | # cv2.imshow("thresholded", imgray*thresh2)
100 | winname = "Input"
101 | cv2.namedWindow(winname) # Create a named window
102 | cv2.moveWindow(winname, 700,300) # Move it to (40,30)
103 | cv2.imshow(winname, img)
104 |
105 | global que
106 | # print("size=", que.qsize())
107 | # writes image test.bmp to disk
108 | que.put(img)
109 |
110 | key = cv2.waitKey(10)
111 | if key == 27: # Esc key
112 | break
113 | cv2.destroyAllWindows()
114 | cv2.VideoCapture(0).release()
115 | print("finished camera")
116 | global exit
117 | exit = 1
118 |
119 | def func(image_data):
120 | print("in func function")
121 |
122 | response = requests.post(face_api_url, params=params, headers=headers, data=image_data)
123 | #print response
124 | response.raise_for_status()
125 | analysis = response.json()
126 |
127 | print("func")
128 |
129 | diic = []
130 | video = []
131 | for i in analysis:
132 | with open('test.txt','a') as myfile:
133 |
134 | print(i)
135 | video.append({"faceRectangle":i["faceRectangle"]})
136 | dic = []
137 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["anger"])
138 | myfile.write("anger="+str(i["faceAttributes"]["emotion"]["anger"])+"\t")
139 |
140 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["contempt"])
141 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["disgust"])
142 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["fear"])
143 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["happiness"])
144 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["neutral"])
145 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["sadness"])
146 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["surprise"])
147 | #dic.insert(len(dic), i["faceAttributes"]["smile"])
148 | #dic.insert(len(dic), abs(i["faceAttributes"]["headPose"]["roll"]))
149 |
150 | myfile.write("contempt="+str(i["faceAttributes"]["emotion"]["contempt"])+"\t")
151 | myfile.write("disgust="+str(i["faceAttributes"]["emotion"]["disgust"])+"\t")
152 | myfile.write("fear="+str(i["faceAttributes"]["emotion"]["fear"])+"\t")
153 | myfile.write("happiness="+str(i["faceAttributes"]["emotion"]["happiness"])+"\t")
154 | myfile.write("neutral="+str(i["faceAttributes"]["emotion"]["neutral"])+"\t")
155 | myfile.write("sadness="+str(i["faceAttributes"]["emotion"]["sadness"])+"\t")
156 | myfile.write("surprise="+str(i["faceAttributes"]["emotion"]["surprise"])+"\n")
157 | #myfile.write("smile="+str(i["faceAttributes"]["smile"])+"\n")
158 | #myfile.write("roll="+str(abs(i["faceAttributes"]["headPose"]["roll"]))+"\n")
159 |
160 | diic.insert(len(diic), dic)
161 | print(diic)
162 |
163 |
164 | return diic, video
165 |
166 | # api code
167 | subscription_key = "02726400482345229652709041c698ba"
168 | assert subscription_key
169 |
170 | face_api_url = 'https://southeastasia.api.cognitive.microsoft.com/face/v1.0/detect'
171 |
172 | headers = { 'Ocp-Apim-Subscription-Key': subscription_key, "Content-Type": "application/octet-stream"}
173 | params = {
174 | 'returnFaceLandmarks': 'false',
175 | 'returnFaceAttributes': 'emotion,smile,headPose'
176 | }
177 |
178 | # scikit code
179 | X = np.loadtxt('Xval.txt', dtype=float)
180 | y = np.loadtxt('yval.txt', dtype=int)
181 |
182 | clf = svm.SVC()
183 | clf.fit(X, y)
184 | thread1 = threading.Thread(target=showframe, args=())
185 | thread1.start()
186 |
187 | frame_width = int(cap.get(3))
188 | frame_height = int(cap.get(4))
189 |
190 | # Define the codec and create VideoWriter object.The output is stored in 'outpy.avi' file.
191 | out = cv2.VideoWriter('outpy.avi', cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), 10, (frame_width, frame_height))
192 | framecount=0
193 |
194 | i=50
195 | while True:
196 | if que.qsize() >= 16:
197 | img = que.get()
198 |
199 | if not que.empty():
200 |
201 | print("----------------------------------------")
202 | print(que.qsize())
203 |
204 | print("----------------------------------------")
205 |
206 | cv2.imwrite("test.bmp", img)
207 |
208 | image_data = open("test.bmp", "rb").read()
209 |
210 | diic, video = func(image_data)
211 |
212 | print("got diic")
213 |
214 | if (diic != []):
215 | Xhat = np.array(diic)
216 | Yhat = clf.predict(Xhat)
217 |
218 | # store time of capturing frame in graphx.txt
219 | graphXarr = np.insert(graphXarr, len(graphXarr), time.time())
220 |
221 | count = 0
222 | array_rec = []
223 | for one in video:
224 | rec = one["faceRectangle"]
225 |
226 | if( (Xhat[count][5] > 0.85) and (Xhat[count][6] > 0.002) ):
227 | Yhat[count] = 1
228 |
229 | # positive value of yhatf means that person can be categorised as bored
230 | # correct errors here using Xhat
231 | yhatf = Yhat[count]
232 |
233 | w1 = rec["width"]
234 | t1 = rec["top"]
235 | h1 = rec["height"]
236 | l1 = rec["left"]
237 | array_rec.append({"w1":w1 ,"t1":t1 ,"h1":h1 ,"l1":l1, "yhat":yhatf })
238 | img = facerec(img)
239 | count = count + 1
240 |
241 |
242 | # store number of people bored in graphyval temporarily and insert it to numpy array for every frame captured
243 | graphyval = 0
244 | for i in Yhat:
245 | if i < 0:
246 | graphyval += 1
247 | # insert into numpy array
248 | graphYarr = np.insert(graphYarr, len(graphYarr), graphyval)
249 |
250 | writeframe(img)
251 |
252 | print("Prediction Array", Yhat)
253 | mScore = clf.score(X, y)
254 | print("Model Score", mScore)
255 |
256 | #cv2.rectangle(img, (50, 50), (50 + 50, 50 + 50), (255, 0, 0), 2)
257 |
258 | if w1 != -1:
259 | for cc in range(15):
260 | img = que.get()
261 | waste_facerec(img,array_rec)
262 | #writeframe(img)
263 |
264 | os.remove("test.bmp")
265 |
266 | else:
267 | #print("queue is empty")
268 | if exit == 1:
269 | print("process finished")
270 | break
271 |
272 | thread1.join()
273 | out.release()
274 |
275 | # save created numpy arrays in respective text files to create graph
276 | np.savetxt('graphx.txt', graphXarr, fmt='%d')
277 | np.savetxt('graphy.txt', graphYarr, fmt='%d')
278 |
--------------------------------------------------------------------------------
/algo/ml_mobile.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import os
3 | import requests
4 | from sklearn import svm
5 | import cv2
6 | import time
7 | import threading
8 | import sys
9 | import urllib
10 |
11 |
12 | # check for Python version to decide which queue module to import
13 | is_py2 = sys.version[0] == '2'
14 | if is_py2:
15 | from Queue import Queue
16 | else:
17 | from queue import Queue
18 |
19 |
20 | img11=urllib.request.urlopen('http://192.168.14.187:8080/shot.jpg')
21 | imgnp=np.array(bytearray(img11.read()),dtype=np.uint8)
22 | imgcv=cv2.imdecode(imgnp,-1)
23 | image_height, image_width, channels = imgcv.shape
24 | def getcvimg():
25 | img11=urllib.request.urlopen('http://192.168.14.187:8080/shot.jpg')
26 | imgnp=np.array(bytearray(img11.read()),dtype=np.uint8)
27 | imgcv=cv2.imdecode(imgnp,-1)
28 | #imgcv1 = cv2.resize(imgcv, (80, 24))
29 |
30 | return imgcv
31 |
32 | # creating arrays to save in graphx and graphy text files
33 | graphXarr = np.empty((0, 1), int)
34 | graphYarr = np.empty((0, 1), int)
35 |
36 | open('test.txt','w')
37 | with open('test.txt','a') as myfile:
38 | myfile.write("anger contempt disgust fear happiness neutral sadness surprise roll\n")
39 |
40 | # create queue to store video frames
41 | que = Queue()
42 | array_rec = []
43 | yhatf=2
44 | w1=-1
45 | t1=-1
46 | l1=-1
47 | h1=-1
48 |
49 | cap = cv2.VideoCapture()
50 | #cap = cv2.VideoCapture(0) # for webcam
51 | exit = 0
52 |
53 | def waste_facerec(img , array_rec):
54 | for rec in array_rec:
55 | w1 = rec["w1"]
56 | t1 = rec["t1"]
57 | h1 = rec["h1"]
58 | l1 = rec["l1"]
59 | yhatf = rec["yhat"]
60 |
61 | if yhatf > 0:
62 | cv2.rectangle(img, (l1, t1), (l1 + w1, t1 + h1), (0, 0, 255), 2)
63 | else:
64 | cv2.rectangle(img, (l1, t1), (l1 + w1, t1 + h1), (255, 0, 0), 2)
65 | return img
66 |
67 | def facerec(img):
68 | print("w1=", w1, "t1=", t1, "l1=", l1, "h1=", h1)
69 | if yhatf > 0:
70 | # if bored, then red rectangle
71 | with open('test.txt','a') as myfile:
72 | myfile.write("bored\n")
73 |
74 | cv2.rectangle(img, (l1, t1), (l1 + w1, t1 + h1), (0, 0, 255), 2)
75 | else:
76 | # blue rectangle
77 | with open('test.txt','a') as myfile:
78 | myfile.write("not bored\n")
79 |
80 | cv2.rectangle(img, (l1, t1), (l1 + w1, t1 + h1), (255, 0, 0), 2)
81 | return img
82 |
83 | def writeframe(img):
84 | for i in range(6):
85 | out.write(img)
86 |
87 | # function to increase opencv frame brightness
88 | def adjust_gamma(image, gamma=2.0):
89 |
90 | invGamma = 1.0 / gamma
91 | table = np.array([((i / 255.0) ** invGamma) * 255
92 | for i in np.arange(0, 256)]).astype("uint8")
93 |
94 | return cv2.LUT(image, table)
95 |
96 | def showframe():
97 | global cap
98 |
99 | # set the width and height, and UNSUCCESSFULLY set the exposure time
100 | cap.set(3, image_width)
101 | cap.set(4, image_height)
102 | cap.set(15, 0.1)
103 |
104 | while True:
105 | img = getcvimg();
106 | #print(img)
107 | #img = cv2.flip(img, 1)
108 |
109 | #increase brightness
110 | gamma = 2.7
111 | img = adjust_gamma(img, gamma=gamma)
112 |
113 |
114 | # frame show function
115 | # cv2.imshow("thresholded", imgray*thresh2)
116 | cv2.imshow("input", img)
117 | global que
118 | # print("size=", que.qsize())
119 | # writes image test.bmp to disk
120 | que.put(img)
121 |
122 | key = cv2.waitKey(10)
123 | if key == 27: # Esc key
124 | print("Escape key pressed")
125 | break
126 | cv2.destroyAllWindows()
127 | cap.release()
128 | #cv2.VideoCapture().release()
129 | print("finished camera")
130 | global exit
131 | exit = 1
132 |
133 | def func(image_data):
134 | print("in func function")
135 |
136 | response = requests.post(face_api_url, params=params, headers=headers, data=image_data)
137 | #print response
138 | response.raise_for_status()
139 | analysis = response.json()
140 |
141 | print("func")
142 |
143 | diic = []
144 | video = []
145 | for i in analysis:
146 | with open('test.txt','a') as myfile:
147 |
148 | print(i)
149 | video.append({"faceRectangle":i["faceRectangle"]})
150 | dic = []
151 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["anger"])
152 | myfile.write("anger="+str(i["faceAttributes"]["emotion"]["anger"])+"\t")
153 |
154 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["contempt"])
155 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["disgust"])
156 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["fear"])
157 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["happiness"])
158 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["neutral"])
159 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["sadness"])
160 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["surprise"])
161 | #dic.insert(len(dic), i["faceAttributes"]["smile"])
162 | #dic.insert(len(dic), abs(i["faceAttributes"]["headPose"]["roll"]))
163 |
164 | myfile.write("contempt="+str(i["faceAttributes"]["emotion"]["contempt"])+"\t")
165 | myfile.write("disgust="+str(i["faceAttributes"]["emotion"]["disgust"])+"\t")
166 | myfile.write("fear="+str(i["faceAttributes"]["emotion"]["fear"])+"\t")
167 | myfile.write("happiness="+str(i["faceAttributes"]["emotion"]["happiness"])+"\t")
168 | myfile.write("neutral="+str(i["faceAttributes"]["emotion"]["neutral"])+"\t")
169 | myfile.write("sadness="+str(i["faceAttributes"]["emotion"]["sadness"])+"\t")
170 | myfile.write("surprise="+str(i["faceAttributes"]["emotion"]["surprise"])+"\n")
171 | #myfile.write("smile="+str(i["faceAttributes"]["smile"])+"\n")
172 | #myfile.write("roll="+str(abs(i["faceAttributes"]["headPose"]["roll"]))+"\n")
173 |
174 | diic.insert(len(diic), dic)
175 | print(diic)
176 |
177 |
178 | return diic, video
179 |
180 | # api code
181 | subscription_key = "02726400482345229652709041c698ba"
182 | assert subscription_key
183 |
184 | face_api_url = 'https://southeastasia.api.cognitive.microsoft.com/face/v1.0/detect'
185 |
186 | headers = { 'Ocp-Apim-Subscription-Key': subscription_key, "Content-Type": "application/octet-stream"}
187 | params = {
188 | 'returnFaceLandmarks': 'false',
189 | 'returnFaceAttributes': 'emotion,smile,headPose'
190 | }
191 |
192 | # scikit code
193 | X = np.loadtxt('Xval.txt', dtype=float)
194 | y = np.loadtxt('yval.txt', dtype=int)
195 |
196 | clf = svm.SVC()
197 | clf.fit(X, y)
198 | thread1 = threading.Thread(target=showframe, args=())
199 | thread1.start()
200 |
201 | frame_width = image_width
202 | frame_height = image_height
203 | print("frame_width=",frame_width," ","frame_height=",frame_height)
204 |
205 | # Define the codec and create VideoWriter object.The output is stored in 'outpy.avi' file.
206 | out = cv2.VideoWriter('outpy.avi', cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), 10, (frame_width, frame_height))
207 | framecount=0
208 | let_enter = 0
209 | i=50
210 | while True:
211 | if que.qsize() >= 20 or let_enter == 1:
212 | if que.qsize() <=1:
213 | print("breaking")
214 | break
215 | img = que.get()
216 |
217 | if not que.empty():
218 |
219 | print("----------------------------------------")
220 | print(que.qsize())
221 |
222 | print("----------------------------------------")
223 |
224 | cv2.imwrite("test.bmp", img)
225 |
226 |
227 | image_data = open("test.bmp", "rb").read()
228 |
229 | diic, video = func(image_data)
230 |
231 | print("dictionary acquired")
232 |
233 | if (diic != []):
234 | Xhat = np.array(diic)
235 | Yhat = clf.predict(Xhat)
236 |
237 | # store time of capturing frame in graphx.txt
238 | graphXarr = np.insert(graphXarr, len(graphXarr), time.time())
239 |
240 | count = 0
241 | array_rec = []
242 | for one in video:
243 | rec = one["faceRectangle"]
244 |
245 | if( (Xhat[count][5] > 0.85) and (Xhat[count][6] > 0.002) ):
246 | Yhat[count] = 1
247 |
248 | # positive value of yhatf means that person can be categorised as bored
249 | # correct errors here using Xhat
250 | yhatf = Yhat[count]
251 |
252 | w1 = rec["width"]
253 | t1 = rec["top"]
254 | h1 = rec["height"]
255 | l1 = rec["left"]
256 | array_rec.append({"w1":w1 ,"t1":t1 ,"h1":h1 ,"l1":l1, "yhat":yhatf })
257 | img = facerec(img)
258 | count = count + 1
259 |
260 | # store number of people bored in graphyval temporarily and insert it to numpy array for every frame captured
261 | graphyval = 0
262 | for i in Yhat:
263 | if i > 0:
264 | graphyval += 1
265 | # insert into numpy array
266 | graphYarr = np.insert(graphYarr, len(graphYarr), graphyval)
267 |
268 | writeframe(img)
269 |
270 | print("Prediction Array", Yhat)
271 | mScore = clf.score(X, y)
272 | print("Model Score", mScore)
273 |
274 | #cv2.rectangle(img, (50, 50), (50 + 50, 50 + 50), (255, 0, 0), 2)
275 |
276 | if w1 != -1 and que.qsize() > 5:
277 | for cc in range(1):
278 | img = que.get()
279 | waste_facerec(img,array_rec)
280 | #writeframe(img)
281 |
282 | os.remove("test.bmp")
283 |
284 | else:
285 | #print("queue is empty")
286 |
287 | if exit == 1:
288 | print("exit=1")
289 | let_enter = 1
290 | if que.qsize() < 5:
291 | print("process finished")
292 | break
293 |
294 | thread1.join()
295 | out.release()
296 |
297 | # save created numpy arrays in respective text files to create graph
298 | np.savetxt('graphx.txt', graphXarr, fmt='%d')
299 | np.savetxt('graphy.txt', graphYarr, fmt='%d')
300 |
--------------------------------------------------------------------------------
/algo/play.py:
--------------------------------------------------------------------------------
1 | # import numpy as np
2 | # import cv2
3 |
4 | # cap = cv2.VideoCapture('outpy.avi')
5 | # length = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
6 | # for i in range(length):
7 | # ret, frame = cap.read()
8 | # winname = "Output"
9 | # cv2.namedWindow(winname) # Create a named window
10 | # cv2.moveWindow(winname, 700,300) # Move it to (40,30)
11 | # cv2.imshow(winname, frame)
12 |
13 |
14 |
15 | # if cv2.waitKey(80) & 0xFF == ord('q'):
16 | # break
17 |
18 | # cap.release()
19 | # cv2.destroyAllWindows()
20 | import os
21 | os.system('totem outpy.avi')
--------------------------------------------------------------------------------
/algo/pool.py:
--------------------------------------------------------------------------------
1 | import multiprocessing.pool as mpool
2 |
3 | def worker(task):
4 | # work on task
5 | print(task) # substitute your migration code here.
6 |
7 | # create a pool of 10 threads
8 | pool = mpool.ThreadPool(10)
9 | N = 100
10 |
11 | for task in range(N):
12 | pool.apply_async(worker, args = (task, ))
13 |
14 | pool.close()
15 | pool.join()
--------------------------------------------------------------------------------
/algo/smile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cseas/crowd-analytics/3911d47c9aa02b75823787cebe53026bddf764f8/algo/smile.txt
--------------------------------------------------------------------------------
/algo/test.txt:
--------------------------------------------------------------------------------
1 | anger contempt disgust fear happiness neutral sadness surprise roll
2 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.998 sadness=0.0 surprise=0.001
3 | not bored
4 | anger=0.001 contempt=0.023 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.972 sadness=0.0 surprise=0.004
5 | not bored
6 | anger=0.001 contempt=0.014 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.969 sadness=0.001 surprise=0.015
7 | not bored
8 | anger=0.001 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.981 sadness=0.0 surprise=0.016
9 | not bored
10 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.974 sadness=0.0 surprise=0.024
11 | not bored
12 | anger=0.001 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.972 sadness=0.0 surprise=0.025
13 | not bored
14 | anger=0.0 contempt=0.015 disgust=0.0 fear=0.0 happiness=0.002 neutral=0.983 sadness=0.0 surprise=0.0
15 | not bored
16 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.997 sadness=0.0 surprise=0.001
17 | not bored
18 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.999 sadness=0.0 surprise=0.0
19 | not bored
20 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=1.0 sadness=0.0 surprise=0.0
21 | not bored
22 | anger=0.0 contempt=0.004 disgust=0.0 fear=0.0 happiness=0.001 neutral=0.995 sadness=0.0 surprise=0.0
23 | not bored
24 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.97 sadness=0.0 surprise=0.029
25 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.995 sadness=0.0 surprise=0.004
26 | not bored
27 | not bored
28 | anger=0.001 contempt=0.002 disgust=0.0 fear=0.0 happiness=0.0 neutral=0.994 sadness=0.0 surprise=0.003
29 | not bored
30 |
--------------------------------------------------------------------------------
/algo/yval.txt:
--------------------------------------------------------------------------------
1 | -1
2 | -1
3 | -1
4 | -1
5 | -1
6 | -1
7 | -1
8 | -1
9 | -1
10 | -1
11 | -1
12 | -1
13 | -1
14 | -1
15 | -1
16 | -1
17 | -1
18 | -1
19 | -1
20 | -1
21 | -1
22 | -1
23 | -1
24 | -1
25 | -1
26 | -1
27 | -1
28 | -1
29 | -1
30 | -1
31 | -1
32 | -1
33 | -1
34 | -1
35 | -1
36 | -1
37 | -1
38 | -1
39 | -1
40 | -1
41 | -1
42 | -1
43 | -1
44 | -1
45 | -1
46 | -1
47 | -1
48 | -1
49 | -1
50 | -1
51 | -1
52 | -1
53 | -1
54 | -1
55 | -1
56 | -1
57 | -1
58 | -1
59 | -1
60 | -1
61 | -1
62 | -1
63 | -1
64 | -1
65 | -1
66 | -1
67 | -1
68 | -1
69 | -1
70 | -1
71 | -1
72 | -1
73 | -1
74 | -1
75 | -1
76 | -1
77 | -1
78 | -1
79 | -1
80 | -1
81 | -1
82 | -1
83 | -1
84 | -1
85 | -1
86 | -1
87 | -1
88 | -1
89 | -1
90 | -1
91 | -1
92 | -1
93 | -1
94 | -1
95 | -1
96 | -1
97 | -1
98 | -1
99 | -1
100 | -1
101 | -1
102 | -1
103 | -1
104 | -1
105 | -1
106 | -1
107 | -1
108 | -1
109 | -1
110 | -1
111 | -1
112 | -1
113 | -1
114 | -1
115 | -1
116 | -1
117 | -1
118 | -1
119 | -1
120 | -1
121 | -1
122 | -1
123 | -1
124 | -1
125 | -1
126 | -1
127 | -1
128 | -1
129 | -1
130 | -1
131 | -1
132 | -1
133 | -1
134 | -1
135 | -1
136 | -1
137 | -1
138 | -1
139 | -1
140 | -1
141 | -1
142 | -1
143 | -1
144 | -1
145 | -1
146 | -1
147 | -1
148 | -1
149 | -1
150 | -1
151 | -1
152 | -1
153 | -1
154 | -1
155 | -1
156 | -1
157 | -1
158 | -1
159 | -1
160 | -1
161 | -1
162 | -1
163 | -1
164 | -1
165 | -1
166 | -1
167 | -1
168 | -1
169 | -1
170 | -1
171 | -1
172 | -1
173 | -1
174 | -1
175 | -1
176 | -1
177 | -1
178 | -1
179 | -1
180 | -1
181 | -1
182 | -1
183 | -1
184 | -1
185 | -1
186 | -1
187 | -1
188 | -1
189 | -1
190 | -1
191 | -1
192 | -1
193 | -1
194 | -1
195 | -1
196 | -1
197 | -1
198 | -1
199 | -1
200 | -1
201 | -1
202 | -1
203 | -1
204 | -1
205 | -1
206 | -1
207 | -1
208 | -1
209 | -1
210 | -1
211 | -1
212 | -1
213 | -1
214 | -1
215 | -1
216 | -1
217 | -1
218 | -1
219 | -1
220 | -1
221 | -1
222 | -1
223 | -1
224 | -1
225 | -1
226 | -1
227 | -1
228 | -1
229 | -1
230 | -1
231 | -1
232 | -1
233 | -1
234 | -1
235 | -1
236 | -1
237 | -1
238 | -1
239 | -1
240 | -1
241 | -1
242 | -1
243 | -1
244 | -1
245 | -1
246 | -1
247 | -1
248 | -1
249 | -1
250 | -1
251 | -1
252 | -1
253 | -1
254 | -1
255 | -1
256 | -1
257 | -1
258 | -1
259 | -1
260 | -1
261 | -1
262 | -1
263 | -1
264 | -1
265 | -1
266 | -1
267 | -1
268 | -1
269 | -1
270 | -1
271 | -1
272 | -1
273 | -1
274 | -1
275 | -1
276 | -1
277 | -1
278 | -1
279 | -1
280 | -1
281 | -1
282 | -1
283 | -1
284 | -1
285 | -1
286 | -1
287 | -1
288 | -1
289 | -1
290 | -1
291 | -1
292 | -1
293 | -1
294 | -1
295 | -1
296 | -1
297 | -1
298 | -1
299 | -1
300 | -1
301 | -1
302 | -1
303 | -1
304 | -1
305 | -1
306 | -1
307 | -1
308 | -1
309 | -1
310 | -1
311 | -1
312 | -1
313 | -1
314 | -1
315 | -1
316 | -1
317 | -1
318 | -1
319 | -1
320 | -1
321 | -1
322 | -1
323 | -1
324 | -1
325 | -1
326 | -1
327 | -1
328 | -1
329 | -1
330 | -1
331 | -1
332 | -1
333 | -1
334 | -1
335 | -1
336 | -1
337 | -1
338 | -1
339 | -1
340 | -1
341 | -1
342 | -1
343 | -1
344 | -1
345 | -1
346 | -1
347 | -1
348 | -1
349 | -1
350 | -1
351 | -1
352 | -1
353 | -1
354 | -1
355 | -1
356 | -1
357 | -1
358 | -1
359 | -1
360 | -1
361 | -1
362 | -1
363 | -1
364 | -1
365 | -1
366 | -1
367 | -1
368 | -1
369 | -1
370 | -1
371 | -1
372 | -1
373 | -1
374 | -1
375 | -1
376 | -1
377 | -1
378 | -1
379 | -1
380 | -1
381 | -1
382 | -1
383 | -1
384 | -1
385 | -1
386 | -1
387 | -1
388 | -1
389 | -1
390 | -1
391 | -1
392 | -1
393 | -1
394 | -1
395 | -1
396 | -1
397 | -1
398 | -1
399 | -1
400 | -1
401 | -1
402 | -1
403 | -1
404 | -1
405 | -1
406 | -1
407 | -1
408 | -1
409 | -1
410 | -1
411 | -1
412 | -1
413 | -1
414 | -1
415 | -1
416 | -1
417 | -1
418 | -1
419 | -1
420 | -1
421 | -1
422 | -1
423 | -1
424 | -1
425 | -1
426 | -1
427 | -1
428 | -1
429 | -1
430 | -1
431 | -1
432 | -1
433 | -1
434 | -1
435 | -1
436 | -1
437 | -1
438 | -1
439 | -1
440 | -1
441 | -1
442 | -1
443 | -1
444 | -1
445 | -1
446 | -1
447 | -1
448 | -1
449 | -1
450 | -1
451 | -1
452 | -1
453 | -1
454 | -1
455 | -1
456 | -1
457 | -1
458 | -1
459 | -1
460 | -1
461 | -1
462 | -1
463 | -1
464 | -1
465 | -1
466 | -1
467 | -1
468 | -1
469 | -1
470 | -1
471 | -1
472 | -1
473 | -1
474 | -1
475 | -1
476 | -1
477 | -1
478 | -1
479 | -1
480 | -1
481 | -1
482 | -1
483 | -1
484 | -1
485 | -1
486 | -1
487 | -1
488 | -1
489 | -1
490 | -1
491 | -1
492 | -1
493 | -1
494 | -1
495 | -1
496 | -1
497 | -1
498 | -1
499 | -1
500 | -1
501 | -1
502 | -1
503 | -1
504 | -1
505 | -1
506 | -1
507 | -1
508 | -1
509 | -1
510 | -1
511 | -1
512 | -1
513 | -1
514 | -1
515 | -1
516 | -1
517 | -1
518 | -1
519 | -1
520 | -1
521 | -1
522 | -1
523 | -1
524 | -1
525 | -1
526 | -1
527 | -1
528 | -1
529 | -1
530 | -1
531 | -1
532 | -1
533 | -1
534 | -1
535 | -1
536 | -1
537 | -1
538 | -1
539 | -1
540 | -1
541 | -1
542 | -1
543 | -1
544 | -1
545 | -1
546 | -1
547 | -1
548 | -1
549 | -1
550 | -1
551 | -1
552 | -1
553 | -1
554 | -1
555 | -1
556 | -1
557 | -1
558 | -1
559 | -1
560 | -1
561 | -1
562 | -1
563 | -1
564 | -1
565 | -1
566 | -1
567 | -1
568 | -1
569 | -1
570 | -1
571 | -1
572 | -1
573 | -1
574 | -1
575 | -1
576 | -1
577 | -1
578 | -1
579 | -1
580 | -1
581 | -1
582 | -1
583 | -1
584 | -1
585 | -1
586 | -1
587 | -1
588 | -1
589 | -1
590 | -1
591 | -1
592 | -1
593 | -1
594 | -1
595 | -1
596 | -1
597 | -1
598 | -1
599 | -1
600 | -1
601 | -1
602 | -1
603 | -1
604 | -1
605 | -1
606 | -1
607 | -1
608 | -1
609 | -1
610 | -1
611 | -1
612 | -1
613 | -1
614 | -1
615 | -1
616 | -1
617 | -1
618 | -1
619 | -1
620 | -1
621 | -1
622 | -1
623 | -1
624 | -1
625 | -1
626 | -1
627 | -1
628 | -1
629 | -1
630 | -1
631 | -1
632 | -1
633 | -1
634 | -1
635 | -1
636 | -1
637 | -1
638 | -1
639 | -1
640 | -1
641 | -1
642 | -1
643 | -1
644 | -1
645 | -1
646 | -1
647 | -1
648 | -1
649 | -1
650 | -1
651 | -1
652 | -1
653 | -1
654 | -1
655 | -1
656 | -1
657 | -1
658 | -1
659 | -1
660 | -1
661 | -1
662 | -1
663 | -1
664 | -1
665 | -1
666 | -1
667 | -1
668 | -1
669 | -1
670 | -1
671 | -1
672 | -1
673 | -1
674 | -1
675 | -1
676 | -1
677 | -1
678 | -1
679 | -1
680 | -1
681 | -1
682 | -1
683 | -1
684 | -1
685 | -1
686 | -1
687 | -1
688 | -1
689 | -1
690 | -1
691 | -1
692 | -1
693 | -1
694 | -1
695 | -1
696 | -1
697 | -1
698 | -1
699 | -1
700 | -1
701 | -1
702 | -1
703 | -1
704 | -1
705 | -1
706 | -1
707 | -1
708 | -1
709 | -1
710 | -1
711 | -1
712 | -1
713 | -1
714 | -1
715 | -1
716 | -1
717 | -1
718 | -1
719 | -1
720 | -1
721 | -1
722 | -1
723 | -1
724 | -1
725 | -1
726 | -1
727 | -1
728 | -1
729 | -1
730 | -1
731 | -1
732 | -1
733 | -1
734 | -1
735 | -1
736 | -1
737 | -1
738 | -1
739 | -1
740 | -1
741 | -1
742 | -1
743 | -1
744 | -1
745 | -1
746 | -1
747 | -1
748 | -1
749 | -1
750 | -1
751 | -1
752 | -1
753 | -1
754 | -1
755 | -1
756 | -1
757 | -1
758 | -1
759 | -1
760 | -1
761 | -1
762 | -1
763 | -1
764 | -1
765 | -1
766 | -1
767 | -1
768 | -1
769 | -1
770 | -1
771 | -1
772 | -1
773 | -1
774 | -1
775 | -1
776 | -1
777 | -1
778 | -1
779 | -1
780 | -1
781 | -1
782 | -1
783 | -1
784 | -1
785 | -1
786 | -1
787 | -1
788 | -1
789 | -1
790 | -1
791 | -1
792 | -1
793 | -1
794 | -1
795 | -1
796 | -1
797 | -1
798 | -1
799 | -1
800 | -1
801 | -1
802 | -1
803 | -1
804 | -1
805 | -1
806 | -1
807 | -1
808 | -1
809 | -1
810 | -1
811 | -1
812 | -1
813 | -1
814 | -1
815 | -1
816 | -1
817 | -1
818 | -1
819 | -1
820 | -1
821 | -1
822 | -1
823 | -1
824 | -1
825 | -1
826 | -1
827 | -1
828 | -1
829 | -1
830 | -1
831 | -1
832 | -1
833 | -1
834 | -1
835 | -1
836 | -1
837 | -1
838 | -1
839 | -1
840 | -1
841 | -1
842 | -1
843 | -1
844 | -1
845 | -1
846 | -1
847 | -1
848 | -1
849 | -1
850 | -1
851 | -1
852 | -1
853 | -1
854 | -1
855 | -1
856 | -1
857 | -1
858 | -1
859 | -1
860 | -1
861 | -1
862 | -1
863 | -1
864 | -1
865 | -1
866 | 1
867 | 1
868 | 1
869 | 1
870 | 1
871 | 1
872 | 1
873 | 1
874 | 1
875 | 1
876 | 1
877 | 1
878 | 1
879 | 1
880 | 1
881 | 1
882 | 1
883 | 1
884 | 1
885 | 1
886 | 1
887 | 1
888 | 1
889 | 1
890 | 1
891 | 1
892 | 1
893 | 1
894 | 1
895 | 1
896 | 1
897 | 1
898 | 1
899 | 1
900 | 1
901 | 1
902 | 1
903 | 1
904 | 1
905 | 1
906 | 1
907 | 1
908 | 1
909 | 1
910 | 1
911 | 1
912 | 1
913 | 1
914 | 1
915 | 1
916 | 1
917 | 1
918 | 1
919 | 1
920 | 1
921 | 1
922 | 1
923 | 1
924 | 1
925 | 1
926 | 1
927 | 1
928 | 1
929 | 1
930 | 1
931 | 1
932 | 1
933 | 1
934 | 1
935 | 1
936 | 1
937 | 1
938 | 1
939 | 1
940 | 1
941 | 1
942 | 1
943 | 1
944 | 1
945 | 1
946 | 1
947 | 1
948 | 1
949 | 1
950 | 1
951 | 1
952 | 1
953 | 1
954 | 1
955 | 1
956 | 1
957 | 1
958 | 1
959 | 1
960 | 1
961 | 1
962 | 1
963 | 1
964 | 1
965 | 1
966 | 1
967 | 1
968 | 1
969 | 1
970 | 1
971 | 1
972 | 1
973 | 1
974 | 1
975 | 1
976 | 1
977 | 1
978 | 1
979 | 1
980 | 1
981 | 1
982 | 1
983 | 1
984 | 1
985 | 1
986 | 1
987 | 1
988 | 1
989 | 1
990 | 1
991 | 1
992 | 1
993 | 1
994 | 1
995 | 1
996 | 1
997 | 1
998 | 1
999 | 1
1000 | 1
1001 | 1
1002 | 1
1003 | 1
1004 | 1
1005 | 1
1006 | 1
1007 | 1
1008 | 1
1009 | 1
1010 | 1
1011 | 1
1012 | 1
1013 | 1
1014 | 1
1015 | 1
1016 | 1
1017 | 1
1018 | 1
1019 | 1
1020 | 1
1021 | 1
1022 | 1
1023 | 1
1024 | 1
1025 | 1
1026 | 1
1027 | 1
1028 | 1
1029 | 1
1030 | 1
1031 | 1
1032 | 1
1033 | 1
1034 | 1
1035 | 1
1036 | 1
1037 | 1
1038 | 1
1039 | 1
1040 | 1
1041 | 1
1042 | 1
1043 | 1
1044 | 1
1045 | 1
1046 | 1
1047 | 1
1048 | 1
1049 | 1
1050 | 1
1051 | 1
1052 | 1
1053 | 1
1054 | 1
1055 | 1
1056 | 1
1057 | 1
1058 | 1
1059 | 1
1060 | 1
1061 | 1
1062 | 1
1063 | 1
1064 | 1
1065 | 1
1066 | 1
1067 | 1
1068 | 1
1069 | 1
1070 | 1
1071 | 1
1072 | 1
1073 | 1
1074 | 1
1075 | 1
1076 | 1
1077 | 1
1078 | 1
1079 | 1
1080 | 1
1081 | 1
1082 | 1
1083 | 1
1084 | 1
1085 | 1
1086 | 1
1087 | 1
1088 | 1
1089 | 1
1090 | 1
1091 | 1
1092 | 1
1093 | 1
1094 | 1
1095 | 1
1096 | 1
1097 | 1
1098 | 1
1099 | 1
1100 | 1
1101 | 1
1102 | 1
1103 | 1
1104 | 1
1105 | 1
1106 | 1
1107 | 1
1108 | 1
1109 | 1
1110 | 1
1111 | 1
1112 | 1
1113 | 1
1114 | 1
1115 | 1
1116 | 1
1117 | 1
1118 | 1
1119 | 1
1120 | 1
1121 | 1
1122 | 1
1123 | 1
1124 | 1
1125 | 1
1126 | 1
1127 | 1
1128 | 1
1129 | 1
1130 | 1
1131 | 1
1132 | 1
1133 | 1
1134 | 1
1135 | 1
1136 | 1
1137 | 1
1138 | 1
1139 | 1
1140 | 1
1141 | 1
1142 | 1
1143 | 1
1144 | 1
1145 | 1
1146 | 1
1147 | 1
1148 | 1
1149 | 1
1150 | 1
1151 | 1
1152 | 1
1153 | 1
1154 | 1
1155 | 1
1156 | 1
1157 | 1
1158 | 1
1159 | 1
1160 | 1
1161 | 1
1162 | 1
1163 | 1
1164 | 1
1165 | 1
1166 | 1
1167 | 1
1168 | 1
1169 | 1
1170 | 1
1171 | 1
1172 | 1
1173 | 1
1174 | 1
1175 | 1
1176 | 1
1177 | 1
1178 | 1
1179 | 1
1180 | 1
1181 | 1
1182 | 1
1183 | 1
1184 | 1
1185 | 1
1186 | 1
1187 | 1
1188 | 1
1189 | 1
1190 | 1
1191 | 1
1192 | 1
1193 | 1
1194 | 1
1195 | 1
1196 | 1
1197 | 1
1198 | 1
1199 | 1
1200 | 1
1201 | 1
1202 | 1
1203 | 1
1204 | 1
1205 | 1
1206 | 1
1207 | 1
1208 | 1
1209 | 1
1210 | 1
1211 | 1
1212 | 1
1213 | 1
1214 | 1
1215 | 1
1216 | 1
1217 | 1
1218 | 1
1219 | 1
1220 | 1
1221 | 1
1222 | 1
1223 | 1
1224 | 1
1225 | 1
1226 | 1
1227 | 1
1228 | 1
1229 | 1
1230 | 1
1231 | 1
1232 | 1
1233 | 1
1234 | 1
1235 | 1
1236 | 1
1237 | 1
1238 | 1
1239 | 1
1240 | 1
1241 | 1
1242 | 1
1243 | 1
1244 | 1
1245 | 1
1246 | 1
1247 | 1
1248 | 1
1249 | 1
1250 | 1
1251 | 1
1252 | 1
1253 | 1
1254 | 1
1255 | 1
1256 | 1
1257 | 1
1258 | 1
1259 | 1
1260 | 1
1261 | 1
1262 | 1
1263 | 1
1264 | 1
1265 | 1
1266 | 1
1267 | 1
1268 | 1
1269 | 1
1270 | 1
1271 | 1
1272 | 1
1273 | 1
1274 | 1
1275 | 1
1276 | 1
1277 | 1
1278 | 1
1279 | 1
1280 | 1
1281 | 1
1282 | -1
1283 | -1
1284 | -1
1285 | -1
1286 | -1
1287 | -1
1288 | -1
1289 | -1
1290 | -1
1291 | -1
1292 | -1
1293 | -1
1294 | -1
1295 | -1
1296 | -1
1297 | -1
1298 | -1
1299 | -1
1300 | -1
1301 | -1
1302 | -1
1303 | -1
1304 | -1
1305 | -1
1306 | -1
1307 | -1
1308 | -1
1309 | -1
1310 | -1
1311 | -1
1312 | -1
1313 | -1
1314 | -1
1315 | -1
1316 | -1
1317 | -1
1318 | -1
1319 | -1
1320 | -1
1321 | -1
1322 | -1
1323 | -1
1324 | -1
1325 | -1
1326 | -1
1327 | -1
1328 | -1
1329 | -1
1330 | -1
1331 | -1
1332 | -1
1333 | -1
1334 | -1
1335 | -1
1336 | -1
1337 | -1
1338 | -1
1339 | -1
1340 | -1
1341 | -1
1342 | -1
1343 | -1
1344 | -1
1345 | -1
1346 | -1
1347 | -1
1348 | -1
1349 | -1
1350 | -1
1351 | -1
1352 | -1
1353 | -1
1354 | -1
1355 | -1
1356 | -1
1357 | -1
1358 | -1
1359 | -1
1360 | -1
1361 | -1
1362 | -1
1363 | -1
1364 | -1
1365 | -1
1366 | -1
1367 | -1
1368 | -1
1369 | -1
1370 | -1
1371 | -1
1372 | -1
1373 | -1
1374 | -1
1375 | -1
1376 | -1
1377 | -1
1378 | -1
1379 | -1
1380 | -1
1381 | -1
1382 | -1
1383 | -1
1384 | -1
1385 | -1
1386 | -1
1387 | -1
1388 | -1
1389 | -1
1390 | -1
1391 | -1
1392 | -1
1393 | -1
1394 | -1
1395 | -1
1396 | -1
1397 | -1
1398 | -1
1399 | -1
1400 | -1
1401 | -1
1402 | -1
1403 | -1
1404 | -1
1405 | -1
1406 | -1
1407 | -1
1408 | -1
1409 | -1
1410 | -1
1411 | -1
1412 | -1
1413 | -1
1414 | -1
1415 | -1
1416 | -1
1417 | -1
1418 | -1
1419 | -1
1420 | -1
1421 | -1
1422 | -1
1423 | -1
1424 | -1
1425 | -1
1426 | -1
1427 | -1
1428 | -1
1429 | -1
1430 | -1
1431 | -1
1432 | -1
1433 | -1
1434 | -1
1435 | -1
1436 | -1
1437 | -1
1438 | -1
1439 | -1
1440 | -1
1441 | -1
1442 | -1
1443 | -1
1444 | -1
1445 | -1
1446 | -1
1447 | -1
1448 | -1
1449 | -1
1450 | -1
1451 | -1
1452 | -1
1453 | -1
1454 | -1
1455 | -1
1456 | -1
1457 | -1
1458 | -1
1459 | -1
1460 | -1
1461 | -1
1462 | -1
1463 | -1
1464 | -1
1465 | -1
1466 | -1
1467 | -1
1468 | -1
1469 | -1
1470 | -1
1471 | -1
1472 | -1
1473 | -1
1474 | -1
1475 | -1
1476 | -1
1477 | -1
1478 | -1
1479 | -1
1480 | -1
1481 | -1
1482 | -1
1483 | -1
1484 | -1
1485 | -1
1486 | -1
1487 | -1
1488 | -1
1489 | -1
1490 | -1
1491 | -1
1492 | -1
1493 | -1
1494 | -1
1495 | -1
1496 | -1
1497 | -1
1498 | -1
1499 | -1
1500 | -1
1501 | -1
1502 | -1
1503 | -1
1504 | -1
1505 | -1
1506 | -1
1507 |
--------------------------------------------------------------------------------
/graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cseas/crowd-analytics/3911d47c9aa02b75823787cebe53026bddf764f8/graph.png
--------------------------------------------------------------------------------
/newTrain/Xval.txt:
--------------------------------------------------------------------------------
1 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.300000
2 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.100000
3 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
4 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.300000
5 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.700000
6 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.500000
7 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 4.000000
8 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.000000
9 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.700000
10 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.200000
11 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.200000
12 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.700000
13 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.000000
14 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.500000
15 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.600000
16 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.600000
17 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000
18 | 0.000000 0.000000 0.000000 0.000000 0.999000 0.000000 0.000000 0.000000 3.100000
19 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.900000
20 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.600000
21 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.200000
22 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
23 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.700000
24 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.100000
25 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.400000
26 | 0.000000 0.000000 0.000000 0.000000 0.998000 0.000000 0.000000 0.002000 1.700000
27 | 0.000000 0.001000 0.000000 0.000000 0.980000 0.019000 0.000000 0.000000 4.400000
28 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.500000
29 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.400000
30 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000
31 | 0.000000 0.000000 0.000000 0.000000 0.998000 0.000000 0.000000 0.002000 0.500000
32 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.800000
33 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.500000
34 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
35 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.300000
36 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.500000
37 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.300000
38 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
39 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.200000
40 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.300000
41 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.200000
42 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.300000
43 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.800000
44 | 0.000000 0.001000 0.000000 0.000000 0.008000 0.987000 0.000000 0.004000 4.000000
45 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.900000
46 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.900000
47 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
48 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.800000
49 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.200000
50 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
51 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.700000
52 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.600000
53 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.800000
54 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.500000
55 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.100000
56 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.100000
57 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
58 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
59 | 0.000000 0.000000 0.000000 0.000000 0.995000 0.005000 0.000000 0.000000 0.500000
60 | 0.000000 0.000000 0.000000 0.000000 0.805000 0.195000 0.000000 0.000000 0.900000
61 | 0.000000 0.007000 0.000000 0.000000 0.022000 0.969000 0.002000 0.000000 1.900000
62 | 0.000000 0.003000 0.000000 0.000000 0.010000 0.986000 0.000000 0.000000 1.400000
63 | 0.000000 0.000000 0.000000 0.000000 0.998000 0.002000 0.000000 0.000000 0.400000
64 | 0.000000 0.001000 0.000000 0.000000 0.966000 0.018000 0.000000 0.015000 2.700000
65 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.900000
66 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.500000
67 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.800000
68 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.500000
69 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
70 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.300000
71 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.100000
72 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.200000
73 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.400000
74 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.200000
75 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.900000
76 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.800000
77 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.800000
78 | 0.000000 0.000000 0.000000 0.000000 0.995000 0.004000 0.000000 0.000000 2.200000
79 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.400000
80 | 0.000000 0.001000 0.000000 0.000000 0.764000 0.235000 0.000000 0.000000 1.000000
81 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.200000
82 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.600000
83 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.100000
84 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.600000
85 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.500000
86 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.700000
87 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.500000
88 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.600000
89 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.200000
90 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.800000
91 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
92 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.700000
93 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.200000
94 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.500000
95 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.500000
96 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.500000
97 | 0.000000 0.000000 0.000000 0.000000 0.768000 0.231000 0.000000 0.000000 1.800000
98 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
99 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.400000
100 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.600000
101 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.600000
102 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.600000
103 | 0.000000 0.000000 0.000000 0.000000 0.999000 0.001000 0.000000 0.000000 0.200000
104 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.900000
105 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.500000
106 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
107 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.100000
108 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.600000
109 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.500000
110 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.100000
111 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000
112 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.900000
113 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.600000
114 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.600000
115 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.700000
116 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.200000
117 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.600000
118 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.300000
119 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.800000
120 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.300000
121 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.200000
122 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.100000
123 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.200000
124 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.900000
125 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.500000
126 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.700000
127 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.100000
128 | 0.000000 0.010000 0.000000 0.000000 0.492000 0.481000 0.017000 0.000000 0.500000
129 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.500000
130 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.900000
131 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.300000
132 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.500000
133 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.300000
134 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.000000
135 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.800000
136 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.100000
137 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.100000
138 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.200000
139 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.200000
140 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.300000
141 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.200000
142 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.400000
143 | 0.000000 0.000000 0.000000 0.000000 0.985000 0.015000 0.000000 0.000000 2.600000
144 | 0.000000 0.000000 0.000000 0.000000 0.982000 0.000000 0.000000 0.018000 1.900000
145 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.300000
146 | 0.000000 0.000000 0.000000 0.000000 0.989000 0.000000 0.011000 0.000000 2.900000
147 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.500000
148 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.400000
149 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.500000
150 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.100000
151 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.600000
152 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.300000
153 | 0.000000 0.000000 0.000000 0.000000 0.999000 0.001000 0.000000 0.000000 2.000000
154 | 0.000000 0.000000 0.000000 0.000000 0.997000 0.003000 0.000000 0.000000 1.400000
155 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.000000
156 | 0.000000 0.000000 0.000000 0.000000 0.990000 0.010000 0.000000 0.000000 0.000000
157 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.800000
158 | 0.000000 0.000000 0.000000 0.000000 0.999000 0.000000 0.000000 0.001000 0.600000
159 | 0.000000 0.000000 0.000000 0.000000 0.999000 0.000000 0.001000 0.000000 4.500000
160 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.500000
161 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.100000
162 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.600000
163 | 0.000000 0.000000 0.000000 0.000000 0.972000 0.000000 0.000000 0.027000 0.600000
164 | 0.000000 0.000000 0.000000 0.000000 0.999000 0.000000 0.000000 0.001000 0.300000
165 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.300000
166 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.000000
167 | 0.000000 0.001000 0.000000 0.000000 0.980000 0.019000 0.000000 0.000000 1.400000
168 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 3.800000
169 | 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 2.000000
170 |
--------------------------------------------------------------------------------
/newTrain/analysis.txt:
--------------------------------------------------------------------------------
1 | neutral > 0.95
2 | angry > 0.002 (double zero)
--------------------------------------------------------------------------------
/newTrain/api.py:
--------------------------------------------------------------------------------
1 | import os, shutil
2 | import requests
3 | import numpy as np
4 |
5 | # free, 20 calls/min, limit 30K calls/month
6 | # subscription_key = "bf5951c5f4934e2e90bc11c48ffb57fa"
7 | # premium, 10 calls/sec, no limit, 66 INR / 1000 calls
8 | subscription_key = "02726400482345229652709041c698ba"
9 | assert subscription_key
10 |
11 | face_api_url = 'https://southeastasia.api.cognitive.microsoft.com/face/v1.0/detect'
12 |
13 | headers = { 'Ocp-Apim-Subscription-Key': subscription_key, "Content-Type": "application/octet-stream"}
14 | params = {
15 | 'returnFaceId': 'false',
16 | 'returnFaceLandmarks': 'false',
17 | 'returnFaceAttributes': 'emotion,smile,headPose'
18 | }
19 |
20 | X = np.empty((0, 8), float)
21 | y = np.empty((0, 1), float)
22 |
23 |
24 | test_folder_name = "happy"
25 | test_file = "happy.txt"
26 |
27 | # remove previous test file
28 | open(test_file,'w')
29 | # writes azure analysed values of files in txt file
30 | def analyse(fname,ara):
31 |
32 | with open(test_file,'a') as myfile:
33 | #myfile.write("anger\tcontempt\tdisgust\tfear\thappiness\tneutral\tsadness\tsurprise\troll\n")
34 | myfile.write("anger=" + str(ara[0]) + " ")
35 | myfile.write("contempt=" + str(ara[1]) + " ")
36 | myfile.write("disgust=" + str(ara[2]) + " ")
37 | myfile.write("fear=" + str(ara[3]) + " ")
38 | myfile.write("happiness=" + str(ara[4])+ " ")
39 | myfile.write("neutral=" + str(ara[5]) + " ")
40 | myfile.write("sadness=" + str(ara[6]) + " ")
41 | myfile.write("surprise=" + str(ara[7]) + " ")
42 | myfile.write("roll=" + str(ara[8]))
43 | myfile.write("\n")
44 | myfile.write(str(fname)+"\n\n")
45 |
46 | # this is criteria for error
47 | if(ara[4] < 0.4):
48 | shutil.move("/home/abhijeet/Documents/github/crowd-analytics/newTrain/" + test_folder_name + "/" + str(fname),
49 | "/home/abhijeet/Documents/github/crowd-analytics/newTrain/errors/" + str(fname))
50 |
51 |
52 | # dataset folder
53 | indir = '/home/abhijeet/Documents/github/crowd-analytics/newTrain/'
54 |
55 | for dirs,dirlist,filenames in os.walk("."):
56 | print(dirs)
57 |
58 | for filename in filenames:
59 | print(filename)
60 | if filename.endswith(".jpeg") or filename.endswith(".jpg") or filename.endswith(".png") or filename.endswith(".JPG") or filename.endswith(".PNG") or filename.endswith(".JPEG"):
61 | print("taken " + filename)
62 | # print(os.path.join(directory, filename))
63 | # image_data = open(indir + '/' + filename, "rb").read()
64 | image_data = open(indir + '/' + dirs.split('/')[1]+'/'+filename, "rb").read()
65 |
66 | response = requests.post(face_api_url, params=params, headers=headers, data=image_data)
67 | response.raise_for_status()
68 | analysis = response.json()
69 |
70 | if analysis:
71 | print("Face detected\n")
72 |
73 | for i in analysis:
74 |
75 | #print(i)
76 | dic = []
77 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["anger"])
78 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["contempt"])
79 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["disgust"])
80 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["fear"])
81 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["happiness"])
82 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["neutral"])
83 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["sadness"])
84 | dic.insert(len(dic), i["faceAttributes"]["emotion"]["surprise"])
85 | #dic.insert(len(dic), i["faceAttributes"]["smile"])
86 | #dic.insert(len(dic), abs(i["faceAttributes"]["headPose"]["roll"]))
87 |
88 | # convert list to numpy array
89 | arr = np.array(dic)
90 |
91 | # insert next row to main numpy array
92 | X = np.vstack([X, arr])
93 |
94 |
95 | # analyse particular folder
96 | if str(dirs[2:]) == test_folder_name:
97 | analyse(filename, arr)
98 | # print(dirs)
99 | # print("---",dirs[2:],"----")
100 | # print(type(dirs))
101 |
102 | if str(dirs[2:]) == "bored" or str(dirs[2:]) == "openmouth" or str(dirs[2:]) == "sad":
103 | y = np.insert(y, len(y), 1)
104 | else:
105 | y = np.insert(y, len(y), -1)
106 |
107 | #print(X)
108 | #print(y)
109 |
110 | np.savetxt('Xval.txt', X, fmt='%f')
111 | np.savetxt('yval.txt', y, fmt='%d')
--------------------------------------------------------------------------------
/newTrain/happy.txt:
--------------------------------------------------------------------------------
1 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.3
2 | BM29HAS.JPG
3 |
4 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.1
5 | BM08HAS.JPG
6 |
7 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.0
8 | AM15HAS.JPG
9 |
10 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.3
11 | AF22HAS.JPG
12 |
13 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.7
14 | BF12HAS.JPG
15 |
16 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.5
17 | BF24HAS.JPG
18 |
19 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=4.0
20 | AM28HAS.JPG
21 |
22 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.0
23 | BF15HAS.JPG
24 |
25 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.7
26 | AM26HAS.JPG
27 |
28 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.2
29 | BM18HAS.JPG
30 |
31 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.2
32 | AF02HAS.JPG
33 |
34 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.7
35 | AF26HAS.JPG
36 |
37 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.0
38 | AF30HAS.JPG
39 |
40 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.5
41 | BM12HAS.JPG
42 |
43 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.6
44 | BF07HAS.JPG
45 |
46 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.6
47 | KM.HA3.6.tiff.png
48 |
49 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.0
50 | AF14HAS.JPG
51 |
52 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.999 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.1
53 | KL.HA3.160.tiff.png
54 |
55 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.9
56 | AF32HAS.JPG
57 |
58 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.6
59 | AM01HAS.JPG
60 |
61 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.2
62 | AF06HAS.JPG
63 |
64 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
65 | BM22HAS.JPG
66 |
67 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.7
68 | YM.HA3.54.tiff.png
69 |
70 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.1
71 | BM04HAS.JPG
72 |
73 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.4
74 | AF19HAS.JPG
75 |
76 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.998 neutral=0.0 sadness=0.0 surprise=0.002 roll=1.7
77 | AF31HAS.JPG
78 |
79 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.98 neutral=0.019 sadness=0.0 surprise=0.0 roll=4.4
80 | TM.HA3.182.tiff.png
81 |
82 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.5
83 | BM26HAS.JPG
84 |
85 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.4
86 | AM07HAS.JPG
87 |
88 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.0
89 | AF25HAS.JPG
90 |
91 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.998 neutral=0.0 sadness=0.0 surprise=0.002 roll=0.5
92 | KA.HA2.30.tiff.png
93 |
94 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.8
95 | BF17HAS.JPG
96 |
97 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.5
98 | AF20HAS.JPG
99 |
100 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.0
101 | AM13HAS.JPG
102 |
103 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.3
104 | BM28HAS.JPG
105 |
106 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.5
107 | AF27HAS.JPG
108 |
109 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.3
110 | AM35HAS.JPG
111 |
112 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.0
113 | BM05HAS.JPG
114 |
115 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.2
116 | BM07HAS.JPG
117 |
118 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.3
119 | BF27HAS.JPG
120 |
121 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.2
122 | BM21HAS.JPG
123 |
124 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.3
125 | AM34HAS.JPG
126 |
127 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.8
128 | BM03HAS.JPG
129 |
130 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.008 neutral=0.987 sadness=0.0 surprise=0.004 roll=4.0
131 | KA.HA4.32.tiff.png
132 |
133 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.9
134 | BF21HAS.JPG
135 |
136 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.9
137 | AF24HAS.JPG
138 |
139 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
140 | BM35HAS.JPG
141 |
142 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.8
143 | BF19HAS.JPG
144 |
145 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.2
146 | BF26HAS.JPG
147 |
148 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
149 | BF20HAS.JPG
150 |
151 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.7
152 | AM25HAS.JPG
153 |
154 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.6
155 | BF04HAS.JPG
156 |
157 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.8
158 | AF35HAS.JPG
159 |
160 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.5
161 | AF17HAS.JPG
162 |
163 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.1
164 | BM34HAS.JPG
165 |
166 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.1
167 | KM.HA4.7.tiff.png
168 |
169 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
170 | AF04HAS.JPG
171 |
172 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.0
173 | AM24HAS.JPG
174 |
175 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.995 neutral=0.005 sadness=0.0 surprise=0.0 roll=0.5
176 | AF12HAS.JPG
177 |
178 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.805 neutral=0.195 sadness=0.0 surprise=0.0 roll=0.9
179 | KR.SA3.79.tiff.png
180 |
181 | anger=0.0 contempt=0.007 disgust=0.0 fear=0.0 happiness=0.022 neutral=0.969 sadness=0.002 surprise=0.0 roll=1.9
182 | UY.HA2.138.tiff.png
183 |
184 | anger=0.0 contempt=0.003 disgust=0.0 fear=0.0 happiness=0.01 neutral=0.986 sadness=0.0 surprise=0.0 roll=1.4
185 | UY.HA1.137.tiff.png
186 |
187 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.998 neutral=0.002 sadness=0.0 surprise=0.0 roll=0.4
188 | KA.HA1.29.tiff.png
189 |
190 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.966 neutral=0.018 sadness=0.0 surprise=0.015 roll=2.7
191 | KA.HA3.31.tiff.png
192 |
193 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.9
194 | BM14HAS.JPG
195 |
196 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.5
197 | BF08HAS.JPG
198 |
199 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.8
200 | AM30HAS.JPG
201 |
202 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.5
203 | BF22HAS.JPG
204 |
205 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
206 | AM02HAS.JPG
207 |
208 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.3
209 | AF08HAS.JPG
210 |
211 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.1
212 | BF11HAS.JPG
213 |
214 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.2
215 | BF05HAS.JPG
216 |
217 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.4
218 | BF13HAS.JPG
219 |
220 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.2
221 | BF02HAS.JPG
222 |
223 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.9
224 | KM.HA2.5.tiff.png
225 |
226 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.8
227 | AF01HAS.JPG
228 |
229 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.8
230 | BF23HAS.JPG
231 |
232 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.995 neutral=0.004 sadness=0.0 surprise=0.0 roll=2.2
233 | BF16HAS.JPG
234 |
235 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.4
236 | BF32HAS.JPG
237 |
238 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.764 neutral=0.235 sadness=0.0 surprise=0.0 roll=1.0
239 | TM.HA1.180.tiff.png
240 |
241 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.2
242 | BM27HAS.JPG
243 |
244 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.6
245 | AF07HAS.JPG
246 |
247 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.1
248 | AF29HAS.JPG
249 |
250 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.6
251 | AF03HAS.JPG
252 |
253 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.5
254 | AF33HAS.JPG
255 |
256 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.7
257 | BM16HAS.JPG
258 |
259 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.5
260 | AF18HAS.JPG
261 |
262 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.6
263 | AM16HAS.JPG
264 |
265 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.2
266 | AM14HAS.JPG
267 |
268 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.8
269 | BM01HAS.JPG
270 |
271 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
272 | BM30HAS.JPG
273 |
274 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.7
275 | AF28HAS.JPG
276 |
277 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.2
278 | AM20HAS.JPG
279 |
280 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.5
281 | MK.HA2.117.tiff.png
282 |
283 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.5
284 | BM10HAS.JPG
285 |
286 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.5
287 | AM22HAS.JPG
288 |
289 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.768 neutral=0.231 sadness=0.0 surprise=0.0 roll=1.8
290 | KR.HA1.74.tiff.png
291 |
292 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
293 | BM24HAS.JPG
294 |
295 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.4
296 | BM32HAS.JPG
297 |
298 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.6
299 | AF09HAS.JPG
300 |
301 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.6
302 | AM23HAS.JPG
303 |
304 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.6
305 | AM11HAS.JPG
306 |
307 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.999 neutral=0.001 sadness=0.0 surprise=0.0 roll=0.2
308 | AM33HAS.JPG
309 |
310 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.9
311 | YM.HA2.53.tiff.png
312 |
313 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.5
314 | AM06HAS.JPG
315 |
316 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
317 | AM29HAS.JPG
318 |
319 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.1
320 | BF25HAS.JPG
321 |
322 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.6
323 | AM04HAS.JPG
324 |
325 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.5
326 | AM32HAS.JPG
327 |
328 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.1
329 | BF29HAS.JPG
330 |
331 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.0
332 | AF11HAS.JPG
333 |
334 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.9
335 | BM13HAS.JPG
336 |
337 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.6
338 | BF14HAS.JPG
339 |
340 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.6
341 | NA.HA2.203.tiff.png
342 |
343 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.7
344 | BF34HAS.JPG
345 |
346 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.2
347 | NA.HA3.204.tiff.png
348 |
349 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.6
350 | AM10HAS.JPG
351 |
352 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.3
353 | BM19HAS.JPG
354 |
355 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.8
356 | BM33HAS.JPG
357 |
358 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.3
359 | AM31HAS.JPG
360 |
361 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.2
362 | BF01HAS.JPG
363 |
364 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.1
365 | AM05HAS.JPG
366 |
367 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.2
368 | AF21HAS.JPG
369 |
370 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.9
371 | AF13HAS.JPG
372 |
373 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.5
374 | AM09HAS.JPG
375 |
376 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.7
377 | BF33HAS.JPG
378 |
379 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.1
380 | BM31HAS.JPG
381 |
382 | anger=0.0 contempt=0.01 disgust=0.0 fear=0.0 happiness=0.492 neutral=0.481 sadness=0.017 surprise=0.0 roll=0.5
383 | UY.HA3.139.tiff.png
384 |
385 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.5
386 | BF30HAS.JPG
387 |
388 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.9
389 | BF09HAS.JPG
390 |
391 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.3
392 | AM21HAS.JPG
393 |
394 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.5
395 | AF10HAS.JPG
396 |
397 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.3
398 | AF34HAS.JPG
399 |
400 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.0
401 | AM19HAS.JPG
402 |
403 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.8
404 | BM09HAS.JPG
405 |
406 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.1
407 | BF35HAS.JPG
408 |
409 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.1
410 | MK.HA1.116.tiff.png
411 |
412 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.2
413 | AF23HAS.JPG
414 |
415 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.2
416 | BF31HAS.JPG
417 |
418 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.3
419 | BM23HAS.JPG
420 |
421 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.2
422 | BF28HAS.JPG
423 |
424 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.4
425 | NA.HA1.202.tiff.png
426 |
427 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.985 neutral=0.015 sadness=0.0 surprise=0.0 roll=2.6
428 | YM.HA1.52.tiff.png
429 |
430 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.982 neutral=0.0 sadness=0.0 surprise=0.018 roll=1.9
431 | AM03HAS.JPG
432 |
433 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.3
434 | MK.HA3.118.tiff.png
435 |
436 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.989 neutral=0.0 sadness=0.011 surprise=0.0 roll=2.9
437 | KL.HA1.158.tiff.png
438 |
439 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.5
440 | BM20HAS.JPG
441 |
442 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.4
443 | BM06HAS.JPG
444 |
445 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.5
446 | BM25HAS.JPG
447 |
448 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.1
449 | BF06HAS.JPG
450 |
451 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.6
452 | AM12HAS.JPG
453 |
454 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.3
455 | BM02HAS.JPG
456 |
457 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.999 neutral=0.001 sadness=0.0 surprise=0.0 roll=2.0
458 | AM27HAS.JPG
459 |
460 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.997 neutral=0.003 sadness=0.0 surprise=0.0 roll=1.4
461 | TM.HA2.181.tiff.png
462 |
463 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.0
464 | BF10HAS.JPG
465 |
466 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.99 neutral=0.01 sadness=0.0 surprise=0.0 roll=0.0
467 | KR.HA2.75.tiff.png
468 |
469 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.8
470 | BM15HAS.JPG
471 |
472 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.999 neutral=0.0 sadness=0.0 surprise=0.001 roll=0.6
473 | BM11HAS.JPG
474 |
475 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.999 neutral=0.0 sadness=0.001 surprise=0.0 roll=4.5
476 | KL.HA2.159.tiff.png
477 |
478 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.5
479 | AF15HAS.JPG
480 |
481 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.1
482 | BM17HAS.JPG
483 |
484 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=0.6
485 | AM17HAS.JPG
486 |
487 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.972 neutral=0.0 sadness=0.0 surprise=0.027 roll=0.6
488 | AF16HAS.JPG
489 |
490 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=0.999 neutral=0.0 sadness=0.0 surprise=0.001 roll=0.3
491 | AM18HAS.JPG
492 |
493 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=1.3
494 | KM.HA1.4.tiff.png
495 |
496 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.0
497 | AF05HAS.JPG
498 |
499 | anger=0.0 contempt=0.001 disgust=0.0 fear=0.0 happiness=0.98 neutral=0.019 sadness=0.0 surprise=0.0 roll=1.4
500 | BF18HAS.JPG
501 |
502 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=3.8
503 | BF03HAS.JPG
504 |
505 | anger=0.0 contempt=0.0 disgust=0.0 fear=0.0 happiness=1.0 neutral=0.0 sadness=0.0 surprise=0.0 roll=2.0
506 | AM08HAS.JPG
507 |
508 |
--------------------------------------------------------------------------------
/newTrain/yval.txt:
--------------------------------------------------------------------------------
1 | -1
2 | -1
3 | -1
4 | -1
5 | -1
6 | -1
7 | -1
8 | -1
9 | -1
10 | -1
11 | -1
12 | -1
13 | -1
14 | -1
15 | -1
16 | -1
17 | -1
18 | -1
19 | -1
20 | -1
21 | -1
22 | -1
23 | -1
24 | -1
25 | -1
26 | -1
27 | -1
28 | -1
29 | -1
30 | -1
31 | -1
32 | -1
33 | -1
34 | -1
35 | -1
36 | -1
37 | -1
38 | -1
39 | -1
40 | -1
41 | -1
42 | -1
43 | -1
44 | -1
45 | -1
46 | -1
47 | -1
48 | -1
49 | -1
50 | -1
51 | -1
52 | -1
53 | -1
54 | -1
55 | -1
56 | -1
57 | -1
58 | -1
59 | -1
60 | -1
61 | -1
62 | -1
63 | -1
64 | -1
65 | -1
66 | -1
67 | -1
68 | -1
69 | -1
70 | -1
71 | -1
72 | -1
73 | -1
74 | -1
75 | -1
76 | -1
77 | -1
78 | -1
79 | -1
80 | -1
81 | -1
82 | -1
83 | -1
84 | -1
85 | -1
86 | -1
87 | -1
88 | -1
89 | -1
90 | -1
91 | -1
92 | -1
93 | -1
94 | -1
95 | -1
96 | -1
97 | -1
98 | -1
99 | -1
100 | -1
101 | -1
102 | -1
103 | -1
104 | -1
105 | -1
106 | -1
107 | -1
108 | -1
109 | -1
110 | -1
111 | -1
112 | -1
113 | -1
114 | -1
115 | -1
116 | -1
117 | -1
118 | -1
119 | -1
120 | -1
121 | -1
122 | -1
123 | -1
124 | -1
125 | -1
126 | -1
127 | -1
128 | -1
129 | -1
130 | -1
131 | -1
132 | -1
133 | -1
134 | -1
135 | -1
136 | -1
137 | -1
138 | -1
139 | -1
140 | -1
141 | -1
142 | -1
143 | -1
144 | -1
145 | -1
146 | -1
147 | -1
148 | -1
149 | -1
150 | -1
151 | -1
152 | -1
153 | -1
154 | -1
155 | -1
156 | -1
157 | -1
158 | -1
159 | -1
160 | -1
161 | -1
162 | -1
163 | -1
164 | -1
165 | -1
166 | -1
167 | -1
168 | -1
169 | -1
170 |
--------------------------------------------------------------------------------
/range/Issues.txt:
--------------------------------------------------------------------------------
1 | 1. Solve issue of code showing attentive faces as bored.
2 | Possible fix:
3 | Use mean values of emotions to measure level of bored.
4 |
5 | Possible problem:
6 | Using more images for analysis should mean more accuracy but since we're using max and min values,
7 | more images only increase the range, thus resulting in worse accuracy.
--------------------------------------------------------------------------------
/range/analysed.txt:
--------------------------------------------------------------------------------
1 | {"sadness": {"min": 0.0, "max": 0.718}, "contempt": {"min": 0.0, "max": 0.14}, "anger": {"min": 0.0, "max": 0.044}, "disgust": {"min": 0.0, "max": 0.025}, "surprise": {"min": 0.0, "max": 0.015}, "fear": {"min": 0.0, "max": 0.011}, "happiness": {"min": 0.0, "max": 0.156}, "neutral": {"min": 0.274, "max": 1.0}}
--------------------------------------------------------------------------------
/range/analyze.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | import requests
4 |
5 | # free, 20 calls/min, limit 30K calls/month
6 | subscription_key = "bf5951c5f4934e2e90bc11c48ffb57fa"
7 | # premium, 10 calls/sec, no limit, 66 INR / 1000 calls
8 | # subscription_key = "02726400482345229652709041c698ba"
9 | assert subscription_key
10 |
11 |
12 | face_api_url = 'https://southeastasia.api.cognitive.microsoft.com/face/v1.0/detect'
13 |
14 | # image_url = 'https://how-old.net/Images/faces2/main007.jpg'
15 | # image_data = open(image_path, "rb").read()
16 |
17 | headers = { 'Ocp-Apim-Subscription-Key': subscription_key, "Content-Type": "application/octet-stream"}
18 | params = {
19 | 'returnFaceId': 'false',
20 | 'returnFaceLandmarks': 'false',
21 | 'returnFaceAttributes': 'emotion',
22 | }
23 |
24 | dic = {
25 | 'sadness':{'min':2.0,'max':0.0},
26 | 'contempt':{'min':2.0,'max':0.0},
27 | 'anger':{'min':2.0,'max':0.0},
28 | 'disgust':{'min':2.0,'max':0.0},
29 | 'surprise':{'min':2.0,'max':0.0},
30 | 'fear':{'min':2.0,'max':0.0},
31 | 'happiness':{'min':2.0,'max':0.0},
32 | 'neutral':{'min':2.0,'max':0.0}
33 | }
34 |
35 | # analysing images folder to find ranges of emotions for bored expression
36 | indir = '/home/abhijeet/Documents/python/faceapi/boredImages'
37 | for root, dirs, filenames in os.walk(indir):
38 | for filename in filenames:
39 | if filename.endswith(".jpeg") or filename.endswith(".jpg") or filename.endswith(".png"):
40 | # print(os.path.join(directory, filename))
41 | image_data = open(indir+'/'+filename, "rb").read()
42 | response = requests.post(face_api_url, params=params, headers=headers, data=image_data)
43 | response.raise_for_status()
44 | analysis = response.json()
45 |
46 | for i in analysis:
47 | for j,value in i["faceAttributes"]["emotion"].items():
48 |
49 | if(value > dic[j]['max']):
50 | dic[j]['max'] = i["faceAttributes"]["emotion"][j]
51 | if(value < dic[j]['min']):
52 | dic[j]['min'] = i["faceAttributes"]["emotion"][j]
53 | #print(i["faceAttributes"]["emotion"]["contempt"])
54 |
55 | else:
56 | print('invalid image')
57 | print(dic)
58 |
59 | f = open('analysed.txt', 'w')
60 | f.write(json.dumps(dic))
61 | f.close()
62 | #faces = response.json()
63 | #HTML("Detected %d faces in the image"%len(faces))
--------------------------------------------------------------------------------
/range/meta-chart.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cseas/crowd-analytics/3911d47c9aa02b75823787cebe53026bddf764f8/range/meta-chart.jpeg
--------------------------------------------------------------------------------
/range/test.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | import requests
4 |
5 | # free, 20 calls/min, limit 30K calls/month
6 | subscription_key = "bf5951c5f4934e2e90bc11c48ffb57fa"
7 | # premium, 10 calls/sec, no limit, 66 INR / 1000 calls
8 | # subscription_key = "02726400482345229652709041c698ba"
9 | assert subscription_key
10 |
11 | face_api_url = 'https://southeastasia.api.cognitive.microsoft.com/face/v1.0/detect'
12 |
13 | headers = { 'Ocp-Apim-Subscription-Key': subscription_key, "Content-Type": "application/octet-stream"}
14 | params = {
15 | 'returnFaceId': 'false',
16 | 'returnFaceLandmarks': 'false',
17 | 'returnFaceAttributes': 'emotion',
18 | }
19 |
20 | # load the stored dictionary data from txt file
21 | f = open('analysed.txt', 'r')
22 | dic = json.loads(f.readline())
23 | f.close()
24 |
25 | # testing test images with analysed emotion values
26 | indir = '/home/abhijeet/Documents/python/faceapi/test'
27 | for root, dirs, filenames in os.walk(indir):
28 | for filename in filenames:
29 | if filename.endswith(".jpeg") or filename.endswith(".jpg") or filename.endswith(".png"):
30 | image_data = open(indir+'/'+filename, "rb").read()
31 | response = requests.post(face_api_url, params=params, headers=headers, data=image_data)
32 | response.raise_for_status()
33 | analysis = response.json()
34 |
35 | for i in analysis:
36 | flag = 0
37 | for j,value in i["faceAttributes"]["emotion"].items():
38 | if(j == "neutral"):
39 | continue
40 | # print (j)
41 | # print (value)
42 | # print ("max",dic[j]['max'])
43 | # print ("min",dic[j]['min'])
44 | if(value > dic[j]['max'] or value < dic[j]['min']):
45 | print("Not bored")
46 | flag = 1
47 | break
48 | if(flag == 0):
49 | print("Bored")
--------------------------------------------------------------------------------
/testImages/attentive.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cseas/crowd-analytics/3911d47c9aa02b75823787cebe53026bddf764f8/testImages/attentive.jpeg
--------------------------------------------------------------------------------
/testImages/bored.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cseas/crowd-analytics/3911d47c9aa02b75823787cebe53026bddf764f8/testImages/bored.jpeg
--------------------------------------------------------------------------------
/testImages/serious.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cseas/crowd-analytics/3911d47c9aa02b75823787cebe53026bddf764f8/testImages/serious.jpg
--------------------------------------------------------------------------------