Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI v3.0.0a released #412

Closed
torzdf opened this issue Jun 3, 2018 · 31 comments
Closed

GUI v3.0.0a released #412

torzdf opened this issue Jun 3, 2018 · 31 comments

Comments

@torzdf
Copy link
Collaborator

torzdf commented Jun 3, 2018

Ok, this is alpha, with known bugs, but I'm releasing now, so that any other bugs can be found and squashed before pushing to master. Please feedback with any issues, whilst I finalise.

The latest GUI can be tested by checking out the gui-v3.0 branch of this repo:
https://github.com/deepfakes/faceswap/tree/gui-v3.0

Known bugs:

  • macOS tooltips still not working.
  • Locale issue not yet fixed.
  • layout issue on Windows 10 (and potentially others)
  • Possibly fixed - currently untested - ffmpeg doesn't work properly (merge conflict between my changes and @AbysmalBiscuit new filehandlers)
  • sort not working
  • Progress bar not working for sort tool
  • sometimes graphs fail to generate when commencing training

This is a major overhaul of the GUI, and probably the final release apart from bugfixes. I do still intend to add a job queue at some point in the future, but didn't want to delay the release any longer.

New features:

  • tools.py and faceswap.py now both accessible from the same GUI
  • tqdm/loss output to console removed and added to new progress bar/status bar in the gui
  • Previews on extract/convert (preview updates every 5 seconds to reduce disk contention)
  • Previews for GAN now all load
  • Ability to pop training previews into their own window (as per default faceswap behaviour). Previews for the GUI are now handled internally, and can be switched off. To enable the external previews, just check the preview option on training.
  • Generate command line arguments
  • New 'Analysis' tab. Fairly basic stuff, but each training session now saves it's stats into the model folder. The analysis tab enables you to see total, or individual stats for all sessions on a given model, graph the progress and save the stats out to csv.
  • DPI scaling fix for windows (untested)
  • Save graphs and previews to disk

analysis
analysis2

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 3, 2018

@andenixa I implemented your DPI fix pretty much exactly as you stated, but can't test. Could you let me know if it works. Thanks

@andenixa
Copy link
Contributor

andenixa commented Jun 3, 2018

@torzdf sure I shall test it ASAP.
Thank you

@linkoid
Copy link

linkoid commented Jun 5, 2018

I got this error when I tried to use it at first:

from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
ImportError: cannot import name 'NavigationToolbar2Tk'

I had to uninstall and reinstall matplotlib again and it worked.
Nothing seems to be an issue now, but I figured I should mention it so you could add a note about it or something.

However, on a separate note if the settings window isn't wide enough, you can't see the scroll bar. The version in the master branch acts this way as well. I have to resize that window every time I reopen the gui to see it.

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 5, 2018

Thanks for the feedback.

I'll add a minimum requirement version for matplotlib, they changed the naming convention for NavigationToolbar2Tk

What OS are you using? It displays differently in different OSes, so I'll try to set the geometry for the OS that requires the most space.

@LordJenQ3
Copy link

Sometimes when I start training, the graph won't show up. Error message:

/home/USER//faceswapNewGui/env/lib/python3.6/site-packages/numpy/lib/polynomial.py:584: RuntimeWarning: invalid value encountered in true_divide
lhs /= scale
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.6/tkinter/init.py", line 1705, in call
return self.func(*args)
File "/usr/lib/python3.6/tkinter/init.py", line 749, in callit
func(*args)
File "/home/USER/faceswapNewGui/lib/gui/display_page.py", line 211, in
self.after(waittime, lambda t=waittime: self.update_page(t))
File "/home/USER/faceswapNewGui/lib/gui/display_page.py", line 210, in update_page
self.load_display()
File "/home/USER/faceswapNewGui/lib/gui/display_page.py", line 221, in load_display
self.display_item_process()
File "/home/USER/faceswapNewGui/lib/gui/display_command.py", line 157, in display_item_process
selections=["raw", "trend"])
File "/home/USER/faceswapNewGui/lib/gui/stats.py", line 214, in init
self.refresh()
File "/home/USER/faceswapNewGui/lib/gui/stats.py", line 220, in refresh
self.get_calculations()
File "/home/USER/faceswapNewGui/lib/gui/stats.py", line 302, in get_calculations
self.stats[key] = method(raw)
File "/home/USER/faceswapNewGui/lib/gui/stats.py", line 334, in calc_trend
fit = np.polyfit(x_range, data, 3)
File "/home/USER/faceswapNewGui/env/lib/python3.6/site-packages/numpy/lib/polynomial.py", line 585, in polyfit
c, resids, rank, s = lstsq(lhs, rhs, rcond)
File "/home/USER/faceswapNewGui/env/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 2041, in lstsq
0, work, lwork, iwork, 0)
ValueError: On entry to DLASCL parameter number 4 had an illegal value

Status remains:"Waiting for graph"

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 6, 2018

Yeah, I've seen that too. Normally if I kill training and start again it goes away. I'd imagine it's to do with attempting to calculate the polynormal when there isn't enough data. I'll look to fix this

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 6, 2018

FYI, I'm not going to be able to work on this until next week, but please keep reporting bugs. Thanks!

@LordJenQ3
Copy link

Happens here in the same situation, when attempting to restart the training.

@luiscosio
Copy link
Contributor

@torzdf Effmpeg tab gets stuck (but I see that this is a known bug), but everything is working on Windows 2016

@andenixa
Copy link
Contributor

andenixa commented Jun 6, 2018

@torzdf negative on the GUI DPI, its still upscaled at MS Windows, but probably for the best.
That way at least the layout is preserved.

@luiscosio
Copy link
Contributor

Loading...
Please backup your data and/or test the tool you want to use with a smaller data set to make sure you understand how it works.
Traceback (most recent call last):
File "C:\Users\Administrator\faceswap\tools.py", line 40, in <module>
ARGUMENTS.func(ARGUMENTS)
File "C:\Users\Administrator\faceswap\lib\cli.py", line 79, in execute_script
script = self.import_script()
File "C:\Users\Administrator\faceswap\lib\cli.py", line 28, in import_script
Process exited.module = import_module(mod)

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'scripts.sort'

Sort doesn't work.

@ruah1984
Copy link

ruah1984 commented Jun 7, 2018

is this include 128??

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 7, 2018

Yeah, it's merged with @andenixa 128 work. He may want to push more changes, but I will merge both to master when I have squashed the bugs next week,

@linkoid
Copy link

linkoid commented Jun 9, 2018

I use Windows 10.

@andenixa
Copy link
Contributor

andenixa commented Jun 12, 2018

@torzdf not sure if its still a thing but I am fished with the new Original 128 model.
For one its rather fast. I don't recommend raising dense layer size. I'd try batch_size 16 and lower though.

It features two different modes: Original (HgihRes) and Shaonlu (not GAN). I personally think Shaonlu's has more generalization, but that's debatable.

@tjess78
Copy link

tjess78 commented Jun 12, 2018

@andenixa nice to hear!
Could you please explain what you mean with Shaoanlu mode? I know Shaoanlu only for his GAN-specific experiments.
Thanks!

@andenixa
Copy link
Contributor

andenixa commented Jun 12, 2018

@tjess78 sure. Basically apart from GAN which ain't performing too well Shaoanlu uses a unique activation with Convolution layers which is different from LeakyRelu used by most if not all Autoencoder models.
I did several experiments and in many cases Shaoanlu activation provides better generalization at an increased memory and computational cost. So by default OriginalHighRes model uses Shaoanlu Encoder's and decoder (minus mask and GAN part, obviously). If you are getting Recourse Exhausted exceptions or just find the training is taking too long you could switch to ENCODER = EncoderType.ORIGINAL in Model.py file which is far less computationally extensive. It might even give you a better result depending on the data-sets.

@tjess78
Copy link

tjess78 commented Jun 12, 2018

@andenixa thanks for the response! Good to know, I will test both modes with several data-sets

@andenixa
Copy link
Contributor

andenixa commented Jun 12, 2018

@tjess78
One thing when testing, regardless the common opinion that both sets ought to be huge, its better to keep set B (your target face) rather small and clean. No more than 2000-3000 crisp shots that would include diverse directions, lighting and expressions. Shots which are too similar don't help the learning but rather slow it down.

@LordJenQ3
Copy link

That's the point, when it comes to the sorting tool. Sorting by hist-dissim (histogram dissimilarity), deleting all pictures at the end of the directory.

Btw.: Why is in faceswap's sorting tool the option "group" existing ? Only know that one from Iperov's script

@scarecrow2415
Copy link

python faceswap.py gui
Traceback (most recent call last):
File "faceswap.py", line 36, in
ARGUMENTS.func(ARGUMENTS)
File "C:\Users\kwg20\Desktop\test\pythondf\pythondf\python-3.6.3.amd64\faceswap-gui-v3.0\lib\cli.py", line 79, in execute_script
script = self.import_script()
File "C:\Users\kwg20\Desktop\test\pythondf\pythondf\python-3.6.3.amd64\faceswap-gui-v3.0\lib\cli.py", line 28, in import_script
module = import_module(mod)
File "C:\Users\kwg20\Desktop\test\pythondf\pythondf\python-3.6.3.amd64\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Users\kwg20\Desktop\test\pythondf\pythondf\python-3.6.3.amd64\faceswap-gui-v3.0\scripts\gui.py", line 11, in
from lib.gui import CurrentSession, CommandNotebook, Config, ConsoleOut
File "C:\Users\kwg20\Desktop\test\pythondf\pythondf\python-3.6.3.amd64\faceswap-gui-v3.0\lib\gui_init
.py", line 2, in
from lib.gui.display import DisplayNotebook
File "C:\Users\kwg20\Desktop\test\pythondf\pythondf\python-3.6.3.amd64\faceswap-gui-v3.0\lib\gui\display.py", line 10, in
from .display_analysis import Analysis
File "C:\Users\kwg20\Desktop\test\pythondf\pythondf\python-3.6.3.amd64\faceswap-gui-v3.0\lib\gui\display_analysis.py", line 8, in
from .display_graph import SessionGraph
File "C:\Users\kwg20\Desktop\test\pythondf\pythondf\python-3.6.3.amd64\faceswap-gui-v3.0\lib\gui\display_graph.py", line 14, in
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
ImportError: cannot import name 'NavigationToolbar2Tk'

why is this happening?

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 13, 2018

@scarecrow2415 what version of matplotlib are you using? Try re-installing the latest version of matplotlib. I'll bump the version requirements.

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 14, 2018

Updated with latest Original 128 mode from @andenixa
tools.py bug fixed (should execute now)
ffmpeg potentially fixed (needs testing)

Some reworking of the code done, so please report any new bugs.

Thanks

@luiscosio
Copy link
Contributor

luiscosio commented Jun 15, 2018 via email

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 15, 2018

Please keep model 128 talk to issue #385, thanks

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 15, 2018

Latest commit:
Fix issue with graphing when commencing training (@LordOEQJen )
Bump matplotlib version to hopefully fix issues with the navigation toolbar (You will need to update your matplotlib to at least version 2.2.2 if you are having issues)
Fix Progress bar for sort/tools
Merge @andenixa 6GB memory fix for highres model

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 16, 2018

@linkoid What screen resolution are you running? Have you any strange DPI settings? I've just fired it up in windows 10 and it displays fine for me. Could you provide a screengrab?

Thanks

@koest
Copy link

koest commented Jun 18, 2018

So excited about the GUI V3.0.0.a. I tried it but the effmpeg didn't work when I clicked the output folder
https://s1.ax1x.com/2018/06/18/CxDO5n.png

I input manually and clicked the effmepg, the windows closed.

I tried Extract, train, and convert, it works fine.
I used Windows7

May I ask if I could translate the GUI language?

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 18, 2018

@AbysmalBiscuit is working on the effmpeg code at the moment.

Please feel free to raise a PR for multilanguage support. If you need any pointers you can ask in discord

@koest
Copy link

koest commented Jun 18, 2018

@torzdf Thank you!

@torzdf
Copy link
Collaborator Author

torzdf commented Jun 20, 2018

beta now merged to master.

@torzdf torzdf closed this as completed Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants