Skip to content

Commit d5330a7

Browse files
author
Yifan Peng
committed
adding source codes
1 parent 0e45e24 commit d5330a7

16 files changed

+44
-289
lines changed

.travis.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,6 @@ python:
33
- "3.6"
44
install:
55
pip install -r requirements.txt
6-
# - sudo apt-get update
7-
# # We do this conditionally because it saves us some downloading if the
8-
# # version is the same.
9-
# - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
10-
# wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
11-
# else
12-
# wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
13-
# fi
14-
# - bash miniconda.sh -b -p $HOME/miniconda
15-
# - export PATH="$HOME/miniconda/bin:$PATH"
16-
# - hash -r
17-
# - conda config --set always_yes yes --set changeps1 no
18-
# - conda update -q conda
19-
# # Useful for debugging any issues with conda
20-
# - conda info -a
21-
#
22-
# # Replace dep1 dep2 ... with your dependencies
23-
# - conda env create --file environment2.7.yml
24-
# - source activate eyesnet3.6
256

267
script:
278
- py.test

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ This project adheres to the [Contributor Covenant Code of Conduct](http://contri
99
DeepSeeNet is maintained with :heart: by:
1010

1111
- **@yfpeng**
12-
- @qingyu-chen
1312

1413
See also the list of [contributors](https://github.com/ncbi-nlp/DeepSeeNet/contributors) who participated in this project.

LICENSE.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ fitness for any particular purpose.
1717

1818
Please cite the author in any work or product based on this material:
1919

20+
Peng Y, Dharssi S, Chen Q, Keenan T, Agron E, Wong W, Chew E, Lu Z. DeepSeeNet:
21+
A deep learning model for automated classification of patientbased age-related
22+
macular degeneration severity from color fundus photographs. Ophthalmology. 2018.
2023

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Besides grading the simplified score, we also provide individual risk factor mod
8585
8686
All models can be found at ``deepseenet``.
8787

88-
The pretrained models can be found at:
88+
The pretrained models can be found at: `<https://github.com/ncbi-nlp/DeepSeeNet/releases/tag/0.1>`_
8989

9090

9191
Training DeepSeeNet model

deepseenet/data_generator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
from typing import Callable
22

33
import numpy as np
4-
from keras.preprocessing import image
54
from keras.utils import Sequence, to_categorical
65
from sklearn.utils import class_weight
76

8-
from deepseenet.utils import crop2square, cal_chunk_number
7+
from deepseenet.utils import cal_chunk_number
98

109

1110
class DataGenerator(Sequence):
1211
def __init__(self, data, *, batch_size: int, n_classes: int,
13-
preprocess_image: Callable[[str]], shuffle: bool=False):
12+
preprocess_image: Callable, shuffle: bool=False):
1413
"""
1514
1615
Args:

deepseenet/deepseenet_adv_amd.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from keras.preprocessing import image
66
from keras.utils import get_file
77

8-
from deepseenet import eyesnet_risk_factor
8+
from deepseenet import deepseenet_risk_factor
99
from deepseenet.utils import crop2square
1010

11-
ADVANCED_AMD_PATH = 'https://github.com/yfpeng/EyesNet/releases/download/v0.1/adv_amd_model.h5'
11+
ADVANCED_AMD_PATH = 'https://github.com/ncbi-nlp/DeepSeeNet/releases/download/0.1/adv_amd_model.h5'
1212
ADVANCED_AMD_MD5 = '0adbf448491ead63ac384da671c4f7ee'
1313

1414

@@ -26,22 +26,22 @@ def preprocess_image(image_path):
2626
img = crop2square(image.load_img(image_path)).resize((224, 224))
2727
x = image.img_to_array(img)
2828
x = np.expand_dims(x, axis=0)
29-
x = eyesnet_risk_factor.preprocess_input(x)
29+
x = deepseenet_risk_factor.preprocess_input(x)
3030
return x
3131

3232

33-
def EyesNetAdvancedAMD(model='areds1'):
33+
def DeepSeeNetAdvancedAMD(model='areds'):
3434
"""
3535
Instantiates the EyesNet advanced AMD architecture.
3636
3737
Args:
38-
model: One of 'areds1' (pre-training on AREDS1),
38+
model: One of 'areds1' (pre-training on AREDS),
3939
or the path to the model file to be loaded.
4040
4141
Returns:
4242
A Keras model instance.
4343
"""
44-
if model == 'areds1':
44+
if model == 'areds':
4545
model = get_file(
4646
'advanced_amd_model.h5',
4747
ADVANCED_AMD_PATH,

deepseenet/deepseenet_drarwi.py

Lines changed: 0 additions & 45 deletions
This file was deleted.

deepseenet/deepseenet_drusen.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from keras.preprocessing import image
66
from keras.utils import get_file
77

8-
from deepseenet import eyesnet_risk_factor
8+
from deepseenet import deepseenet_risk_factor
99
from deepseenet.utils import crop2square
1010

11-
DRUSEN_PATH = 'https://github.com/yfpeng/EyesNet/releases/download/v0.1/drusen_model.h5'
11+
DRUSEN_PATH = 'https://github.com/ncbi-nlp/DeepSeeNet/releases/download/0.1/drusen_model.h5'
1212
DRUSEN_MD5 = '997a8229f972482e127e8a32d1967549'
1313

1414

@@ -26,11 +26,11 @@ def preprocess_image(image_path):
2626
img = crop2square(image.load_img(image_path)).resize((224, 224))
2727
x = image.img_to_array(img)
2828
x = np.expand_dims(x, axis=0)
29-
x = eyesnet_risk_factor.preprocess_input(x)
29+
x = deepseenet_risk_factor.preprocess_input(x)
3030
return x
3131

3232

33-
def EyesNetDrusen(model='areds1'):
33+
def DeepSeeNetDrusen(model='areds'):
3434
"""
3535
Instantiates the EyesNet drusen architecture.
3636
@@ -41,7 +41,7 @@ def EyesNetDrusen(model='areds1'):
4141
Returns:
4242
A Keras model instance.
4343
"""
44-
if model == 'areds1':
44+
if model == 'areds':
4545
model = get_file(
4646
'drusen_model.h5',
4747
DRUSEN_PATH,

deepseenet/deepseenet_f2.py

Lines changed: 0 additions & 69 deletions
This file was deleted.

deepseenet/deepseenet_feature.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)