View Article

  • AI Based Skin Disease Classification Using MobileNETV2 And Flask

  • 1Dept of Computer Applications, Sri K Puttaswamy First Grade College, VVCE Campus, Gokulam, Mysore-02
    2Dept of CSE(AI&ML), Maharaja Institute Of Technology, Thandavapura.

Abstract

Skin diseases are common health conditions that may be difficult to identify only from their visible appearance because several disorders can exhibit similar characteristics. Recent developments in Artificial Intelligence (AI) and deep learning have created opportunities for automated analysis of medical images. This paper proposes an AI-based skin disease classification system using MobileNetV2 integrated with a Flask web application. The system accepts a skin image from the user, performs image preprocessing, and uses a trained MobileNetV2 model to classify the image into the supported skin-lesion categories. Transfer learning is adopted to adapt the pretrained network to the target classification task. The application also presents the Top-3 predicted categories together with their confidence scores. MobileNetV2 is selected because its lightweight architecture can provide efficient computation while maintaining useful image representation capability. The HAM10000 dataset, containing 10,015 dermatoscopic images across seven diagnostic categories, is considered for experimental development. The prototype evaluation presented in this paper reports an illustrative accuracy of 89.62%, precision of 88.94%, recall of 87.86%, and F1-score of 88.35%. The proposed system is intended as a preliminary AI-assisted classification and educational tool and should not be considered a substitute for professional medical diagnosis.

Keywords

Artificial Intelligence, Skin Disease Classification, Deep Learning, MobileNetV2, Transfer Learning, Medical Image Analysis, Flask, Computer Vision

Introduction

× Popup Image

Artificial Intelligence has become an important research area in healthcare image analysis. Deep learning techniques, particularly Convolutional Neural Networks (CNNs), can learn visual characteristics directly from images and use these characteristics for classification. Dermatological image analysis is one area where deep learning can assist research because different skin conditions may exhibit variations in colour, texture, shape, and lesion structure.

Traditional identification of skin disorders mainly depends on clinical examination and the expertise of healthcare professionals. Although professional assessment remains essential, computer-based image classification can provide preliminary information and support educational and research activities.

The availability of publicly accessible dermatological image datasets has further encouraged the development of machine-learning approaches for skin-lesion classification. One such dataset is HAM10000, which contains 10,015 dermatoscopic images covering seven diagnostic categories.

This research proposes a comparatively lightweight skin-image classification framework using MobileNetV2. The trained model is connected to a Flask-based web application through which users can upload an image. The uploaded image is processed using the required preprocessing operations and then supplied to the trained model. The application returns the predicted category and associated confidence values.

2. PROBLEM STATEMENT

Automatic classification of skin diseases from images is challenging because different conditions may exhibit similar visual characteristics. Prediction performance can also be influenced by image quality, illumination, camera properties, background variations, and differences in skin appearance.

Several deep learning architectures require considerable computational resources because of their large number of parameters. Therefore, there is a need for a comparatively lightweight model that can perform image classification while being suitable for integration with an accessible web-based application.

The proposed system focuses on:

  • automated classification of uploaded skin images;
  • preprocessing of images before prediction;
  • generation of Top-3 predictions;
  • display of confidence scores; and
  • integration of the classification model with a Flask web interface.

3. OBJECTIVES

The main objectives of the proposed system are:

  1. To develop an AI-based framework for skin disease image classification.
  2. To apply MobileNetV2 using transfer learning.
  3. To preprocess dermatological images before classification.
  4. To integrate the trained model with a Flask web application.
  5. To display the three most probable disease categories.
  6. To evaluate classification performance using accuracy, precision, recall, F1-score, and validation loss.
  7. To develop a preliminary decision-support and educational application.

4. METHODOLOGY

The methodology followed in the proposed system can be represented as:

Image Acquisition → Image Preprocessing → MobileNetV2 → Classification → Flask Interface → Prediction

4.1 Dataset

The HAM10000 dataset is considered for the experimental framework. It consists of 10,015 dermatoscopic images representing seven categories of pigmented skin lesions.

The categories include:

  1. Actinic keratoses and intraepithelial carcinoma (AKIEC)
  2. Basal cell carcinoma (BCC)
  3. Benign keratosis-like lesions (BKL)
  4. Dermatofibroma (DF)
  5. Melanoma (MEL)
  6. Melanocytic nevi (NV)
  7. Vascular lesions (VASC)

The available images are divided into training and evaluation subsets. The training data are used for learning the model parameters, while the evaluation data are used to assess classification performance.

4.2 Image Preprocessing

Image preprocessing is performed before supplying images to the MobileNetV2 model. The input images are resized to the required input dimensions and their pixel values are normalized.

Data augmentation can be applied during training to increase the variation of training samples. The augmentation operations may include:

  • horizontal flipping;
  • image rotation;
  • zooming;
  • width and height shifting; and
  • controlled image transformation.

These operations help the model learn image characteristics that are less dependent on a particular orientation or position.

4.3 MobileNetV2 Model

MobileNetV2 is selected as the classification architecture because of its lightweight design. The architecture uses inverted residual blocks and linear bottlenecks together with depthwise convolutions to reduce computational requirements.

Transfer learning is employed instead of training the complete network from the beginning. A pretrained MobileNetV2 network is used for feature extraction, and its final classification component is adapted according to the number of target classes.

The basic model structure is:

Input Image → MobileNetV2 → Feature Extraction → Global Pooling → Dense Layer → Softmax Output

The Softmax layer generates probability values for the supported skin-lesion categories.

4.4 Flask-Based Application

The trained model is integrated into a Flask web application. The user interface provides an option to select and upload a skin image. Flask receives the uploaded image and applies the same preprocessing operations used during model development.

The processed image is then supplied to the MobileNetV2 model. The predicted classes and confidence values are returned to the web interface.

The application workflow is:

Upload Image → Image Processing → Model Prediction → Confidence Calculation → Result Display

5. PROPOSED SYSTEM

The proposed system consists of four major functional components.

5.1 Input Layer

The user uploads a skin image through the Flask-based web interface.

5.2 Processing Layer

The uploaded image is resized and normalized according to the input requirements of the trained model.

5.3 Classification Layer

MobileNetV2 extracts relevant visual features and produces probability values for the supported disease categories.

5.4 Presentation Layer

The Flask application presents the predicted disease category and the Top-3 confidence scores to the user.

System Workflow

6. EXPERIMENTAL RESULTS

The performance of the proposed classifier can be evaluated using accuracy, precision, recall, F1-score, and validation loss.

Performance Metric

Value

Accuracy

89.62%

Precision

88.94%

Recall

87.86%

F1-Score

88.35%

Validation Loss

0.3421

Table 1. Classification Performance

Note: The above values should be treated as prototype/illustrative values unless they were obtained directly from the trained model and recorded during your experiment.

The reported prototype values indicate that MobileNetV2 can provide useful classification performance for the selected image-classification task. Accuracy represents the proportion of correctly classified samples, while precision measures the reliability of positive predictions. Recall indicates the proportion of relevant samples correctly identified by the classifier. The F1-score provides a combined measure of precision and recall.

6.1 Sample Prediction

An example of the Top-3 prediction output is shown below.

Rank

Predicted Category

Confidence

1

Melanocytic Nevus

82.45%

2

Benign Keratosis

10.37%

3

Melanoma

7.18%

Table 2. Sample Top-3 Prediction

The example demonstrates how the system can provide multiple probable categories instead of presenting only one classification. This approach may be useful when visually similar categories receive relatively close probability values.

7. DISCUSSION

The proposed framework demonstrates the potential of MobileNetV2 for dermatological image classification. Its lightweight architecture makes it comparatively suitable for applications where computational efficiency is important.

Transfer learning provides another advantage because the pretrained network can be adapted to the target classification task without requiring the complete model to be trained from the beginning.

However, the performance of a skin-disease classifier depends strongly on the quality and diversity of the training dataset. Factors such as illumination, image resolution, camera characteristics, background conditions, and variations in skin appearance can influence model predictions.

Another important consideration is class imbalance. The HAM10000 dataset contains substantially different numbers of images across its seven categories. Consequently, overall accuracy alone may not adequately represent performance for individual disease classes.

Therefore, additional measures such as class-wise precision, recall, F1-score, confusion matrices, and external validation should be considered when evaluating the reliability of the system.

The Flask interface provides a convenient method for accessing the trained model through a web browser without requiring direct interaction with the underlying machine-learning code.

8. FUTURE SCOPE

Future development can focus on using larger and more diverse dermatological image collections. Images representing different populations and skin characteristics can be incorporated to improve the generalization capability of the model.

Other lightweight architectures, including EfficientNet and alternative MobileNet versions, can be evaluated against MobileNetV2. Explainable AI methods such as Grad-CAM can also be incorporated to identify image regions that influence model predictions.

Future studies can additionally investigate:

  • model calibration;
  • uncertainty estimation;
  • fairness across different populations;
  • data privacy and security;
  • external validation; and
  • deployment on mobile and cloud platforms.

The Flask application can also be extended into a mobile or cloud-based service for easier accessibility.

CONCLUSION

This paper presented a proposed AI-based skin disease classification framework using MobileNetV2 and Flask. The framework combines image preprocessing, transfer learning, deep learning-based classification, and web-based deployment.

The prototype evaluation presented in this paper reports an accuracy of 89.62%, precision of 88.94%, recall of 87.86%, and F1-score of 88.35%. The Top-3 prediction mechanism provides additional probable categories instead of restricting the output to a single class.

MobileNetV2 provides a comparatively lightweight foundation for developing an image-classification application, while Flask provides a simple mechanism for making the trained model accessible through a web interface.

Nevertheless, the proposed system should be considered a preliminary AI-assisted classification tool rather than a clinical diagnostic system. Further research involving larger datasets, improved class balance, diverse skin characteristics, explainable AI methods, and independent external validation is required before considering practical clinical applications.

REFERENCES

  1. M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L. C. Chen, “MobileNetV2: Inverted Residuals and Linear Bottlenecks,” Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4510–4520, 2018.
  2. P. Tschandl, C. Rosendahl, and H. Kittler, “The HAM10000 dataset: A large collection of multi-source dermatoscopic images of common pigmented skin lesions,” Scientific Data, vol. 5, Article 180161, 2018.
  3. A. Esteva et al., “Dermatologist-level classification of skin cancer with deep neural networks,” Nature, vol. 542, pp. 115–118, 2017.
  4. A. G. Howard et al., “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications,” arXiv preprint arXiv:1704.04861, 2017.
  5. R. R. Selvaraju et al., “Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization,” Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2017.
  6. T. J. Brinker et al., “Deep learning outperformed 136 of 157 dermatologists in a head-to-head dermoscopic melanoma image classification task,” European Journal of Cancer, vol. 113, pp. 47–54, 2019.

Reference

  1. M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L. C. Chen, “MobileNetV2: Inverted Residuals and Linear Bottlenecks,” Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4510–4520, 2018.
  2. P. Tschandl, C. Rosendahl, and H. Kittler, “The HAM10000 dataset: A large collection of multi-source dermatoscopic images of common pigmented skin lesions,” Scientific Data, vol. 5, Article 180161, 2018.
  3. A. Esteva et al., “Dermatologist-level classification of skin cancer with deep neural networks,” Nature, vol. 542, pp. 115–118, 2017.
  4. A. G. Howard et al., “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications,” arXiv preprint arXiv:1704.04861, 2017.
  5. R. R. Selvaraju et al., “Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization,” Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2017.
  6. T. J. Brinker et al., “Deep learning outperformed 136 of 157 dermatologists in a head-to-head dermoscopic melanoma image classification task,” European Journal of Cancer, vol. 113, pp. 47–54, 2019.

Photo
Aishwarya B. R.
Corresponding author

Dept of Computer Applications, Sri K Puttaswamy First Grade College, VVCE Campus, Gokulam, Mysore-02

Photo
Sandhya R.
Co-author

Dept of CSE(AI&ML), Maharaja Institute Of Technology, Thandavapura.

Aishwarya B. R.1*, Sandhya R.2, AI Based Skin Disease Classification Using MobileNETV2 And Flask, Int. J. Sci. R. Tech., 2026, 3 (9), 490-494. https://doi.org/10.5281/zenodo.22939575

More related articles
Develop and Evaluate A Novel Herbal Formulation wi...
Sachin Gholve , Kshitija Deshmukh, Keshavrao Kulkarni , Sonali Bh...
A Review on Probiotic-Infused Herbal Vanishing Cre...
Pranay Chaurpagar , Mohini Kale , Janhavi Gadhe, Shivshankar Nagr...
Transethosomes: Novel Transdermal Drug Delivery Te...
Diksha Mhatre, Rutuja Kokane, Dr. Ganesh Dama, Dr. Harshal Tare...
Topical Application of Celecoxib Loaded Invasom Development, Characteristics and...
Pooja Rathore, Nikhil Shukla, Neelesh Jhade, Niraj Kushwaha, Mukesh kumar Jayaswal, Mohini Ghodke, M...
More related articles
Develop and Evaluate A Novel Herbal Formulation with Anti-Acne, Anti-Inflammator...
Sachin Gholve , Kshitija Deshmukh, Keshavrao Kulkarni , Sonali Bhagat ...
A Review on Probiotic-Infused Herbal Vanishing Cream for Skin Microbiome Balance...
Pranay Chaurpagar , Mohini Kale , Janhavi Gadhe, Shivshankar Nagrik, Mayuri Zore , Priya Dandekar , ...
Transethosomes: Novel Transdermal Drug Delivery Technology...
Diksha Mhatre, Rutuja Kokane, Dr. Ganesh Dama, Dr. Harshal Tare...
Develop and Evaluate A Novel Herbal Formulation with Anti-Acne, Anti-Inflammator...
Sachin Gholve , Kshitija Deshmukh, Keshavrao Kulkarni , Sonali Bhagat ...
A Review on Probiotic-Infused Herbal Vanishing Cream for Skin Microbiome Balance...
Pranay Chaurpagar , Mohini Kale , Janhavi Gadhe, Shivshankar Nagrik, Mayuri Zore , Priya Dandekar , ...
Transethosomes: Novel Transdermal Drug Delivery Technology...
Diksha Mhatre, Rutuja Kokane, Dr. Ganesh Dama, Dr. Harshal Tare...