Accurate multiclass classification of dermatoscopic images remains challenging because skin lesions often exhibit substantial visual similarity, considerable variation in color and morphology, and severe class imbalance. This study presents a hybrid deep learning framework that integrates ConvNeXt Tiny, pyramid pooling context modeling, and a hierarchical Swin Transformer for seven class skin lesion classification. The ConvNeXt branch extracts progressive local texture, color, and morphological representations, while the pyramid pooling module aggregates lesion context at spatial scales defined by pooling bins of 1, 2, 3, and 6. In parallel, the Swin Transformer branch models hierarchical spatial relationships and long range dependencies through shifted window attention. The three branch representations are globally pooled, projected into a shared 512 dimensional latent space, and combined using a learned gated attention mechanism that adaptively controls their contributions to the final prediction. The framework was evaluated on the HAM10000 dataset containing 10,015 dermatoscopic images from seven diagnostic categories. Images were partitioned at the lesion level into 7,010 training, 1,502 validation, and 1,503 testing samples to prevent information leakage between images of the same lesion. Class balanced focal loss, AdamW optimization, ImageNet normalization, and controlled image augmentation were used during training. The proposed model achieved an accuracy of 95.81%, balanced accuracy of 92.51%, macro precision of 92.64%, macro recall of 92.51%, macro F1 score of 92.58%, and macro area under the receiver operating characteristic curve of 99.01%. Ablation analysis showed progressive improvements after introducing pyramid pooling, Swin features, channel attention, and gated fusion, with a macro F1 increase of 3.21 percentage points over the ConvNeXt Tiny baseline. These findings indicate that complementary local, contextual, and global representations can improve image level skin lesion classification, particularly under substantial class imbalance.
Copyrights © 2023