GithubHelp home page GithubHelp logo

deepankarvarma / skin-cancer-detection--opencv-tensorflow-keras Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 6 KB

This repository contains Python code for generating a skin cancer detection model and utilizing it to detect skin cancer from user-inputted images or videos. The model architecture follows a sequential structure consisting of convolutional and pooling layers, with the final output layer using a sigmoid activation function.

Python 100.00%
binary-classification binary-image-classification convolutional-neural-networks image-classification image-processing kaggle keras opencv python sequential-models

skin-cancer-detection--opencv-tensorflow-keras's Introduction

Skin Cancer Detection Model

This repository contains Python code for generating a skin cancer detection model and using it to detect skin cancer from user-inputted images or videos. The model architecture is as follows:

model = Sequential()
model.add(Conv2D(32, (3, 3), activation='relu', input_shape=(img_size[0], img_size[1], 3)))
model.add(BatchNormalization())
model.add(MaxPooling2D((2, 2)))
model.add(Conv2D(64, (3, 3), activation='relu'))
model.add(MaxPooling2D((2, 2)))
model.add(Conv2D(128, (3, 3), activation='relu'))
model.add(MaxPooling2D((2, 2)))
model.add(Conv2D(128, (3, 3), activation='relu'))
model.add(MaxPooling2D((2, 2)))
model.add(Flatten())
model.add(Dropout(0.5))
model.add(Dense(512, activation='relu'))
model.add(Dense(1, activation='sigmoid'))

Dataset

The dataset used for training and evaluation can be downloaded from Kaggle: Skin Cancer Binary Classification Dataset. It provides labeled images for binary classification of skin cancer.

Dependencies

To run the code in this repository, you'll need the following dependencies:

  • Python 3.x
  • TensorFlow
  • Keras
  • NumPy
  • OpenCV

You can install the required packages using pip:

pip install tensorflow keras numpy opencv-python

Usage

  1. Clone this repository to your local machine:
git clone https://github.com/your-username/your-repository.git
cd your-repository
  1. Download the Skin Cancer Binary Classification Dataset from the provided link and place it in the appropriate directory.

  2. Use the provided code to train the skin cancer detection model.

  3. Run the script to detect skin cancer from an image:

python predict_image.py --image path/to/your/image.jpg
  1. Run the script to detect skin cancer from a video:
python predict_video.py --video path/to/your/video.mp4

Make sure to replace path/to/your/image.jpg and path/to/your/video.mp4 with the actual paths to your desired image and video files, respectively.

Results

The skin cancer detection model, trained on the Skin Cancer Binary Classification Dataset, can accurately classify skin cancer from images and videos. You can modify the code and experiment with different architectures or hyperparameters to potentially improve the performance.

Acknowledgments

License

This project is licensed under the MIT License.

skin-cancer-detection--opencv-tensorflow-keras's People

Contributors

deepankarvarma avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

skin-cancer-detection--opencv-tensorflow-keras's Issues

file not found

Hello, I copied your experiment on my computer, but I didn't see the python file corresponding to the fourth point in the tutorial. Is it convenient for you to answer this part?
which is predict_image.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.