# Skin Lesion Classification Using a Deep Ensemble Model
## 3 Materials and Methods
### Proposed Deep Ensemble Model for Skin Lesion Classification  
Our study proposes a skin lesion classification system to classify skin lesions into BCC, SCC, and melanoma by applying a deep ensemble model. The system design integrates three widely recognized deep learning architectures: VGG16, Inception-V3, and ResNet-50. These models are selected for their proven effectiveness in image classification tasks and their widespread adoption in medical image analysis. The ISIC dataset, a well-established and widely used repository of dermoscopic images, serves as the primary dataset for training and evaluation. This dataset comprises a varied assortment of skin lesion images, encompassing basal cell carcinoma, squamous cell carcinoma, and melanoma, thereby offering a comprehensive and diverse resource for training and validating models. One of the primary challenges in skin lesion classification revolves around the inherent class imbalance within the dataset, where certain classes may be underrepresented in comparison to others. To mitigate this imbalance, we employ oversampling techniques. Specifically, we augment the size of the minority classes (e.g., melanoma) by generating synthetic instances, thereby ensuring a more balanced distribution across all classes. Preprocessing enhances the learning capability and precise classification is achieved regarding the minority class. The core of our proposed system lies in the integration of multiple deep learning models through ensemble learning. By combining the strengths of VGG16, ResNet-50, and Inception-V3, we aim to leverage their complementary features and improve the overall classification performance. Each model contributes unique insights and representations, which are aggregated to make the final predictions. Ensemble learning has been shown to enhance robustness and generalization capabilities, making it an ideal approach for complex classification tasks such as skin lesion categorization. By leveraging deep ensemble modeling techniques and balancing the ISIC dataset through oversampling, our proposed system represents a significant advancement in automated skin lesion classification, offering potential applications in early detection and diagnosis of skin cancer, thereby contributing to improved patient outcomes and clinical decision-making in dermatology. The proposed skin lesion classification system design is illustrated in Figure 5.  
The system aims to develop a reliable assistance system for medical doctors for the classification of skin lesions using an original dataset and a balanced dataset by applying the oversampling technique. Initially, the original dataset was split for training (75%) and testing (25%). The images were resized to 224 \(\times\) 224 for VGG16 and ResNet50 inputs, and 299 \(\times\) 299 for Inception V3 inputs. They were then normalized and transformed into tensor form. To balance the dataset, a random oversampling method was used. Pre-trained models were loaded using the deep learning framework TensorFlow, with the feature extraction layers frozen to prevent updates during training. A new fully connected layer was added, replacing the old one. The models were compiled with a specified loss function and the Adam optimizer. Training was conducted on the training dataset for 150 epochs. Models that achieved the desired accuracy were saved. Finally, the models were combined using the ensemble weighted average method. During testing, the images were resized to 224 \(\times\) 224 for VGG16 and ResNet-50 inputs and to 299 \(\times\) 299 for Inception-V3 inputs. They were then normalized and transformed into tensor form for further processing. Classification was performed using an ensemble model. Initially, the system was tested with the original, unbalanced dataset. Subsequently, the dataset was balanced using oversampling and augmentation methods, and the system was tested again.