mirror of
https://github.com/deepfakes/faceswap
synced 2025-06-07 10:43:27 -04:00
* Add tools.py command and control script for use as the main interface for various tools. The structure and approach is the same as faceswap.py Add many new features to tools/sort.py: various new sorting methods, grouping by folders, logging file renaming/movemeng, keeping original files in the input directory and improved cli options documentation. Argument parsing has been re-written to inteface with tools.py Add __init__.py empty file in tools directory for python to register it as a module so that sort.py and future tools can be easily imported. * Fix various bugs where the correct sorting method would not get called. Add new sorting methon: face-cnn-dissim. Update help documentation for face-cnn-dissim. Change default grouping to rename. Update initial print in all sorting/grouping methods to say precisely which method is being used. * Major refactor and redesign. Use dynamic method allocation to avoid large amounts of nested if-elif statements in process() function and to allow easily combine sort and group methods. Change cli arguments to make them more intuitive and work with the new design. Previous: '-g/--grouping' -> '-f/--final-processing' {folders,rename} Previous: '-by/--by' -> '-s/--sort-by' {blur,face,face-cnn,face-cnn-dissim,face-dissim,hist,hist-dissim} New: '-g/--group-by' {blur,face,face-cnn,hist} Add: '--logfile' -> '-lg/--logfile' PATH_TO_LOGFILE Greatly improve grouping performance. Grouping now has to sort using one of the sorting methods which makes the grouping stable and no longer dependent on how well the the target files are already sorted. Sorting and grouping methods can be combined in any way. If no -g/--group-by is specified by user, it will default to group by the non '-dissim' version of sort method. Different combinations of sorting and grouping methods work well for different sets of data. Fixes Fix progress updates not showing properly by setting them to print to stdout instead of stderror. Fix bug in grouping by face-cnn where wrong score method was being called. Misc Add documentation for reload_list() and splice_lists() methods because it's not obvious what they do. Add warning message to tools.py to tell users to make sure they understand how the tool they want to use works before using it. Add warning message to tools/sort.py to tell users to make sure they undrestand how the sort tool works before using it. Update help documentation to reflect new functionality and options. Set defaults for group by face-cnn to work properly with the correct score method. Amend commit in order to sign it. * Perform unittests for all options and combinations of sort and group methods: everything OK. Fix typos in help documentation.
0 lines
Python
0 lines
Python