Skip to content

Commit

Permalink
Select backbone ResNet50/101 in config.
Browse files Browse the repository at this point in the history
  • Loading branch information
waleedka committed Mar 16, 2018
1 parent 4682e01 commit 22a80f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class Config(object):
# down the training.
VALIDATION_STEPS = 50

# Backbone network architecture
# Supported values are: resnet50, resnet101
BACKBONE = "resnet101"

# The strides of each layer of the FPN Pyramid. These values
# are based on a Resnet101 backbone.
BACKBONE_STRIDES = [4, 8, 16, 32, 64]
Expand Down
2 changes: 1 addition & 1 deletion model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ def build(self, mode, config):
# Bottom-up Layers
# Returns a list of the last layers of each stage, 5 in total.
# Don't create the thead (stage 5), so we pick the 4th item in the list.
_, C2, C3, C4, C5 = resnet_graph(input_image, "resnet101", stage5=True)
_, C2, C3, C4, C5 = resnet_graph(input_image, config.BACKBONE, stage5=True)
# Top-down Layers
# TODO: add assert to varify feature map sizes match what's in config
P5 = KL.Conv2D(256, (1, 1), name='fpn_c5p5')(C5)
Expand Down

0 comments on commit 22a80f3

Please sign in to comment.