Optimizing Deep Learning for Skin Cancer Classification: A Computationally Efficient CNN with Minimal Accuracy Trade-Off
Abdullah Al Mamun, Pollob Chandra Ray, Md Rahat Ul Nasib, Akash Das, Jia Uddin, Md Nurul Absur
TL;DR
The paper tackles the challenge of deploying skin cancer classifiers in resource-constrained settings by reducing the computational burden of state-of-the-art transfer-learning models. It compares a ResNet50-based transfer-learning baseline to a lightweight custom CNN, achieving a 96.7% reduction in parameters and a 99.2% reduction in FLOPs while maintaining near-parity in accuracy on the HAM10000 dataset. Specifically, ResNet50+TL reaches about $89.08\%$ accuracy with $4.00\text{B}$ FLOPs, whereas the proposed CNN achieves around $87.05\%$ accuracy with only $30.04\text{M}$ FLOPs, accompanied by substantial training and inference speedups. These findings demonstrate a favorable accuracy-efficiency trade-off for mobile/edge dermatology diagnostics and point to future work in quantization and pruning to push efficiency further.
Abstract
The rapid advancement of deep learning in medical image analysis has greatly enhanced the accuracy of skin cancer classification. However, current state-of-the-art models, especially those based on transfer learning like ResNet50, come with significant computational overhead, rendering them impractical for deployment in resource-constrained environments. This study proposes a custom CNN model that achieves a 96.7\% reduction in parameters (from 23.9 million in ResNet50 to 692,000) while maintaining a classification accuracy deviation of less than 0.022\%. Our empirical analysis of the HAM10000 dataset reveals that although transfer learning models provide a marginal accuracy improvement of approximately 0.022\%, they result in a staggering 13,216.76\% increase in FLOPs, considerably raising computational costs and inference latency. In contrast, our lightweight CNN architecture, which encompasses only 30.04 million FLOPs compared to ResNet50's 4.00 billion, significantly reduces energy consumption, memory footprint, and inference time. These findings underscore the trade-off between the complexity of deep models and their real-world feasibility, positioning our optimized CNN as a practical solution for mobile and edge-based skin cancer diagnostics.
