Deep Learning-Based Detection of Xylazine Exposure from Wound Imaging

Loading...
Thumbnail Image
Penn collection
Interdisciplinary Centers, Units and Projects::Center for Undergraduate Research and Fellowships (CURF)::Spring Research Symposium
Degree type
Discipline
Biomedical Engineering and Bioengineering
Subject
Xylazine
Wounds
Imaging
Deep Learning
Artificial Intelligence
Addiction Medicine
Funder
Grant number
Copyright date
2025-04-11
Distributor
Related resources
Author
Pranav Sompalle
Abeed Sarker
Jennifer Love
Jeffrey Moon
Anthony Spadaro
Rachel Wightman
Jeanmarie Perrone
Contributor
Abstract

Background and Introduction Xylazine, a veterinary sedative, has emerged as a common adulterant of illicitly-manufactured fentanyl. Xylazine has contributed to additional morbidity resulting from xylazine-fentanyl dependence, withdrawal management, and xylazine-associated skin ulcerations. Xylazine-associated ulcers may progress to severe tissue necrosis and require specific management strategies such as enzymatic or tissue sparing surgical debridement.

Surveys and qualitative interviews with people who use drugs (PWUD) have shown that many are unaware of xylazine, its effects, and its widespread presence as an adulterant. The majority of PWUD do not seek or prefer xylazine. Moreover, clinical detection of xylazine exposure is difficult because xylazine testing is rarely available. Discrimination of xylazine-associated ulcers from alternative wounds is difficult, although xylazine-associated ulcers have been shown to share some common characteristics, including proximity to injection sites, enlargement over time, tissue necrosis, and eschar development.

Due to limited provider- and patient-awareness of xylazine-associated ulcers, accurate prediction of xylazine exposure from wound imaging can serve to (1) identify potential xylazine exposure in a patient presenting skin ulcers and (2) guide wound management strategies specific to the cause of ulcer/wound. Our objective was to assess if machine learning-based methods could be employed for automatic classification of xylazine wound images.

Methods In this study, we train and test various convolutional neural network (CNN)-based deep learning models in detecting xylazine exposure from wound imaging.

We compiled a dataset of 1791 publicly-sourced, anonymized wound images. N=78 images of confirmed xylazine-associated ulcers were collected from academic publications, Reddit, and newspaper publications. The negative control dataset (N=1713) was sourced from academic publications and Reddit. Negative control images ranged from skin conditions, such as psoriasis and eczema, to injection-related wounds (unrelated to xylazine exposure), surgical wounds, trauma wounds, pressure ulcers, diabetic ulcers, venous ulcers, and ischemic ulcers.

We developed and trained four CNN-based 2D image classification models using the MONAI open-source framework. Four distinct network architectures (DenseNet121, ResNet, EfficientNetB0, and SENet154) were used among the four models: DenseNet121- and ResNet-based models served as classic 2D image classification architectures (baselines), while EfficientNetB0- and SENet154-based models served as state-of-the-art models. Models were trained for 100 epochs (validation every 5 epochs), on the same training (70%)-validation (15%) cohort. Models were evaluated on a common test (15%) cohort. Stratified sampling was used to create the cohorts, and F1 score and accuracy were used to assess model performance.

Results All models achieved accuracies of ≥0.94 on the test cohort (DenseNet121: 0.97, ResNet: 0.95, EfficientNetB0: 0.98, SENet154: 0.94). EfficientNetB0’s accuracy was statistically significantly higher than ResNet’s accuracy (p (McNemar’s test) = 0.02246, p (z test) = 0.03555) and SENet154’s accuracy (p (McNemar’s test) = 0.00739, p (z test) = 0.01435), but not significantly different from DenseNet’s accuracy.

Highest performance on the test cohort was achieved with EfficientNetB0. EfficientNetB0 had a weighted-average F1 score=0.98 and macro-average F1 score=0.88. The difference in weighted-average and macro-average F1 score suggests that EfficientNetB0 is subject to varying intra-class performance: EfficientNetB0 had an F1 score=0.76 on xylazine-associated ulcer images and an F1 score=0.99 on negative control images.

DenseNet121, ResNet, and SENet154 exhibited varying performance on the test cohort: DenseNet121, ResNet, and SENet154 had weighted-average F1 scores=0.96, 0.95, 0.94, respectively, and macro-average F1 scores=0.73, 0.67, 0.70, respectively. The observation of significant weighted-average-macro-average differences for all models suggests that all models are subject to varying intra-class performance: DenseNet121, ResNet, and SENet154 had F1 scores=0.47, 0.36, 0.43, respectively, on xylazine-associated ulcer images and F1 scores=0.98, 0.97, 0.97 on negative control images. High variability in macro-average F1 score and F1 score on xylazine-associated ulcer images is observed among all models. No significant differences in F1 scores were observed for any pair of models.

Conclusion and Discussion This study demonstrates the ability of deep learning-based models to detect xylazine exposure from wound imaging: Despite the class imbalance, all models learned features unique to xylazine-associated ulcers relative to alternative wounds. We furthermore identify EfficientNetB0 as the most promising model for strong intra-/inter-class performance and higher relative sensitivity.

All models exhibit high specificity but low sensitivity, which is likely caused by the low number of xylazine-associated ulcer images in the dataset. High variance in F1 scores suggests that different model architectures isolate features associated with xylazine-associated ulcers to varying degrees, impacting their predictions’ sensitivity.

Another limitation lies in the data used. All images used were classified as xylazine-associated ulcers or not from provided descriptions and may not represent the full spectrum of xylazine-associated ulcer presentations. Other factors associated with drug use (eg, clean needle access) may also influence xylazine-associated ulcer presentation.

Deep learning in evaluation of wound imaging may enable accurate detection of xylazine exposure, which can suggest specific wound care treatment and substance use disorder-related care, including antibiotic usage guidance. Additionally, utilizing these tools to enhance identification of xylazine exposure can help track the emergence of wound complications in regions where xylazine’s presence is lower.

Advisor
Date of presentation
2025-04-11
Conference name
Conference dates
Conference location
Date Range for Data Collection (Start Date)
Date Range for Data Collection (End Date)
Digital Object Identifier
Series name and number
Volume number
Issue number
Publisher
Publisher DOI
Journal Issue
Comments
Recommended citation
Collection