gurpreetsingh8792 / skin-disease-classification

skin disease classification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

Our team always wanted to build an end to end ml solution - starting with model creation and ending with a live web app. Here we managed to do it. Users are able to submit a picture of a skin disease and get an instant prediction. It is a fine tuned MobileNet CNN. The main challenges were the unbalanced dataset and the small amount of data. We used data augmentation to reduce the class imbalance and in so doing get categorical accuracy scores that were not heavily skewed by a single majority class.

MobileNet’s small size and speed makes it ideal for web deployment. It’s also a joy to train.

What is the objective?

Create an online tool that can tell doctors and Patients, the three highest probability diagnoses for a given skin disease. This will help them quickly identify high priority patients and speed up their workflow. The app should produce a result in less than 3 seconds.

Dataset

https://www.kaggle.com/kmader/skin-cancer-mnist-ham10000

The HAM10000 Dataset: A Large Collection of Multi-Source Dermatoscopic Images of Common Pigmented Skin Diseases

It only contains images of seven diseases given below:

--->nv

Melanocytic nevi are benign neoplasms of melanocytes and appear in a myriad of variants, which all are included in our series. The variants may differ significantly from a dermatoscopic point of view. [6705 images]

--->mel

Melanoma is a malignant neoplasm derived from melanocytes that may appear in different variants. If excised in an early stage it can be cured by simple surgical excision. Melanomas can be invasive or non-invasive (in situ). We included all variants of melanoma including melanoma in situ, but did exclude non-pigmented, subungual, ocular or mucosal melanoma. [1113 images]

--->bkl

"Benign keratosis" is a generic class that includes seborrheic ker- atoses ("senile wart"), solar lentigo - which can be regarded a flat variant of seborrheic keratosis - and lichen-planus like keratoses (LPLK), which corresponds to a seborrheic keratosis or a solar lentigo with inflammation and regression [22]. The three subgroups may look different dermatoscop- ically, but we grouped them together because they are similar biologically and often reported under the same generic term histopathologically. From a dermatoscopic view, lichen planus-like keratoses are especially challeng- ing because they can show morphologic features mimicking melanoma [23] and are often biopsied or excised for diagnostic reasons. [1099 images]

--->bcc

Basal cell carcinoma is a common variant of epithelial skin cancer that rarely metastasizes but grows destructively if untreated. It appears in different morphologic variants (flat, nodular, pigmented, cystic, etc) [21], which are all included in this set. [514 images]

--->akiec

Actinic Keratoses (Solar Keratoses) and intraepithelial Carcinoma (Bowen’s disease) are common non-invasive, variants of squamous cell car- cinoma that can be treated locally without surgery. Some authors regard them as precursors of squamous cell carcinomas and not as actual carci- nomas. There is, however, agreement that these lesions may progress to invasive squamous cell carcinoma - which is usually not pigmented. Both neoplasms commonly show surface scaling and commonly are devoid of pigment. Actinic keratoses are more common on the face and Bowen’s disease is more common on other body sites. Because both types are in- duced by UV-light the surrounding skin is usually typified by severe sun damaged except in cases of Bowen’s disease that are caused by human papilloma virus infection and not by UV. Pigmented variants exists for Bowen’s disease [19] and for actinic keratoses [20]. Both are included in this set. [327 images]

--->vasc

Vascular skin lesions in the dataset range from cherry angiomas to angiokeratomas [25] and pyogenic granulomas [26]. Hemorrhage is also included in this category. [142 images]

--->df

Dermatofibroma is a benign skin lesion regarded as either a benign proliferation or an inflammatory reaction to minimal trauma. It is brown often showing a central zone of fibrosis dermatoscopically [24]. [115 images]

[Total images = 10015]

Skin Disease classification Implmented Using Flask

In SkinDiseaseClassification.ipynb model is created using CNN and MobileNet and then it's weights used in web apllication which implemented using flask in app.py

Instructions To Use

---> To run this project, accumulate this full repository in a directory .

---> Open a command prompt in the above directory and write commands as follows:

 1: mkdir envs
 
 2: cd envs
 
 3: python -m virtualenv name      // here name is environment name 
 
 4: name\Scripts\activate          // activate name enviroment
 
 5: cd ..
 
 6: python app.py                  

---> open this link http://127.0.0.1:5000/ in your browser

About

skin disease classification


Languages

Language:Jupyter Notebook 71.9%Language:CSS 10.9%Language:SCSS 7.4%Language:Less 7.3%Language:HTML 1.9%Language:Python 0.4%Language:JavaScript 0.1%Language:Procfile 0.0%