In this chapter, we introduce the general framework of this project by explain-
ing the main existing challenges and problems that have pushed to find an engineering
solution. also we are going to define some dermatological and technical notions which we
will often talk about in my project.
1.2 Startup presentation
VISTASY is a Startup Providing High Quality Simulations for different fields.
The simulations quality is based on a combination of advanced cutting edge technology
in both Artificial Intelligence (Computer Vision) and Embedded Systems, Allowing us to
provides during consultation a High Quality Simulation without using the Standard 3D
1.3 Problem Statement
On the one hand, smooth, luminous and healthy skin is everyone’s dream to
maintain self-confidence. Good skin reflects that the owner is very concerned about their
personal health, as skin health is a useful marker of a person’s current state of health.
On the other hand, cosmetic products are a double-edged sword. Indeed, to
obtain an effective result with these products, it is necessary to use the product adapted
to our type of skin.
Figure 1.5: The Local Binary Gray Level Co-occurrence Matrix concept
1.5.4 Support Vector Machine
The objective of the support vector machine algorithm is to find a hyperplane
in an N-dimensional space(N:the number of features) that distinctly classifies the data
points. To separate the two classes of data points, there are many possible hyperplanes
that could be chosen. Our objective is to find a plane that has the maximum margin,
i.e the maximum distance between data points of both classes. Maximizing the margin
distance provides some reinforcement so that future data points can be classified with
Figure 1.6: Support Vector in Two dimensions
Nassim Hammami 8 Engineering internship report
1.5.5 Skin types
126.96.36.199 Normal skin
A well-balanced complexion is referred to as normal skin. This skin type does
not suffer from excessive dryness or oiliness. Acne, uneven skin tone, and large pores
are also not issues. This type of skin, also known as eudermic, indicates good blood
circulation and consistent sebum production.
Eudermic: the scientific term for healthy skin.
Result: Normal skin won’t feel tight or oily and it will have few imperfections.
Normal skin is characterized by:
• Limited sensitivity
• Few blemishes or imperfections
• Small pores
• Radiance and good circulation
Figure 1.7: Examples of normal skin
Nassim Hammami 9 Engineering internship report
188.8.131.52 Sensitive skin
Sensitive skin is inherited. Thinner, more delicate skin and blood vessels close
to the surface are common characteristics, which means you may get red more frequently.
Sensitive skin is a common condition that causes skin reactions such as redness
and itching. Most people with sensitive skin experience itching, burning, and stinging in
patches of skin on a regular or irregular basis. Sensitive skin is easily treated and may
necessitate a visit to the dermatologist.
The symptoms of sensitive skin include the following:
• Redness and irritation
• Uneven texture
Figure 1.12: Examples of sensitive skin
Nassim Hammami 13 Engineering internship report
First approach: Data mining
In this approach, we built an intelligent system capable of classifying facial skin
types using the concept of data mining.
This approach uses discrete wavelet transform (DWT), gray level co-occurrence
matrix (GLCM), local binary pattern (LBP) and binary local gray level co-occurrence
matrix (LBGLCM) to extract the features contained in the face image and uses a method
2.2 Data Mining
2.2.1 Description of the datasets
The basic dataset that we have is composed of 5 classes, which represents each
skin type. For each folder, we have a number of photos between 15 and 20.The number
of images per skin type is as follows:
• Normal: 20
• Oily : 20
• Dry : 20
• Combination : 20
• Sensitive : 16
we developed as a classifier to determine facial skin type.
In an effort to get a more accurate model, we seek to focus only on the region
of interest in the images, which is why we created other datasets.
184.108.40.206 face segmentation dataset
In this dataset, we transformed the image into two regions, a black region which
represents the non-facial region and the colored region which represents the facial region.
To obtain this result we used the landmarks provided by the Mediapipe library.
Figure 2.1: Face landmarks given by mediapipe library
Figure 2.2: Example of face segmentation
Nassim Hammami 15 Engineering internship report
Figure 2.5: Examples of results from Algorithm 1
Algorithm 2: GLCM features significance determination
for Skin in ( Skins ) do
; // skin:Normal, Oily, Dry ... //
for d in ( Distances ) do
for θ in ( Angles ) do
S ← 0;
for Image in ( Skin ) do
GLCM ← GLCM(Image, d, θ)
Contrast ← GLCM.Contrast; Correlation ← GLCM.Correlation
Homogeneity ← GLCM.Homogeneity
Dissimilarity ← GLCM.Dissimilarity
Energy ← GLCM.Energy
# − − − − − feature_best_parameters − − − −−
MinDistancefeature ← min(
for feature in [Features] do
Normal(featureList(d, θ)) − feature|,
|Dry(featureList(d, θ)) − feature|,
|Oily(featureList(d, θ)) − feature|,
|Combination(featureList(d, θ)) − feature|,
|Sensitive(featureList(d, θ)) − feature|
if skin = Right_skin then
S ← S + 1
significance = S / N
featuresig[(d, θ)] ← significance
Skins[skin] ← featuresig
Nassim Hammami 19 Engineering internship report
Second approach: Deep learning
In this approach we developed a deep learning model based on convolutional
neural network. we used the fastai library developed by M.Jeremy Howard.
3.2 Dataset description
In this approach we worked with a database that have a number of photos
between 900 and 1000 image per skin type.
3.3 the stages of classification
3.3.1 Creating datablocks and dataloaders
DataBlocks are blueprints on how to assemble data.Think of them as a pipeline
about how to manage your entire dataflow.
DataLoader are extensions of Pytorch’s DataLoader Class but with more func-
tionality and flexibility. They help as to investigate, clean, change and prepare our data
before, during and after building our deep learning model.we always need a DataLoader
to build your fastai model.This are the steps and the tricks that we used to create our
1. A trick often used in image classification is data augmentation. This means
one creates more data by manipulating existing data. For images this means that the
Figure 3.2: Loading the model
3.4.2 Find the optimal learning rate
In this step, the goal is to find the best learning rate that a) avoids overshooting
during stochastic gradient descent, and b) converges as a fast as possible. We are looking
for the spot in the graph where the line has the steepest slope. This means that the model
is improving the most with that learning rate.
Figure 3.3: finding the learning rate of the model
3.5 Fitting the learner
Model fitting is a measure of how well a machine learning model generalizes to
similar data to that on which it was trained.
Nassim Hammami 33 Engineering internship report
Figure 3.4: Fitting the model
3.6 Evaluate the results
In this step we see which classes our classifier is having the most identifying
correctly. We can have a look at the confusion matrix. It tells us which classes the model
Figure 3.5: The confusion matrix
Nassim Hammami 34 Engineering internship report
[B1] Sekolah Tinggi Bali, classification of facial skin type using discrete wavelet
transform, contrast, local binary pattern and support vector machine.
[B2] Dr. Punal, M. Arabi, Mrs. Gayathri Joshi, Rohith. N. Reddy, Anusha
S R, Categorising Normal Skin, Oily Skin and Dry Skin using 4-Connectivity and 8-
Connectivity Region Properties
[B3] Koushik Chandrasekaran, “2D-Discrete Wavelet Transformation and its ap-
plications in Digital Image Processing using MATLAB”,
[B4] Pawanpreet Kaur Harra, Deepak Aggarwal, Hybrid Approach for Face
Recognition Using DWT and LBP.
[B5] Ridha Ilyas Bendjillali, Mohammed Beladgham and Khaled Merit, Im-
proved Facial Expression Recognition Based on DWT Feature for Deep CNN.
[B6] Rafael C. Gonzalez, Richard E. Woods, Digital Image Processing, Fourth
[B7] Andreas Savakis, T. Tanaka, “Discrete wavelet transform core for image
Apparemment, vous utilisez un bloqueur de publicités qui est en cours d'exécution. En ajoutant SlideShare à la liste blanche de votre bloqueur de publicités, vous soutenez notre communauté de créateurs de contenu.
Vous détestez les publicités?
Nous avons mis à jour notre politique de confidentialité.
Nous avons mis à jour notre politique de confidentialité pour nous conformer à l'évolution des réglementations mondiales en matière de confidentialité et pour vous informer de la manière dont nous utilisons vos données de façon limitée.
Vous pouvez consulter les détails ci-dessous. En cliquant sur Accepter, vous acceptez la politique de confidentialité mise à jour.