Skip to content

zcy618/Speech_Enhancement-DCUnet_With_Transformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(2021-09-01) ASR Transformer 오류 수정

(2021-09-07) Freq and Temporal CBAM 추가

Final Branch

  • Encoder와 Decoder Skip Connection에 CBAM을 적용

  • ASR Transformer에 사용하였던 ScheduleAdam을 사용

  • Self Attention 적용한 Discriminator 적용

  • Loss를 wSDR이 아닌 SI-SNR로 바꿈(DCCRN꺼 그대로)

  • 수정: Inference할 때는 DCUnet(Upsampling7)을 걸치고 나온 Mask에 Input을 곱해준 Denoising Output(즉, attention을 적용 하지 않은 Output)을 Decoder Input으로 할 예정

Architecture

1 cbam - DCUnet(16block)을 Base로 각 SKip-Connection 마다 CBAM(Convolutional Block Attention Module)적용

: Transformer에서 쓰는 Self Attention을 쓰기에는 [batch, channel=1, freq=1539, time=213]이 너무 크기 때문에 / CBAM 을 사용하여 어떤 Channel(What) 과 Spatial(Where)을 집중 할 것인지를 찾음

ASR-transformer

- DCUnet에서 나온 Mask 뒷단에다가 ASR-Transformer를 붙힘(Decoder Input = Target Spectrogram)

: Mask와 Target의 Spectrogram을 Encoder, Decoder Input으로 받아서 서로 MultiHead Cross Attention 적용

(그림과 다르게 Decoder도 Encoder와 같은 Spectrogram이므로 VGGExtractor 사용)

Discriminator sagan

- Denoising된 Spectrogram을 GAN 관점으로 보면 Fake Image로 볼 수있다고 생각하여 Self-Attention이 적용된 Discriminator를 적용

:https://openaccess.thecvf.com/content_cvpr_2017_workshops/w12/papers/Divakar_Image_Denoising_via_CVPR_2017_paper.pdf

loss

- DCUnet에서는 원래 wSDR을 사용하였지만 대중적으로 많이 쓰고 있다고 하는 SI-SNR Loss를 사용

Reference

paper: https://openreview.net/pdf?id=SkeRTsAcYm

Unet: https://arxiv.org/abs/1505.04597

Phase: https://angeloyeo.github.io/2019/10/11/Fourier_Phase.html (Phase와 Magnitude 지식 필요)

Code: https://github.com/pheepa/DCUnet/blob/master/dcunet.ipynb

Code: https://github.com/sweetcocoa/DeepComplexUNetPyTorch

Code: https://github.com/chanil1218/DCUnet.pytorch

Code: https://github.com/sweetcocoa/DeepComplexUNetPyTorch/tree/c68510a4d822f19fa366f1da84eff8c0c25ff88a

Implement

Training

`python main.py --gpu(or MultiGPU) --batch-size ** --warm-steps (batch에 따라 유연성있게) --epochs 40 --decay_epoch 20``

Result

  • (Base DCUnet)PESQ: 3.1231 기록
Mix predict GT
mixture.wav predict.wav GT.wav

- todo 업데이트 예정

  • (ours Model)PESQ: 약 3.3(GPU고장으로 학습 중단하고 뽑은 Score)
Mix predict GT
[mixture.wav] [predict.wav] [GT.wav]

About

오류o 차후 수정

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages