Efficient Skin Lesion Detection using YOLOv9 Network

Skin lesion detection plays a crucial role in dermatological diagnosis and treatment. In this study, we propose an efficient approach for skin lesion detection using the YOLOv9 network. Leveraging state-of-the-art deep learning techniques, our model demonstrates robust performance in accurately identifying various skin lesion types, including acne, atopic dermatitis, keratosis pilaris, leprosy, psoriasis, and wart. We conducted comprehensive experiments using a curated dataset comprising 2721 training images, 288 validation images, and 145 test images. The model was trained and evaluated based on standard metrics such as Precision, Recall, and mean Average Precision (mAP). Our results indicate promising detection accuracy, with an overall Precision of 60.5%, Recall of 86.0%, and an mAP of 81.4%. Class-wise analysis reveals varying levels of performance across different disease classes, highlighting the model's proficiency in detecting common dermatological conditions such as acne and wart lesions. Furthermore, we provide insights into potential challenges and limitations, including dataset size and class imbalance, and discuss avenues for future research to address these issues. Our study contributes to the advancement of AI-driven solutions for dermatological diagnosis and underscores the efficacy of the YOLOv9 network in skin lesion detection.


Introduction
Skin diseases represent a significant global health concern, affecting millions of individuals worldwide and imposing a substantial burden on healthcare systems [1].The immediate and accurate identification of skin lesions is of utmost importance in order to provide prompt diagnosis and efficient treatment [2].In recent times, there have been notable advancements in the field of artificial intelligence (AI) and computer vision, which have presented encouraging prospects for the automated diagnosis of skin lesions [3], [4].These advancements hold the potential to enhance efficiency and accuracy in comparison to conventional diagnostic approaches, while adhering to existing regulations [5].
The You Only Look Once version 9 (YOLOv9) is a state-of-the-art deep learning model renowned for its real-time object detection capabilities [6], [7], [8], [9].Originally developed for general object detection tasks, YOLOv9 has shown promising potential for medical imaging applications, including skin lesion detection.By leveraging its efficient architecture and powerful feature extraction capabilities, YOLOv9 offers a compelling framework for automating the detection of various types of skin lesions.
Despite the advancements made in the field of AI-driven skin lesion identification, there are still some hurdles that remain [10].A primary obstacle lies in attaining a high level of detection precision while also upholding computing efficiency, particularly in contexts with limited resources, such as mobile devices or telemedicine systems.Furthermore, it is crucial to guarantee the resilience and applicability of the results across various datasets and types of lesions.
In this paper, we propose a novel approach for efficient skin lesion detection using the YOLOv9 network.Building upon recent advancements in AI and deep learning, our methodology integrates programmable gradient information (PGI) [9], [11] and the Generalized Efficient Layer Aggregation Network (GELAN) architecture based on ELAN [12] to enhance the performance and efficiency of skin lesion detection.By incorporating PGI, our model can effectively address information bottleneck issues and adapt to multiple objectives, while the GELAN architecture enables lightweight yet powerful feature extraction, making it suitable for deployment in various settings.
The primary objective of this study is to demonstrate the effectiveness of our proposed approach in accurately detecting skin lesions across different datasets and lesion types.We evaluate the performance of our model using a comprehensive dataset of skin lesion images, consisting of various classes such as acne, atopic dermatitis, keratosis pilaris, leprosy, psoriasis, and wart.Through extensive experimentation and comparative analysis, we aim to validate the superiority of our method in terms of detection accuracy, computational efficiency, and generalizability.
In summary, this paper contributes to the growing body of literature on AI-driven skin lesion detection by introducing a novel methodology that combines the YOLOv9 network with PGI and GELAN architecture.Our findings hold significant implications for the development of efficient and accurate solutions for automated skin lesion detection, with potential applications in clinical practice, telemedicine, and public health initiatives.The manuscript is segmented into four primary parts: the initial part elucidates the research's background, the subsequent section addresses the proposed research methodologies, the third part elucidates the research findings and discussion, and finally, the last section encapsulates the conclusion of this study.

Research Method
In this section, we present the detailed methodology employed in our study for efficient skin lesion detection using the YOLOv9 network, as shown in Figure 1.

Data Collection and Processing
For our study, we collected a diverse dataset of skin lesion images from various medical databases and research repositories [13].The dataset encompasses 6 distinct classes of skin diseases outlined in Table 1.Each image in the dataset is accompanied by annotations specifying the class of the lesion.Prior to model training, we performed preprocessing steps to standardize the dataset.This involved resizing all images to a uniform resolution, converting them to the RGB color space, and augmenting the dataset through techniques such as rotation, flipping, and scaling to enhance model robustness.

Model Implementation
We implemented the YOLOv9 architecture for skin lesion detection.YOLOv9 is a state-of-the-art deep learning model known for its real-time object detection capabilities.The architecture consists of a backbone feature extractor, followed by detection heads responsible for predicting bounding boxes and class probabilities.In our implementation, we utilized pretrained weights on a large-scale dataset for transfer learning.Additionally, we incorporated programmable gradient information (PGI) and the Generalized Efficient Layer Aggregation Network (GELAN) architecture to optimize model performance and efficiency as shown in Figure 2.

Performance Evaluation
To evaluate the performance of our model, we employed standard metrics for object detection tasks, including precision, recall, and mean Average Precision (mAP).
We conducted experiments on held-out validation and test sets to assess the model's accuracy and generalization capabilities.Additionally, qualitative analysis was performed by visualizing model predictions alongside ground truth annotations to gain insights into the model's behavior and identify potential areas for improvement.
Recall measures the proportion of true positive detections out of all actual positive instances present in the dataset [14].It is calculated using the following formula can be seen in Equation (1).

𝑅𝑒𝑐𝑎𝑙𝑙 = 𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠 𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠 + 𝐹𝑎𝑙𝑠𝑒 𝑁𝑒𝑔𝑎𝑡𝑖𝑣𝑒𝑠
(1) Precision, on the other hand, quantifies the proportion of true positive detections out of all instances predicted as positive by the model [14].The formula for Precision can be seen in Equation ( 2).

𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = 𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠 𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠 + 𝐹𝑎𝑙𝑠𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠
(2) mean Average Precision (mAP) provides an overall measure of the model's performance across multiple classes by calculating the average of the Average Precision (AP) values for each class [15].The formula for mAP is expressed can be seen in Equation (3): Where N denotes the Average Precision for each individual class.The mAP calculation was carried out using the Intersection over Union (IOU) value.
By evaluating our model using these metrics, we gain valuable insights into its ability to accurately detect skin lesions and its overall performance across various disease classes.

Result and Discussion
The performance of our skin lesion detection model using the YOLOv9 network was comprehensively evaluated across various metrics, including Precision, Recall, and mAP.These metrics provide insights into the model's ability to accurately identify and classify skin lesions across different disease classes.Our model training was conducted using Google Colab, utilizing computational resources as shown in Figure 3.The dataset was partitioned into training, validation, and test sets using an 80:20:10 ratio, respectively, to enable efficient model training and evaluation.We trained the model for 30 epochs with a batch size of 16 and a learning rate of 0.01, utilizing pre-trained weights.
Hyperparameter tuning was subsequently conducted to achieve optimal model performance.The bestperforming weights were then utilized for evaluating the test dataset.

Overall Model Performance
Across all evaluated classes, our model demonstrated promising results, achieving an overall Precision of 60.5%, Recall of 86.0%, and a mean Average Precision (mAP) of 81.4%.These metrics reflect the model's capacity to effectively detect and classify skin lesions with a satisfactory level of accuracy as shown in Figure 4.

Class-wise Analysis
A detailed analysis of model performance across individual skin disease classes revealed notable variations in detection accuracy.Acne lesions, being one of the most common dermatological conditions, were detected with high precision and recall rates, achieving a Precision of 85.6% and a Recall of 96.7%.This suggests the model's proficiency in recognizing characteristic features associated with acne, such as comedones and pustules.
Conversely, classes such as atopic dermatitis and psoriasis exhibited comparatively lower precision and recall rates, indicating potential challenges in accurately identifying these conditions as shown in Figure 5.The subtle or heterogeneous nature of lesions associated with these diseases may contribute to the observed discrepancies in model performance.

Discussion and Interpretation
The observed variations in model performance across different skin disease classes can be attributed to several factors, including differences in lesion morphology, texture, and size.Additionally, variations in dataset composition, annotation quality, and class imbalance may also influence model performance.
Despite the promising results, it is essential to acknowledge the limitations of our study, including the relatively small size of the dataset, potential biases in data distribution, and the presence of noise or inaccuracies in annotations.Addressing these limitations through the collection of larger and more diverse datasets, as well as the implementation of advanced data augmentation techniques, could further enhance the generalization and robustness of the model.

Conclusion
In this study, we developed and evaluated a skin lesion detection model using the YOLOv9

Figure 3 .
Figure 3. Specification of computational resources utilized on Google Colab

Table 1 .
Dataset's Description itchy, and inflamed patches of skin.It commonly affects areas such as the elbows, knees, face, and neck, and may be triggered by environmental factors or allergies.Keratosis Pilaris a benign skin condition characterized by the appearance of small, rough bumps on the skin, typically on the upper arms, thighs, buttocks, and cheeks.It occurs due to the buildup of keratin, a protein that forms the outer layer of the skin.LeprosyLeprosy, also known as Hansen's disease, is a chronic infectious disease caused by the bacterium Mycobacterium leprae.It primarily affects the skin, nerves, and mucous membranes, leading to skin lesions, nerve damage, and deformities if left untreated.Psoriasis a chronic autoimmune skin disorder characterized by the rapid growth of skin cells, leading to the formation of thick, red, and scaly patches on the skin.It commonly affects areas such as the scalp, elbows, knees, and lower back, and may be associated with itching, pain, and inflammation.WartWarts are benign growths caused by the human papillomavirus (HPV) that can appear anywhere on the body.They are characterized by rough, raised bumps on the skin and can vary in size, shape, and color.Warts are contagious and can spread through direct contact with infected skin or surfaces.
While conditions such as acne and wart lesions exhibited high precision and recall rates, others such as atopic dermatitis and psoriasis presented challenges due to the subtle or heterogeneous nature of their lesions.Despite the promising results, it is important to acknowledge the limitations of our study.These include the relatively small size of the dataset, potential biases in data distribution, and the presence of noise or inaccuracies in annotations.Addressing these limitations through the collection of larger and more diverse datasets, as well as the implementation of advanced data augmentation techniques, could further enhance the generalization and robustness of the model.Moving forward, future research efforts should focus on several key areas.This includes the development of more advanced deep learning architectures tailored specifically for dermatological diagnosis, as well as the integration of additional clinical data such as patient history and demographics to enhance diagnostic accuracy.In conclusion, our study represents a significant step towards the development of accurate and reliable AI-driven solutions for dermatological diagnosis and treatment.By leveraging state-of-the-art deep learning techniques and conducting rigorous experimentation, we have demonstrated the potential of the YOLOv9 network in improving the efficiency and effectiveness of skin lesion detection.These findings hold great promise for the advancement of dermatology and the delivery of personalized healthcare solutions in the future.