值此AI普及應用的現今,在終端設備(例如iPhone的Face ID、機場通關與犯罪偵防等等)的內建AI也加持了人臉辨識(face identification)的準確率。本文以強於矩陣運算的MATLAB程式語言實作人臉辨識,首先讀入來自AT&T Laboratories Cambridge的40個人之各10張圖檔;這400張人臉圖檔先經過預處理(preprocessing)以利計算共變異數矩陣(correlation matrix)的特徵值(eigenvalue),此即統計學上的主成份分析法(Principal Component Analysis)。文中再以20個最大的特徵值,經奇異值分解(singular value decomposition)找到各自對應的特徵向量(eigenvector)作為識別候選人;最後以特徵臉(Eigenface)方法計算標的人臉與識別候選人的2-norm差距,差距最小者即判定為欲辨識之人臉。本系統的辨識成功率為97.5% (390個圖像/400個圖像)。
AI is almost ubiquitous now and with the aid of AI in terminal applications (Face ID of iPhone, Customs clearance, Criminal investigation, and the like), the accuracy of face identification is significantly enhanced. The study employs MATLAB, strong on matrix operations, to implement face recognition. The program first reads in 10 different images of 40 distinct persons from AT&T Laboratories Cambridge. After preprocessing 400 images for correlation matrix to compute eigenvectors, known as Principal Component Analysis, the system extracts the eigenvectors as candidates corresponding to 20 largest eigenvalues by singular value decomposition. Then the program exercises eigenface method to calculate 2-norm between target and candidate. The image with minimum distance is recognized as found person. The failure rate for the project is 2.5%.