@@ -52,7 +52,6 @@ local function active_cropping(x, y, size, p, tries)
local yc = iproc.crop(y, xi, yi, xi + size, yi + size)
return xc, yc
else
- local samples = {}
local best_se = 0.0
local best_xc, best_yc
local m = torch.FloatTensor(x:size(1), size, size)
@@ -90,12 +90,8 @@ end
local function get_image(req)
local file = req:get_argument("file", "")
local url = req:get_argument("url", "")
- local blob = nil
- local img = nil
- local alpha = nil
if file and file:len() > 0 then
- blob = file
- return image_loader.decode_float(blob)
+ return image_loader.decode_float(file)
elseif url and url:len() > 0 then
return cache_url(url)
end