1
0
Fork 0
mirror of synced 2024-05-16 19:02:21 +12:00

Merge branch 'dev'

This commit is contained in:
nagadomi 2017-04-16 04:40:02 +09:00
commit 5fe6cf6ef8
2 changed files with 6 additions and 7 deletions

View file

@ -52,7 +52,12 @@ function pairwise_transform.user(x, y, size, offset, n, options)
xc:add(-mean)
end
end
table.insert(batch, {xc, iproc.crop(yc, offset, offset, size - offset, size - offset)})
yc = iproc.crop(yc, offset, offset, size - offset, size - offset)
if options.pairwise_y_binary then
yc[torch.lt(yc, 0.5)] = 0
yc[torch.gt(yc, 0)] = 1
end
table.insert(batch, {xc, yc})
end
return batch

View file

@ -108,12 +108,6 @@ function pairwise_transform_utils.preprocess_user(x, y, scale_y, size, options)
x = iproc.crop_mod4(x)
y = iproc.crop_mod4(y)
if options.pairwise_y_binary then
y[torch.lt(y, 128)] = 0
y[torch.gt(y, 0)] = 255
end
return x, y
end
function pairwise_transform_utils.active_cropping(x, y, lowres_y, size, scale, p, tries)