Skip to content

Commit

Permalink
added PyTorch and Keras DataGenerators (#52)
Browse files Browse the repository at this point in the history
* added PyTorch and Keras DataGenerators

* adding pyyaml to reqts

* fixing keras imports

* fixing model_io import
  • Loading branch information
nrweir committed May 29, 2019
1 parent 35dba5f commit 60c02f2
Show file tree
Hide file tree
Showing 13 changed files with 225 additions and 235 deletions.
1 change: 1 addition & 0 deletions environment.yml
Expand Up @@ -21,6 +21,7 @@ dependencies:
- scikit-image=0.15.0
- tensorflow=1.13.1
- pytorch=1.0.1
- pyyaml=5.1
- pip:
- affine==2.2.2
- albumentations==0.2.3
Expand Down
1 change: 1 addition & 0 deletions readthedocs-environment.yml
Expand Up @@ -17,6 +17,7 @@ dependencies:
- scikit-image=0.15.dev0
- tensorflow=1.13.1
- pytorch=1.0.1
- pyyaml=5.1
- pip:
- affine=2.2.1
- albumentations=0.2.2
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Expand Up @@ -16,3 +16,4 @@ torch==1.0.1.post2
affine==2.2.2
albumentations==0.2.3
rio-tiler==1.2.4
pyyaml==5.1
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -17,7 +17,8 @@
'torch>=1.0.1',
'affine>=2.2.1',
'albumentations>=0.2.2',
'rio-tiler>=1.2.4'
'rio-tiler>=1.2.4',
'pyyaml>=5.1'
]

version = '0.0.1'
Expand Down
8 changes: 6 additions & 2 deletions solaris/data/config_skeleton.yml
@@ -1,5 +1,5 @@
################################################################################
################# CW-NETS MODEL CONFIGURATION SKELETON #########################
################# SOLARIS MODEL CONFIGURATION SKELETON #########################
################################################################################

# This skeleton lays out the required instructions for running a model using
Expand All @@ -20,8 +20,11 @@ nn_framework: # if not using a model included with the package, use this
data_specs:
width: # width of the input images taken in by the neural net.
height: # height of the input images taken in by the neural net.
bit_depth: # 8 or 16.
image_type: normalized # format of images. options are 'normalized',
# 'zscore', '8bit', '16bit'
channels: # number of channels in the input imagery.
label_type: mask # one of ['mask', 'bbox']
mask_channels: 1 # number of channels in the training mask
val_holdout_frac: # if empty, assumes that separate data ref files define the
# training and validation dataset. If a float between 0 and
# 1, indicates the fraction of training data that's held
Expand All @@ -48,6 +51,7 @@ training_augmentation: # augmentations for use with training data
# include augmentations here. See the documentation for options and
# required arguments.
p: 1.0 # probability of applying the entire training augmentation pipeline.
shuffle: true # should the image order be shuffled in each epoch.
validation_augmentation: # augmentations for use with validation data
augmentations:
# include augmentations here
Expand Down
2 changes: 1 addition & 1 deletion solaris/nets/callbacks.py
@@ -1,4 +1,4 @@
from keras.callbacks import Callback
from tensorflow.keras.callbacks import Callback
import numpy as np


Expand Down

0 comments on commit 60c02f2

Please sign in to comment.