Coder Social home page Coder Social logo

fitushar / skin-lesion-segmentation-using-grabcut Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 1.0 12.83 MB

Skin lesion segmentation is one of the first steps towards automatic Computer-Aided Diagnosis of skin cancer. Vast variety in the appearance of the skin lesion makes this task very challenging. The contribution of this paper is to apply a power foreground extraction technique called GrabCut for automatic skin lesion segmentation in HSV color space with minimal human interaction. Preprocessing was performed for removing the outer black border. Jaccard Index was measured to evaluate the performance of the segmentation method. On average, 0.71 Jaccard Index was achieved on 1000 images from ISIC challenge 2017 Training Dataset.

Python 79.65% MATLAB 20.35%
skin-lesion-segmentation segmentation grabcut skin-cancer jaccard paper

skin-lesion-segmentation-using-grabcut's Introduction

Automatic Skin Lesion Segmentation Using GrabCut in HSV Color Space

Skin lesion segmentation is one of the first steps towards automatic Computer-Aided Diagnosis of skin cancer. Vast variety in the appearance of the skin lesion makes this task very challenging. The contribution of this paper is to apply a power foreground extraction technique called GrabCut for automatic skin lesion segmentation in HSV color space with minimal human interaction. Preprocessing was performed for removing the outer black border. Jaccard Index was measured to evaluate the performance of the segmentation method. On average, 0.71 Jaccard Index was achieved on 1000 images from ISIC challenge 2017 Training Dataset. ProjectOverview In this work, a framework was proposed for skin lesion segmentation based on automatic GrabCut segmentation. Auto Extracting mask and rectangle initialization strategies was shown for making the segmentation algorithm automatic and generic. The algorithm achieved over 0.71 average Jaccard index for 1000 test images. Future work will be focused on exploring different color channels to improve the performance.

Qualitative and Quantitative results of segmentation

Results

skin-lesion-segmentation-using-grabcut's People

Contributors

fitushar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

codwest

skin-lesion-segmentation-using-grabcut's Issues

Error on line 'cv2.grabCut(img,mask,None,bgdModel,fgdModel,5,cv2.GC_INIT_WITH_MASK)'

Hello,

I am trying to use your code for the skin leison segmentation and I am getting the following error:

error                                     Traceback (most recent call last)
<ipython-input-19-daaa4cb8cf6e> in <module>
    119         mask[newmask == 255] = 1
    120 
--> 121         dim= cv2.grabCut(img,mask,None,bgdModel,fgdModel,5,cv2.GC_INIT_WITH_MASK)
    122         mask2 = np.where((mask==2)|(mask==0),0,1).astype('uint8')
    123         GrabCut_img = img*mask2[:,:,np.newaxis]

error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src\grabcut.cpp:386: error: (-215:Assertion failed) !bgdSamples.empty() && !fgdSamples.empty() in function 'initGMMs'

The image and code are in the right folder. Do you know why am I getting this error? The Green_Mask and the Inverse_Green_mask for the image are empty, and enhanced_bgr_image looks like this:

ISIC_0024306_AHE

The original image is:

ISIC_0024306

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.