CNN
2

2018

1

This article is my reflection on my previous work FaceLock, a project to recognize user's face and lock the computer if the user doesn't present in a certain time. CNN is used to recognize different faces. I watch the Coursera course Convolutional Neural Networks by Andrew Ng to understand more about CNN, so it's also a learning note about it. One Layer of a Convolutional Network In a non-convolutional network, we have the following formula: Similarly, in the convolutional network, we can have: @ is a convolution operation. @ is the input matrix. @ is the filter. Different filter can detect different feature, e.g. vertical edge, diagonal edge, etc. @ is the bias. @ is a activation function. @ is the output matrix, and can be fed to the next layer. Calculating the Number The Number of the Parameters Suppose we have 10 filters which are in one layer of a neural

2017

1

最近(上个月)想研究一下人脸识别。人脸检测。找了下网上的资料,有不少都是介绍怎么用现成的模块识别的。但是我想了解的是用神经网络进行人脸识别,并且希望能够更多地接触神经网络。于是往基于TensorFlow框架的人脸识别方面查找了下,幸运地找到了 Hironsan 的 BossSensor 项目。学习他的代码,我了解到了 Keras 框架搭建神经网络的步骤。在此基础上进行了一系列改进,获得了更高的精度。 Main Produce 预处理 -> 数据集划分 -> 人脸图像输入 -> 卷积神经网络 -> 分类输出 -> 决策 Preprocess 首先,获取人脸图像数据。我是通过 OpenCV 采集照片中的人脸。照片来源:现场取材,身边人下手,手机照片,网络收集。(直到我做完才想起来有个 ImageNet 这种方便的东西。) 然后是读取图像数据,将人脸图像预处理,将图片缩放和增加 Padding, 使得图片的长宽像素一致