Detecting faces in images with complex backgrounds is a difficult task. Our approach, which obtains state of the art results, is based on a generative neural network model: the Constrained Generative Model (CGM). To detect side view faces and to decrease the number of false alarms, a conditional mixture of networks is used. To decrease the computationaltimecost,afastsearchalgorithmisproposed. The level of performance reached, in terms of detection accuracy and processing time, allows to apply this detector to a real word application: the indexation of face images on the Web.