Automatic Nipple Detection Using Shape and Statistical Skin Color Information

Automatic Nipple Detection Using Shape and Statistical Skin Color Information Yue Wang, Jun Li, HeeLin Wang, and ZuJun Hou Institute for Infocomm Rese...
6 downloads 0 Views 1MB Size
Automatic Nipple Detection Using Shape and Statistical Skin Color Information Yue Wang, Jun Li, HeeLin Wang, and ZuJun Hou Institute for Infocomm Research A*Star (Agency for Science, Technology and Research), Singapore {ywang,stulj,hlwang,zhou}@i2r.a-star.edu.sg

Abstract. This paper presents a new approach on nipple detection for adult content recognition, it combines the advantage of Adaboost algorithm that is rapid speed in object detection and the robustness of nipple features for adaptive nipple detection. This method first locates the potential nipple-like region by using Adaboost algorithm for fast processing speed. It is followed by a nipple detection using the information of shape and skin color relation between nipple and non-nipple region. As this method uses the nipple features to conduct the adult image detection, it can achieve more precise detection and avoids other methods that only detect the percentage of exposure skin area to decide whether it is an adult image. The proposed method can be also used for other organ level detection. The experiments show that our method performs well for nipple detection in adult images. Keywords: Pornographic image, adult image, obscene image, nipple detection, naked image detection.

1 Introduction There are a huge number of adult images that can be freely accessed in multimedia documents and databases through Internet. To protect children, detection and blocking the obscene images and videos received more and more concern. Automatic recognition of pornographic images has been studied by some researchers. Current methods can be briefly classified into two kinds [1]: (1) Skin-based detection and (2) Feature-based detection. Skin-based methods focus on skin detection. Many skin models have been developed based on color histogram [1], chromatic distribution [2], color and texture information [3][5][6][8][9]. After skin region has been detected, perform one of below detections: (a) Model-based detection [3] which is using a geometrical model to describe the structure or shape of human body; (b) Region-based detection which extracts features for recognition based on the detected skin regions. These features include contour and contour-based features [1][8], shape features [2][6], a series of features [9] from each connected skin region: color, texture, and shape, etc. Featurebased methods focus on using the features directly extracted in the images. These features include normalized central moments and color histogram [4], shape feature S. Boll et al. (Eds.): MMM 2010, LNCS 5916, pp. 644–649, 2010. © Springer-Verlag Berlin Heidelberg 2010

Automatic Nipple Detection Using Shape and Statistical Skin Color Information

645

(Compactness descriptor) [7], etc. These methods tend to use a global matching rather than a local matching. All existing methods mentioned above suffer from a fundamental problem that they did not conduct the detection at the organ (object) level. A certain percentage of skin detected over the whole image or a human body does not mean it is a naked adult image. To make a correct judgment, the basic rule is checking whether the female nipples, male and female private parts are exposure into the image. The only paper can be found in literature that detects the sex organ is in [10] for nipple detection. This method conducted the skin detection first, and then performed the nipple detection using self-organizing map neural network. They claimed that the correct nipple detection rate is 65.4%. This paper focuses on nipple detection in images. It is a fundament step in pornography image detection. Our method is an organ model driven, that means we emphasize the features of organ to be detected. In nipple detection, shape and skin are the most important features for nipple appearance. Therefore, in the real application, both of them should be combined for detection, at least play the same important role. Our method consists of two stages: (1) (2)

Rapid locating for potential nipple region. Adaboost algorithm with Haar-like features is used to rapidly locate the possible nipple regions. Nipple detection which combines shape and skin statistical information is applied to determine whether the located regions from stage 1 are the real nipples.

The remaining structure of this paper is arranged as follows. Section 2 briefly introduces the Adaboost algorithm with Haar-like features and its application in searching the possible nipple region. Section 3 describes the details of the nipple model for nipple detection. Experimental results and discussion are presented in Section 4. Finally, the conclusion of this paper is presented in Section 5.

2 Rapid Locating for Possible Nipple Region Adaboost algorithm is first proposed in [11] for fast face detection with the Haar-like features which are based on computing the gray level values within rectangle boxes. The Adaboost algorithm takes as input of a training set of positive and negative samples and then constructs a cascade detector as linear combination of simple and weak classifiers. It can achieve a fast processing speed by using integral image. In our Adaboost training proceeding, we are using 638 single nipple images as positive samples, 19370 images as negative samples. Some nipple samples from positive training set are shown in Fig. 1(a). The trained Adaboost detector contains 16 stages with 257 weak classifiers. Adaboost algorithm may not always get a correct detection. We found that there are some false alarms in Adaboost nipple detection. Fig. 1(b) shows two examples. The red boxes indicated in Fig. 1(b) are the results from Adaboost algorithm. There are total 4 regions that have been located as possible nipple regions. However, two of them are false results, the regions of eye and belly button are wrongly detected as nipple. This is because Haar-features calculate the summary grey values within the rectangle box, the detail clues in these boxes are lost. To remove such false nipples regions, a further nipple detection is applied following. The details are showed in next section.

646

Y. Wang et al.

(a)

(b)

Fig. 1. (a) Some nipple samples from training set. (b) Nipple detection results in Adaboost algorithm. Red boxes without cross sign are the correct results from Adaboost algorithm, while the red boxes with cross sign are the false alarms detected that are removed in section 3.

3 Nipple Detection A filter which is using the nipple skin statistical information is developed to remove the false nipple detected in Adaboost. First the statistical information of skin color relation between nipple and region surrounding nipple has to be extracted, and then this information is used to filter off the non-nipple region detected in last stage. 3.1 Color Statistical Information Extraction for Nipple Skin Here we focus on the red and green components in nipple regions, as the statistical information shows that the red and green have a related significant difference between the nipple and non-nipple skin. We are using the same nipple images that have been used as the positive samples in Adaboost training. We first extract the standard deviation of gray values of pixels in nipple and non-nipple skin, and then extract means and distributions of (Rsur - Rnip) and (Gsur - Gnip) / (Rsur - Rnip), here nip and sur denote the nipple and non-nipple region. It can be observed that the nipple skin contains more R component compared with non-nipple skin, but it is reversed for G component. The extracted information is used to determine the thresholds used in the nipple detection algorithm presented in next section. 3.2 Nipple Detection Algorithm The results from Adaboost algorithm are fed into this detection. The color and gray information are used in this stage. It involves few steps list below:

Automatic Nipple Detection Using Shape and Statistical Skin Color Information

(a)

(b)

(c)

(d)

(e)

(f)

647

(g)

Fig. 2. Create the templates for nipple and ring region surrounding nipple. (a) Input image for stage 1. (b) Canny edge detection. (c) Connect broken boundaries and remove spur. (d)(e) Templates of sampling region for nipple. (f)(g) Sampling region for nipple region.

(1) (2)

Conduct Canny edge detection for input from stage 1, see Fig. 2(a)(b). Clean the small size objects and then fill holes for remained object, see Fig. 2(c). (3) Get the biggest object from the remained objects and check the ratio of its width and height. If the ratio is not in a certain range, will judge it as a fake nipple region and Stop. Otherwise, assume it is a nipple pattern and go to next step. (4) Form the templates for sampling the nipple region and the region surrounding nipple, see Fig. 2(d)(e). (5) The template for the ring region surrounding nipple is created from the templates of nipple by dilating and subtraction. Calculate the standard deviations (stdnip, stdsur) of those pixels in nipple region and the ring region surrounding nipple in their grey images, respectively. If anyone of (stdnip, stdsur) exceeds a certain range which is extracted in section 3.1, judge it as a fake nipple and Stop. (6) Calculate the mean values (Mnip, Msur) for R, G, B components of those pixels in nipple and the ring region surrounding nipple in their color images, respectively. Here denote Mnip=( Rnip, Gnip, Bnip) and Msur=( Rsur, Gsur, Bsur). In order to be a true nipple, all of conditions listed below must be satisfied: (i) (Rsur - Rnip)/ Rsur < Threshold0; (ii) Threshold1 >(Gsur - Gnip)/( Rsur - Rnip) > Threshold2; Based on the extracted statistical information in section 3.1, the Threshold0, Threshold1 and Threshold2 are set to 0, 0.57 and -1.34, respectively. The red boxes with cross sign in Fig. 1(b) show the removed nipple regions based on above algorithm. From there it can be observed that although some false nipple regions have been located in stage 1 of our method, they can be filtered out in stage 2.

4 Experimental Results and Discussions The above algorithm has been simulated by using Matlab codes and tested to pornographic images downloaded from Internet. A database of 980 images, which consists of 265 images with 348 labeled nipples and 715 non-nipple images, is used for testing. Fig. 3 shows some results of nipple detection. Table 1 presents the experimental results for this testing database. There are 75.6% of nipples have been corrected detected but 24.4% missing. Those results presented in [10] which are 65.4% and 34.6%, respectively. However, it is hard to compare as we are not using the same dataset for testing.

648

Y. Wang et al. Table 1. Experimental result for testing

Total images Nipple images Non-nipple images Total Nipples Detected nipples Missing nipples False Detection

Number 980 265 715 348 263 85 170

Percentage (%)

263 / 348 = 75.6 % 85 / 348 = 24.4 % 170 / 980 = 0.174 /per frame

(a)

(b)

(c)

(d)

(e)

(f)

Fig. 3. Some results in nipple detection. (a)-(d) Correct detection, red boxes show the nipple detected; (e) Belly button is wrongly detected as nipple. Right nipple is not located in Adaboost algorithm. (f) Left nipple is judged as a fake nipple in stage 2 due to half of its region is in the shadow. The red boxes with cross sign are determined as the false nipples in stage 2.

The false detection in our method is still need to be reduced, as there are total 170 false alarms have been detected, false rate is 0.174/per frame. Two samples of false detections are showed in Fig. 3(e)(f). It can be observed that the belly button (Fig. 3(e))

Automatic Nipple Detection Using Shape and Statistical Skin Color Information

649

sometime is still confusing our algorithm due to the similar shape and appearance with nipple. The shadow (Fig. 3(f)) may also cause a wrong decision in stage 2 of our method due to half of its region is in the shadow.

5 Conclusion This paper presents a two-stage nipple detection algorithm for adult images inspection. It is using nipple features for organ level detection. In the first stage, Adaboost algorithm is applied to fast locate the potential nipple regions. In the second stage, a nipple model is implemented to further confirm the real nipple from the results of first stage. This nipple model includes the shape and skin color information of nipple and the skin surrounding nipple to effectively detect real nipple in the images. The proposed method was tested for finding the nipple in the real images, the experimental results show the efficient and accuracy of the proposed algorithm. Our future work will focus on the following aspects to improve our method: (1) A dual-threshold or multi-threshold can be applied in Adaboost to reduce the false detection in stage 1 of proposed method. (2) Color information can be involved in Adaboost. (3) To fully judge whether an image is pornography, the private part of human body must be detected as well. A different model has to be constructed for this purpose.

References 1. Hu, W., Wu, O., Chen, Z., Fu, Z., Maybank, S.: Recognition of Pornographic Web Pages by Classifying Texts and Images. IEEE Transactions on Pattern Analysis and Machine Intelligence 29(6), 1019–1034 (2007) 2. Lee, J.-S., Kuob, Y.-M., Chung, P.-C., Chen, E.-L.: Naked Image Detection Based on Adaptive and Extensible Skin Color Model. Pattern Recognition 40, 2261–2270 (2007) 3. Forsyth, D.A., Fleck, M.M.: Automatic Detection of Human Nudes. International Journal of Computer Vision 32(1), 63–77 (1999) 4. Wang, J.Z., Li, J., Wiederhold, G., Firschein, O.: System for Screening Objectionable Images. Computer Comm. 21(15), 1355–1360 (1998) 5. Zhu, H., Zhou, S., Wang, J., Yin, Z.: An Algorithm of Pornographic Image Detection. In: IEEE Fourth International Conference on Image and Graphics 2007, pp. 801–804 (2007) 6. Zheng, Q.-F., Zeng, W., Wen, G., Wang, W.-Q.: Shape-based Adult Images Detection. In: Proceedings of the Third International Conference on Image and Graphics, pp. 150–153 (2004) 7. Shih, J.-L., Lee, C.-H., Yang, C.-S.: An Adult Image Identification System Employing Image Retrieval Technique. Pattern Recognition Letter 28, 2367–2374 (2007) 8. Yang, J., Fu, Z., Tan, T., Hu, W.: A Novel Approach to Detecting Adult Images. In: 17th International Conference on Pattern Recognition 2004, pp. 479–482 (2004) 9. Arentz, W.A., Olstad, B.: Classifying Offensive Sites Based on Image Content. Computer Vision and Image Understanding 94(1-3), 295–310 (2004) 10. Fuangkhon, P., Tanprasert, T.: Nipple Detection for Obscene Pictures. In: Proc. of the 5th Int. Conf. on Signal, Speech and Image Processing, Greece, August 2005, pp. 315–320 (2005) 11. Viola, P., Jones, M.: Rapid Object Detection Using A Boosted Cascade of Simple Features. In: Proc. of IEEE Conference on Compter Vision and Pattern Recognition, USA, pp. 511–518 (2001)

Suggest Documents