- This project focuses on the binary classification of skin cancer images into "Benign" or "Malignant" categories. The implementation includes a Convolutional Neural Network (CNN) and/or Transfer Learning using TensorFlow and Keras.
- The dataset is not provided here, but you can use your own Skin Cancer image dataset.
- I have used 10,000 images for Training .
- 5000 Benign and 5000 Malignant images with Train:Validate:Test ratio 7:2:1
├───Data
│ ├───Test
│ │ ├───benign # 500
│ │ └───malignant # 500
│ ├───Train
│ │ ├───benign # 3500
│ │ └───malignant # 3500
│ └───Validate
│ ├───benign # 1000
│ └───malignant # 1000
│ └───.ipynb_checkpoints
- Python 3.10.11
- TensorFlow 2.11.0
- NumPy
- Matplotlib
- Anaconda Navigator
- Your Skin Cancer Image Dataset (not provided, you can use your own dataset)
Click here to install Anaconda Navigator.
Follow the steps in this video to install Tensorflow.
2.1 Create a Conda Environment:
$ conda create -n py310 python=3.10
2.2 Activate Conda Environment:
$ conda activate py310
2.3 Install CUDA toolkit & CUDNN Library:
$ conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
2.4 Install Tensorflow:
$ python3 -m pip install "tensorflow<2.11"
2.5 Test GPU
$ Python
>> import tensorflow as tf
>> tf.config.list_physical_devices('GPU')
git clone https://github.com/Vipsy-123/Skin-Cancer-Classification-using-CNN.git
Download the Benign and Malignant images dataset from ISIC Archive
- Open cnn1.ipynb
- Run the cells to perform predictions on new skin cancer images
- Open DensNet201.ipynb
- You need to make 3 changes
- Import your pre-trained model in Section 1. Installing Dependencies
- Change input size in Section 2. Data Preparation & Augmentation
- Change to your Model name in Section 3. Building the Model
- e.g base_model = VGG16(weights='imagenet', include_top=False, input_shape=(224, 224, 3))
You can see pre-trained models in models Directory to save Model Change the Model name in Section 4. Training the Model