Skip to content

Commit

Permalink
Merge 3e514f9 into b44b680
Browse files Browse the repository at this point in the history
  • Loading branch information
msschwartz21 committed Apr 20, 2020
2 parents b44b680 + 3e514f9 commit c13dc5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions deepcell/applications/cytoplasm_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@


WEIGHTS_PATH = ('https://deepcell-data.s3-us-west-1.amazonaws.com/'
'model-weights/general_cyto_9c7b79e6238d72c14ea8f87023ac3af9.h5')
'model-weights/general_cyto.h5')


class CytoplasmSegmentation(Application):
Expand Down Expand Up @@ -96,7 +96,7 @@ class CytoplasmSegmentation(Application):
#: Metadata for the model and training process
model_metadata = {
'batch_size': 2,
'lr': 1e-5,
'lr': 1e-4,
'lr_decay': 0.95,
'training_seed': 0,
'n_epochs': 8,
Expand All @@ -114,14 +114,15 @@ def __init__(self,
num_semantic_heads=3,
num_semantic_classes=[1, 1, 2],
location=True,
include_top=True)
include_top=True,
lite_fpn=True)

if use_pretrained_weights:
weights_path = get_file(
os.path.basename(WEIGHTS_PATH),
WEIGHTS_PATH,
cache_subdir='models',
md5_hash='4e9136df5071930a66365b2229fc358b'
md5_hash='50614f04d5dbc4b3eadd897fa5fb0e23'
)

model.load_weights(weights_path)
Expand Down
9 changes: 5 additions & 4 deletions deepcell/applications/nuclear_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@


WEIGHTS_PATH = ('https://deepcell-data.s3-us-west-1.amazonaws.com/'
'model-weights/general_nuclear_train_batch_size_82800_resnet50_'
'8_epochs_c4b2167eb754923856bc84fb29074413.h5')
'model-weights/nuclear_0_82800_resnet50_watershed_'
'076bb10d832089b6a77faed1e63ad375.h5')


class NuclearSegmentation(Application):
Expand Down Expand Up @@ -114,14 +114,15 @@ def __init__(self,
num_semantic_heads=3,
num_semantic_classes=[1, 1, 2],
location=True,
include_top=True)
include_top=True,
lite_fpn=True)

if use_pretrained_weights:
weights_path = get_file(
os.path.basename(WEIGHTS_PATH),
WEIGHTS_PATH,
cache_subdir='models',
md5_hash='eb29808ef2f662fb3bcda6986e47f91a'
md5_hash='62b6ac21807d34dd42734f43ed20756f'
)

model.load_weights(weights_path)
Expand Down

0 comments on commit c13dc5f

Please sign in to comment.