scieee AI-readable full text Open interactive document viewer

Classification of basal cell carcinoma in ex vivo confocal microscopy images from freshly excised tissues using a deep learning algorithm

Sendín-Martín, Mercedes; Lara-Caro, Manuel; Harris, Ucalene; Moronta, Matthew; Rossi, Anthony; Lee, Erica; Conejo-Mir Sánchez, Julián; Pereyra-Rodríguez, José-Juan; Jain, Manu

Abstract

Ex vivo confocal microscopy (EVCM) generates digitally colored purple-pink images similar to H&E without time-consuming tissue processing. It can be used during Mohs surgery for rapid detection of basal cell carcinoma (BCC); however, reading EVCM images requires specialized training. An automated approach using a deep learning algorithm for BCC detection in EVCM images can aid in diagnosis. A total of 40 BCCs and 28 negative (not-BCC) samples were collected at Memorial Sloan Kettering Cancer Center to create three training datasets: (i) EVCM image dataset (663 images), (ii) H&E image dataset (516 images), and (iii) a combination of the two datasets. A total of seven BCCs and four negative samples were collected to create an EVCM test dataset (107 images). The model trained with the EVCM dataset achieved 92% diagnostic accuracy, similar to the H&E model (93%). The area under the receiver operator characteristic curve was 0.94, 0.95, and 0.94 for EVCM-, H&E-, and combination-trained models, respectively. We developed an algorithm for automatic BCC detection in EVCM images (comparable accuracy to dermatologists). This approach could be used to assist with BCC detection during Mohs surgery. Furthermore, we found that a model trained with only H&E images (which are more available than EVCM images) can accurately detect BCC in EVCM images.

Full text

     Depósito de Investigación de la Universidad de Sevilla https://idus.us.es/ This is an Accepted Manuscript of an article published by Elsevier in Journal of Investigative Dermatology (JID) , Vol. 1291 - 1299.e2 , on May 2022, available at: https://doi.org/10.1016/j.jid.2021.09.029 Elsevier Copyright © 2021 The Authors. Published by Elsevier Inc. All rights reserved . En idUS Licencia Creative Commons CC BY-NC-ND 1 Article Type: Original article 1 Article Title: CLASSIFICATION OF BASAL CELL CARCINOMA IN EX VIVO 2 CONFOCAL MICROSCOPY IMAGES FROM FRESHLY EXCISED TISSUES USING 3 A DEEP LEARNING ALGORITHM 4 Short Title: Deep learning for confocal ex vivo images 5 6 Mercedes Sendín-Martín1 (ORCID ID# 0000-0003-0156-381X), Manuel Lara-Caro1 (ORCID 7 ID# 0000-0001-7424-2000), Ucalene Harris2 (ORCID ID# 0000-0002-7845-7460), Matthew 8 Moronta2 (ORCID ID# 0000-0002-7845-7460), Anthony Rossi2 (ORCID ID# 0000-0003-9 2295-1934), Erica Lee2 (ORCID ID# 0000-0001-9670-3242), Chih-Shan Jason Chen2 (ORCID 10 ID# orcid.org/0000-0002-0977-2707), Kishwer Nehal2 (ORCID ID# 0000-0001-5791-7184), 11 Julián Conejo-Mir Sánchez1,3 (ORCID ID# 0000-0001-9108-9538), José-Juan Pereyra-12 Rodríguez*1,4 (ORCID ID# 0000-0001-6843-5877), Manu Jain*2,4 (ORCID ID# 0000-0002-13 6035-0825). 14 1. Hospital Universitario Virgen del Rocío, Dermatology Department, Sevilla (Spain). 15 2. Memorial Sloan Kettering Cancer Center, Dermatology Service, Department of Medicine, 16 New York (USA). 17 3. School of Medicine, University of Seville (Spain). 18 4. Weill Cornell Medicine, Dermatology Service, Department of Medicine, New York (USA). 19 * Both authors contributed equally. 20 21 Corresponding author: Manu Jain 22 Memorial Sloan Kettering Cancer Centre (MSKCC) 23 530 E74th St NY, NY 10021 24 Email: [email protected] 25 2 Funding sources: This research is funded by a grant from the National Cancer Institute 26 /National Institutes of Health (P30-CA008748) made to the Memorial Sloan Kettering Cancer 27 Center. 28 Manuscript word count: 3500. 29 Figures: 4; Tables: 2; Supplementary figures: 2; Supplementary video: 1; Supplementary 30 tables: 1. 31 Keywords: ex vivo confocal microscopy, digitally stained purple and pink images, basal cell 32 carcinoma, convolutional neural network, deep learning 33 Abbreviations Used: BCC is Basal Cell carcinoma, MMS is Mohs Micrographic Surgery, AI 34 is Artificial Intelligence, EVCM is Ex Vivo Confocal Microscopy, ROC is Receiver Operator 35 Characteristic, AUC is Area Under the Curve, CNN is Convolutional Neural Network. 36 3 ABSTRACT 37 Ex vivo confocal microscopy (EVCM) generates digitally colored purple-pink images similar 38 to H&E, without time-consuming tissue processing. It can be used during Mohs surgery for 39 rapid detection of basal cell carcinoma (BCC); however, reading EVCM images requires 40 specialized training. An automated approach using a Deep Learning algorithm to BCC detection 41 in EVCM images can aid in diagnosis. 40 BCCs and 28 negative (“not-BCC”) samples were 42 collected at Memorial Sloan Kettering Cancer Center to create three training datasets: 1) EVCM 43 image dataset (663 images), 2) H&E image dataset (516 images), and 3) a combination of the 44 two datasets. 7 BCCs and 4 negative samples were collected to create a EVCM test dataset 45 (107 images). The model trained with the EVCM dataset achieved 92% diagnostic accuracy, 46 similar to the H&E model (93%). The area under ROC was 0.94, 0.95, and 0.94 for EVCM, 47 H&E, and combination trained models, respectively. We developed an algorithm for automatic 48 BCC detection in EVCM images (comparable accuracy to dermatologists). This approach could 49 be used to assist with BCC detection during Mohs surgery. Furthermore, we found that a model 50 trained with only H&E images (which are more available than EVCM images) can accurately 51 detect BCC in EVCM images. 52 53 54 55 56 57 58 59 60 61 4 INTRODUCTION 62 Basal cell carcinoma (BCC) is the most common skin cancer accounting for ~2 millions of 63 cases annually in the United States alone [Rogers et al. 2015]. Biopsy, followed by 64 histopathology, is the gold standard for diagnosis and subtyping of BCCs (as aggressive or non-65 aggressive) for appropriate management — surgical treatment for aggressive tumors versus 66 topical treatment (non-surgical) for less aggressive BCCs. For aggressive or recurrent tumors, 67 especially those located in cosmetically sensitive sites such as the face, Mohs micrographic 68 surgery (MMS) is the treatment of choice with high cure rates [Van Loo et al. 2014]. However, 69 MMS is a tedious and time-consuming procedure as it involves careful removal of skin cancer 70 layer-by-layer. Each excised layer undergoes frozen sectioning and microscopic evaluation, 71 requiring up to 20-45 minutes. Often times multiple layers are removed to achieve complete 72 tumor clearance; thus, the entire surgical procedure may last for several hours [Keena and Que 73 2016], increasing patient’s waiting time, complications, and cost of the procedure. Additionally, 74 frozen sectioning can cause tissue destruction and create artefacts that may hinder the final 75 diagnosis. 76 To expedite the surgical procedure, various ex vivo optical imaging devices have been 77 developed [Bennàssar et al. 2013; Dalimier and Salomon 2012; Gareau et al. 2009; Karen et al. 78 2009]. These devices can rapidly image freshly excised tissues at “near-histopathological” 79 resolution, obviating the need for destructive and time-consuming tissue processing. 80 Ex vivo confocal microscopy (EVCM) is an emerging imaging technique that can evaluate 81 freshly (un-processed) excised whole-tissue samples without the need for tissue processing 82 (frozen sectioning). As there is no tissue processing involved, EVCM can image tissues rapidly 83 (less than a minute for a tissue measuring up to 2 cm), reducing the time for the Mohs surgery 84 and enabling real-time imaging in the surgical suite [Keena and Que 2016]. Furthermore, 85 EVCM creates digitally colored purple and pink images (similar to H&E images) by converting 86 5 fluorescence signal originating from the nucleus into purple color and reflectance signal from 87 the cytoplasm into pink color. These digitally colored images can be read by Mohs surgeons 88 trained in pathology [Mu et al. 2016]. Although EVCM has demonstrated an overall high 89 sensitivity and specificity (~ 90%) for detection of BCC [Gareau et al. 2009; Karen et al. 2009] 90 during MMS [Bennàssar et al. 2013], it is only been utilized in very few academic centers. We 91 believe that the integration of an automatic algorithm for the detection of BCC in EVCM images 92 could immensely aid Mohs surgeons, increasing adoption of this technology. Moreover, EVCM 93 technology may be useful for surgical pathologists and dermatologists to obtain faster results 94 from standard excisions [Bennàssar A et al. 2012; Debarbieux et al. 2015] or even for biopsies 95 of inflammatory skin lesions [Bağcı et al. 2019; Bağcı et al. 2021; Bertoni et al. 2018]. This 96 approach can achieve the goal of a real “bedside” pathology, similar to the ongoing integration 97 of this technique for assessment of non-dermatology specimens in surgical pathology 98 [Panarello et al. 2020]. 99 Artificial intelligence (AI) is currently transforming healthcare [Hinton 2018]. A popular AI 100 technique for image classification is Convolutional Neural Networks (CNNs), a deep-learning 101 approach inspired from the human brain. In CNNs, inputs such as images go through several 102 layers of artificial “neurons” before an output is finally rendered such as the diagnoses of those 103 images. CNN algorithms are being used in radiology and pathology [Topol 2019] to classify 104 images as neoplastic or non-neoplastic and have shown a proficiency at par or even exceeding 105 human performance [Campanella et al. 2019]. Likewise, in dermatology, CNNs have reported 106 comparable performance to an expert dermatologist in skin cancer diagnosis using clinical 107 [Esteva et al. 2017; Fujisawa et al. 2019, Han et al. 2018] and dermoscopy images [Brinker et 108 al. 2019; Codella et al. 2016; Haenssle et al. 2018; Haenssle et al. 2020]. Recently, CNN has 109 also been applied successfully to reflectance confocal microscopy (RCM) images to classify 110 skin lesions [Kose et al. 2020, Wodzkinski et al. 2019; Wodzkinski et al. 2020, Campanella et 111 6 al. 2021]. However, to the best of our knowledge, CNNs have not been developed and tested to 112 diagnose skin cancers in digitally colored EVCM images. 113 The goal of this study was to develop and test the performance of CNN algorithms for detecting 114 BCC in digitally colored EVCM images obtained from freshly excised tissues from Mohs 115 surgery. For this study, 40 BCCs and 28 negative (“not-BCC”) skin tissue samples were 116 collected from 42 patients to create three different image datasets to train CNN models: 1) an 117 EVCM image dataset with 663 images, 2) an H&E image dataset with 516 images, and 3) a 118 combination of the two datasets (EVCM and H&E image datasets) with 1179 images. The 119 performance of these 3 trained models were evaluated and compared on a separate test set (not 120 used in training), which comprised of 97 EVCM images created using 7 BCCs and 4 negative 121 (“not-BCC”) skin tissue samples were from 11 patients. 122 123 RESULTS 124 Patient demographics and lesion characteristics: 125 A total of 53 patients were enrolled in the study. Mean age was 61 years ( 13, range 36-95 126 years); 64% (34/53) were males and 36% (19/53) females. Majority of the lesions, 63.3% 127 (50/79) were located on the head and neck. A total of 47 BCCs were imaged including 18 128 nodular BCCs (nBCCs), 11 superficial BCCs (sBCCs), 10 infiltrative BCCs (iBCCs), 8 mix-129 subtype BCCs and 32 skin samples did not present BCC. Patient demographics and lesion 130 characteristics are detailed in the Supplementary Table S1. 131 132 Model performance: 133 The main outcome measures were sensitivity, specificity, positive predictive value (PPV), and 134 negative predictive value (NPV) (Table 1 and Supplementary Figure S1). 135 7 The model trained with the EVCM dataset (EVCM model) achieved 92% diagnostic accuracy, 136 similar to the H&E model (93%). Compared to the H&E model, the EVCM model had a higher 137 sensitivity (96% vs. 93%) but lower specificity (89% vs. 92%). The combined model had the 138 lowest diagnostic accuracy (86%) with a high specificity (92%; similar to H&E model) but the 139 lowest sensitivity (78%). Area under the curve (AUC) of receiver operating characteristics 140 (ROC) for diagnostic dichotomous classification was calculated for each the three training 141 datasets (Figure 1). The AUC was 0.94, 0.95, and 0.94 for EVCM, H&E and combination 142 trained models, respectively. 143 144 Gradient maps: 145 Gradient maps created with Grad-CAM [Selvaraju RR, 2016] highlighted important regions in 146 red color in the images for predicting the presence/absence of tumor after all the three trainings. 147 Figure 2 shows gradient map examples of a true positive (TP), a true negative (TN), a false 148 positive (FP), and a false negative (FN) tissue sample. For the TP example, the algorithm 149 identified even small BCC nodules (asterisks) as important areas for BCC prediction, while not 150 taking the hair follicle (arrow) as an important region. Likewise, for the TN example, sebaceous 151 gland was correctly identified as an important region within the image for the negative 152 prediction for tumor. We had a very few images with false positive and false negative results. 153 For FP example, sebaceous glands (arrowhead) and eccrine ducts (star) were detected as 154 important for BCC detection. On the other hand, a FN example where BCC nodules (asterisks) 155 were not considered important and the algorithm prediction was no-BCC. 156 157 DISCUSSION 158 BCC is the most common skin cancer worldwide [Leiter et al. 2014]. Although, BCC has a low 159 metastatic potential it can be locally invasive causing extensive tissue damage and loss of 160 8 regional function [Nehal and Bichakjian 2018]. MMS is a specialized surgical procedure 161 capable of achieving complete clearance of BCC, while maximizing normal tissue preservation, 162 making it a preferred treatment for recurrent BCCs and BCCs located on cosmetically sensitive 163 and functionally challenging sites, such as the face [Jain et al. 2017]. However, MMS is not 164 only a time-consuming surgery (due to frozen section analysis) but it is also an expensive 165 procedure that requires an extensive laboratory set-up and specialized surgeons and technicians. 166 Ex vivo confocal microscopy (EVCM) is an emerging imaging technique that generates 167 digitally colored purple and pink images similar to H&E, without any time-consuming tissue 168 processing [Mu et al. 2016; Schüürmann et al. 2019]. It can be used during Mohs surgery 169 (MMS) for rapid detection of residual basal cell carcinoma (BCC); however, reading EVCM 170 images requires specialized training. An automated approach to BCC detection in EVCM 171 images can aid in diagnosis. 172 Currently, AI is being implemented extensively in the field of dermatology and pathology for 173 the automated diagnosis of skin cancers and non-neoplastic lesions (psoriasis, atopic dermatitis 174 and onychomycosis) [Han et al. 2018] in clinical and dermoscopy images using CNN, a deep-175 learning algorithm [Esteva et al. 2017, Schüürmann et al. 2019]. In our study we used CNN for 176 detection of BCC in EVCM images. CNN was first used in skin cancer detection by Nasr-177 Esfahani et al. (2016) for the diagnosis of melanoma. They trained the algorithm with a small 178 dataset of 170 clinical images from melanocytic lesions. Similar to our study, the authors used 179 augmentation methods such as random rotation, and resizing of the images to increase the 180 number of images (from 170 original images to 6120 images) in the training dataset, which 181 yielded a sensitivity of 81% and a specificity of 80% in the diagnosis of melanoma. 182 CNNs has been applied to non-invasive in vivo imaging technique such as reflectance confocal 183 microscopy (RCM). Wodzinski et al. (2019) reported an accuracy of 91% in the diagnosis of 184 BCC in RCM images. Recently, Campanella et al. (2021) developed a deep learning model to 185 15 sampling the result to the image size to plot the original image with the heatmap, highlighting 335 the important regions (red color) for the model prediction. A subset of gradient maps is shown 336 in Figure 2. 337 338 Statistical analysis: 339 All statistical analyses was performed in R (v4.03) [R Core Team, 2020]. The ability to 340 discriminate the classes (“BCC” or “not-BCC”) inferred by the model was used to generate 341 ROC curves with 95% intervals, using the package “pROC” (version 1.17.0.1) [Robin et al. 342 2011]. ROC curves and 95% confidence intervals for sensitivity, specificity, positive predictive 343 and negative predictive values, and accuracy measures were generated. 344 345 DATA AVAILABILITY 346 The deep learning model that was trained to generate the presented results and the code is 347 available at https://github.com/boxyware/confocal-ex-vivo. 348 349 CONFLICT OF INTERESTS 350 The authors declare none. 351 352 ACKNOWLEDGMENTS 353 We would like to thank Dr. Kivanc. Kose, PhD at Memorial Sloan Kettering Center for his 354 critical review of the manuscript. 355 356 357 AUTHOR CONTRIBUTIONS STATEMENT 358 Conceptualization: MSM, MJ. Data curation: MSM, MLC, MM, UH, MJ. Resources: AR, EL, 359 16 CJC, NK. Software: MLC. Formal Analysis: MLC. Results analysis: MSM, MJ, MLC, JJPR. 360 Writing – original draft: MSM. Writing – review & editing: MSM, MLC, JCS, JPR, MJ. 361 362 ORCID IDs 363 Mercedes Sendín-Martín1 (ORCID ID# 0000-0003-0156-381X), Manuel Lara-Caro1 (ORCID 364 ID# 0000-0001-7424-2000), Ucalene Harris2 (ORCID ID# 0000-0002-7845-7460), Matthew 365 Moronta2 (ORCID ID# 0000-0002-7845-7460), Anthony Rossi2 (ORCID ID# 0000-0003-366 2295-1934), Erica Lee2 (ORCID ID# 0000-0001-9670-3242), Chih-Shan Jason Chen2 (ORCID 367 ID# orcid.org/0000-0002-0977-2707), Kishwer Nehal2 (ORCID ID# 0000-0001-5791-7184), 368 Julián Conejo-Mir Sánchez1,3 (ORCID ID# 0000-0001-9108-9538), José-Juan Pereyra-369 Rodríguez*1,4 (ORCID ID# 0000-0001-6843-5877), Manu Jain*2,4 (ORCID ID# 0000-0002-370 6035-0825). 371 372 373 374 375 376 377 378 379 380 381 382 REFERENCES 383 17 Bağcı IS, Aoki R, Krammer S, Ruzicka T, Sárdy M, French LE, Hartmann D. Ex vivo confocal 384 laser scanning microscopy for bullous pemphigoid diagnostics: new era in direct 385 immunofluorescence? J Eur Acad Dermatol Venereol. 2019 Nov;33(11):2123-2130. doi: 386 10.1111/jdv.15767. 387 388 Bağcı IS, Aoki R, Vladimirova G, Ergün E, Ruzicka T, Sárdy M, et al. New-generation 389 diagnostics in inflammatory skin diseases: Immunofluorescence and histopathological 390 assessment using ex vivo confocal laser scanning microscopy in cutaneous lupus 391 erythematosus. Exp Dermatol. 2021 May;30(5):684-690. doi: 10.1111/exd.14265. 392 393 Bennàssar A, Vilalta A, Carrera C, Puig S, Malvehy J. Rapid diagnosis of two facial papules 394 using ex vivo fluorescence confocal microscopy: toward a rapid bedside pathology. Dermatol 395 Surg. 2012 Sep;38(9):1548-51. doi: 10.1111/j.1524-4725.2012.02467.x. 396 397 Bennàssar A, Carrera C, Puig S, Vilalta A, Malvehy J. Fast evaluation of 69 basal cell 398 carcinomas with ex vivo fluorescence confocal microscopy: criteria description, 399 histopathological correlation, and interobserver agreement. JAMA Dermatol. 2013 400 Jul;149(7):839-47. doi: 10.1001/jamadermatol.2013.459. 401 402 Bertoni L, Azzoni P, Reggiani C, Pisciotta A, Carnevale G, Chester J, et al. Ex vivo 403 fluorescence confocal microscopy for intraoperative, real-time diagnosis of cutaneous 404 inflammatory diseases: A preliminary study. Exp Dermatol 2018;27:1152–9. 405 https://doi.org/10.1111/exd.13754. 406 18 Brinker TJ, Hekler A, Hauschild A, Berking C, Schilling B, Enk AH, et al. Comparing artificial 407 intelligence algorithms to 157 German dermatologists: the melanoma classification benchmark. 408 Eur J Cancer 2019;111:30–7. https://doi.org/10.1016/j.ejca.2018.12.016. 409 410 Campanella G, Hanna MG, Geneslaw L, Miraflor A, Werneck Krauss Silva V, Busam KJ, et 411 al. Clinical-grade computational pathology using weakly supervised deep learning on whole 412 slide images. Nat Med 2019;25:1301–9. https://doi.org/10.1038/s41591-019-0508-1. 413 414 Campanella G, Navarrete-Dechent C, Liopyris K, Monnier J, Aleissa S, Minas B, et al. Deep 415 Learning for Basal Cell Carcinoma Detection for Reflectance Confocal Microscopy. J Invest 416 Dermatol. 2021 Jul 12:S0022-202X(21)01437-8. doi: 10.1016/j.jid.2021.06.015. Epub ahead 417 of print. PMID: 34265329. 418 419 Codella N, Nguyen Q-B, Pankanti S, Gutman D, Helba B, Halpern A, et al. Deep Learning 420 Ensembles for Melanoma Recognition in Dermoscopy Images. IBM J Res Dev 2016;61. 421 422 Dalimier E, Salomon D. Full-field optical coherence tomography: A new technology for 3D 423 high-resolution skin imaging. Dermatology 2012;224:84–92. 424 https://doi.org/10.1159/000337423. 425 426 Esteva A, Kuprel B, Novoa RA, Ko J, Swetter SM, Blau HM, et al. Dermatologist-level 427 classification of skin cancer with deep neural networks. Nature 2017;542:115–8. 428 https://doi.org/10.1038/nature21056. 429 430 19 Debarbieux S, Gaspar R, Depaepe L, Dalle S, Balme B, Thomas L. Intraoperative diagnosis of 431 nonpigmented nail tumours with ex vivo fluorescence confocal microscopy: 10 cases. Br J 432 Dermatol. 2015 Apr;172(4):1037-44. doi: 10.1111/bjd.13384. 433 434 Fujisawa Y, Otomo Y, Ogata Y, Nakamura Y, Fujita R, Ishitsuka Y, et al. Deep-learning-based, 435 computer-aided classifier developed with a small dataset of clinical images surpasses board-436 certified dermatologists in skin tumour diagnosis. Br J Dermatol 2019;180:373–81. 437 https://doi.org/10.1111/bjd.16924. 438 439 Gareau DS, Karen JK, Dusza SW, Tudisco M, Nehal KS, Rajadhyaksha M. Sensitivity and 440 specificity for detecting basal cell carcinomas in Mohs excisions with confocal fluorescence 441 mosaicing microscopy. J Biomed Opt 2009;14:034012. https://doi.org/10.1117/1.3130331. 442 Haenssle HA, Fink C, Schneiderbauer R, Toberer F, Buhl T, Blum A, et al. Man against 443 Machine: Diagnostic performance of a deep learning convolutional neural network for 444 dermoscopic melanoma recognition in comparison to 58 dermatologists. Ann Oncol 445 2018;29:1836–42. https://doi.org/10.1093/annonc/mdy166. 446 447 Haenssle HA, Fink C, Schneiderbauer R, Toberer F, Buhl T, Blum A, et al. Man against 448 Machine: Diagnostic performance of a deep learning convolutional neural network for 449 dermoscopic melanoma recognition in comparison to 58 dermatologists. Ann Oncol 450 2018;29:1836–42. https://doi.org/10.1093/annonc/mdy166. 451 452 Haenssle HA, Fink C, Toberer F, Winkler J, Stolz W, Deinlein T, et al. Man against machine 453 reloaded: performance of a market-approved convolutional neural network in classifying a 454 broad spectrum of skin lesions in comparison with 96 dermatologists working under less 455 20 artificial conditions. Ann Oncol 2020;31:137–43. 456 https://doi.org/10.1016/j.annonc.2019.10.013. 457 458 Han SS, Kim MS, Lim W, Park GH, Park I, Chang SE. Classification of the Clinical Images 459 for Benign and Malignant Cutaneous Tumors Using a Deep Learning Algorithm. J Invest 460 Dermatol 2018;138:1529–38. https://doi.org/10.1016/j.jid.2018.01.028. 461 462 Han SS, Park GH, Lim W, Kim MS, Na JI, Park I, et al. Deep neural networks show an 463 equivalent and often superior performance to dermatologists in onychomycosis diagnosis: 464 Automatic construction of onychomycosis datasets by region-based convolutional deep neural 465 network. PLoS One 2018;13. https://doi.org/10.1371/journal.pone.0191493. 466 467 He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. Proc. IEEE 468 Comput. Soc. Conf. Comput. Vis. Pattern Recognit., vol. 2016- December, IEEE Computer 469 Society; 2016, p. 770–8. https://doi.org/10.1109/CVPR.2016.90. 470 471 Hinton G. Deep learning-a technology with the potential to transform health care. JAMA - J 472 Am Med Assoc 2018;320:1101–2. https://doi.org/10.1001/jama.2018.11100. 473 474 Jain M, Rajadhyaksha M, Nehal K. Implementation of fluorescence confocal mosaicking 475 microscopy by “early adopter” Mohs surgeons and dermatologists: recent progress. J Biomed 476 Opt 2017;22:24002. https://doi.org/10.1117/1.JBO.22.2.024002. 477 478 21 Karen JK, Gareau DS, Dusza SW, Tudisco M, Rajadhyaksha M, Nehal KS. Detection of basal 479 cell carcinomas in Mohs excisions with fluorescence confocal mosaicing microscopy. Br J 480 Dermatol 2009;160:1242–50. https://doi.org/10.1111/j.1365-2133.2009.09141.x. 481 482 Keena S, Que T. Research Techniques Made Simple: Noninvasive Imaging Technologies for 483 the Delineation of Basal Cell Carcinomas. J Invest Dermatol 2016;136:e33–8. 484 https://doi.org/10.1016/j.jid.2016.02.012. 485 486 Kose K, Bozkurt A, Alessi-Fox C, Brooks DH, Dy JG, Rajadhyaksha M, et al. Utilizing 487 Machine Learning for Image Quality Assessment for Reflectance Confocal Microscopy. J 488 Invest Dermatol 2020;140:1214–22. https://doi.org/10.1016/j.jid.2019.10.018. 489 490 Liang X, Wu L, Li J, Wang Y, Meng Q, Qin T, et al. R-Drop: Regularized Dropout for Neural 491 Networks 2021. arXiv:2106.14448 492 493 Mu EW, Lewin JM, Stevenson ML, Meehan SA, Carucci JA, Gareau DS. Use of digitally 494 stained multimodal confocal mosaic images to screen for nonmelanoma skin cancer. JAMA 495 Dermatology 2016;152:1335–41. https://doi.org/10.1001/jamadermatol.2016.2997. 496 497 Nasr-Esfahani E, Samavi S, Karimi N, Soroushmehr SMR, Jafari MH, Ward K, et al. Melanoma 498 detection by analysis of clinical images using convolutional neural network. Proc. Annu. Int. 499 Conf. IEEE Eng. Med. Biol. Soc. EMBS, vol. 2016- October, Institute of Electrical and 500 Electronics Engineers Inc.; 2016, p. 1373–6. https://doi.org/10.1109/EMBC.2016.7590963. 501 502 22 Nehal KS, Bichakjian CK. Update on keratinocyte carcinomas. N Engl J Med 2018;379:363–503 74. https://doi.org/10.1056/NEJMra1708701. 504 505 Leiter U, Eigentler T, Garbe C. Epidemiology of Skin Cancer. Sunlight, Vitam. D Ski. Cancer, 506 vol. 810, New York, NY: Springer New York; 2014, p. 120–40. https://doi.org/10.1007/978-1-507 4939-0437-2_7. 508 509 Pan SJ, Yang Q. A survey on transfer learning. IEEE Trans Knowl Data Eng 2010;22:1345–510 59. https://doi.org/10.1109/TKDE.2009.191. 511 512 Panarello D, Compérat E, Seyde O, Colau A, Terrone C, Guillonneau B. Atlas of Ex Vivo 513 Prostate Tissue and Cancer Images Using Confocal Laser Endomicroscopy: A Project for 514 Intraoperative Positive Surgical Margin Detection During Radical Prostatectomy. Eur Urol 515 Focus. 2020 Sep 15;6(5):941-958. doi: 10.1016/j.euf.2019.01.004 516 517 R Core Team (2020). A language and environment for statistical computing. R Foundation for 518 Statistical Computing, Vienna, Austria. n.d. 519 520 Robin X, Turck N, Hainard A, Tiberti N, Lisacek F, Sanchez JC, et al. pROC: An open-source 521 package for R and S+ to analyze and compare ROC curves. BMC Bioinformatics 2011;12. 522 https://doi.org/10.1186/1471-2105-12-77. 523 524 Rogers HW, Weinstock MA, Feldman SR, Coldiron BM. Incidence estimate of nonmelanoma 525 skin cancer (keratinocyte carcinomas) in the us population, 2012. JAMA Dermatology 526 2015;151:1081–6. https://doi.org/10.1001/jamadermatol.2015.1187. 527 23 Selvaraju RR, Cogswell M, Das A, Vedantam R, Parikh D, Batra D. Grad-CAM: Visual 528 Explanations from Deep Networks via Gradient-based Localization. Int J Comput Vis 529 2016;128:336–59. https://doi.org/10.1007/s11263-019-01228-7. 530 531 Schüürmann* M, Stecher MM, Paasch U, Simon JC, Grunewald S. Evaluation of digital 532 staining for ex vivo confocal laser scanning microscopy. J Eur Acad Dermatology Venereol 533 2019:jdv.16085. https://doi.org/10.1111/jdv.16085. 534 535 Topol EJ. High-performance medicine: the convergence of human and artificial intelligence. 536 Nat Med 2019;25:44–56. https://doi.org/10.1038/s41591-018-0300-7. 537 538 Van Loo E, Mosterd K, Krekels GAM, Roozeboom MH, Ostertag JU, Dirksen CD, et al. 539 Surgical excision versus Mohs’ micrographic surgery for basal cell carcinoma of the face: A 540 randomised clinical trial with 10 year follow-up. Eur J Cancer 2014;50:3011–20. 541 https://doi.org/10.1016/j.ejca.2014.08.018 542 543 Wodzinski M, Skalski A, Witkowski A, Pellacani G, Ludzik J. Convolutional Neural Network 544 Approach to Classify Skin Lesions Using Reflectance Confocal Microscopy. Proc. Annu. Int. 545 Conf. IEEE Eng. Med. Biol. Soc. EMBS, vol. 2019, Institute of Electrical and Electronics 546 Engineers Inc.; 2019, p. 4754–7. https://doi.org/10.1109/EMBC.2019.8856731. 547 548 Wodzinski M, Pajak M, Skalski A, Witkowski A, Pellacani G, Ludzik J. Automatic Quality 549 Assessment of Reflectance Confocal Microscopy Mosaics using Attention-Based Deep Neural 550 Network. Proc. Annu. Int. Conf. IEEE Eng. Med. Biol. Soc. EMBS, vol. 2020- July, Institute 551 24 of Electrical and Electronics Engineers Inc.; 2020, p. 1824–7. 552 https://doi.org/10.1109/EMBC44109.2020.9176557. 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 Supplementary Table 1. Summary of patient´s demographic data and lesion location Abbreviation: SD, standard deviation  Variable Total (53 patients/79 lesions) Age, mean (SD), y* 61 (13) Sex, %(n) Male 64% (34/53) Female 36% (19/53) Diagnosis, n(%) 79 lesions BCC 47 (59.5%) Nodular 18 (22.8%) Superficial 11 (13.9%) Infiltrative 10 (12.6%) Mix-subtype 8 (10.1%) “Not-BCC” 32 (40.5%) Location, n(%) 79 lesions Head and neck 50 (63.3%) Upper extremities 8 (10.1%) Trunk 15 (19%) Lower extremities 6 (7.6%) 1 SUPPLEMENTARY MATERIAL 1 Supplementary Figure 1. Algorithm´s performance in each separate category with three 2 different trainings. 3 4 Supplementary Figure 2. EVCM image acquisition: a) Purple and pink digitally colored 5 EVCM image of a nodular BCC (yellow boxed area and arrows) acquired from a freshly excised 6 whole-tissue obtained from Mohs surgery. EVCM images tissues simultaneously in 7 fluorescence and reflectance mode, where fluorescence signal from nucleus is converted to 8 purple color (b) and reflectance signal from cytoplasm and collagen is converted to pink color 9 (c) to generate a combined purple and pink image (d), resembling conventionally H&E- stained 10 image. Scale bars: a) 400 µm and b, c, d) 200 µm. 11 12 Supplementary Table 1. Summary of patient´s demographic data and lesion location 13 14 Supplementary Video 1. Steps involved in EVCM image acquisition. 15 16