Skin cancer is one of the most common types of cancer worldwide, with over 1.2 million new cases diagnosed annually. Early detection is crucial for improving treatment outcomes, but access to specialized medical professionals, such as dermatologists, is often limited in rural or low-income regions.
The Computer-Aided Skin Cancer Identification and Diagnosis (CASCID) project was developed to address this issue by leveraging computer vision and machine learning to assist in the early identification of skin cancer. By analyzing images of skin lesions taken with a smartphone, CASCID provides an initial assessment that can help users determine whether they should seek further medical evaluation.
This innovative system integrates image processing, deep learning models, and metadata analysis to enhance diagnostic accuracy. The project serves as a proof of concept, demonstrating the feasibility of AI-powered telemedicine solutions for skin cancer detection.
The CASCID project relied on high-performance computing and publicly available medical datasets for training and validation. To handle the computational demands of deep learning, a virtual machine with 32GB Nvidia Tesla V100 GPUs was used, significantly reducing processing time.
For data, the project utilized the PAD-UFES-20 dataset, which contains 2,298 smartphone images from 1,373 patients, along with 26 metadata attributes such as age, lesion location, and medical history. Additionally, the ISIC Archive, a large collection of high-quality dermoscopic images, was incorporated to improve data diversity, particularly for melanoma cases. These resources provided the necessary computational power and dataset balance to develop an AI-assisted skin cancer detection system.
Image Pre-processing is a fundamental step for the construction of an efficient computer-aided skin cancer diagnosis tool. In this application were applied three main pre processing steps: hair removal, noise reduction, contrast enhancment and Holistically-Nested Edge Detection (HED) for lesion segmentation. An example of the image preprocessing flow can be seen below.
The CASCID project implemented multiple machine learning approaches for skin cancer detection, combining image classification and metadata-based prediction. The models were trained using publicly available datasets and optimized for accuracy in distinguishing between cancerous and non-cancerous lesions.
A Random Forest Classifier (RFC) was developed to analyze patient metadata, such as age, lesion size, history of smoking, and previous cancer diagnoses. Feature selection techniques were applied, reducing the number of input variables while maintaining classification performance. The best metadata model achieved 85.3% accuracy, with an 89% specificity at 73% sensitivity.
Several approaches were tested for image classification, including SIFT + Random Forest, a custom CNN, and transfer learning. The first two methods suffered from underfitting and overfitting, respectively.
The final approach used ResNet50 with transfer learning, fine-tuned on PAD-UFES-20 and ISIC datasets. This method leveraged pre-trained deep learning features, significantly improving accuracy and generalization.
To enhance performance, stacking combined image classification outputs with metadata predictions, integrating visual and clinical information for a more robust diagnosis. The final model reached:
Overall Accuracy: 87.5%
Sensitivity (Cancer Detection Rate): 82.1%
Specificity (Non-Cancer Detection Rate): 91.3%
The final product for this project consists of two main parts: a mobile application (front-end) and an API (back-end).
The mobile application, called CASCID, the acronym for Computer Aided Skin Cancer Identification and Diagnosis, was developed using React-Native, more specifically the Expo framework, which allows one JavaScript to work for Android and IOS platforms. The CASCID application is responsible for taking a photo using the smartphone camera, then sending this picture with some metadata to an API, then getting the image classification and showing the user the results. This functionality was developed with 6+ different screens: home, tips, camera, preview, metadata and results.
The API, in turn, was developed using FastAPI, based on the Python program language. The server is responsible for receiving an image from the client, applying the image pre processing and HED algorithm and finally predicting the class through the transfer learning model.