Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2015
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.97 KB | None | 0 0
  1. ---What is Waifu2x?---
  2.  
  3. https://github.com/nagadomi/waifu2x
  4. Waifu2x is a neural network based image upscaler for anime images. It is primarily designed to run on CUDA.
  5. The quality increase is practically unparalleled.
  6. Demonstration Image: https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png
  7. You can test it on images yourself at http://waifu2x.udp.jp/
  8. Most crucially, it's been ported to run on .avi videos, hence it can upscale anime to quality previously unavalible.
  9.  
  10. ---What is this process for?---
  11.  
  12. This process takes a .avi video and runs waifu2x on it to generate an unparalleled high quality upscale.
  13. Uncompressed .avi files have monsterously impractical file sizes (200gb per episode would be typical)
  14. Hence this process carries out a convulted system of encoding to generate very small file sizes for the quality of video.
  15. The audio gets split from the video by the process and then needs to be remerged.
  16.  
  17. ---What is this process worth using on?---
  18.  
  19. Anime where the best release avalible is DVD quality or equivalent or worse will see the most benefit from this process.
  20. Anime that already recieved a BD or HD quality release will recieve less benefit from this process (and take longer)
  21. Maybe there's someone out there with a fetish for UHD anime?
  22.  
  23. ---Requirements---
  24.  
  25. A .avi video
  26. An Nvidia GPU that can utilize CUDA
  27. A lot of time to set up all the programs you need.
  28. A lot of time (dependant upon GPU model) to process the video using waifu2x-w2xc (0.25fps on a GTX770 on DVD quality)
  29. Can be done without CUDA but expect ~0.02fps
  30.  
  31. ---Step 1: Getting AviUtl---
  32.  
  33. 1. Go to http://www.htasoft.com/aviutl/aviutl.htm for information
  34. 2. Download AviUtl here: http://spring-fragrance.mints.ne.jp/aviutl/
  35. 3. Download http://www.htasoft.com/aviutl/aviutlengsettings.zip and unzip it all into the AviUtl folder, replacing files
  36. 4. You now have an English-translated AviUtl
  37.  
  38. ---Step 2: Getting waifu2x-w2xc plugin---
  39.  
  40. 1. Go to https://github.com/YSRKEN/aviutl-waifu2x-w2xc and google translate it to read up on it
  41. 2. Ensure you have Visual C++ redistributable package 2013
  42. 3. Install by downloading the plugins folder and extracting it
  43. 4. The folder titled "plugins" needs to be within the AviUtl directory and contain both models_rgb folders and the .auf
  44.  
  45. ---Step 3: Getting x264vfw---
  46.  
  47. 1. This doesn't need an explanation: http://sourceforge.net/projects/x264vfw/
  48.  
  49. ---Step 4: Getting Avi-Mux GUI---
  50.  
  51. 1. This doesn't need an explanation: http://www.alexander-noe.com/video/amg/
  52.  
  53. ---Step 5: Getting AviUtl-waifu2x-w2xc to happen---
  54.  
  55. 1. Load up the target .avi
  56. 2. Under Filter select waifu2x-w2xc
  57. 3. Under settings select waifu2x-w2xc
  58.  
  59. Explanation of next dialogue:
  60.  
  61. Noise 0 is no noise reduction. Noise 1 is Normal noise reduction. Noise 2 is High noise reduction
  62. High noise reduction is most suited to JPEG, not to video. You may want to test all the settings to determine the best
  63. Scale 0 is no increase in resolution. Scale 1 is a 2x increase in resolution (what we want)
  64. Block is related to how CUDA works in some ridiculously complicated way
  65. Have Use GPU ticked or you will die of old age before the video finishes processing
  66. Leave photography unticked
  67.  
  68. 4. Set Block to the vertical resolution of the input footage.
  69. To adjust the slider quickly instead of reprocessing every tick, you may want to close the file then reopen when done
  70. 5. Close the dialogue
  71.  
  72. If at this point the program crashes or hangs, set block back to 128 and use that in future.
  73.  
  74. You will get an error with different text depending upon whether you are using Japanese AppLocal
  75. Japanese: サイズが大きすぎます!
  76. English: ƒTƒCƒY‚ª‘å‚«‚·‚¬‚Ü‚·I
  77.  
  78. This translates to "Size is too big".
  79. This means waifu2x-w2xc is increasing the resolution of the file beyond what AviUtl settings allow
  80. 6. File - General settings - system configuration
  81. 7. Set MAX picture size X and Y to double the resolution of the source AVI. Hit OK
  82. 8. Reboot AviUtl and reload the Avi. You are now good to go.
  83.  
  84. ---Step 6: Exporting from AviUtl---
  85.  
  86. 1. File -> Save Avi
  87. 2. Click "Video Codec"
  88. 3. From the dropdown select x264vfw - H.264/MPEG-4 AVC codec
  89. 4. Click "Configure"
  90. 5. Under Rate Control, set the Rate Factor to about 18.
  91. 6. Under Output, set output mode to File and select an output file location/name along the lines of AnimeEP01-Video.avi
  92. 7. Hit ok and ok again
  93. 8. Back in the main window for saving, use same location with file name along the lines of AnimeEp01-Audio.avi
  94. 9. MAKE SURE EVERYTHING YOU WANT IS SET UP CORRECTLY BEFORE CONTINUING BECAUSE YOU'RE IN FOR THE LONG HAUL NOW.
  95. 10. Click save and wait anywhere between several hours and several weeks (years if not using CUDA)
  96. 11. You now have a .avi file which has the audio but a blank video, and a .avi file with the video but no audio.
  97.  
  98. ---Step 7: Remerging the audio and video---
  99.  
  100. 1. Load up AVI-Mux GUI
  101. 2. Open both the audio and video files via drag and drop
  102. 3. Select each of the files in the program and click "Generate data source from files" (you need to do this 1 at a time)
  103. 4. In the lower GUI find the line that says something like "FourCC: x264 (unknown bitrate. 0.00kByte, 12:34:56.789
  104. 5. Untick the tick box next to that line
  105. 6. Click start to save the file, giving it whatever name you want
  106. 7. Save. This process is very quick compared to the previous step
  107. 8. You are done. Enjoy your extremely high quality anime
  108.  
  109. ---Extra 1: waifu2x-w2xc in multiple stages---
  110.  
  111. Leaving waifu2x-w2xc doing it's stuff in AviUtl for several days straight might not be the best idea.
  112. Any interuption to the process and you would have to start over
  113. Hence, it may be important to do the process in multiple stages.
  114.  
  115. 1. Install AviDemux http://www.videohelp.com/software/AviDemux
  116. 2. Do the above process as normal until you reach Step 6
  117. 3. Get the total number of frames at the top (it looks like [1/34567] where the second number is total)
  118. 4. Split the number of frames into equalish sized segments (like 1 - 17283 and 17284-34567)
  119. 5. FOR EACH SEGMENT...
  120. Edit -> select processing range
  121. Enter the start and end frame of that segment and hit ok
  122. Do step 6 as per normal, giving each segment a different name
  123. 6. Carry out step 7 on every segment to create the merged segments
  124. 7. Boot up AviDemux
  125. 8. Open the FIRST merged segment
  126. 9. Use File -> Append to append the SECOND through LAST merged segment
  127. 10. File -> Save
  128. 11. You are done. Enjoy your extremely high quality anime
  129.  
  130. ---Extra 2: Speeding shit up---
  131.  
  132. This document should already have made it very clear how slow this process is
  133. Doing it on an entire anime series with typical hardware would take almost as long as it does for each episode to come out
  134. Hence you would need a dedicated CUDA / Neural Network rig to do serious, frequent releases at this quality
  135. https://timdettmers.wordpress.com/2014/08/14/which-gpu-for-deep-learning/ gives some advice on making that rig
  136. In short, you probably want the Titan X. I don't know if having multiple Titan X will speed up waifu2x further.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement