Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问,模型低信噪比场景听感难受问题 #10

Open
gedebabin opened this issue Apr 19, 2024 · 5 comments
Open

请问,模型低信噪比场景听感难受问题 #10

gedebabin opened this issue Apr 19, 2024 · 5 comments

Comments

@gedebabin
Copy link

晓彬,您好:
非常感谢您的开源精神,我正在使用您开源的训练框架 SEtrain。
我发现训练出来的小参数网络在低信噪比场景下会出现降噪不干净,人声听感难受的问题。在尝试更换网络结构、更换mask、单独使用mse或sisnr均无明显改善,并且减小参数时问题更加明显。
您开源的本模型在处理低信噪比音频时同样会出现降噪不干净,听感难受的问题。您能否提出建议帮助解决这一问题。
期待回复,感谢!

@Xiaobin-Rong
Copy link
Owner

Xiaobin-Rong commented Apr 19, 2024 via email

@gedebabin
Copy link
Author

gedebabin commented Apr 24, 2024

谢谢晓彬的答复!
另外在查看代码时我有个不解之处:

   out = self.mask(mask, inpt.permute(0,3,2,1)) # (B,2,T,F)
   out = out.permute(0,3,2,1)  # (B,F,T,2)
    此处为什么要permute两次?SEtrain中只permute一次就可以了,是这样catch内存会快一些吗?     
  m = de_x1.permute(0,3,2,1)
  s_real = x_ref[...,0] * m[...,0] - x_ref[...,1] * m[...,1]
  s_imag = x_ref[...,1] * m[...,0] + x_ref[...,0] * m[...,1]
  s = torch.stack([s_real, s_imag], dim=-1)  # (B,F,T,2)

另外我发现decoder输出冗余了一个维度,可以考虑decoder最后一个维度输入设置为2。

@Xiaobin-Rong
Copy link
Owner

@gedebabin

你好!第一个问题permute两次是因为Mask类中定义了输入的mask和spec维度是(B,2,T,F)

class Mask(nn.Module):
    """Complex Ratio Mask"""
    def __init__(self):
        super().__init__()

    def forward(self, mask, spec):
        s_real = spec[:,0] * mask[:,0] - spec[:,1] * mask[:,1]
        s_imag = spec[:,1] * mask[:,0] + spec[:,0] * mask[:,1]
        s = torch.stack([s_real, s_imag], dim=1)  # (B,2,T,F)
        return s

这纯粹是一个个人习惯问题,我习惯模型的input和output都是 (B,F,T,2)维度。应该不太会影响内存读取速度。

另一个问题,”decoder输出冗余了一个维度,考虑decoder最后一个维度输入设置为2“ 是什么意思?我现在decoder输出的维度就是2吧。

@gedebabin
Copy link
Author

是的,您是正确的,非常感谢!

@vivi-max
Copy link

@gedebabin 您好,可以回复我一下吗!我有问题关于该项目的想向您请教

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants