--- license: mit metrics: - accuracy pipeline_tag: image-classification tags: - medical --- # **Skin Cancer Detection Model** This is a **deep learning model** designed to detect skin cancer from images. It is trained on a diverse dataset of skin lesions and uses advanced convolutional neural network (CNN) architectures to classify images as **cancerous** or **non-cancerous**. The model is highly specialized in detecting common skin cancers such as melanoma, basal cell carcinoma, and squamous cell carcinoma. --- ## **Model Details** - **Model Architecture**: VGG16-based convolutional neural network. - **Input**: RGB images of skin lesions. - **Output**: A classification label indicating whether the lesion is cancerous or non-cancerous. - **Dataset**: The model was trained using a dataset from the **International Skin Imaging Collaboration (ISIC)**. The dataset contains labeled images of different skin lesions categorized into cancerous and non-cancerous groups. --- ## **Model Performance** - **Accuracy**: Achieved an accuracy of **97.5%** on the test set. - **Loss**: Final test loss: **0.29**. - **Confusion Matrix**: ![Confusion Matrix](./confusion_matrix.png) --- ## **Usage** You can use this model to classify skin lesions by providing an image. Here's an example of how to use the model: ```python from transformers import pipeline # Load the model from the Hugging Face Hub classifier = pipeline("image-classification", model="VRJBro/skin-cancer-detection") # Example usage image_path = "path_to_your_image.jpg" result = classifier(image_path) print(result) ``` ### **Limitations** - This model is **not a substitute for medical advice**. Always consult a dermatologist or medical professional for accurate diagnosis and treatment. - The model may not perform well on images with low resolution, extreme lighting, or non-standard viewpoints. --- ## **Training Process** The model was trained using a multi-phase approach: 1. **Data Augmentation**: The images were augmented with random flips, rotations, and zooms to improve generalization. 2. **Initial Training**: The model was trained with frozen layers of the base VGG16 architecture using a learning rate of **0.001**. 3. **Fine-Tuning**: The model was fine-tuned with partially unfrozen layers to boost performance. 4. **Loss Function**: The training process used `sparse_categorical_crossentropy` to handle the multi-class classification problem. --- ## **License** The model is released under the **MIT License**. You are free to use, modify, and distribute the model, provided that proper credit is given. --- ## **Citation** If you use this model in your research or applications, please cite it as follows: ``` @inproceedings{vrjbro_skin_cancer_detection, title={Skin Cancer Detection Model}, author={VRJBro}, year={2024}, howpublished={\url{https://huggingface.co/VRJBro/skin-cancer-detection}}, } ```