Skip to main content
. 2022 Feb 26;22(5):1854. doi: 10.3390/s22051854
Algorithm 2: Diagnosis_Service
Input: skin_image
Output: P[p0, …,pC] ∈ R   //C is the number of skin disease classes
1   Function: get_diagnosis (skin_image)
2    Init: size ← model input dimension, std ← model normalization factor
     //Image pre-processing
3    skin_image ← skin_image.rsize(size, size)//Resize the image to size x size
4    img_array[size, size] ← convert_to_array(skin_image)//Convert image to an array
     //Normalization
5    For x in img_array
6       For y in img_array[x]
7          img_array[x, y] ← img_array[x, y]/std
8       End For
9    End For
     //Classification
10    model ← load_model() //load trained model
11    P ← model.predict(img_array)
12    Return P