waifu2x-ncnn-vulkan icon indicating copy to clipboard operation
waifu2x-ncnn-vulkan copied to clipboard

可否增加一个跳过(不覆盖)已有文件的选项?

Open kingofotaku opened this issue 4 years ago • 9 comments

很抱歉英文不好,只能用中文写。我的意思是假如在转换大量图片过程中因为某些原因中断的话。目前就只能全部重新转换(因为转换顺序好像是随机的,所以无法筛选出已转换文件),所以希望能够加上类似的选项以节省时间。

kingofotaku avatar Apr 09 '20 07:04 kingofotaku

I'm sorry that English is not good, I can only write in Chinese. What I mean is if the process of converting a large number of pictures is interrupted for some reason. At present, it can only be converted again (because the conversion order seems to be random, so it is impossible to filter out the converted files), so I hope to add similar options to save time.

(Sorry, don't speak Chinese.) Could you write a shell script similar to this one? to translate them one at a time to fix this. It is not ideal, but it could work.

(对不起,不会说中文,这是google翻译的。)您能写一个与此类似的shell脚本吗? 一次翻译一个即可解决。 这不是理想的方法,但是它可以工作。

Nova-Aurora avatar May 21 '20 19:05 Nova-Aurora

I'm sorry that English is not good, I can only write in Chinese. What I mean is if the process of converting a large number of pictures is interrupted for some reason. At present, it can only be converted again (because the conversion order seems to be random, so it is impossible to filter out the converted files), so I hope to add similar options to save time.

(Sorry, don't speak Chinese.) Could you write a shell script similar to this one? to translate them one at a time to fix this. It is not ideal, but it could work.

(对不起,不会说中文,这是google翻译的。)您能写一个与此类似的shell脚本吗? 一次翻译一个即可解决。 这不是理想的方法,但是它可以工作。

(also use machine translation) Thank you for your advice. Although this is a solution, I think it will significantly reduce the conversion efficiency, if you can enter more than one file at a time is another matter.

kingofotaku avatar May 22 '20 01:05 kingofotaku

conversion number is not random if all the filenames are in order. if the filename is not important do ctrl+a press f2 and DEL then ENTER to give all files in the folder a number (default behavior on windows)

then you can put 500 files at a time in one folder and process them (to avoid process interruption with too many files)

lextra2 avatar May 28 '20 23:05 lextra2

conversion number is not random if all the filenames are in order. if the filename is not important do ctrl+a press f2 and DEL then ENTER to give all files in the folder a number (default behavior on windows)

then you can put 500 files at a time in one folder and process them (to avoid process interruption with too many files)

Just now, I tested it with the latest release, and the results showed that the conversion order was still random.

kingofotaku avatar Jun 02 '20 13:06 kingofotaku

conversion order is not random if you follow my instructions

lextra2 avatar Jun 02 '20 14:06 lextra2

conversion order is not random if you follow my instructions

Unfortunately. Even if I modify the file name as you suggest, it is still randomly sorted. I use the following command: waifu2x-ncnn-vulkan.exe -n 0 -v -t 230 -j 4:4:4 -m models-cunet -i C:\Users\Administrator\Desktop\test1 -o C:\Users\Administrator\Desktop\test2 Finally output the following log: C:\Users\Administrator\Desktop\test1/(8).jpg -> C:\Users\Administrator\Desktop\test2/(8).jpg.png done C:\Users\Administrator\Desktop\test1/(6).jpg -> C:\Users\Administrator\Desktop\test2/(6).jpg.png done C:\Users\Administrator\Desktop\test1/(3).jpg -> C:\Users\Administrator\Desktop\test2/(3).jpg.png done C:\Users\Administrator\Desktop\test1/(1).jpg -> C:\Users\Administrator\Desktop\test2/(1).jpg.png done C:\Users\Administrator\Desktop\test1/(7).jpg -> C:\Users\Administrator\Desktop\test2/(7).jpg.png done C:\Users\Administrator\Desktop\test1/(4).jpg -> C:\Users\Administrator\Desktop\test2/(4).jpg.png done C:\Users\Administrator\Desktop\test1/(9).jpg -> C:\Users\Administrator\Desktop\test2/(9).jpg.png done C:\Users\Administrator\Desktop\test1/(10).jpg -> C:\Users\Administrator\Desktop\test2/(10).jpg.png done C:\Users\Administrator\Desktop\test1/(2).jpg -> C:\Users\Administrator\Desktop\test2/(2).jpg.png done C:\Users\Administrator\Desktop\test1/(5).jpg -> C:\Users\Administrator\Desktop\test2/(5).jpg.png done

kingofotaku avatar Jun 02 '20 14:06 kingofotaku

conversion order is not random if you follow my instructions

I may have found out why.because of the parameter " -j 4:4:4", and if it is " -j 1:2:2" by default, it will sort as correctly as you said.

kingofotaku avatar Jun 02 '20 14:06 kingofotaku

thats odd. but good thing you've figured it out.

lextra2 avatar Jun 03 '20 11:06 lextra2

conversion order is not random if you follow my instructions

I may have found out why.because of the parameter " -j 4:4:4", and if it is " -j 1:2:2" by default, it will sort as correctly as you said.

Processing order should be more stable since https://github.com/nihui/waifu2x-ncnn-vulkan/commit/80c810576194c6ecfa6909afbb5c0312da9679b3

nihui avatar Jul 24 '20 11:07 nihui