Skin cancer is among the most rapidly increasing malignancies worldwide, and early detection remains the most effective strategy to reduce mortality. Melanoma, though representing a minority of cases, accounts for the majority of skin cancer–related deaths, underscoring the importance of timely and accurate diagnosis. In this context, artificial intelligence (AI) and computer vision have become essential tools to support dermatologists in their decision-making processes. Two fundamental and closely related computer vision tasks—classification, which identifies the diagnostic category of a lesion, and segmentation, which delineates its spatial extent—form the methodological foundation of this doctoral research. Despite significant advances, existing computer-aided diagnostic systems still face critical limitations in generalization, interpretability, and clinical applicability. Even with the availability of large annotated repositories such as the International Skin Imaging Collaboration (ISIC) archive, which includes the widely adopted HAM10000 dataset, most models struggle to maintain performance under domain shifts or across heterogeneous clinical data. To address these issues, this thesis explores Transformer-based architectures and investigates three progressive research stages: dataset unification, segmentation analysis, and sequential task learning. First, a Large Dataset was assembled by merging and harmonizing several public dermatological datasets to increase data diversity and mitigate class imbalance. This unified dataset enabled a comprehensive evaluation of Swin Transformer–based models for skin lesion classification, showing improved accuracy and robustness compared to single-source training. Building upon these results, the research then examined the role of segmentation in enhancing classification performance, demonstrating that segmentation alone does not guarantee improvement, yet provides a meaningful structural prior that can guide representation learning. From these insights, a Sequential Learning framework was developed to explicitly model the interaction between segmentation and classification. A modular Sequential Swin Transformer architecture was designed to investigate how the order of learning—performing segmentation before classification or vice versa—affects performance and interpretability. A standardized protocol was implemented using HAM10000 for training, and an independent external test set was used for external validation. Experiments revealed that performing segmentation first yields superior generalization and more structured latent representations. Explainability analyses, utilizing gradient-based visualization and t-distributed stochastic neighbor embedding, further confirmed that segmentation-first learning enhances spatial coherence and interpretability. Beyond algorithmic contributions, this research also emphasizes the importance of data realism and clinical collaboration. In collaboration with dermatologists from the "Ospedale di Circolo e Fondazione Macchi" in Varese, a new dataset named SKINPAN was constructed, comprising over 10,000 high-resolution panoramic dermatological images annotated by expert dermatologists. Designed to reflect real clinical conditions and lesion distribution, SKINPAN bridges the gap between curated dermoscopic datasets and real-world clinical imagery. Overall, this doctoral work demonstrates that progress in AI-assisted dermatology depends not solely on model complexity but on the synergy between data quality, task sequencing, and rigorous evaluation. The proposed framework establishes a reproducible foundation for integrating structural and semantic information, fostering both robustness and interpretability. Through methodological innovation and interdisciplinary collaboration, this research contributes to the advancement of trustworthy, context-aware AI systems for clinical dermatology.
Il cancro della pelle è tra le neoplasie in più rapida crescita a livello mondiale, e la diagnosi precoce resta la strategia più efficace per ridurre la mortalità. Sebbene il melanoma rappresenti solo una minoranza dei casi, è responsabile della maggior parte dei decessi, evidenziando l’importanza di una diagnosi tempestiva e accurata. In questo ambito, l’intelligenza artificiale (IA) e la visione artificiale stanno diventando strumenti cruciali per supportare i dermatologi. Due compiti fondamentali della visione artificiale — classificazione e segmentazione — costituiscono la base metodologica di questa ricerca di dottorato. Nonostante i progressi recenti, i sistemi di diagnosi assistita esistenti presentano ancora limiti di generalizzazione, interpretabilità e applicabilità clinica. Anche con ampi archivi come ISIC e HAM10000, molti modelli non mantengono prestazioni costanti in presenza di cambiamenti di dominio. Per affrontare tali criticità, questa tesi esplora architetture Transformer-based attraverso tre fasi di ricerca: unificazione dei dataset, analisi della segmentazione e apprendimento sequenziale dei compiti. Un Large Dataset è stato creato unendo diversi dataset pubblici per aumentare la diversità e ridurre lo sbilanciamento tra classi, consentendo una valutazione approfondita dei modelli Swin Transformer per la classificazione di lesioni cutanee, che hanno mostrato maggiore accuratezza e robustezza. Successivamente, è stato analizzato il ruolo della segmentazione nel supportare la classificazione, evidenziando che, pur non garantendo da sola un miglioramento, fornisce un importante priore strutturale utile all’apprendimento delle rappresentazioni. Da queste osservazioni è nato il framework di Sequential Learning, che modella l’interazione tra segmentazione e classificazione. L’architettura Sequential Swin Transformer è stata progettata per analizzare come l’ordine di apprendimento influenzi le prestazioni. Gli esperimenti, condotti su HAM10000 e validati su un test esterno, mostrano che eseguire prima la segmentazione porta a migliore generalizzazione e rappresentazioni latenti più strutturate, come confermato anche da analisi di explainability basate su gradienti e t-SNE. In collaborazione con i dermatologi dell’Ospedale di Circolo e Fondazione Macchi di Varese, è stato inoltre sviluppato il dataset SKINPAN, contenente oltre 10.000 immagini panoramiche dermatologiche ad alta risoluzione, annotate da esperti, per rappresentare scenari clinici reali. In sintesi, questo lavoro dimostra che i progressi nella dermatologia assistita dall’IA dipendono dalla sinergia tra qualità dei dati, sequenza dei compiti e valutazione rigorosa, più che dalla sola complessità dei modelli. Il framework proposto offre una base riproducibile per integrare informazioni strutturali e semantiche, contribuendo allo sviluppo di sistemi di IA affidabili e interpretabili per l’uso clinico.
Diagnosi avanzata e automatizzata del cancro della pelle attraverso architetture Transformer
GALLAZZI, MIRCO
2026
Abstract
Skin cancer is among the most rapidly increasing malignancies worldwide, and early detection remains the most effective strategy to reduce mortality. Melanoma, though representing a minority of cases, accounts for the majority of skin cancer–related deaths, underscoring the importance of timely and accurate diagnosis. In this context, artificial intelligence (AI) and computer vision have become essential tools to support dermatologists in their decision-making processes. Two fundamental and closely related computer vision tasks—classification, which identifies the diagnostic category of a lesion, and segmentation, which delineates its spatial extent—form the methodological foundation of this doctoral research. Despite significant advances, existing computer-aided diagnostic systems still face critical limitations in generalization, interpretability, and clinical applicability. Even with the availability of large annotated repositories such as the International Skin Imaging Collaboration (ISIC) archive, which includes the widely adopted HAM10000 dataset, most models struggle to maintain performance under domain shifts or across heterogeneous clinical data. To address these issues, this thesis explores Transformer-based architectures and investigates three progressive research stages: dataset unification, segmentation analysis, and sequential task learning. First, a Large Dataset was assembled by merging and harmonizing several public dermatological datasets to increase data diversity and mitigate class imbalance. This unified dataset enabled a comprehensive evaluation of Swin Transformer–based models for skin lesion classification, showing improved accuracy and robustness compared to single-source training. Building upon these results, the research then examined the role of segmentation in enhancing classification performance, demonstrating that segmentation alone does not guarantee improvement, yet provides a meaningful structural prior that can guide representation learning. From these insights, a Sequential Learning framework was developed to explicitly model the interaction between segmentation and classification. A modular Sequential Swin Transformer architecture was designed to investigate how the order of learning—performing segmentation before classification or vice versa—affects performance and interpretability. A standardized protocol was implemented using HAM10000 for training, and an independent external test set was used for external validation. Experiments revealed that performing segmentation first yields superior generalization and more structured latent representations. Explainability analyses, utilizing gradient-based visualization and t-distributed stochastic neighbor embedding, further confirmed that segmentation-first learning enhances spatial coherence and interpretability. Beyond algorithmic contributions, this research also emphasizes the importance of data realism and clinical collaboration. In collaboration with dermatologists from the "Ospedale di Circolo e Fondazione Macchi" in Varese, a new dataset named SKINPAN was constructed, comprising over 10,000 high-resolution panoramic dermatological images annotated by expert dermatologists. Designed to reflect real clinical conditions and lesion distribution, SKINPAN bridges the gap between curated dermoscopic datasets and real-world clinical imagery. Overall, this doctoral work demonstrates that progress in AI-assisted dermatology depends not solely on model complexity but on the synergy between data quality, task sequencing, and rigorous evaluation. The proposed framework establishes a reproducible foundation for integrating structural and semantic information, fostering both robustness and interpretability. Through methodological innovation and interdisciplinary collaboration, this research contributes to the advancement of trustworthy, context-aware AI systems for clinical dermatology.| File | Dimensione | Formato | |
|---|---|---|---|
|
Tesi_Dottorato_Gallazzi_Mirco_formato_pdfa.pdf
accesso aperto
Licenza:
Tutti i diritti riservati
Dimensione
6.33 MB
Formato
Adobe PDF
|
6.33 MB | Adobe PDF | Visualizza/Apri |
I documenti in UNITESI sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/20.500.14242/358166
URN:NBN:IT:UNINSUBRIA-358166