Skip to content

Commit

Permalink
Update generate_submit.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PkuRainBow authored Nov 11, 2018
1 parent 95f6ebf commit 32eaca7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions generate_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,13 @@ def predict_whole_img(net, image, classes, method, scale):
else:
interp = nn.Upsample(size=(H_, W_), mode='bilinear')

if scale > 1:
scaled_img = ndimage.zoom(image, (1.0, 1.0, scale, scale), order=1, prefilter=False)
else:
scaled_img = image
# bug
# if scale > 1:
# scaled_img = ndimage.zoom(image, (1.0, 1.0, scale, scale), order=1, prefilter=False)
# else:
# scaled_img = image

scaled_img = ndimage.zoom(image, (1.0, 1.0, scale, scale), order=1, prefilter=False)

full_prediction_ = net(Variable(torch.from_numpy(scaled_img), volatile=True).cuda(), )
if 'dsn' in method:
Expand Down

0 comments on commit 32eaca7

Please sign in to comment.