Giter Site home page Giter Site logo

alexwilliam1 / melanoma-detection-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hadikhanhk786/melanoma-detection-python

0.0 0.0 0.0 301 KB

A python program to categorize skin lesions as benign or melanoma based on ABCD features.

License: GNU General Public License v3.0

Python 23.44% C++ 76.56%

melanoma-detection-python's Introduction

Melanoma detection

This application is developed as a part of our manuscript titled Skin cancer diagnostics with an all-inclusive smartphone application.

The application reads dermoscopic lesion images and classfies them as melanoma or benign. It is developed using OpenCV 3.2.0 and Python 2.7

Environment Setup

  • Download & Install Python using Anaconda or Miniconda (Recommended)

  • Then you can run the following commands install required packages

  sudo install python-pip # if pip is not installed (Linux only)
  pip install opencv-python==3 numpy scikit-learn scipy scons
  # (or)
  conda install -y opencv=3.2 numpy scikit-learn scipy scons -c conda-forge
  • Clone this repository and change directory
  git clone https://github.com/ukalwa/melanoma_project_python
  cd melanoma_project_python
  • Install prerequisites for active contour (C++) module (Windows)

    • Download and extract boost-libraries which includes boost-python either from official website or unofficial prebuilt binaries (1.62 msvc-14 64bit) and set an environment variable (BOOST_DIR) pointing to the root of the extracted folder.

    • Download and extract OpenCV 2.4.10 libraries and set an environment variable (OPENCV_DIR) pointing to {folder path}\build\x64\vc12.

  • Create the active_contour module by running scons in the terminal in the cloned folder.

It is compatible with both Python 2.7 and Python 3.5 tested on Windows.

Usage

The usage of the program is as mentioned below

python run_script.py [--file <filename> | --dir <dirname>]

Steps involved

The code performs following steps:

  1. Reads in dermoscopic lesion image specified by --file or a directory name specified by --dir
  2. Preprocess the image by applying color transformation and filtering
  3. Segment the lesion from the image using active contour model
  4. Extract features (Asymmetry, Border irregularity, Colors, Diameter) from the lesion
  5. Classify the lesion based on the features extracted using an SVM classifier and output the result.
  6. Save the processed images and results

Troubleshooting

  • If you face any vcvarsall.bat errors, try installing visual studio 2017 community edition.

  • If you are unable to import active_contour module, please follow the steps in the environment setup to generate the module.

License

This code is GNU GENERAL PUBLIC LICENSED.

Contributing

If you have any suggestions or identified bugs please feel free to post them!

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.