Skip to content

This code enables you to train a Convolutional Neural Network (CNN) using a pretrained model (transfer learning) using Keras

License

Notifications You must be signed in to change notification settings

abderhasan/cnn_melanoma_classification_transfer_learning_keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

I will be sharing a script using Keras for training a Convolutional Neural Network (CNN) with transfer learning for melanoma detection. You can find the code in this GitHub repository.

Before proceeding, make sure that you structure the data as follows (the numbers represent the number of images in each file):

alt text

You can download the data from, here. I used two classes as you can see from the figure above (nevus and melanoma). For training, I kept 374 images in each class to keep the data balanced.

To run the code:

$ python cnn_transfer_learning.py

The results will not be optimal, as the purpose is to show how one can train a CNN from scratch.

What variables to edit in the code?

You need to edit the following variables to point to your data:

train_directory (path to your training directory)

validation_directory (path to your training directory)

test_directory (path to your testing directory)

About

This code enables you to train a Convolutional Neural Network (CNN) using a pretrained model (transfer learning) using Keras

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages