A Sequential Segmentation and Classification Learning Approach for Skin Lesion Images
Source abstract
Abstract
This study investigates how the learning order between segmentation and classification tasks influences performance and generalization in medical image analysis. We propose a Sequential Swin Transformer framework that reuses a shared Transformer backbone with alternating task-specific heads to compare two sequential strategies: (i) segmentation followed by classification and (ii) classification followed by segmentation. Unlike conventional multitask or preprocessing-based pipelines, the proposed framework isolates the impact of task ordering on feature transfer under an identical architecture. Evaluated on the HAM10000 skin lesion dataset, the segmentation-then-classification configuration achieves the highest multiclass accuracy (up to 86.9%) while maintaining strong segmentation performance (Jaccard index ≈ 86%). Statistical tests confirm its superiority in accuracy and macro F1 score, whereas Grad-CAM and t-distributed stochastic neighbor embedding (t-SNE) analyses reveal that segmentation-first training yields more lesion-centered attention and a more discriminative latent space. Cross-domain evaluation on gastrointestinal endoscopy images further demonstrates robust segmentation (Jaccard index ≈ 91%) and multiclass accuracy (≈94.5%), confirming the generalizability of the sequential paradigm. Overall, the proposed method provides a theoretically grounded, clinically interpretable, and reproducible alternative to joint multitask learning approaches, enhancing feature transfer and generalization in medical imaging.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Cutaneous Melanoma Detection and Management · AI in cancer detection · Advanced Neural Network Applications
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of Theoretical and Applied Science, University of Insubria, 21100 Varese, Italy
References (56)
Show source-provided references
1. Waseh, S., and Lee, J.B. (2023). Advances in melanoma: Epidemiology, diagnosis, and prognosis. Front. Med., 10.10.3389/fmed.2023.1268479 ↗
2. Woo, Y.R., Cho, S.H., Lee, J.D., and Kim, H.S. (2022). The human microbiota and skin cancer. Int. J. Mol. Sci., 23.10.3390/ijms23031813 ↗
3. Melanoma10.1016/S0140-6736(18)31559-9 ↗
4. A Large Dataset to Enhance Skin Cancer Classification with Transformer-Based Deep Neural Networks10.1109/ACCESS.2024.3439365 ↗
5. The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions10.1038/sdata.2018.161 ↗
6. Gallazzi, M., Rehman, A.U., Corchs, S., and Gallo, I. (2025, January 24–26). Improving Classification in Skin Lesion Analysis Through Segmentation. Proceedings of the 14th International Conference on Pattern Recognition Applications and Methods, Beijing, China.10.5220/0013247900003905 ↗
7. Convolutional neural networks for medical image analysis: Full training or fine tuning?10.1109/TMI.2016.2535302 ↗
8. Joint segmentation and classification of skin lesions via a multi-task learning convolutional neural network10.1016/j.eswa.2023.120174 ↗
9. Mustafa, S., Jaffar, A., Rashid, M., Akram, S., and Bhatti, S.M. (2025). Deep learning-based skin lesion analysis using hybrid ResUNet++ and modified AlexNet-Random Forest for enhanced segmentation and classification. PLoS ONE, 20.10.1371/journal.pone.0315120 ↗
10. Khan, M.A., Sharif, M., Akram, T., Damaševičius, R., and Maskeliūnas, R. (2021). Skin lesion segmentation and multiclass classification using deep learning features and improved moth flame optimization. Diagnostics, 11.10.3390/diagnostics11050811 ↗
11. Chattopadhay, A., Sarkar, A., Howlader, P., and Balasubramanian, V.N. (2018, January 12–15). Grad-cam++: Generalized gradient-based visual explanations for deep convolutional networks. Proceedings of the 2018 IEEE Winter Conference on Applications of Computer Vision (WACV), IEEE, Lake Tahoe, NV, USA.10.1109/WACV.2018.00097 ↗
12. Codella, N.C., Gutman, D., Celebi, M.E., Helba, B., Marchetti, M.A., Dusza, S.W., Kalloo, A., Liopyris, K., Mishra, N., and Kittler, H. (2018, January 4–7). Skin lesion analysis toward melanoma detection: A challenge at the 2017 international symposium on biomedical imaging (isbi), hosted by the international skin imaging collaboration (isic). Proceedings of the 2018 IEEE 15th International Symposium on Biomedical Imaging (ISBI 2018), Washington, DC, USA.10.1109/ISBI.2018.8363547 ↗
13. Pogorelov, K., Randel, K.R., Griwodz, C., Eskeland, S.L., de Lange, T., Johansen, D., Spampinato, C., Dang-Nguyen, D.T., Lux, M., and Schmidt, P.T. (2017, January 20–23). Kvasir: A multi-class image dataset for computer aided gastrointestinal disease detection. Proceedings of the 8th ACM on Multimedia Systems Conference, Taipei, Taiwan.10.1145/3083187.3083212 ↗
14. Chen, L.C., Zhu, Y., Papandreou, G., Schroff, F., and Adam, H. (2018, January 8–14). Encoder-decoder with atrous separable convolution for semantic image segmentation. Proceedings of the European conference on computer vision (ECCV), Munich, Germany.10.1007/978-3-030-01234-2_49 ↗
15. Optimized Skin Lesion Segmentation: Analysing DeepLabV3+ and ASSP Against Generative AI-Based Deep Learning Approach10.1007/s10699-024-09957-w ↗
16. CA-Net: Comprehensive attention convolutional neural networks for explainable medical image segmentation10.1109/TMI.2020.3035253 ↗
17. FAT-Net: Feature adaptive transformers for automated skin lesion segmentation10.1016/j.media.2021.102327 ↗
18. Wang, J., Wei, L., Wang, L., Zhou, Q., Zhu, L., and Qin, J. (October, January 27). Boundary-aware transformers for skin lesion segmentation. Proceedings of the Medical Image Computing and Computer Assisted Intervention–MICCAI 2021: 24th International Conference, Strasbourg, France. Proceedings, Part I 24.10.1007/978-3-030-87193-2_20 ↗
19. Hu, M., Li, Y., and Yang, X. (2023). Skinsam: Empowering skin cancer segmentation with segment anything model. arXiv.
20. Dermatologist-level classification of skin cancer with deep neural networks10.1038/nature21056 ↗
21. An enhanced technique of skin cancer classification using deep convolutional neural network with transfer learning models
22. Datta, S.K., Shaikh, M.A., Srihari, S.N., and Gao, M. (2021, January 27). Soft attention improves skin cancer classification performance. Proceedings of the Interpretability of Machine Intelligence in Medical Image Computing, and Topological Data Analysis and Its Applications for Medical Data: 4th International Workshop, iMIMIC 2021, and 1st International Workshop, TDA4MedicalData 2021, Held in Conjunction with MICCAI 2021, Strasbourg, France. Proceedings 4.
23. Multiclass skin lesion classification in dermoscopic images using swin transformer model10.1007/s00521-022-08053-z ↗
24. Xin, C., Liu, Z., Zhao, K., Miao, L., Ma, Y., Zhu, X., Zhou, Q., Wang, S., Li, L., and Yang, F. (2022). An improved transformer network for skin cancer classification. Comput. Biol. Med., 149.10.1016/j.compbiomed.2022.105939 ↗
25. Combalia, M., Codella, N.C., Rotemberg, V., Helba, B., Vilaplana, V., Reiter, O., Carrera, C., Barreiro, A., Halpern, A.C., and Puig, S. (2019). Bcn20000: Dermoscopic lesions in the wild. arXiv.
26. FixCaps: An improved capsules network for diagnosis of skin cancer10.1109/ACCESS.2022.3181225 ↗
27. DeepSkin: A deep learning approach for skin cancer classification10.1109/ACCESS.2023.3274848 ↗
28. Yang, J., Wang, J., Zhang, G., and Li, Y. (2024). Selecting the best sequential transfer path for medical image segmentation with limited labeled data. arXiv.10.1007/978-981-96-6594-5_14 ↗
29. Segmentation and classification of skin lesions using hybrid deep learning method in the Internet of Medical Things10.1111/srt.13524 ↗
30. Wang, Y., Su, J., Xu, Q., and Zhong, Y. (2023). A collaborative learning model for skin lesion segmentation and classification. Diagnostics, 13.10.3390/diagnostics13050912 ↗
31. A multi-task learning framework for automated segmentation and classification of breast tumors from ultrasound images10.1177/01617346221075769 ↗
32. Dual-stage segmentation and classification framework for skin lesion analysis using deep neural network10.1177/20552076251351858 ↗
33. Himel, G.M.S., Islam, M.M., Al-Aff, K.A., Karim, S.I., and Sikder, M.K.U. (2024). Skin cancer segmentation and classification using vision transformer for automatic analysis in dermatoscopy-based noninvasive digital system. Int. J. Biomed. Imaging, 2024.10.1155/2024/3022192 ↗
34. Jha, D., Smedsrud, P.H., Riegler, M.A., Halvorsen, P., De Lange, T., Johansen, D., and Johansen, H.D. (2020, January 5–8). Kvasir-seg: A segmented polyp dataset. Proceedings of the MultiMedia modeling: 26th International Conference, MMM 2020, Daejeon, Republic of Korea. Proceedings, Part II 26.
35. Dumitru, R.G., Peteleaza, D., and Craciun, C. (2023). Using DUCK-Net for polyp image segmentation. Sci. Rep., 13.10.1038/s41598-023-36940-5 ↗
36. Vezakis, I.A., Georgas, K., Fotiadis, D., and Matsopoulos, G.K. (2024). EffiSegNet: Gastrointestinal Polyp Segmentation through a Pre-Trained EfficientNet-based Network with a Simplified Decoder. arXiv.10.1109/EMBC53108.2024.10782015 ↗
37. Spatial-attention ConvMixer architecture for classification and detection of gastrointestinal diseases using the Kvasir dataset10.1007/s13755-024-00290-x ↗
38. Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., and Guo, B. (2021, January 10–17). Swin transformer: Hierarchical vision transformer using shifted windows. Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada.10.1109/ICCV48922.2021.00986 ↗
39. Codella, N., Rotemberg, V., Tschandl, P., Celebi, M.E., Dusza, S., Gutman, D., Helba, B., Kalloo, A., Liopyris, K., and Marchetti, M. (2019). Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the international skin imaging collaboration (isic). arXiv.
40. (2025, May 20). 2018, I.C. HAM10000 Test Set Release. Available online: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/DBW86T.
41. Training on polar image transformations improves biomedical image segmentation10.1109/ACCESS.2021.3116265 ↗
42. Aladhadh, S., Alsanea, M., Aloraini, M., Khan, T., Habib, S., and Islam, M. (2022). An effective skin cancer classification mechanism via medical vision transformer. Sensors, 22.10.3390/s22114008 ↗
43. A deep learning based architecture for multi-class skin cancer classification10.1007/s11042-024-19817-1 ↗
44. Jain, S., Singhania, U., Tripathy, B., Nasr, E.A., Aboudaif, M.K., and Kamrani, A.K. (2021). Deep learning-based transfer learning for classification of skin cancer. Sensors, 21.10.3390/s21238142 ↗
45. A multi-class skin Cancer classification using deep convolutional neural networks10.1007/s11042-020-09388-2 ↗
46. Shetty, B., Fernandes, R., Rodrigues, A.P., Chengoden, R., Bhattacharya, S., and Lakshmanna, K. (2022). Skin lesion classification of dermoscopic images using machine learning and convolutional neural network. Sci. Rep., 12.10.1038/s41598-022-22644-9 ↗
47. (2025, November 20). ISIC Collaboration (2016–2024). ISIC Challenge Datasets. Available online: https://challenge.isic-archive.com/data/.
48. Multi-task learning for hand heat trace time estimation and identity recognition10.1016/j.eswa.2024.124551 ↗
49. Zhou, J., He, X., Sun, L., Xu, J., Chen, X., Chu, Y., Zhou, L., Liao, X., Zhang, B., and Gao, X. (2023). SkinGPT-4: An interactive dermatology diagnostic system with visual large language model. arXiv.
50. Pre-trained multimodal large language model enhances dermatological diagnosis using SkinGPT-410.1038/s41467-024-50043-3 ↗
51. Large language models in evaluating hidradenitis suppurativa from clinical images10.1111/jdv.20861 ↗
52. Diagnostic Performance of GPT-4o and Gemini Flash 2.0 in Acne and Rosacea10.1111/ijd.17729 ↗
53. Fonolla, R., van der Sommen, F., Schreuder, R.M., Schoon, E.J., and de With, P.H. (2019, January 8–11). Multi-modal classification of polyp malignancy using CNN features with balanced class augmentation. Proceedings of the 2019 IEEE 16th International Symposium on Biomedical Imaging (ISBI 2019), IEEE, Venice, Italy.10.1109/ISBI.2019.8759320 ↗
54. Zhang, X., Chen, F., Yu, T., An, J., Huang, Z., Liu, J., Hu, W., Wang, L., Duan, H., and Si, J. (2019). Real-time gastric polyp detection using convolutional neural networks. PLoS ONE, 14.10.1371/journal.pone.0214133 ↗
55. Fine-tuning pre-trained convolutional neural networks for gastric precancerous disease classification on magnification narrow-band imaging images10.1016/j.neucom.2018.10.100 ↗
56. Lonseko, Z.M., Adjei, P.E., Du, W., Luo, C., Hu, D., Zhu, L., Gan, T., and Rao, N. (2021). Gastrointestinal disease classification in endoscopic images using attention-guided convolutional neural networks. Appl. Sci., 11.10.3390/app112311136 ↗