Skip to content

Commit

Permalink
SSDUtils: Fix the extra_scale parameter
Browse files Browse the repository at this point in the history
The parameter was mistakenly set to 100 times the correct value.

It has been reported independently by @LeoIV and @khle08. Thanks!

Fixes #2
Fixes #22
Fixes #39
Fixes #40
  • Loading branch information
ljanyst committed Feb 3, 2019
1 parent 1fcb6a7 commit ebf1b11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ssdutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
SSDMap(Size( 3, 3), 0.725, [2, 0.5]),
SSDMap(Size( 1, 1), 0.9, [2, 0.5])
],
extra_scale = 107.5,
extra_scale = 1.075,
num_anchors = 8732),
'vgg512': SSDPreset(name = 'vgg512',
image_size = Size(512, 512),
Expand All @@ -57,7 +57,7 @@
SSDMap(Size( 2, 2), 0.75, [2, 0.5]),
SSDMap(Size( 1, 1), 0.9, [2, 0.5])
],
extra_scale = 105,
extra_scale = 1.05,
num_anchors = 24564)
}

Expand Down Expand Up @@ -105,6 +105,7 @@ def get_anchors_for_preset(preset):
anchors = []
for k in range(len(preset.maps)):
fk = preset.maps[k].size[0]
s = preset.maps[k].scale
for size in box_sizes[k]:
for j in range(fk):
y = (j+0.5)/float(fk)
Expand Down

0 comments on commit ebf1b11

Please sign in to comment.