本文研究動機源自於 Viola 和 Jones [10] 對物件偵測的探討,但我們採用 Krizhevsky等人 [5] 的卷積神經網路方法,希望能從一張給定的彩色圖片中偵測出圖片裡的人臉影像個數,改進原本只能應用於黑白圖片上的侷限,及處理只能掃取固定大小人臉影像的問題。我們採用 Keras 與 OpenCV 進行結合,架構出包含卷積層與全連接層的類神經網路,但由於我們電腦硬體設備的侷限,架構出的類神經網路的層數並不深。在訓練方面,我們利用 CelebFaces Attributes Dataset (CelebA) [7] 與 Imagenet 的圖片資料庫,進行處理後做為訓練集,圖片總數為十五萬張。以訓練後所得到的類神經網路做為強分類器,再利用滑動視窗將強分類器作用在偵測圖片上,利用縮放的技術,搭配雙線性插值法,將原本只能偵測固定大小的人臉影像改進成可偵測到偏大或偏小的人臉影像。最後進行人臉偵測的模擬實驗,實驗結果顯示該類神經網路的架構可成功的應用在彩色圖片上,同時所提出的縮放技術能有效地偵測到偏大或偏小的人臉影像。;Motivated by the work of Viola and Jones [10] for object detection, in this thesis we propose a new convolutional neural network model for face detection which is based on the study by Krizhevsky et al. [5]. The proposed convolutional neural network model for face detection is not limited to the black-white images and fixed face size. This approach combines Keras with OpenCV to construct a neural network framework consisting of several convolutional layers and fully connected layers. We use a training set which contains about 150,000 color images, cited from the CelebA [7] and Imagenet databases, to train the proposed neural network model. After that we employ the trained neural network as a strong classifier, combining with a sliding window, to detect the number of faces in a given color image. We also use the bilinear interpolation to design a zoom-in and zoom-out technique to deal with an image which contains a face image that is too large or too small. Finally, a series of numerical experiments is performed to demonstrate the effectiveness of the proposed convolutional neural network model for face detection.