Change downscaling filters when photo training
This commit is contained in:
parent
aaac6ed6e5
commit
a975155828
|
@ -74,16 +74,23 @@ local function active_cropping(x, y, size, p, tries)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function pairwise_transform.scale(src, scale, size, offset, n, options)
|
function pairwise_transform.scale(src, scale, size, offset, n, options)
|
||||||
local filters = {
|
local filters;
|
||||||
"Box","Box", -- 0.012756949974688
|
|
||||||
"Blackman", -- 0.013191924552285
|
if options.style == "photo" then
|
||||||
--"Cartom", -- 0.013753536746706
|
filters = {
|
||||||
--"Hanning", -- 0.013761314529647
|
"Box", "lanczos", "Catrom"
|
||||||
--"Hermite", -- 0.013850225205266
|
}
|
||||||
"Sinc", -- 0.014095824314306
|
else
|
||||||
"Lanczos", -- 0.014244299255442
|
filters = {
|
||||||
"Catrom"
|
"Box","Box", -- 0.012756949974688
|
||||||
}
|
"Blackman", -- 0.013191924552285
|
||||||
|
--"Catrom", -- 0.013753536746706
|
||||||
|
--"Hanning", -- 0.013761314529647
|
||||||
|
--"Hermite", -- 0.013850225205266
|
||||||
|
"Sinc", -- 0.014095824314306
|
||||||
|
"Lanczos", -- 0.014244299255442
|
||||||
|
}
|
||||||
|
end
|
||||||
local unstable_region_offset = 8
|
local unstable_region_offset = 8
|
||||||
local downscale_filter = filters[torch.random(1, #filters)]
|
local downscale_filter = filters[torch.random(1, #filters)]
|
||||||
local y = preprocess(src, size, options)
|
local y = preprocess(src, size, options)
|
||||||
|
|
Loading…
Reference in a new issue