Non-melanoma skin cancer (NMSC) classification faces challenges like severe data imbalance and the "black-box" nature of AI, limiting clinical trust. This study benchmarks four pre-trained convolutional models (ConvNeXt-Tiny, EfficientNetV2-S, DenseNet121, MobileNetV3-Large) for the imbalanced multi-class classification of Squamous Cell Carcinoma, Actinic Keratosis, and benign Nevus. Images were preprocessed using morphological hair removal and inpainting. The methodology integrated a 5-fold Stratified Group-KFold cross-validation, Focal Loss to address class imbalance, and Grad-CAM for Explainable AI (XAI) transparency. Results showed ConvNeXt-Tiny achieved the highest and most stable performance with a Balanced Accuracy of 76.98% (± 0.31 standard deviation) and a Macro F1-Score of 0.7513, significantly outperforming the other architectures. Grad-CAM confirmed the model's precise focus on pathological lesion borders. Ultimately, the optimal model was deployed as a real-time Streamlit web application, establishing a robust and practical clinical decision-support system.
Copyrights © 2026