mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-07 13:32:09 -07:00
DFL-2.0 initial branch commit
This commit is contained in:
parent
52a67a61b3
commit
38b85108b3
154 changed files with 5251 additions and 9414 deletions
|
@ -4,9 +4,9 @@ import struct
|
|||
from pathlib import Path
|
||||
|
||||
import samplelib.SampleHost
|
||||
from interact import interact as io
|
||||
from core.interact import interact as io
|
||||
from samplelib import Sample
|
||||
from utils import Path_utils
|
||||
from core import pathex
|
||||
|
||||
packed_faceset_filename = 'faceset.pak'
|
||||
|
||||
|
@ -19,20 +19,20 @@ class PackedFaceset():
|
|||
|
||||
if samples_dat_path.exists():
|
||||
io.log_info(f"{samples_dat_path} : file already exists !")
|
||||
io.input_bool("Press enter to continue and overwrite.", False)
|
||||
io.input("Press enter to continue and overwrite.")
|
||||
|
||||
as_person_faceset = False
|
||||
dir_names = Path_utils.get_all_dir_names(samples_path)
|
||||
dir_names = pathex.get_all_dir_names(samples_path)
|
||||
if len(dir_names) != 0:
|
||||
as_person_faceset = io.input_bool(f"{len(dir_names)} subdirectories found, process as person faceset? (y/n) skip:y : ", True)
|
||||
as_person_faceset = io.input_bool(f"{len(dir_names)} subdirectories found, process as person faceset?", True)
|
||||
|
||||
if as_person_faceset:
|
||||
image_paths = []
|
||||
|
||||
for dir_name in dir_names:
|
||||
image_paths += Path_utils.get_image_paths(samples_path / dir_name)
|
||||
image_paths += pathex.get_image_paths(samples_path / dir_name)
|
||||
else:
|
||||
image_paths = Path_utils.get_image_paths(samples_path)
|
||||
image_paths = pathex.get_image_paths(samples_path)
|
||||
|
||||
samples = samplelib.SampleHost.load_face_samples(image_paths)
|
||||
samples_len = len(samples)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue