Face recognition using PCA and KNN

버전 1.1.0.1 (12.5 KB) 작성자: Mahmoud Afifi
Face recognition using PCA and KNN
다운로드 수: 1.2K
업데이트 날짜: 2019/1/4

라이선스 보기

The files here are:
(1) load_data: load the data from face_images.mat and nonface_images.mat
face_images.mat file should contain:
- train_imgs: NxMxL tensor that contains N test face images. Each image is MxL pixels (grayscale).
- train_ids: Nx1 vector that contains the id of each image in test_imgs
- test_imgs: KxMxL tensor that contains N test face images. Each image is MxL pixels (grayscale).
- test_ids: Kx1 vector that contains the id of each image in test_imgs
nonface_images.mat file should contain:
- nonface_imgs: SxMxL tensor that contains S non-face images. Each image is MxL pixels (grayscale)
(2) getAvgFace: calculate the average of the training face images and display it.
(3) PCA_: calculate the principle components (PCs), the latent low-dimensional data, and the eigenvalues
(4) KNN_: classifying using k-nearest neighbors algorithm. The nearest neighbors search method is euclidean distance.
(5) Demo: is a demo!
Note: you have to prepare your data as described in (1)

To get the results:
1- Download the datasets and locate them in the same directory of the source code.

2- Run Demo.m

인용 양식

Mahmoud Afifi (2024). Face recognition using PCA and KNN (https://www.mathworks.com/matlabcentral/fileexchange/64568-face-recognition-using-pca-and-knn), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2015a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

FaceRec_using_PCA_and_KNN

버전 게시됨 릴리스 정보
1.1.0.1

.

1.1.0.0

a bug in KNN (for K>1) is fixed

1.0.0.0