<figure><img src="image_1.png" /></figure>

HAL
open science

# Adult Content Web Filtering and Face Detection Using Data-mining based Skin-color Model

Latifa Hammami, Dzmitry Tsishkou, Liming Chen

► To cite this version:

Latifa Hammami, Dzmitry Tsishkou, Liming Chen. Adult Content Web Filtering and Face Detection Using Data-mining based Skin-color Model. IEEE International Conference on Multimedia and Expo, ICME'04, Jun 2004, Taipei, Taiwan. 10.1109/ICME.2004.1394214. hal-01588397

HAL Id: hal-01588397

https://hal.science/hal-01588397

Submitted on 1 Feb 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
ADULT CONTENT WEB FILTERING AND FACE DETECTION USING
DATA-MINING BASED SKIN-COLOR MODEL

Mohamed Hammami, Dzmitry Tsishkou, Liming Chen

LIRIS, Ecole Centrale de Lyon, France

{mohamed.hammami, dzmitry.tsishkou, liming.chen}@ec-lyon.fr

Abstract

This paper presents a novel approach for robust
skin-color detection using data-mining techniques. The
goal of skin-color detection is to select the appropriate
color model that allows verifying pixels under different
lighting conditions and other variations. When the
appropriate color model is selected, it is implied that
we have good properties of the skin-color classifier for
skin detection. This model has been successfully
applied to face detection and web based adult content
filtering issues.

1. Introduction

A central task in visual learning is the construction
of statistical models of image appearance from pixel
data. When the amount of available training data is
small, sophisticated learning algorithms may be
required to interpolate between samples. However, as a
result of the World Wide Web and the proliferation of
on-line image collections, the vision community today
has access to image libraries of unprecedented size.
These large data sets can support simple,
computationally efficient learning algorithms.

This paper describes the construction of statistical
color models from a data set of unprecedented size:
Our model includes nearly 1 billion labelled training
pixels obtained from the CLR dataset [6]. From this
data we construct a color model as well as separate
skin and non-skin color. Using our skin classifier,
which operates on the color of a single pixel, we
construct a system for detecting images containing
naked people and facial regions.

The remainder of this paper is organized as follows.
The skin detection using color model is presented in
Section 2. The web site filtering system is discussed in
Section 3. The face detection system is presented in
Section 4. Section 5 draws conclusions on our work.

2. Skin Detection Using Color Model

The color of skin in the visible spectrum depends
primarily on the concentration of melanin and
hemoglobin [18]. The distribution of skin color across
different ethnic groups under controlled conditions of
illumination has been shown to be quite compact, with
variations expressible in terms of the concentration of
skin pigments [19]. However, under arbitrary
conditions of illumination the variation in skin color
will be less constrained. This is particularly true for
web images captured under a wide variety of imaging
conditions. However, given a sufficiently large
collection of labelled training pixels we can still model
the distribution of skin and non-skin colors
accurately[6].

2.1. Learning database

Skin colors change from person to person. Several
color spaces have been proposed in the literature for
skin detection applications[5]. YCbCr has been widely
used since the skin pixels form a compact cluster in the
Cb-Cr plane. As YCbCr is also used in video coding
and then no transcoding is needed, this color space has
been used in skin detection applications where the
video sequence is compressed [1, 11]. In [12] two
components of the normalized RGB color space (rg)
have been proposed to minimize luminance
dependence. And finally CIE Lu*v* has been used in
[14]. However, it is still not clear which is the color
space where the skin detection performance is the best.
To create skin-color model using color information we
use CRL database of skin-color and non-skin color
images [6]; all intensity information on color pixels
was extracted using binary masks.

For each pixel we compute its representation in
following normalized colorspaces: RGB, HSV, YIQ,
YCbCr, CMY in order to find the most discriminative
set of color axes.
## 2.2. Data mining-based Skin Classifier

A number of classification techniques from the statistics and machine learning communities have been proposed [3, 7, 8, 13]. A well-accepted method of classification is the induction of decision trees [2, 7]. In our approach we use the SIPINA method [17].

SIPINA is a widely used technique for data-mining. The effectiveness of SIPINA is superior to the classical methods such as ID3 and C4.5[8], because the distribution equivalency can be considered in a population-wise manner, irrespective of any fixed solutions proposed previously[16]. This accounting mechanism accurately charts usage distribution and leads to the highest performance among other methods, particularly for skin-color modelling.

As a result of applying this method to a training set, a hierarchical structure of classifying rules of the type "IF...THEN..." is created. This structure has a form of a tree. We discover that HSV is the most discriminative colorspace. Because of copyrights policy we are not authorized to publish detailed values on skin-color model decision rules, however we will present experimental results on evaluation of this model for face detection in video and adult web content filtering applications.

# 3. Web site filtering system

By taking advantage of the fact that there is a strong correlation between images with large patches of skin and adult or pornographic images, the skin detector can be used as the basis for an adult image detector. There is a growing industry aimed at filtering and blocking adult content from Web indexes and browsers. Some representative companies are www.surfcontrol.com and www.netnanny.com. All of these services currently operate by maintaining lists of objectionable URL's and newsgroups and require constant manual updating [6].

In this section, we propose an adult content detection and filtering system that extends adult content detection accuracy by the usage of both image signature and textual clues for adult web site filtering.

## 3.1. WebGuard's Architecture

The formulation of the « WebGuard » is as follows:
- Fully automated adult content detection and filtering

- Categorization into “black list” (access denied) and “white list” (access allowed) to speed up navigation

- If the site is not recorded on the "black list" or "white list" the engine will then analyse both the visual and

textual information and make a further decision on the sites access allowed/denied status. The black list/white list file is then updated.

<figure><img src="image_3.png" /><figcaption>Figure 1. WebGuard architecture.</figcaption></figure>

## 3.2. Adult Web sites classification

WebGuard is using data-mining both for text and image classification. The creation of a database for the data-mining process requires a large number of sites of each category: 1000 pornographic and 1000 non-pornographic sites were added to the data-base. Once the feature vectors of all the URLs have been constructed, the task is to use a classifier to categorize these URLs into two types: adult content URLs and non-adult content URLs.

## 3.3. Dictionary and weighting system

In WebGuard 2.0 the efficiency and quality of classification methods was improved by enhancing the dictionary that defines which words are sexually explicit: the richer the word base, the more accurate the data that is recovered by the parser. Its richness also depends on the different languages it addresses. This database contains English, French, Spanish and Italian words. Thus, the classification rules and the analysis of a site are more accurate.

In improved version of system "Webguard 2.0", several text classification methods are used (ID3, C4.5, SIPINA (with two different values for the admissibility constraint), and Improved C4.5) that can be combined in order to ensure a higher degree of accuracy. Three
methods were used for evaluating the performances of each algorithm: the random error rates method, cross-validation, and bootstrap. In order to determine whether a website is pornographic or not, we use a weighting method: each algorithm has a coefficient and the sum of these five coefficients is equal to one. For each algorithm, the system examines the web site and returns a Boolean value equal to one when the site is classified as pornographic and zero when it is classified as clean. Using the Boolean results from each algorithm and the weighting coefficient, we obtain a decimal number between zero and one. Higher final score results in the higher probability that the website is pornographic.

## 3.4. Textual and visual analysis

Most of the existing systems that rely only on URL and textual information can be readily outsmarted by adult content providers. Still, textual information remains the most significant index for fast filtering and will be used as the first stage in the detection and the filtering of contents of adult sites.

When our method of text based analysis is used WebGuard 2.0 is able to filter 94% of adult web sites. To improve the classification performance we use image analysis which is based on the skin color model. According to the percentage of skin color pixels in the image one can decide whenever the image is suspect or not. This increases accuracy more than 98%. We evaluated our technique using textual analysis only (A) and then textual + visual analysis using data-mining based skin-color model (B)[4]. For the purposes of our experiment we used 1000 web sites which were manually classified into adult and non-adult sets. Figure 2 shows the improvement of WebGuard system by the use of image analysis.

<figure><img src="image_4.png" /><figcaption>Figure 2. Comparison chart</figcaption></figure>

# 4. Face detection

## 4.1. Face detection in video

One of the central tasks in content-based video analysis is the construction of a face detection, tracking and recognition system. A solution consists of a representation of video appearance, with content descriptors providing information - such as the person's name, face position and orientation - on the frame. Human faces are one of the most important subjects in many types of videos, such as news, talk shows, and sitcoms[15]. Faces provide crucial visual clues that help us understand the content of the video, and it is very natural for the user to search for videos using faces. When the amount of available training data is large enough, sophisticated algorithms may be required to satisfy systems requirements. However, as a result of the World Wide Web and the proliferation of on-line video collections, the vision community today has access to video libraries of unprecedented size and richness. These large data sets can support simple, computationally efficient algorithms. In the past, several researchers have worked on face detection, tracking and recognition systems for video content indexing and analysis.

## 4.2. Experimental Evaluation

We performed two experiments and present the results here. All experiments were performed with video captured to files, so that pure performance (faster than real time) could be evaluated. The skin-color models used in experiments were: data-mining based (A), CRL [6] (B). We note that the face detection in video system was tuned for fast performance and some features were disabled. Meanwhile skin-color preprocessing takes less than 1% of total computational complexity; therefore the only parameter evaluated is a total number of detected persons per hour of video.

<table><caption>Table 1. Face detection in video using skin-color model.</caption><tr><td>Experimental conditions:</td><td>Video news (totally 10 TV channels European, US, Asian, Arabic, Africa and South America)</td></tr><tr><td>Duration</td><td>15 hours</td></tr><tr><td>Time interval</td><td>1 month</td></tr><tr><td>Correct face detection rate</td><td>A - 64 (B - 60) different persons per hour</td></tr><tr><td>False face detection rate</td><td>6 subjects per hour</td></tr></table>
<table><tr><td>Performance</td><td>Average fps - 100 (Intel Pentium 2.0 GH)</td></tr><tr><td>Minimum size</td><td>20x20 pixels</td></tr><tr><td>Maximum size</td><td>infinite</td></tr><tr><td>In plane Rotation freedom</td><td>Up to 25 degrees</td></tr></table>

<table><tr><td>Experimental conditions:</td><td>Full time French public TV (TF1,France2, France3, M6)</td></tr><tr><td>Duration</td><td>30 hours</td></tr><tr><td>Time interval</td><td>15 days</td></tr><tr><td>Correct face detection rate</td><td>A - 29 (B - 26) different persons per hour, A - 460 (B - 410) face pictures per hour</td></tr></table>

## 5. Conclusions

We have presented a new approach for skin-color modeling – a data-mining based skin-color model, which is a part of web based adult content detection and filtering and face detection in video systems. The method is able to automatically select from the most discriminative colorspaces and construct the most efficient skin-color model.

## 6. References

[1] A. Albiol, L. Torres, C.A. Bouman, and E. J. Delp, "A simple and efficient face detection algorithm for video database applications," in Proceedings of the IEEE International Conference on Image Processing, Vancouver, Canada, September 2000, vol. 2, pp. 239-242.

[2] L. Breiman, J. Friedman, R. Olshen, and C. Stone. Classification of Regression Trees. Wadsworth, 1984.

[3] U. M. Fayyad, S. G. Djorgovski, and N. Weir. Automating the analysis and cataloging of sky surveys. In U. Fayyad, G. Piatetsky, S. P. Smyth, and R. Uthurusamy, editors, Advances in Knowledge Discovery and Data Mining, pages 471-493. AAAI/MIT Press, 1996.

[4] M. Hammami, Y. Chahir, L. Chen, D. Zigbed, "Détection des régions de couleur de peau dans l'image" revue RIA-ECA vol 17, Ed.Hermès, ISBN 2-7462-0631-5, Janvier 2003, pp.219-231.

[5] M. Hammami, L. Chen, D. Zighed, Q. SONG, "Définition d'un modèle de peau et son utilisation pour la classification des images", Ed. Hermès, ISBN 2-7462-0500-9, Juin 2002, pp.186-197.

[6] M.J.Jones, J.M.Regh, "Statistical Color Models with application to Skin Detection", Cambridge Research Laboratory, CRL 98/11, 1998.

[7] J. R. Quinlan. Induction of decision trees. Machine Learning, 1:81-106, 1986.

[8] J. R. Quinlan. C4.5: Programs for Machine Learning. Morgan Kaufmann, 1993.

[9] S. Schüpp, Y. Chahir and A. Elmoataz, Extraction d'informations textuelles dans une vidéo par une approche morphologique robuste, International Conference on Vision Interface VI 2003, Canada.

[10] Y. Chahir et al., "Détection et extraction automatique de texte dans une vidéo: une approche par morphologie mathématique", MediaNet2002, Ed Hermès, pp :73 - 82, 2002.

[11] H. Wang and S-F. Chang, "A highly efficient system for automatic face region detection in mpeg video," IEEE Transactions on circuits and system for video technology, vol. 7, no. 4, pp. 615-628, August 1997.

[12] J. G. Wang and E. Sung, "Frontal-view face detection and facial feature extraction using color adn morphological operators," Pattern recognition letters, vol. 20, no. 10, pp. 1053-1068, October 1999.

[13] S. M. Weiss and C. A. Kulikowski. Computer Systems that Learn: Classification and Prediction Methods from Statistics, Neural Nets, Machine Learning, and Expert Systems. Morgan Kaufman, 1991.

[14] Ming-Hsuan Yang and Narendra Ahuja, "Detecting human faces in color images," in Proceedings of the International Conference on Image Processing, Chicago, IL, October 4-7 1998, pp. 127-130.

[15] D. Tsishkou, L. Chen, K. Peng "Face Detection, Tracking and Recognition in Video", Medianet'02, Ed. Hermès, ISBN 2-7462-0500-9, Juin 2002, pp. 83-89.

[16] D.A.Zighed "Méthodes d'apprentissage", Equipe de recherche en ingénierie des connaissances, Université lumière Lyon, Décembre 1997.

[17] D.A.Zighed et R. Rakotomala. A method for non arborescent induction graphs. Technical report, Laboratory ERIC, University of Lyon2, 1996.

[18] M. J. C. Van Gernert, Steven L. Jacques, H. J. C. M. Sterenborg, and W. M. Star. Skin optics. IEEE Transaction. on Biomedical Engineering, 36(12):1146-1154, December 1989.

[19] Symon D'Oyly Cotton and Ela Claridge. Do all human skin colors lie on a defined surface within LMS space? Technical Report CSR-96-01, School of Computer Science, Univ. of Birmingham, UK, Jan 1996.