Author Topic: [FF7PC]FF7 SYW V3, Battle, world map and fields with ERSGAN (WIP)  (Read 38140 times)

blippyp

  • *
  • Posts: 100
    • View Profile
-I swiped thru just over 1.3K images in like 10 minutes
>I think you do something wrong, i own a gtx1060, the process uses about 90% of gpu (gpu is the bottleneck in basicSR) and it take about 3 minutes for 200 iter (and the learning process need to do 500 000 iter, so about 5.2days 24h/24h)

ya, I have the same card and I just compared the PSNR model with the one it produced for me and the results were identical actually, so I'm guessing it wasn't doing anything. I think this is related to the worker/batch arguments I modified to get it to 'work'. I'm guessing I'll have to try a linux install due to this torch issue in windows I suppose. What OS are you using?

blippyp

  • *
  • Posts: 100
    • View Profile
-I swiped thru just over 1.3K images in like 10 minutes
>I think you do something wrong, i own a gtx1060, the process uses about 90% of gpu (gpu is the bottleneck in basicSR) and it take about 3 minutes for 200 iter (and the learning process need to do 500 000 iter, so about 5.2days 24h/24h)

As a side note, just for confirmation on how I did it. I put the 'original hi-res' images in the hqval folder, and my original downsized versions in the lqval folder. I then ran the extract_subimgs_single.py script on my hqval folder putting those files into the hr folder, and then downsized those and put them into my lr folder if that makes sense. I also ran that command you gave me on all the mages to makes sure they were all png 24 format.

satsuki

  • *
  • Posts: 782
    • View Profile
    • My softs (french only)
That's not exactly the way it needed to be

1)Took your HQ pictures and run extract_subimgs_single.py on that folder
>Results in a ff8hq folder

2)Took the picture from  ff8hq folder and make a 25% downsize
>Results in a ff8lq folder

3)Copy about 10%/15% of pictures from  ff8hq folder
>Results in ff8hqval folder

4)Copy about 10%/15% of (the same than hq) pictures from  ff8lq folder
>Results in ff8lqval folder

5)"Normalize" with imagemagik

edit your train_esrgan.json file with your folders:
Code: [Select]
, "datasets": {
    "train": {
      "name": "FF8"
      , "mode": "LRHR"
      , "dataroot_HR": "E:/ESRGANModel/Dataset/ff8hq"
      , "dataroot_LR": "E:/ESRGANModel/Dataset/ff8lq"
      , "subset_file": null
      , "use_shuffle": true
      , "n_workers": 4
      , "batch_size": 8
      , "HR_size": 128
      , "use_flip": true
      , "use_rot": true
    }
   , "val": {
      "name": "val_set14_part"
      , "mode": "LRHR"
      , "dataroot_HR": "E:/ESRGANModel/Dataset/ff8hqval"
      , "dataroot_LR": "E:/ESRGANModel/Dataset/ff8lqval"
   }

launch the training ^^

As workers don't seems to work, try the values 1-2 or 2-4 instead of the original 8-16

My computer using windows 10 pro 1809 64 bits (corei7 8700k / 8go ram / gtx1060-6go)
here's my python config (default value without any mods, from ersgan use to basicSR):
1)install python 3.6.2 64bits
2)pip install scipy
3)pip install pillow
4)pip install numpy opencv-python
5)pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.1-cp36-cp36m-win_amd64.whl
6)pip3 install torchvision
7)pip install numpy opencv-python
8)pip install tensorboardX
As i dont use lmdb i haven't put it here, but i installed it with a wheel file because of the well know vc++ 14 error (even if i installed the right buildtools)

blippyp

  • *
  • Posts: 100
    • View Profile
okay, so if I'm understanding you correctly, I did exactly the same thing, except that I put all my files in the val folders (which I'm guessing would only make the process take longer in the end) and I didn't normalize my files, which again, I'm guessing would only have an effect on how my model ends up.

aside from that I didn't have scipy installed, which I just installed.

so I'm pretty confused as to why this isn't working for me, as was suggested in the notes on the github, I modified the worker/batch arguments and now the process seems to complete, but the model doesn't actually 'change', instead it just makes a copy of it from what I can tell and it completed the training super fast.

oh the joys of all of this... the best part is that if I figure this out, I can look forward to days of my computer doing nothing but crunching numbers just to end up with an even worse model than what I'm already using haha ;-P

satsuki

  • *
  • Posts: 782
    • View Profile
    • My softs (french only)
The imagemagic normalization is only if you get a picture import error while runing training.
Have you tried the worker-batch to 1-2 or 2-4, i think the "0" worker you used make it bugs

"... the best part is that if I figure this out, I can look forward to days of my computer doing nothing but crunching numbers just to end up with an even worse model than what I'm already using"
That will probably be the same for my model training, but with a lot of luck maybe ....
« Last Edit: 2019-01-13 09:17:46 by satsuki »

blippyp

  • *
  • Posts: 100
    • View Profile
Have you tried the worker-batch to 1-2 or 2-4, i think the "0" worker you used make it bugs

ya, anything above 0 makes it crash for some reason, we seem to have nearly identical systems, except that I'm using an i5, not that it should matter much though considering we're using our GPU's, which are identical. However I'm on Windows 7 and using Python 3.7.1. I'm pretty sure I ran into this issue before I even started using lmdb, so don't think it's related, but I'm not aware of the buildtools bug you were talking about which might be part of the problem I suppose. My guess is that the issue has more to do with either the OS differences or the Python version differences. I also just realized that I'm using PyTorch v1.0 not 0.4.1, but every attempt so far to downgrade has failed with  a 'not supported wheel on this platform' message :'(
« Last Edit: 2019-01-13 14:21:59 by blippyp »

blippyp

  • *
  • Posts: 100
    • View Profile
Okay, I'm a big dummy and should of listened to you to begin with! :P
I disabled lmdb, and off it went without a hitch using the variables as they should be. (so much wasted time, I even installed python 3.6.7, 3.6.2, Anaconda...) haha
definitely taking a lot longer now...

satsuki

  • *
  • Posts: 782
    • View Profile
    • My softs (french only)
Great you made it works ^^

AlphaAtlas

  • *
  • Posts: 9
    • View Profile
Thanks for your works, i think i'll have some fun with this ^^


I lied about having plenty of time to finish it this weekend ;D. This is a WIP, but a functional WIP:

https://github.com/AlphaAtlas/vs_mxnet_helper/

You can format the imagemagik input to take (and write) a sequence of images easily enough, but among many other things, I need to figure out a script that can work through a whole directory recursively.




blippyp

  • *
  • Posts: 100
    • View Profile
You can format the imagemagik input to take (and write) a sequence of images easily enough, but among many other things, I need to figure out a script that can work through a whole directory recursively.

I didn't really look at it much, but noticed you were using python and batch scripting, recursion is pretty simple tbh:

BATCH FILE RECURSION
Code: [Select]
@echo off
for /r %%f in (*.*) do (
echo The File: %%f
echo The Directory: %%~pf
echo The Filename: %%~nf
echo The File Extension: %%~xf
)

PYTHON RECURSION
Code: [Select]
src="C:/Windows"
for root, dirnames, filenames in os.walk(src+"/"):
for filename in fnmatch.filter(filenames, '*.*'):
infile=root+filename

AlphaAtlas

  • *
  • Posts: 9
    • View Profile
I didn't really look at it much, but noticed you were using python and batch scripting, recursion is pretty simple tbh:

BATCH FILE RECURSION
Code: [Select]
@echo off
for /r %%f in (*.*) do (
echo The File: %%f
echo The Directory: %%~pf
echo The Filename: %%~nf
echo The File Extension: %%~xf
)

PYTHON RECURSION
Code: [Select]
src="C:/Windows"
for root, dirnames, filenames in os.walk(src+"/"):
for filename in fnmatch.filter(filenames, '*.*'):
infile=root+filename

Thanks, I may use that. The real trick is feeding that data to the ImageMagick plugin, which I can't just stick in another for loop IIRC.

http://www.vapoursynth.com/doc/plugins/imwri.html

I think I can physically move/rename all the images to a single directory with that script, let Vapoursynth do its thing on the nicely formatted images, then move the processed images back using the saved directory data once the script is done.
« Last Edit: 2019-01-14 13:58:48 by AlphaAtlas »

blippyp

  • *
  • Posts: 100
    • View Profile
it's been a while, but imagemagick has it's own way of dealing with multiple files (I believe they are sequential, ie: image000.png, image001.png, image002.png) so if your files are number as such they are easy to manipulate. If you're moving files around that don't have names like that, you'll have to generate the names for the files and then likely keep a record as well (image000.png=somefile.png, image001.png=anotherfile.png, etc...) then when you're done manipulating the files in sequence, rename them again.

MarinoKadame

  • *
  • Posts: 14
    • View Profile
Finally some breakthrough for the pre-rendered backgrounds. The other method would have been to remake em in a 3D software which can take lot of work.

satsuki

  • *
  • Posts: 782
    • View Profile
    • My softs (french only)
Game checked to the end.

To do before release:
-Need to find better filtering for 12 fields.
-Need to do some world map and battle fields optimisation.
-Need to wait the final alpha test from azertyuiop2 (ff7.fr) to spot bug or optimisation i havent seen.

After the release:
-Check if i can do a good videos upscale method

mikevincent

  • *
  • Posts: 40
    • View Profile
This looks so good. Just wonder exactly what pc version of FFVII do I need to make this mod work?

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Downgraded steam version or the 98 release with Aali's driver.

mikevincent

  • *
  • Posts: 40
    • View Profile
Downgraded steam version or the 98 release with Aali's driver.

Thank you.

bottaluscio

  • *
  • Posts: 1
    • View Profile
Hi, I want to say, amazing job! Really wanted to play FFVII again before the remaster, it's my childhood favorite game!
Just got a few questions:
  • How much time does it need for the first release?
  • Do you need any beta tester?

Again thanks for your work, cheers! ;D

satsuki

  • *
  • Posts: 782
    • View Profile
    • My softs (french only)
The first release will take some time (i found that on some TV or mis-calibrated computer screens, the black offset isn't right (#020301 or so instead of #000000)), i'm generating the whole background again then do the game again for test.
I also need to found better filtering for some screens.

Maybe one or two month, i don't want to speed up the process, i want to do a bug free release.

I don't need more beta tester right now but i'll tell you if i need.

Clarret

  • *
  • Posts: 8
    • View Profile
I'm a little rusty on Avisynth filtering, but I'd wager the FMVs could look alright with some MVDegrain3, Gradfunkmirror and NNEDI2. Maybe with a light AddGrain to fake extra detail.

AlphaAtlas

  • *
  • Posts: 9
    • View Profile
Sorry for being kinda afk. I'll clean up the vapoursynth assistant more soon, but it more or less works now.

I'm a little rusty on Avisynth filtering, but I'd wager the FMVs could look alright with some MVDegrain3, Gradfunkmirror and NNEDI2. Maybe with a light AddGrain to fake extra detail.

I've tried NNEDI3 and fast denoiser with a test video recently, and I can tell you that neural network upscaling + KNLMeansCL or V-BM3D for temporal denoising looks WAY better.  And it shouldn't be too slow with a good GPU.

Also, when you say NNEDI2... are the source clips interlaced, or did you just mean NNEDI2 image doubling?
« Last Edit: 2019-01-25 17:55:34 by AlphaAtlas »

satsuki

  • *
  • Posts: 782
    • View Profile
    • My softs (french only)
Thanks AlphaAtlas, take your time, i'm doing the game again to correct the black offset bug i have on some screens, so i won't process the videos ATM

mikevincent

  • *
  • Posts: 40
    • View Profile
Is it possible to get just a few more gameplay screenshots?  :P

satsuki

  • *
  • Posts: 782
    • View Profile
    • My softs (french only)
here's some more ingame :















mikevincent

  • *
  • Posts: 40
    • View Profile
Thank you. Well ... I have not seen FFVII ever look better than that thats for sure. I am hoping for a release soon :)