Bộ Phát Hiện Khuôn Mặt Viola Jones#

Dự án mẫu Viola-Jones đi kèm với CMUcam3 là một ví dụ về một bộ phát hiện khuôn mặt nhẹ. Thuật toán dựa trên bài báo nổi tiếng "Robust Real-Time Face Detection" của P. Viola và M. Jones từ năm 2004 (viola-ijcv04.pdf). Cách triển khai trên CMUcam3 sẽ trả về các tọa độ cho các khung nơi nó phát hiện một khuôn mặt trong ảnh. Nếu bạn kiểm tra mã này với một nền tương đối đồng nhất (như một bức tường trắng), nó hoạt động khá tốt. Các ảnh được huấn luyện từ cơ sở dữ liệu khuôn mặt CMU sao cho chúng tổng quát hóa cho tất cả các khuôn mặt. Đôi khi một số khuôn mặt nhất định với các đặc điểm không có trong cơ sở dữ liệu có thể làm cho bộ phát hiện bối rối.

Sample Face 1 Sample Face 2

The paper (viola-ijcv04.pdf) introduces a novel technique to detect faces in real-time and with very high detection rate. It is essentially a feature-based approach in which a classifier is trained for Haar-like rectangular features selected by Adaboost. The test image is scanned at different scales and positions using a rectangular window, and the regions which pass the classifier are declared as faces. One of the major contributions of this paper is the extremely rapid computation of these features using the concept of Integral Image, which enables the detection in real-time. Additionally, instead of learning a single classifier and computing all the features for all the scanning windows in the image, a number of classifiers are learnt which are put together in a series to form a cascade. The classifiers in the beginning of the cascade are simpler and consist of smaller numbers of features. However, as one proceeds in the cascade, the classifiers become more complex. A region is reported as detection only if it passes all the classifier stages in the cascade. If it is rejected at any stage, it is discarded and not processed further. This way, the easier patches in the image which the "cascade of classifiers" is sure of not being a face, are rejected very early while the difficult regions are operated on by more complex classifiers. This greatly speeds up the detection process without compromising on the accuracy and provides high detection rate. This overall system provides performance comparable to the existing best face detector systems (Rowley et al., 1998 CVPR00.pdf; Schneiderman and Kanade, 2000 nips00.pdf; Roth at al., 2000 rowley-ieee.pdf) but with orders of magnitudes faster than any of these systems. On a conventional desktop, it can detect faces at 15 frames per second.

Có thể tìm thấy thêm thông tin về bộ phát hiện khuôn mặt Viola-Jones và cách triển khai nó trên CMUcam3 trong tài liệu CC3 Face Detector của chúng tôi.

Tiện Ích và Hình Ảnh Bổ Sung

  • generate_feat_in_struct_for_C.m

    • Tập tin Matlab này in mô hình adaboost đã học ra một tập tin văn bản để nó có thể được nhập dễ dàng vào vj.h

  • get_scaled_feature.m

    • Tập tin này được sử dụng bởi generate_feat_in_struct_for_C.m

  • Các ảnh kiểm tra chúng tôi đã dùng cho bộ phát hiện khuôn mặt viola-jones