With the rapid development of science and technology, computer technology is playing an increasingly important role in today's life. The ability of computers to process visual information has largely made up for the shortcomings of human vision, thus making computer vision research also has become one of the hot research directions nowadays. This paper proposes two research methods. One is based on the traditional AdaBoost face detection algorithm, and the algorithm is implemented based on OpenCV. The results are tested and analyzed by AFW dataset and FDDB dataset. The second is based on the deep learning algorithm of convolutional neural network, based on the TensorFlow framework, implements a face detection algorithm based on convolutional neural network, and finally uses the AFW data set and FDDB data set to verify the algorithm. The experimental results show that the face detection algorithm based on deep learning can not only detect the front face, but also the side faces that cannot be detected by the traditional AdaBoost algorithm, and the former has better detection effect. The experimental results show that the face detection algorithm based on deep learning can not only detect the front face, but also the side faces that cannot be detected by the traditional AdaBoost algorithm, and the former has better detection effect.