Online Onychomycosis Model – RESTful API

Requirements

– Python (version 2.x is better than 3.x)
– Internet access

Download

api.zip

How to use

1) Install Python 2.7
Download Anaconda2 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 (requests and matplotlib)
c:\api\> pip install –upgrade pip
c:\api\> pip install requests matplotlib
or
c:\api\> setup.bat

4) Run Python scripts (api.py, roc.py)
c:\api\> python api.py
c:\api\> python roc.py

# Source code – api.py

 

Example 1 – test.jpg

 

Example 2 – Draw 1) ROC curve (test dataset = B1+C; training dataset = A1) 2) Threshold / Sensitivity / Specificity graph

We created ROC curves, using MatPlotLib (https://matplotlib.org). It will takes about 15 minutes to complete the tasks depending on network bandwidths.

# ResNet-152 alone ( ~$ python roc.py 1 )

# ResNet-152 + VGG-19; arithmetic mean ( ~$ python roc.py 0 ; ~$ python roc.py )

# ResNet-152 + VGG-19; feedforward neural networks ( ~$ python roc.py 2 )

Offline Onychomycosis Model – BVLC caffemodel

Requirements

– Python
– BVLC PyCaffe

Download

Figshare.com (3.7 Gigabytes)

How to use

1. Download the zip file. It contains,

1) Model Onychomycosis; Models trained with A1, A2, and E dataset + the feedforward neural networks model
2) Python example and batch files that generate ROC curves
3) Prebuilt 64bit windows pycaffe – “caffe” folder

2. Install BVLC PyCaffe
Tutorial : Install PyCaffe

3. Run examples

Fig3C-A1-ensemble.bat
Fig3C-A1-ResNet.bat



Fig4C-A2-ResNet.bat
Fig4C-E-ResNet.bat