  At present, cancer is one of the most important health issues in the world.
Because early detection and appropriate treatment in cancer are very effective
in the recovery and survival of patients, image processing as a diagnostic tool
can help doctors to diagnose in the first recognition of cancer. One of the
most important steps in diagnosing a skin lesion is to automatically detect the
border of the skin image because the accuracy of the next steps depends on it.
If these subtleties are identified, they can have a great impact on the
diagnosis of the disease. Therefore, there is a good opportunity to develop
more accurate algorithms to analyze such images. This paper proposes an
improved method for segmentation and classification for skin lesions using two
architectures, the U-Net for image segmentation and the DenseNet121 for image
classification which have excellent accuracy. We tested the segmentation
architecture of our model on the ISIC-2018 dataset and the classification on
the HAM10000 dataset. Our results show that the combination of U-Net and
DenseNet121 architectures provides acceptable results in dermatoscopic image
analysis compared to previous research. Another classification examined in this
study is cancerous and non-cancerous samples. In this classification, cancerous
and non-cancerous samples were detected in DenseNet121 network with 79.49% and
93.11% accuracy respectively.
