Add PyTorch & GPU support for DNSMOS calculation#5548
Add PyTorch & GPU support for DNSMOS calculation#5548sw005320 merged 7 commits intoespnet:masterfrom
Conversation
for more information, see https://pre-commit.ci
|
It requires additional packages for the test https://github.com/espnet/espnet/actions/runs/6872983326/job/18692312021?pr=5548#step:9:2429 |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5548 +/- ##
==========================================
+ Coverage 76.54% 76.57% +0.03%
==========================================
Files 720 720
Lines 66599 66695 +96
==========================================
+ Hits 50975 51072 +97
+ Misses 15624 15623 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I see. I intended not to make it a mandatory package in espnet. Just for unit test purposes, do you think I should add this dependency in |
|
How about only adding it in https://github.com/espnet/espnet/blob/master/ci/install.sh? |
|
OK. I'll try it. |
963ed81 to
07c339f
Compare
07c339f to
bc8f909
Compare
|
Thanks a lot! |
What?
This PR adds support for PyTorch-based DNSMOS calculation in addition to the existing ONNX-based one. This is based on a third-party package
onnx2torchwhich converts the ONNX-format model to a PyTorch module.Why?
Current DNSMOS calculation basically relies on the ONNX wrapper, where the GPU-based processing is not well supported. By converting the ONNX-format model to a PyTorch module using
onnx2torch, we can now easily use CUDA devices to greatly speed up the calculation.In addition, since the model is converted to a PyTorch module, gradient backpropagation is also supported, which can be used to provide supervision during training later on.