mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-30 19:50:08 -07:00
added sort by one face in images. it trashes all images in which more than 1 face is found
This commit is contained in:
parent
65752e044b
commit
5e474c3462
4 changed files with 23 additions and 6 deletions
4
main.py
4
main.py
|
@ -61,7 +61,7 @@ if __name__ == "__main__":
|
|||
|
||||
sort_parser = subparsers.add_parser( "sort", help="Sort faces in a directory.")
|
||||
sort_parser.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir", help="Input directory. A directory containing the files you wish to process.")
|
||||
sort_parser.add_argument('--by', required=True, dest="sort_by_method", choices=("blur", "face", "face-dissim", "face-yaw", "face-pitch", "hist", "hist-dissim", "brightness", "hue", "black", "origname", "final", "test"), help="Method of sorting. 'origname' sort by original filename to recover original sequence." )
|
||||
sort_parser.add_argument('--by', required=True, dest="sort_by_method", choices=("blur", "face", "face-dissim", "face-yaw", "face-pitch", "hist", "hist-dissim", "brightness", "hue", "black", "origname", "oneface", "final", "test"), help="Method of sorting. 'origname' sort by original filename to recover original sequence." )
|
||||
sort_parser.set_defaults (func=process_sort)
|
||||
|
||||
def process_util(arguments):
|
||||
|
@ -72,7 +72,7 @@ if __name__ == "__main__":
|
|||
|
||||
if arguments.add_landmarks_debug_images:
|
||||
Util.add_landmarks_debug_images (input_path=arguments.input_dir)
|
||||
|
||||
|
||||
util_parser = subparsers.add_parser( "util", help="Utilities.")
|
||||
util_parser.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir", help="Input directory. A directory containing the files you wish to process.")
|
||||
util_parser.add_argument('--convert-png-to-jpg', action="store_true", dest="convert_png_to_jpg", default=False, help="Convert DeepFaceLAB PNG files to JPEG.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue