Citation: Elshahawy, M.; Elnemr, A.;
Oproescu, M.; Schiopu, A.-G.;
Elgarayhi, A.; Elmogy, M.M.; Sallah,
M. Early Melanoma Detection Based
on a Hybrid YOLOv5 and ResNet
Technique. Diagnostics 2023, 13, 2804.
https://doi.org/10.3390/
diagnostics13172804
Academic Editor: Dechang Chen
Received: 25 July 2023
Revised: 11 August 2023
Accepted: 22 August 2023
Published: 30 August 2023
Copyright: © 2023 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
diagnostics
Article
Early Melanoma Detection Based on a Hybrid YOLOv5
and ResNet Technique
Manar Elshahawy
1,†
, Ahmed Elnemr
2,†
, Mihai Oproescu
3,
* , Adriana-Gabriela Schiopu
4
, Ahmed Elgarayhi
2
,
Mohammed M. Elmogy
1,
*
,‡
and Mohammed Sallah
5,‡
1
Information Technology Department, Faculty of Computers and Information, Mansoura University,
Mansoura 35516, Egypt; manarelshahawy@mans.edu.eg
2
Applied Mathematical Physics Research Group, Physics Department, Faculty of Science, Mansoura University,
Mansoura 35516, Egypt; ahmedelnemr@mans.edu.eg (A.E.); elgarayhi@mans.edu.eg (A.E.)
3
Faculty of Electronics, Communication, and Computer Science, University of Pitesti, 110040 Pitesti, Romania
4
Department of Manufacturing and Industrial Management, Faculty of Mechanics and Technology,
University of Pitesti, 110040 Pitesti, Romania; gabriela.plaiasu@upit.ro
5
Department of Physics, College of Sciences, University of Bisha, P.O. Box 344, Bisha 61922, Saudi Arabia;
msallahd@mans.edu.eg
* Correspondence: mihai.oproescu@upit.ro (M.O.); melmogy@mans.edu.eg (M.M.E.)
†
The authors contributed equally to this work and shared the first authorship.
‡
The authors share the senior authorship.
Abstract: Skin cancer, specifically melanoma, is a serious health issue that arises from the melanocytes,
the cells that produce melanin, the pigment responsible for skin color. With skin cancer on the rise, the
timely identification of skin lesions is crucial for effective treatment. However, the similarity between
some skin lesions can result in misclassification, which is a significant problem. It is important
to note that benign skin lesions are more prevalent than malignant ones, which can lead to overly
cautious algorithms and incorrect results. As a solution, researchers are developing computer-assisted
diagnostic tools to detect malignant tumors early. First, a new model based on the combination
of “you only look once” (YOLOv5) and “ResNet50” is proposed for melanoma detection with its
degree using humans against a machine with 10,000 training images (HAM10000). Second, feature
maps integrate gradient change, which allows rapid inference, boosts precision, and reduces the
number of hyperparameters in the model, making it smaller. Finally, the current YOLOv5 model is
changed to obtain the desired outcomes by adding new classes for dermatoscopic images of typical
lesions with pigmented skin. The proposed approach improves melanoma detection with a real-time
speed of 0.4 MS of non-maximum suppression (NMS) per image. The performance metrics average is
99.0%, 98.6%, 98.8%, 99.5, 98.3%, and 98.7% for the precision, recall, dice similarity coefficient (DSC),
accuracy, mean average precision (MAP) from 0.0 to 0.5, and MAP from 0.5 to 0.95, respectively.
Compared to current melanoma detection approaches, the provided approach is more efficient in
using deep features.
Keywords: skin cancer classification; melanoma detection; you only look once (YOLO);
dermatoscopic image analysis; ResNet50 network
1. Introduction
The skin is the outermost layer of the human body. The largest organ in the human
integument structure comprises multiple layers. It also involves immune cells and cells that
generate melanin to keep the body healthy from the carcinogenic potential of ultraviolet
radiation [1]. Skin cancer arises when skin cells become disorganized and proliferate
uncontrollably, potentially migrating to other body parts. Skin cancer is the most common
type of cancer worldwide. Melanoma and non-melanoma pigmented lesions are the
two main forms of skin cancer. Melanoma is associated with melanocytes, influencing the
color of malignant cells [2].
Diagnostics 2023, 13, 2804. https://doi.org/10.3390/diagnostics13172804 https://www.mdpi.com/journal/diagnostics