# pca-face-recognition
A simple face recognition demo using PCA algorithm.
# Use KNN classifier
Using the ORL face database.
I set ```k = 90```, and the accuracy reach 92.5%.
```shell
$ python pca_face_recognition.py
s1/10.pgm is the most similar to s1/5.pgm
s2/10.pgm is the most similar to s2/8.pgm
s3/10.pgm is the most similar to s3/9.pgm
s4/10.pgm is the most similar to s4/5.pgm
s5/10.pgm is the most similar to s40/5.pgm
s6/10.pgm is the most similar to s6/6.pgm
s7/10.pgm is the most similar to s7/5.pgm
s8/10.pgm is the most similar to s8/3.pgm
s9/10.pgm is the most similar to s9/5.pgm
s10/10.pgm is the most similar to s8/6.pgm
s11/10.pgm is the most similar to s11/1.pgm
s12/10.pgm is the most similar to s12/9.pgm
s13/10.pgm is the most similar to s13/5.pgm
s14/10.pgm is the most similar to s14/1.pgm
s15/10.pgm is the most similar to s15/2.pgm
s16/10.pgm is the most similar to s16/3.pgm
s17/10.pgm is the most similar to s17/7.pgm
s18/10.pgm is the most similar to s18/5.pgm
s19/10.pgm is the most similar to s19/3.pgm
s20/10.pgm is the most similar to s20/2.pgm
s21/10.pgm is the most similar to s21/8.pgm
s22/10.pgm is the most similar to s22/9.pgm
s23/10.pgm is the most similar to s23/1.pgm
s24/10.pgm is the most similar to s24/9.pgm
s25/10.pgm is the most similar to s25/3.pgm
s26/10.pgm is the most similar to s26/8.pgm
s27/10.pgm is the most similar to s27/1.pgm
s28/10.pgm is the most similar to s28/1.pgm
s29/10.pgm is the most similar to s29/3.pgm
s30/10.pgm is the most similar to s30/2.pgm
s31/10.pgm is the most similar to s31/5.pgm
s32/10.pgm is the most similar to s32/9.pgm
s33/10.pgm is the most similar to s33/2.pgm
s34/10.pgm is the most similar to s34/6.pgm
s35/10.pgm is the most similar to s35/5.pgm
s36/10.pgm is the most similar to s36/6.pgm
s37/10.pgm is the most similar to s37/9.pgm
s38/10.pgm is the most similar to s38/5.pgm
s39/10.pgm is the most similar to s39/6.pgm
s40/10.pgm is the most similar to s5/1.pgm
accuracy: 0.925000
```
# Use SVM classifier
```pca_svm_face_recogition.m``` is a Matlab code which implements a face recognition program using PCA to reduce the dimension of the features and one-vs-one multiclass SVM to classify the image.
I used PCA to reduce the data to 50 dimensions and then use SVM linear kernel function to classify, finally, I got an accuracy of 0.9437.
```
accuracy =
0.9437
```
Here is the eigen faces:
![eigen_faces.jpg](https://github.com/techping/pca-face-recognition/raw/master/eigen_faces.jpg)
没有合适的资源?快使用搜索试试~ 我知道了~
pca-face-recognition.zip_PCA-SVM_face recognition_matlab 图像处理_sv
共405个文件
pgm:400个
md:1个
py:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 133 浏览量
2022-07-14
06:09:18
上传
评论
收藏 3.97MB ZIP 举报
温馨提示
一个简单的人脸识别演示使用PCA算法。pca_svm_face_recogition.m是一种Matlab代码,它利用PCA实现人脸识别程序,降低特征的维数,并利用one-vs-one多类SVM对图像进行分类。 我使用PCA将数据缩减到50维,然后使用SVM线性核函数进行分类,最终得到了0.9437的准确率。
资源推荐
资源详情
资源评论
收起资源包目录
pca-face-recognition.zip_PCA-SVM_face recognition_matlab 图像处理_sv (405个子文件)
eigen_faces.jpg 180KB
pca_svm_face_recogition.m 3KB
README.md 2KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
2.pgm 10KB
7.pgm 10KB
10.pgm 10KB
3.pgm 10KB
9.pgm 10KB
1.pgm 10KB
6.pgm 10KB
4.pgm 10KB
8.pgm 10KB
5.pgm 10KB
共 405 条
- 1
- 2
- 3
- 4
- 5
资源评论
小贝德罗
- 粉丝: 63
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功