Model Dermatology RESTful API

Requirements

– Python (version 2.x) ; It may work on python version 3.x, but it is not tested enough.

– Internet Access

– Windows or Linux

Download

api.zip

How to use

– If you have any trouble using this API, please email to whria78@gmail.com

1) Install Python 2.7
Download Anaconda2 32bit or 64bit 2.7 (https://www.continuum.io/downloads#windows) and install.
Set installation path to “c:\anaconda2” or “c:\python27”
Be sure to check “Add anaconda to my PATH environment variable” during installation

2) Download api.zip

and extract api.zip

3) Resolve dependencies (numpy, matplotlib, requests, opencv)
c:\api\> pip install –upgrade pip
c:\api\> pip install numpy matplotlib requests opencv-python

4) Run Python scripts (api.py)

c:\api\> python api.py

# Source code – api.py

 

Example 1 – test.jpg

 

Example 2 – Draw ROC curve, and get AUC results with custom dataset

The api.zip contains test python code, ISIC’s 100 images, and 13 nevus images.

The 240 test images of SNU dataset is available at (https://figshare.com/articles/SNU_SNU_MELANOMA_and_Reddit_dataset_Quiz/6454973).
Edinburgh Dermofit Image Library is a commercial library (https://licensing.eri.ed.ac.uk/i/software/dermofit-image-library.html)

By default, the currect script (roc.py) performs 4-crop analysis.
If you want to perform 10-crop analysis, please change the line 38 of the roc.py to

 

 

“run.bat” – Batch file for testing on MS Windows system
“roc.py” – Test python code
“/isic” – ISIC 100 melanoma, basal cell carcinoma, and squamous cell carcinoma images [cropped]
“/custom” – 13 nevus images ; remove all and replace with your custom images if you want to test with a custom dataset.

# Source code – run.bat

# Source code – roc.py