|
@@ -59,7 +59,7 @@ local function convert_frames(opt)
|
|
|
end
|
|
|
fp:close()
|
|
|
for i = 1, #lines do
|
|
|
- if file_exists(string.format(opt.o, i)) == false then
|
|
|
+ if path.exists(string.format(opt.o, i)) == false then
|
|
|
local x = image_loader.load_float(lines[i])
|
|
|
local new_x = nil
|
|
|
if opt.m == "noise" and opt.noise_level == 1 then
|
|
@@ -97,16 +97,6 @@ local function convert_frames(opt)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
-function file_exists(name)
|
|
|
- local f=io.open(name,"r")
|
|
|
- if f~=nil then
|
|
|
- io.close(f)
|
|
|
- return true
|
|
|
- else
|
|
|
- return false
|
|
|
- end
|
|
|
-end
|
|
|
-
|
|
|
local function waifu2x()
|
|
|
local cmd = torch.CmdLine()
|
|
|
cmd:text()
|