Skin cancer remains one of the most serious health concerns globally, and catching it early can make a dramatic difference in how well patients recover. Melanoma, which is the deadliest form of skin can- cer, has a survival rate of over 95% when caught early — but this drops to under 20% once it reaches an advanced stage. The problem is that current diagnosis depends heavily on dermatologists physically exam- ining each lesion, which is time-consuming, expensive, and simply not available to people living in rural or remote areas. On top of that, two different doctors looking at the same lesion can sometimes reach different conclusions. To tackle these challenges head-on, we set out to build something prac- tical and powerful — a fully automated deep learning system capa- ble of looking at a photograph of a skin lesion and determining what type it is, without any human intervention. To make this a reality, we turned to the HAM10000 dataset, a rich and well-established collection of 10,015 clinical dermatoscopic images covering seven different categories of skin lesions, which served as the backbone for training and refining our model. Rather than building a model from zero, we used EfficientNetB3— a convolutional neural network already trained on over a million gen- eral images — and adapted it for our specific task. This method is called ‘transfer learning’ and helped us achieve high scores in this way. Does well even with a comparatively small medical data collection. The model was trained in two steps. In the first stage, we kept the Effi- cientNetB3 We only trained our newly added classification layers on top of layers fixed. In the In the second stage, the top 80 layers of the base network were carefully unlocked, Continued training at a much reduced learning rate, enabling the model to learn better. Know the visual pat- terns of skin lesions in detail. One of the more challenging features of this dataset is that almost 67% of all images are nearly hidden by the rain.One of the more challenging features of this dataset is that almost 67% of all images are nearly hidden by rain. belong to just one class — common moles. This is a model that has not been corrected. This data is more prone to simply predicting moles for everything and to ignore rarer but more Tumors that are dangerous such as melanoma. This was addressed by repeating samples from With little more than 2000 training examples of each of the underrepresented classes, and by By using Focal Loss which forces the model to focus more on the cases it finds, chal- lenge, not take the easy way out. In addition, a variety of digital images were used. rotations, flips, brightness changes, etc. during training, and zoom — so the model would be robust towards the level of variability encountered in the real situation. real-world photographs.
All training was carried out on Kaggle’s free GPU environment, which brought our training time reduced, from what it used to take several hours to complete on a regular laptop to just a few hours. around 35 min- utes. When we were happy with the model’s performance we created a simple A web application built with Streamlit that allows for uploading a picture of a skin lesion by anyone and get it evaluated. get an immediate prediction – such as the type of lesion, a confidence score and A layman’s explanation of the meaning of the result. The application is deployed as a live application. On Streamlit Cloud, the trained model file is located on Google Drive and It automatically downloads at the application launch time.
Our best model had more than 70above 0.90 in all seven classes, which is a noteworthy improvement over a naive learner. A very simple clas- sifier that just classifies to the most popular class. Every stage of this work — from handling raw image data all the way through to deploying a live, usable application — has been built in a transparent and repro- ducible manner, with all resources made openly available to the research community.We really hope that what we are doing will be a starting point for something big. Our goal is that this will be an important first step, toward making a system that uses artificial intelligence to help with screening. We want the artificial intelligence assisted screening to become a reality. screening tools.
Introduction
The text describes a deep learning–based skin cancer detection system designed to improve early diagnosis, especially for melanoma, which is the most dangerous form of skin cancer. Early detection has a very high survival rate, but late diagnosis drastically reduces survival chances, highlighting the need for automated and accessible diagnostic tools.
Traditional diagnosis relies on dermatologists using dermatoscopes, but this approach is limited by shortage of specialists, subjective judgment, and accessibility issues, especially in rural regions. To address this, the study uses Convolutional Neural Networks (CNNs) and deep learning to automatically classify skin lesions using the HAM10000 dataset.
The proposed system:
Uses EfficientNetB3 (pre-trained on ImageNet) as the main feature extractor.
Applies transfer learning in two phases: feature extraction (frozen layers) and fine-tuning (unfrozen top layers).
Handles severe class imbalance using oversampling and Focal Loss.
Focuses on improving performance for rare but critical classes like melanoma.
The literature review shows the evolution of the field:
Early systems used handcrafted features + traditional ML (SVM, Random Forest, etc.), but had limited performance.
Deep CNNs significantly improved accuracy by learning features directly from images.
Transfer learning improves results when medical data is limited.
EfficientNet offers high accuracy with fewer parameters.
Class imbalance remains a major challenge in dermatology datasets.
The main research gap identified is that most existing works focus only on model accuracy and do not provide complete, user-friendly, deployable systems.
To address this, the proposed work develops an end-to-end pipeline, including:
Training and evaluation of the model
Handling imbalanced data
Deployment as a web-based application (Streamlit)
User-friendly image upload and prediction interface
Conclusion
This paper presents a complete end-to-end skin cancer detection and classifica- tion system built on EfficientNetB3 transfer learning applied to the HAM10000 dermatoscopic image dataset. The system addresses four principal challenges in this domain: limited labelled medical data, severe class imbalance across seven diagnostic categories, the need for high sensitivity on rare malignancies, and the requirement for practical public deployment. The two-phase transfer learn- ing (feature extraction and partial fine-tuning using cosine learning rate de- cay) allows for the effective transfer of visual representations without discarding them.The two-phase transfer learning (feature extraction and partial fine-tuning with cosine learning rate decay) allows the effective transfer of visual represen- tations without discarding them. With the Focal Loss (? = 2) and Class weight regularisation techniques, class imbalance is addressed by oversampling the mi- nority class to 2,000, which brings the overall accuracy from a baseline of 44% up to more than 70% in V2. The system performs well on the held-out test set with an AUC greater than 0.90 and clinically relevant melanoma recall of 74%. The trained model is then rolled out as a public web app using Streamlit that anyone with an internet connection can use to upload images and receive automated multi-class skin lesion classification and risk explanations in plain language and with confidence scores.
The deployment stack uses free tier ser- vices on Kaggle, Google Drive, GitHub and Streamlit Cloud, and shows that AI-powered diagnostic screening tools can be built and deployed for free, with zero infrastructure costs. Further research will focus on multimodal classification with patient metadata along with image features, increased training on datasets that feature a variety of skin tones, adding Grad-CAM visual explanations to improve interpretability, and conversion to TensorFlow Lite for offline mobile use in low connectivity areas.
References
[1] Esteva, B. Kuprel, R. A. Novoa, J. Ko, S. M. Swetter, H. M. Blau, and S. Thrun, “Dermatologist-level classification of skin cancer with deep neural networks,” Na- ture, vol. 542, no. 7639, pp. 115–118, 2017.
[2] N. C. F. Codella, D. Gutman, M. E. Celebi, B. Helba, M. A. Marchetti, S. W. Dusza et al., “Skin lesion analysis toward melanoma detection: ISIC 2017 challenge, dataset, and results,” in Proc. IEEE Int. Symp. Biomedical Imaging (ISBI), 2018.
[3] M. Tan and Q. V. Le, “EfficientNet: Rethinking model scaling for convolutional neural networks,” in Proc. 36th Int. Conf. Machine Learning (ICML), vol. 97, pp. 6105–6114, 2019.
[4] T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár, “Focal loss for dense object detection,” in Proc. IEEE Int. Conf. Computer Vision (ICCV), pp. 2980–2988, 2017.
[5] A. Mahbod, G. Schaefer, C. Wang, R. Ecker, and I. Ellinger, “Fusing fine-tuned deep features for skin lesion classification,” Computerized Medical Imaging and Graphics, vol. 71, pp. 19–29, 2019.
[6] P. Tschandl, C. Rosendahl, and H. Kittler, “The HAM10000 dataset, a large col- lection of multi-source dermatoscopic images of common pigmented skin lesions,” Scientific Data, vol. 5, article 180161, 2018.
[7] J. Yang, R. Shi, and B. Ni, “MedMNIST classification decathlon: A lightweight AutoML benchmark for medical image analysis,” in Proc. IEEE 18th Int. Symp. Biomedical Imaging (ISBI), 2021.
[8] B. Harangi, “Skin lesion classification with ensembles of deep convolutional neural networks,” Journal of Biomedical Informatics, vol. 86, pp. 25–32, 2018.
[9] I. González-Díaz, “DermaKNet: Incorporating the knowledge of dermatologists to convolutional neural networks for skin lesion diagnosis,” IEEE Journal of Biomed- ical and Health Informatics, vol. 23, no. 2, pp. 547–559, 2019.