-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheigenfaces.lyx
1593 lines (1147 loc) · 29.7 KB
/
eigenfaces.lyx
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
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
357
358
359
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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
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
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#LyX 1.6.7 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass scrartcl
\begin_preamble
\usepackage{todonotes}
\setkomafont{caption}{\sffamily}
\setkomafont{captionlabel}{\sffamily}
\setkomafont{sectioning}{\rmfamily\bfseries}
\clubpenalty=10000
\widowpenalty=10000
\end_preamble
\options a4wide, bibtotoc, chapterprefix, numbers=noendperiod, abstracton, BCOR=5mm
\use_default_options true
\language ngerman
\inputencoding auto
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize a4paper
\use_geometry true
\use_amsmath 1
\use_esint 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author ""
\author ""
\end_header
\begin_body
\begin_layout Title
Eigenfaces zur Gesichtserkennung
\end_layout
\begin_layout Author
Johannes Kulick
\end_layout
\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents
\end_inset
\end_layout
\begin_layout Section
Einleitung
\end_layout
\begin_layout Itemize
Gesichtserkennung als Sicherheitsfeature
\end_layout
\begin_layout Itemize
Multimediaanwendung
\end_layout
\begin_layout Itemize
Geschichtliches (Eigenfaces als erste relevante Technik)
\end_layout
\begin_layout Section
Gesichtserkennung als Mathematisches Problem
\end_layout
\begin_layout Standard
Gesichtserkennung wird in dieser Arbeit als Problem auf zwei dimensionalen
Grauwertbildern aufgefasst.
Die Eingabe für entsprechende Algorithmen ist also eine
\begin_inset Formula $n\times m$
\end_inset
Grauwertmatrix, das Bild.
Jeder Grauwert ist 8 Bit groß, ist also ein Wert aus dem Intervall
\begin_inset Formula $[0,255]$
\end_inset
.
\end_layout
\begin_layout Standard
Zusätzlich gibt es
\begin_inset Formula $t$
\end_inset
Trainingsbilder, denen jeweils ein Schlüssel
\begin_inset Formula $k_{i}\in k_{1},\ldots,k_{j},j\le t$
\end_inset
zugeordnet ist, die Person.
Die Aufgabe des Gesichtserkennungsalgorithmus ist nun bei Eingabe eines
neuen Bildes den Schlüssel
\begin_inset Formula $k_{l}$
\end_inset
\end_layout
\begin_layout Itemize
2d bilder
\end_layout
\begin_layout Section
Eigenfaces als Repräsentation von Gesichtern
\end_layout
\begin_layout Subsection
PCA
\end_layout
\begin_layout Standard
Der Eigenfaces Algorithmus beruht im Wesentlichen auf einer Hauptkomponentenanal
yse der Trainingsbilder.
Die Hauptkomponenten dienen im weiteren Verlauf als Fingerabdruck eines
Gesichts.
\end_layout
\begin_layout Standard
Die Hauptkomponentenanalyse ist ein statistisches Verfahren, bei dem in
einer
\begin_inset Formula $n$
\end_inset
-dimensionale Punktmenge die Basis gefunden wird, bei der die Punkte in
Richtung der Basisvektoren die größte Varianz aufweisen.
Diese Basisvektoren sind die sogenannten Hauptkomponenten, sortiert nach
der Varianz der Daten bezüglich dieses Basisvektors.
Die erste Hauptkomponente, ist also genau der Basisvektor, in dessen Richtung
die Punkte die größte Varianz aufweisen.
Für eine Menge zwei dimensionaler Punkte ist dies in Abbildung
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:Ein-Datencluster"
\end_inset
dargestellt.
\end_layout
\begin_layout Standard
Das Problem der Findung der Hauptkomponenten wurde zuerst als geometrisches
Problem durch Pearson beschrieben
\begin_inset CommandInset citation
LatexCommand cite
key "pearson-1901"
\end_inset
.
Der hier beschriebene Ansatz zur Berechnung der Haupotkomponenten als Optimieru
ngsproblem geht auf Hotelling
\begin_inset CommandInset citation
LatexCommand cite
key "hotelling-1933"
\end_inset
zurück und wird in vielen Textbüchern zu statistischen Verfahren beschrieben
(zum Beispiel
\begin_inset CommandInset citation
LatexCommand cite
key "webb-2002"
\end_inset
).
\end_layout
\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open
\begin_layout Plain Layout
\align center
\begin_inset Graphics
filename pca.png
width 70text%
\end_inset
\end_layout
\begin_layout Plain Layout
\family sans
\begin_inset Caption
\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "fig:Ein-Datencluster"
\end_inset
Ein Datencluster im 2-dimensionalen Raum mit den beiden Hauptkomponenten
(rot)
\end_layout
\end_inset
\end_layout
\begin_layout Plain Layout
\end_layout
\end_inset
\end_layout
\begin_layout Standard
Seien
\begin_inset Formula $X_{1},\ldots,X_{m}\in\mathbb{R}^{n}$
\end_inset
Vektoren und
\begin_inset Formula $M\in\mathbb{R}^{m\times n}$
\end_inset
eine
\begin_inset Formula $m\times n$
\end_inset
Matrix, mit
\begin_inset Formula $M=\left(\begin{array}{cccc}
X_{1} & X_{2} & \ldots & X_{m}\end{array}\right)$
\end_inset
.
Ziel ist es nun, die Hauptkomponenten dieser Datenmatrix zu finden.
\end_layout
\begin_layout Standard
Wir fassen nun jeden Vektor
\begin_inset Formula $X_{i}$
\end_inset
als Belegung eines
\begin_inset Formula $n$
\end_inset
-dimensionalen Zufallsvektors
\begin_inset Formula $X$
\end_inset
auf.
Wir nehmen an, dass diese Belegungen normalverteilt um ihren Mittelwert
\begin_inset Formula $\mu=\frac{1}{m}\sum_{i=1}^{m}X_{i}$
\end_inset
sind, also gilt auch das der Erwartungswert
\begin_inset Formula $E[X]=\mu$
\end_inset
ist und wir die Kovarianzmatrix
\end_layout
\begin_layout Standard
\begin_inset Formula \[
\Sigma=E\left[(X-\mu)(X-\mu)^{T}\right]=E\left[XX^{T}\right]-\mu\mu^{T}\]
\end_inset
haben.
\end_layout
\begin_layout Standard
Obiges Problem ist nun analog dazu, neue Zufallsvariablen
\begin_inset Formula $Z$
\end_inset
zu finden, die eine Lineartransformation von
\begin_inset Formula $X$
\end_inset
sind, also
\begin_inset Formula $Z_{i}=a_{i}^{T}X$
\end_inset
mit
\begin_inset Formula $a$
\end_inset
einer noch zu findenden
\begin_inset Formula $(n\times n)$
\end_inset
Matrix von konstanten Koeffizienten.
Diese neuen Variablen sollten möglichst unkorreliert sein, die Varianz
der einzelnen Zufallsvariablen soll also möglichst hoch sein.
\end_layout
\begin_layout Standard
Um Abstände nach dem Basiswechsel gleich zu halten führen wir außerdem die
Nebenbedingung ein, dass
\begin_inset Formula $a_{j}^{T}a_{j}=\sum_{k=1}^{n}a_{jk}^{2}=1$
\end_inset
.
Dies entspricht einer Normierung der Basisvektoren auf die gleiche Länge
wie zuvor, die Abbildung wird also orthogonal.
\end_layout
\begin_layout Standard
Die erste Hauptkomponente ist nun also die Zufallsvariable
\begin_inset Formula $Z_{1}$
\end_inset
, mit der höchsten Varainz.
Es gilt
\end_layout
\begin_layout Standard
\begin_inset Formula \[
Var\left(Z_{i}\right)=Var\left(a_{i}^{T}X\right)=E\left[a_{i}^{T}(X-\mu)(X-\mu)^{T}a_{i}\right]=a_{i}^{T}\Sigma a_{i}.\]
\end_inset
\end_layout
\begin_layout Standard
Um die Hauptkomponenten zu finden müssen wir also die Zielfunktion
\begin_inset Formula $a_{i}^{T}\Sigma a_{i}$
\end_inset
maximieren, unter der gegebenen Nebenbedingung.
Dies ist ein Optimierungsproblem.
Zur Lösung nutzen wir Lagrange-Multiplikatoren
\begin_inset CommandInset citation
LatexCommand cite
key "vapnyarskii-2001"
\end_inset
.
Die Lagrange Funktion mit dem Lagrange-Multiplikator
\begin_inset Formula $\lambda_{i}$
\end_inset
, die wir erhalten, ist
\begin_inset Newline newline
\end_inset
\begin_inset Formula \[
L(a_{i})=a_{i}^{T}\Sigma a_{i}-\lambda_{i}(a_{i}^{T}a_{i}-1).\]
\end_inset
\end_layout
\begin_layout Standard
Wir differenzieren nach
\begin_inset Formula $a_{i}^{T}$
\end_inset
.
\end_layout
\begin_layout Standard
\begin_inset Formula \[
\frac{\partial L}{\partial a_{i}^{T}}=2\Sigma a_{i}-2\lambda_{i}a_{i}\]
\end_inset
\end_layout
\begin_layout Standard
Um das Maximum zu erhalten setzen wir mit Null gleich und erhalten:
\end_layout
\begin_layout Standard
\begin_inset Formula \begin{eqnarray*}
0 & = & 2\Sigma a_{i}-2\lambda_{i}a_{i}\\
0 & = & (\Sigma-\lambda_{i}I)a_{i}\end{eqnarray*}
\end_inset
\end_layout
\begin_layout Standard
Wobei
\begin_inset Formula $I$
\end_inset
die
\begin_inset Formula $n$
\end_inset
-dimensionale Identitätsmatrix darstellt.
Dies ist aber offenbar ein Eigenwertproblem
\begin_inset CommandInset citation
LatexCommand cite
key "anton-1998"
\end_inset
.
Es sind also
\begin_inset Formula $a_{i}$
\end_inset
genau die Eigenvektoren von
\begin_inset Formula $\Sigma$
\end_inset
und
\begin_inset Formula $\lambda_{i}$
\end_inset
die Eigenwerte.
\end_layout
\begin_layout Standard
Nun ist
\begin_inset Formula $a$
\end_inset
also genau die Basistransformationsmatrix, die uns einen Vektor gegeben
zur kanonischen Basis in den Vektorraum zur Basis der Hauptkomponenten
transformiert.
Die Hauptkomponenten sind also genau die kanonischen Basisvektoren transformier
t mit
\begin_inset Formula $a$
\end_inset
, dies sind aber genau die Vektoren
\begin_inset Formula $a_{i}$
\end_inset
.
\end_layout
\begin_layout Standard
Zwar ist die Berechnung von Eigenvektoren und -werten für höherdimensionale
Matrizen kein triviales Problem, es gibt aber eine Reihe stabiler und effizient
er Algorithmen zur Berechnung.
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
todo{Ref}
\end_layout
\end_inset
\end_layout
\begin_layout Subsection
Eigenfaces
\end_layout
\begin_layout Standard
Viele frühe Gesichtserkennungsverfahren basieren auf Merkmalen, die menschenvers
tehbar sind, wie beispielsweise Haarfarbe, Augenfarbe oder Position der
Gesichtsteile zueinander.
Diese Algorithmen ignorieren, dass solche Merkmale korreliert sein können,
oder aber zu wenig Information transportieren können
\begin_inset CommandInset citation
LatexCommand cite
key "turk-1991a"
\end_inset
.
Zwar scheinen Menschen auf solche Merkmale zur Erkennung von Gesichtern
zurückzugreifen, da entsprechende Abläufe im Gehirn aber noch nicht vollständig
verstanden werden, ist es auch möglich das andere Features zur Erkennung
von Gesichtern wichtiger sind.
\end_layout
\begin_layout Standard
Der Eigenface Ansatz abstrahiert von solchen greifbaren Merkmalen.
Stattdessen wurde ein ein Informationstheoretischer Ansatz gewählt, bei
dem aus den Gesichtsbildern Merkmale extrahiert werden, die möglichst unkorreli
ert sind
\begin_inset CommandInset citation
LatexCommand cite
key "turk-1991"
\end_inset
, die sogenannten
\emph on
Eigenfaces
\emph default
.
Die Beschreibung der Berechnung von Eigenfaces folgt im wesentlichen
\begin_inset CommandInset citation
LatexCommand cite
key "turk-1991"
\end_inset
.
\end_layout
\begin_layout Standard
Sei
\begin_inset Formula $T$
\end_inset
eine Trainingsmenge der Größe
\begin_inset Formula $M$
\end_inset
von Gesichtsbildern, also
\begin_inset Formula $n\times m$
\end_inset
Matrizen mit ganzzahligen Werten im Intervall
\begin_inset Formula $[0,255]$
\end_inset
.
Diese fassen wir auch als
\begin_inset Formula $1\times n\cdot m$
\end_inset
-dimensionale Merkmalsvektoren auf.
Wir suchen jetzt die Matrizen bzw.
Merkmalsvektoren, aus denen wir mittels Linearkombination alle Trainingsbilder
rekonstruieren können und die möglichst unkorreliert sind.
Dies sind aber genau die Hauptkomponenten der Datenmenge.
Wir suchen also genau die Hauptkomponenten von
\begin_inset Formula $T$
\end_inset
, dise bilden dann die Eigenfaces.
\end_layout
\begin_layout Standard
Zuerst erstellen wir ein Durchschnittsbild
\begin_inset Formula $\Psi$
\end_inset
aller Gesichtsbilder
\begin_inset Formula $\Gamma_{i}\in T$
\end_inset
:
\end_layout
\begin_layout Standard
\begin_inset Formula \[
\Psi=\frac{1}{M}\sum_{i=1}^{M}\Gamma_{i}\]
\end_inset
\end_layout
\begin_layout Standard
Wir nehmen an, das dies der Erwartungswert eines Gesichtsbildes ist, nehmen
also an, dass alle Gesichtsbilder normalverteilt um dieses Durchschnittsbild
sind.
\end_layout
\begin_layout Standard
Nun gibt es zu jedem Gesicht
\begin_inset Formula $\Gamma_{i}$
\end_inset
ein Differenzbild
\begin_inset Formula $\Phi_{i}$
\end_inset
, dass die Differenz zu
\begin_inset Formula $\Psi$
\end_inset
ist:
\end_layout
\begin_layout Standard
\begin_inset Formula \[
\Phi_{i}=\Gamma_{i}-\Psi\]
\end_inset
\end_layout
\begin_layout Standard
Diese geben also den Abstand zum Erwartungswert an und können so genutzt
werden um eine Kovarianzmatrix aufzustellen:
\end_layout
\begin_layout Standard
\begin_inset Formula \begin{eqnarray*}
Cov(T) & = & \frac{1}{M}\sum_{i=1}^{M}\Phi_{i}\Phi_{i}^{T}\\
& = & AA^{T}\end{eqnarray*}
\end_inset
\end_layout
\begin_layout Standard
Wobei
\begin_inset Formula $A$
\end_inset
die Matrix
\begin_inset Formula $\left[\begin{array}{cccc}
\Phi_{1} & \Phi_{2} & \ldots & \Phi_{M}\end{array}\right]$
\end_inset
ist.
\end_layout
\begin_layout Standard
Von dieser Kovarianzmatrix müssen nun die Eigenvektoren und Eigenwerte berechnet
werden.
Wie bereits erwähnt handelt es sich bei
\begin_inset Formula $\Phi_{i}$
\end_inset
um
\begin_inset Formula $n\cdot m$
\end_inset
große Vektoren.
Selbst bei niedrig aufgelösten Bildern ergeben sich also sehr große Kovarianzma
trizen.
Die Berechnung der Eigenvektoren und -werte ist dann aus Speichergründen
nicht mehr möglich.
\end_layout
\begin_layout Standard
Da wir nur
\begin_inset Formula $M$
\end_inset
Trainingsbilder haben, wobei
\begin_inset Formula $M$
\end_inset
normalerweise deutlich kleiner ist als die Dimension der Bilder
\begin_inset Formula $n\cdot m$
\end_inset
, wird es maximal
\begin_inset Formula $M-1$
\end_inset
Eigenfaces geben, die aussagekräftig sind.
Alle weiteren werden mit einem Eigenwert von
\begin_inset Formula $0$
\end_inset
assoziiert sein.
Diese Eigenvektoren können aus den Eigenvektoren der Matrix
\begin_inset Formula $A^{T}A$
\end_inset
berechnet werden
\begin_inset CommandInset citation
LatexCommand cite
key "turk-2005"
\end_inset
.
Es gilt folgende Abhängigkeit von Eigenvektoren
\begin_inset Formula $v_{i}$
\end_inset
und Eigenwerten
\begin_inset Formula $\lambda_{i}$
\end_inset
der Kovarianzmatrix
\begin_inset Formula $C$
\end_inset
von
\begin_inset Formula $T$
\end_inset
:
\end_layout
\begin_layout Standard
\begin_inset Formula \[
Cv_{i}=\lambda_{i}v_{i}\]
\end_inset
\end_layout
\begin_layout Standard
Seien
\begin_inset Formula $\hat{v}_{i}$
\end_inset
die Eigenvektoren und
\begin_inset Formula $\mu_{i}$
\end_inset
die Eigenwerte der Matrix
\begin_inset Formula $D=A^{T}A$
\end_inset
, so gilt:
\end_layout
\begin_layout Standard
\begin_inset Formula \begin{eqnarray*}
D\hat{v}_{i} & = & \mu_{i}\hat{v}_{i}\\
A^{T}A\hat{v}_{i} & = & \mu_{i}\hat{v}_{i}\\
AA^{T}A\hat{v}_{i} & = & \mu_{i}A\hat{v}_{i}\\
C\left(A\hat{v}_{i}\right) & = & \mu_{i}\left(A\hat{v}_{i}\right)\end{eqnarray*}
\end_inset
\end_layout
\begin_layout Standard
Die Eigenvektoren und -werte von
\begin_inset Formula $C$
\end_inset
können also berechnet werden als:
\end_layout
\begin_layout Standard
\begin_inset Formula \begin{eqnarray*}
v_{i} & = & \left(A\hat{v}_{i}\right)\\
\lambda_{i} & = & \mu_{i}\end{eqnarray*}
\end_inset
\end_layout
\begin_layout Standard
Die Matrix
\begin_inset Formula $A^{T}A$
\end_inset
ist aber nur eine
\begin_inset Formula $M\times M$
\end_inset
Matrix, hat also deutlich weniger Dimensionen als
\begin_inset Formula $AA^{T}$
\end_inset
.
Wir können ihre Eigenvektoren und -werte also mit deutlich weniger Speicheraufw
and berechnen und so auch Eigenvektoren von
\begin_inset Formula $AA^{T}$
\end_inset
.
\end_layout
\begin_layout Standard
Wir sortieren nun die Eigenvektoren nach den assoziierten Eigenwerten.
Diese Hauptkomponenten nennen wir aufgrund ihres gesichtsähnlichen Aussehens
\emph on
Eigenfaces
\emph default
(vgl.
Abbildung
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:Eigenfaces"
\end_inset
).
Sie spannen einen Unterraum vom Raum aller
\begin_inset Formula $n\cdot m$
\end_inset
Bilder auf, den wir
\emph on
Gesichtsraum
\emph default
nennen.
Dieser Gesichtsraum ist maximal
\begin_inset Formula $M$
\end_inset
-dimensional, die Dimension kann aber auch noch verringert werden, indem
nur die
\begin_inset Formula $k<M$
\end_inset
ersten Hauptkomponenten genutzt werden.
\end_layout
\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open
\begin_layout Plain Layout
\noindent
\align center
\begin_inset Graphics
filename eigenfaces/eig01.png
lyxscale 60
width 25text%
\end_inset
\begin_inset space \qquad{}
\end_inset
\begin_inset Graphics
filename eigenfaces/eig02.png
lyxscale 60
width 25text%
\end_inset
\begin_inset space \qquad{}
\end_inset
\begin_inset Graphics
filename eigenfaces/eig03.png
lyxscale 60
width 25text%
\end_inset
\family sans
\begin_inset Caption
\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "fig:Eigenfaces"
\end_inset
Die ersten drei Eigenfaces des AT&T Datenbank Trainingssets.
Man erkennt deutlich die namensgebende Gesichtsähnlichkeit.
\end_layout
\end_inset
\end_layout
\begin_layout Plain Layout
\end_layout
\end_inset
\end_layout
\begin_layout Subsection
Eigenfaces als Feature-Vektor
\end_layout
\begin_layout Standard
Wie im vorigen Abschnitt beschrieben bilden die Eigenfaces den Gesichtsraum.
In
\begin_inset CommandInset citation
LatexCommand cite
key "sirovich-1987"
\end_inset
zeigen Sirovich und Kriby, dass relativ wenig Eigenfaces notwendig sind,
um Gesichter der Trainingsmenge zu recodieren.
Man benötigt also im allgemeinen nur
\begin_inset Formula $M'$
\end_inset
Eigenfaces.
\end_layout
\begin_layout Standard
Ein Gesicht
\begin_inset Formula $\Gamma$
\end_inset
wird mit den Eigenfaces recodiert, indem wir es in den Gesichtsraum projezieren.
Wir erhalten dann also die Rekodierung
\begin_inset Formula $\Omega=\left[\begin{array}{cccc}
\omega_{1} & \omega_{2} & \ldots & \omega_{M'}\end{array}\right]^{T}$
\end_inset
, mit
\end_layout
\begin_layout Standard
\begin_inset Formula \[
\omega_{i}=v_{i}(\Gamma-\Psi).\]
\end_inset
\end_layout
\begin_layout Standard
Jedes
\begin_inset Formula $\omega_{i}$
\end_inset
ist nun der Anteil des Eigenface
\begin_inset Formula $i$
\end_inset
am Gesichtsbild
\begin_inset Formula $\Gamma$
\end_inset
.
Wenn wir nun Gesichter erkennen wollen, können wir nun die Recodierung
\begin_inset Formula $\Omega$
\end_inset
als Merkmalsvektor des Gesichtsbild auffassen.
Diesen nutzen wir als Eingabe für einen Mustererkennungsalgorithmus.
Eigenfaces selber dienen also nur als Repräsentation oder Features für
Gesichtsbilder.
Die eigentliche Erkennung wird nicht mit dem Eigenface Algorithmus ausgeführt.
\end_layout
\begin_layout Subsection
Gesichtserkennungs Algorithmen
\end_layout
\begin_layout Standard
Um nun mit Eigenfaces Gesichter auch tatsächlich zu erkennen können unterschiedl
iche Ansätze gewählt werden.
Der einfachste Algorithmus ist dabei ein
\emph on
Nearest Neighbour
\emph default
Ansatz, von Turk vorgeschlagen
\begin_inset CommandInset citation
LatexCommand cite
key "turk-1991"
\end_inset