mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 04:52:13 -07:00
nothing interesting
This commit is contained in:
parent
046649e6be
commit
3ffdc50576
2 changed files with 28 additions and 22 deletions
|
@ -42,11 +42,13 @@ class SampleGeneratorImageTemporal(SampleGeneratorBase):
|
|||
if samples_len == 0:
|
||||
raise ValueError('No training data provided.')
|
||||
|
||||
if samples_len - self.temporal_image_count < 0:
|
||||
mult_max = 4
|
||||
l = samples_len - (self.temporal_image_count-1)*mult_max + 1
|
||||
if l < 0:
|
||||
raise ValueError('Not enough samples to fit temporal line.')
|
||||
|
||||
shuffle_idxs = []
|
||||
samples_sub_len = samples_len - self.temporal_image_count + 1
|
||||
samples_sub_len = samples_len - l + 1
|
||||
|
||||
while True:
|
||||
|
||||
|
@ -60,9 +62,9 @@ class SampleGeneratorImageTemporal(SampleGeneratorBase):
|
|||
idx = shuffle_idxs.pop()
|
||||
|
||||
temporal_samples = []
|
||||
|
||||
mult = np.random.randint(mult_max)
|
||||
for i in range( self.temporal_image_count ):
|
||||
sample = samples[ idx+i ]
|
||||
sample = samples[ idx+i*mult ]
|
||||
try:
|
||||
temporal_samples += SampleProcessor.process (sample, self.sample_process_options, self.output_sample_types, self.debug)
|
||||
except:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue