Skip to article
AHFE AHFE Discoveries AHFE International Open Access Journal
AHFE OPEN ACCESS OPEN ACCESS CONFERENCE PROCEEDINGS PAPER

Detection of inappropriate images on smartphones based on computer vision techniques

1 North Technical University, Ibarra, 100150, Ecuador; National University of La Plata, La Plata, 1900, Argentina ↗
2 North Technical University, Ibarra, 100150, Ecuador ↗
Publication year
Digital Object Identifier10.54941/ahfe1001443

Abstract

In recent years, the use of smartphones in children and adolescents has increased by a considerable number and, therefore, the dangers faced by this population are increasing. Due to this, it is important to develop a technological solution that allows combat this problem by making use of computer vision. Through a bibliographic review, it has been detected those children and adolescents frequently view violent and pornographic images, this allowed us to build a dataset of this type of images to develop an artificial intelligence model. It was successfully developed under the training and validation phases using a google supercomputer (Google Colab), while for the testing phase it was implemented on an android mobile device, using screenshots, images were extracted that the screen projected, and thus later the results were analyzed under statistics using R studio. The computational model detected, with a large percentage of true positives, images and videos of a pornographic and violent nature captured from the screen resolution of a smartphone while the user was using it normally.

INTRODUCTION

Because more than 175,000 children connect to the internet every day for the first time, a new child every half second, becoming the most vulnerable of the risks and damages detected in cyberspace such as access to harmful content, exploitation, abuse sexual abuse, cyberbullying, and improper use of your private information, among others (Martinez, 2019).

Currently, there are parental control applications that allow restricting access to certain smartphone functionalities. Among them Spyzie that allows you to select the limit of access to the phone’s functionalities and that only a child can use (Hardzone.es, 2019).

However, Spyzie will not allow identifying certain specific content, such as the display of images and videos of a pornographic or violent nature on the smartphone screen.

© 2022. Published by AHFE Open Access. All rights reserved. 26

Detection of In-Appropriate Images on Smartphones Based on Computer Vision Techniques 27

Figure 1: Tiny-YOLO Convolutional Neural Network, minimized in convolutional layers.
Original PDF Figure 1:

The work (Allison, 2018), shows the investigation of risk content that chil- dren and adolescents have access through the use of the Internet, to apply parental control techniques, but does not develop a specific solution that starts the detection of forbidden content.

This research aims to know what information on the internet is considered a threat to children and adolescents, in addition, the search for a compu- ter vision algorithm that allows the detection of objects in real-time on a mobile device, to develop with these results an Android application to detect this type of content. To ensure the quality of the product, the operational characteristics of the object detector will be evaluated.

MATERIALS AND METHODS

Bibliographic Review For the theoretical basis of this project, a search for information was carried out in sources such as (F. de las N. U. para la I, 2017; Livingstone, 2019; United Nations, 2014; Catalina García et al., 2014; Jiménez Iglesias et al., 2015) which allowed knowing the risks that children and adolescents face when surfing the internet without any restriction, in addition, the investigati- ons of (Chaves et al., 2018; Redmon et al., 2016, Yin et al., 2016; Chaudhuri et al., 2017) were reviewed to know the operation and performance of the different computer vision algorithms to identify objects in real-time at same as optical character recognition.

As a result of the bibliographic review, it was obtained that the next step was to develop a computer vision model to identify pornographic and violent images from screenshots that the Android operating system emits automati- cally using the Tiny- Yolo algorithm already that allows recognizing objects in real-time, it is also necessary to implement it in a mobile application due to its reduced weight compared to Yolo and others.

Tiny-Yolo was selected due to its high speed to catch on mobile devices, although its problem would be the low detection accuracy, in this case, speed was prioritized over precision, however, the results are quite satisfactory. In the image below, created by (Redmon et al., 2016) we can see its features.

The images were acquired from the web that was later placed in a label assignment process before training the algorithm where bounding boxes are graphed to identify the objects of interest. For this, the LabelImg software

Figure 2: LabelImg allows the creation of bounding boxes to generate location coordinates of objects within an image.

Figure available in the original PDF paper.

was used, which easily allows to graph squares on the image to indicate the coordinates of the object that the algorithm should recognize, and because of this process, a text file is obtained for each image that is also compatible with Tiny- Yolo.

Dataset y Data Augmentation For this project, it was necessary to develop a dataset of pornographic and violent images so that the computer vision algorithm learns about the objects that it will later have to detect. Data augmentation techniques create more images from one, applying a certain variation in each one.

The techniques employed were anticlockwise rotate, rotate clockwise, horizontal flip, vertical flip, warp shift, adding noise, blurring the image, fill, clipped zoom. The number of images between pornographic and violent with which we worked was 36,340.

For the use of these techniques, scripts were developed in the Python programming language, implementing libraries such as: random, skimage, numpy, matplotlib, scipy, among others. For this, functions were created that receive the original image as arguments and then apply the necessary function to each one and as a result we will have the creation of a new image applied the selected technique and that will be stored in the device. Below we can see the implementation of this process.

Bounding Boxes The bounding boxes technique allows locating the object of interest within the image by coordinates and to facilitate this work the LabelImg software was used, which is a practical way to facilitate this work by generating as a product a text file with the respective location of the object.

Detection of In-Appropriate Images on Smartphones Based on Computer Vision Techniques 29

Figure 3: Computer features in Google Colab.
Original PDF Figure 3:

RESULTS

Algorithm Training For the development of the computer vision application, it was necessary to implement a neural network that allows the use of the Tiny-Yolo algorithm, in this case, Darknet, is an open-source framework that allows the use of the OpenCV library and allows the custom configuration of according to the data they used for training the computational model.

In addition, the Google cloud service Colab was used to execute the algori- thm training process since this type of execution requires high computational resources. The features about computer of google colab we can see it in the figure 3.

Sampling For the validation phase, it was necessary to determine the population sample using statistics in the following aspects:

  • The number of smartphones that should be evaluated considering 4 ver- sions of Android: 6, 7, 8, and 9, was resolved with the one-way ANOVA test to determine the number of individuals for each group, obtaining 108 individuals.
  • The number of images that would be evaluated on each mobile device was resolved with the multiple linear regression calculation, resulting in 50 images between positive and negative.

The operation flow of the application is visualized in figure 4.

Validation When developing a computer vision model, it is important to evaluate its performance, through the use of the confusion matrix, which also allows obtaining measurement metrics.

At the end of the tests carried out, a total of 2,700 positive images (porno- graphic and violent) and 2,700 negative images (they are not pornographic or violent) were obtained.

Figure 4: Detector operation flow on Android smartphone.
Original PDF Figure 4:
Figure 5: ROC curve of results.
Original PDF Figure 5:

Table 1 shows the results of the evaluation of the computer vision model. In addition, with the results obtained from the validation process, an analy- sis of the RUC curve was carried out, to project the trajectory of the results where the specificity and sensitivity are shown. The results are shown in Figure 5.

CONCLUSION

Pornography and images of violence are more viewed by children and ado- lescents when using a smartphone and not having any internet browsing control.

Detection of In-Appropriate Images on Smartphones Based on Computer Vision Techniques 31

Table 1. Confusion matrix Risk images.

Table available in the original PDF paper.

Tiny-Yolo is a real-time object detection system that is also lightweight and effective to incorporate into mobile devices.

The Tiny-Yolo object detection system is 93% accurate to identify por- nographic and violent images from a screenshot automatically taken by the Android operating system.

The detector has a Specificity of 95% indicating the percentage for the prediction of positive data and a Sensitivity of 75% for negative data.

The computer vision detector works on Android version 6, 7, 8, and 9 mobile smartphones.

The data augmentation technique allows increasing the initial image data- set, thus allowing the application to be trained with much more precision considering the various distortions that may exist in an image.

Labeling is to use software that allows the creation of bounding boxes within an image to obtain the coordinates of the objects.

REFERENCES

Allison, K., “Online Risks, Sexual Behaviors, and Mobile Technology Use in Early Adolescent Children: Parental Awareness, Protective Practices, and Mediation,” ProQuest Diss. Theses, p. 130, 2018. Catalina García, B., López de Ayala López, M. C., and García Jiménez, A., “Los

riesgos de los adolescentes en Internet: Los menores como actores y víctimas de los peligros de Internet,” Rev. Lat. Comun. Soc., vol. 69, pp. 462–485, 2014, doi: 10.4185/RLCS-2014-1020. Chaudhuri, A., Mandaviya, K., Badelia, P., and Ghosh, S. K., Optical Character Recognition Systems for Different Languages with Soft Computing, vol. 352, no. December. 2017. Chaves, D., Saikia, S., Fernández-Robles, L., Alegre, E., and Trujillo, M., “Una

Revisión Sistemática de Métodos para Localizar Automáticamente Objetos en Imágenes,” Rev. Iberoam. Automática e Informática Ind., vol. 15, no. 3, p. 231, 2018, doi: 10.4995/riai.2018.10229. F. de las N. U. para la I. UNICEF, Estado Mundial de la Infancia 2017. Niños en un mundo digital. 2017. Hardzone.es, “Spyzie: la mejor aplicación de control parental para iOS y Android,”

2019. [Online]. Available: https://hardzone.es/2019/04/11/spyzie-mejor-aplicacio n-control-parental-ios-android/. [Accessed: 18-Jul-2020].

Jiménez Iglesias, E., Garmendia Larrañaga, M., and Casado del Río, M. “Percepción de los y las menores de la mediación parental respecto a los riesgos en internet,” Rev. Lat. Comun. Soc., vol. 70, pp. 49–68, 2015, doi: 10.4185/RLCS-2015-1034. Livingstone, S. “EU Kids Online,” Int. Encycl. Media Lit., pp. 1–17, 2019, doi:

10.1002/9781118978238.ieml0065. Martinez, A., “La realidad del ciberacoso en Ecuador y cómo denunciarlo | Metro Ecuador,” 2019. [Online]. Available: https://www.metroecuador.com.ec/ec/estilo- vida/2019/05/10/telefonica-movistar-la-realidad-del-ciberacoso-en-ecuador-y-co mo-denunciarlo.html.[Accessed: 06-Jan-2020]. Redmon, Joseph F., Divvala S., Girshick, R., Farhadi, A. “(YOLO) You Only Look

Once,” Cvpr, 2016, doi: 10.1109/CVPR.2016.91. United Nations, “Derechos de la infancia en la era digital,” Desafíos Boletín la Infanc.

y Adolesc. sobre el Av. los Objet. Desarro. del Milen. Derechos la Infanc. en la era Digit., no. 18, pp. 1–12, 2014. Yin, X. C., Zuo, Z. Y., Tian, S., and Liu, C. L., “Text Detection, Tracking and Recognition in Video: A Comprehensive Survey,” IEEE Trans. Image Process., vol. 25, no. 6, pp. 2752–2773, 2016, doi: 10.1109/TIP.2016.2554321.

Cover of the proceedings volume Artificial Intelligence and Social Computing

Explore the complete digital volume

Artificial Intelligence and Social Computing

Read this individual research paper free through the original publisher, or explore the full digital proceedings book.

ISBN 978-1-958651-04-9

Explore this ISBN in the AHFE Bookstore Listed in the July 2026 bookstore catalogue; search by ISBN to confirm current availability · Digital book purchase optional

Explore Related Research

Related research 8 matches

More papers from this volume

← Back to Research ExplorerBrowse the full library →