deepfacelab中文网

 找回密码
 立即注册(仅限QQ邮箱)
楼主: Headmaster1615

【角度加强工具】此方法实现了训练时侧脸和上下脸都优化.

[复制链接]

11

主题

117

帖子

3177

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
3177

万事如意节日勋章

发表于 2024-3-28 13:46:25 | 显示全部楼层
有人用过试过效果没
回复 支持 反对

使用道具 举报

0

主题

15

帖子

287

积分

初级丹师

Rank: 3Rank: 3

积分
287
发表于 2024-4-20 00:28:03 | 显示全部楼层
没有看懂楼主的方法,所以就全部替换了字符,启动训练程序后出来了一大段的字码,最后到了平时的训练那里,然后就没有任何反应了。应该是替换字符替换的不对,烦请楼主再发个讲解,说一下替换字符,是替换哪一部分。
回复 支持 反对

使用道具 举报

4

主题

31

帖子

3229

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
3229
 楼主| 发表于 2024-4-21 00:58:06 | 显示全部楼层
ajno22 发表于 2024-4-20 00:28
没有看懂楼主的方法,所以就全部替换了字符,启动训练程序后出来了一大段的字码,最后到了平时的训练那里, ...

你做的没错,就是替换全部字符。把你说的“一大段的字码”复制过来看看,应该不是我代码的问题。
回复 支持 反对

使用道具 举报

0

主题

15

帖子

287

积分

初级丹师

Rank: 3Rank: 3

积分
287
发表于 2024-4-21 15:48:05 | 显示全部楼层
Headmaster1615 发表于 2024-4-21 00:58
你做的没错,就是替换全部字符。把你说的“一大段的字码”复制过来看看,应该不是我代码的问题。 ...


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "multiprocessing\process.py", line 258, in _bootstrap
  File "multiprocessing\process.py", line 93, in run
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\core\jobl
ib\SubprocessGenerator.py", line 54, in process_func
    gen_data = next (self.generator_func)
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 142, in batch_func
    raise Exception ("Exception occured in sample %s. Error: %s" % (sample.filen
ame, traceback.format_exc() ) )
Exception: Exception occured in sample G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\
workspace\data_src\aligned\03026_0.jpg. Error: Traceback (most recent call last)
:
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

Process Process-23:
Traceback (most recent call last):
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "multiprocessing\process.py", line 258, in _bootstrap
  File "multiprocessing\process.py", line 93, in run
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\core\jobl
ib\SubprocessGenerator.py", line 54, in process_func
    gen_data = next (self.generator_func)
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 142, in batch_func
    raise Exception ("Exception occured in sample %s. Error: %s" % (sample.filen
ame, traceback.format_exc() ) )
Exception: Exception occured in sample G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\
workspace\data_src\aligned\04519_0.jpg. Error: Traceback (most recent call last)
:
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

Process Process-24:
Traceback (most recent call last):
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "multiprocessing\process.py", line 258, in _bootstrap
  File "multiprocessing\process.py", line 93, in run
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\core\jobl
ib\SubprocessGenerator.py", line 54, in process_func
    gen_data = next (self.generator_func)
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 142, in batch_func
    raise Exception ("Exception occured in sample %s. Error: %s" % (sample.filen
ame, traceback.format_exc() ) )
Exception: Exception occured in sample G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\
workspace\data_src\aligned\01298_0.jpg. Error: Traceback (most recent call last)
:
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

Process Process-21:
Traceback (most recent call last):
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "multiprocessing\process.py", line 258, in _bootstrap
  File "multiprocessing\process.py", line 93, in run
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\core\jobl
ib\SubprocessGenerator.py", line 54, in process_func
    gen_data = next (self.generator_func)
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 142, in batch_func
    raise Exception ("Exception occured in sample %s. Error: %s" % (sample.filen
ame, traceback.format_exc() ) )
Exception: Exception occured in sample G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\
workspace\data_src\aligned\00574_0.jpg. Error: Traceback (most recent call last)
:
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

侧脸和上下都优化: 100%|######################| 128/128 [01:47<00:00,  1.19it/s]
Process Process-28:
Traceback (most recent call last):
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)
Process Process-26:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "multiprocessing\process.py", line 258, in _bootstrap
Process Process-29:
  File "multiprocessing\process.py", line 93, in run
Traceback (most recent call last):
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\core\jobl
ib\SubprocessGenerator.py", line 54, in process_func
    gen_data = next (self.generator_func)
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 142, in batch_func
    raise Exception ("Exception occured in sample %s. Error: %s" % (sample.filen
ame, traceback.format_exc() ) )
ValueError: too many values to unpack (expected 1)
Exception: Exception occured in sample G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\
workspace\data_dst\aligned\17137_0.jpg. Error: Traceback (most recent call last)
:
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
Traceback (most recent call last):
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
  File "multiprocessing\process.py", line 258, in _bootstrap
ValueError: too many values to unpack (expected 1)
  File "multiprocessing\process.py", line 93, in run

During handling of the above exception, another exception occurred:

  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\core\jobl
ib\SubprocessGenerator.py", line 54, in process_func
    gen_data = next (self.generator_func)
Traceback (most recent call last):
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 142, in batch_func
    raise Exception ("Exception occured in sample %s. Error: %s" % (sample.filen
ame, traceback.format_exc() ) )
  File "multiprocessing\process.py", line 258, in _bootstrap
Exception: Exception occured in sample G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\
workspace\data_dst\aligned\16131_0.jpg. Error: Traceback (most recent call last)
:
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

  File "multiprocessing\process.py", line 93, in run
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\core\jobl
ib\SubprocessGenerator.py", line 54, in process_func
    gen_data = next (self.generator_func)
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 142, in batch_func
    raise Exception ("Exception occured in sample %s. Error: %s" % (sample.filen
ame, traceback.format_exc() ) )
Exception: Exception occured in sample G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\
workspace\data_dst\aligned\07453_0.jpg. Error: Traceback (most recent call last)
:
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

Process Process-27:
Traceback (most recent call last):
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "multiprocessing\process.py", line 258, in _bootstrap
  File "multiprocessing\process.py", line 93, in run
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\core\jobl
ib\SubprocessGenerator.py", line 54, in process_func
    gen_data = next (self.generator_func)
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 142, in batch_func
    raise Exception ("Exception occured in sample %s. Error: %s" % (sample.filen
ame, traceback.format_exc() ) )
Exception: Exception occured in sample G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\
workspace\data_dst\aligned\10276_0.jpg. Error: Traceback (most recent call last)
:
  File "G:\DeepFaceLab_NVIDIA_RTX2080Ti_MVE_AIBL\_internal\DeepFaceLab\samplelib
\SampleGeneratorFace.py", line 140, in batch_func
    x, = SampleProcessor.process ([sample], self.sample_process_options, self.ou
tput_sample_types, self.debug, ct_sample=ct_sample)
ValueError: too many values to unpack (expected 1)

回复 支持 反对

使用道具 举报

0

主题

15

帖子

287

积分

初级丹师

Rank: 3Rank: 3

积分
287
发表于 2024-4-21 15:49:43 | 显示全部楼层
Headmaster1615 发表于 2024-4-21 00:58
你做的没错,就是替换全部字符。把你说的“一大段的字码”复制过来看看,应该不是我代码的问题。 ...

特别长,上面顶到没影了,可能复制的不够全。麻烦大佬看一下,是什么原因。
回复 支持 反对

使用道具 举报

23

主题

77

帖子

1293

积分

初级丹圣

Rank: 8Rank: 8

积分
1293
发表于 2024-5-1 21:08:48 | 显示全部楼层
ajno22 发表于 2024-4-21 15:49
特别长,上面顶到没影了,可能复制的不够全。麻烦大佬看一下,是什么原因。 ...

怎样?解决了吗?
回复 支持 反对

使用道具 举报

40

主题

862

帖子

4717

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
4717

万事如意节日勋章

发表于 2024-5-5 23:48:16 | 显示全部楼层
vancheap 发表于 2024-3-25 11:49
关键部分移到MVE版本,好像没有报错,不知道有没有效果

哪几段是关键代码  我今天开始转移到ME了
回复 支持 反对

使用道具 举报

9

主题

145

帖子

3474

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
3474

荣誉会员勋章小有贡献勋章

发表于 2024-5-6 19:33:01 | 显示全部楼层
pasanonic 发表于 2024-5-5 23:48
哪几段是关键代码  我今天开始转移到ME了

其实就一段

        if uniform_yaw_distribution:  # Now it means uniform distribution for both pitch and yaw 都优化
            samples_pyr = [(idx, sample.get_pitch_yaw_roll()) for idx, sample in enumerate(samples)]
            
            grads = 128
            pitch_space = np.linspace(-1.2, 1.2, grads)  # Assuming the same range for pitch
            yaw_space = np.linspace(-1.2, 1.2, grads)  # Yaw range

            grid_samples_list = [[None]*grads for _ in range(grads)]
            for g_pitch in io.progress_bar_generator(range(grads), "侧脸和上下脸排序中"):
                pitch = pitch_space[g_pitch]
                next_pitch = pitch_space[g_pitch+1] if g_pitch < grads-1 else pitch + (pitch_space[1] - pitch_space[0])
                for g_yaw in range(grads):
                    yaw = yaw_space[g_yaw]
                    next_yaw = yaw_space[g_yaw+1] if g_yaw < grads-1 else yaw + (yaw_space[1] - yaw_space[0])
                    
                    grid_samples = []
                    for idx, pyr in samples_pyr:
                        s_pitch, s_yaw, _ = pyr
                        s_pitch, s_yaw = -s_pitch, -s_yaw  # Adjusting the signs if necessary
                        
                        if (pitch <= s_pitch < next_pitch) and (yaw <= s_yaw < next_yaw):
                            grid_samples.append(idx)
                    if len(grid_samples) > 0:
                        if grid_samples_list[g_pitch][g_yaw] is None:
                            grid_samples_list[g_pitch][g_yaw] = []
                        grid_samples_list[g_pitch][g_yaw].extend(grid_samples)
            
            # Flatten the list and filter out None values
            yaws_sample_list = [item for sublist in grid_samples_list for item in sublist if item is not None]

            index_host = mplib.Index2DHost(yaws_sample_list)
        else:
            index_host = mplib.IndexHost(self.samples_len)
回复 支持 反对

使用道具 举报

40

主题

862

帖子

4717

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
4717

万事如意节日勋章

发表于 2024-5-6 20:23:10 | 显示全部楼层

感谢感谢
回复 支持 反对

使用道具 举报

8

主题

143

帖子

899

积分

高级丹师

Rank: 5Rank: 5

积分
899
发表于 2024-5-10 11:08:11 | 显示全部楼层

有效吗,我用了半个月没有分辨出区别
回复 支持 反对

使用道具 举报

QQ|Archiver|手机版|deepfacelab中文网 |网站地图

GMT+8, 2024-11-24 21:14 , Processed in 0.179030 second(s), 36 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表