假设我有长度为10秒的立体声音乐,采样率= 44100,那么在读完音乐后,numpy数组形状将是REF = (2, 441000)
。
我有这个带有噪音EST = (2, 441000)
的音乐的第二个版本。我想计算一下:
有关如何计算它们的一些信息可在以下站点获得:https://source-separation.github.io/tutorial/basics/evaluation.html
对于特别提款权,提出了以下公式:https://www.aicrowd.com/challenges/music-demixing-challenge-ismir-2021#evaluation-metric
和代码:
def sdr(references, estimates):
# compute SDR for one song
delta = 1e-7 # avoid numerical errors
num = np.sum(np.square(references), axis=(1, 2))
den = np.sum(np.square(references - estimates), axis=(1, 2))
num += delta
den += delta
return 10 * np.log10(num / den)
SIR、SIR和SAR是否有相同的代码?是否还有其他指标来计算去噪(或源分离)模型的质量?
发布于 2022-07-18 05:04:24
基于原创文章
将Π{y1,.,yk}作为正交投影仪,由向量y1,.,yk.投影仪是一个T×T矩阵,其中T是这些向量的长度,首先需要计算三个正交投影仪:
Psj = Π{Sj}
Ps = Π{(Sj') 1≤j'≤n}
Ps,n = Π{(Sj') 1≤j'≤n, (Ni) 1≤i≤m}
starget := Psj*Sj
einterf := Ps*Sj − Psj*Sj
enoise := Ps,n*Sj − Ps*Sj
eartif := Sj − Ps,n*Sj
一旦你有了这些计算:
def sir(starget, einterf):
# compute SIR for one song
delta = 1e-7 # avoid numerical errors
num = np.sum(np.square(starget), axis=(1, 2))
den = np.sum(np.square(einterf), axis=(1, 2))
num += delta
den += delta
return 10 * np.log10(num / den)
以及:
def sar(starget, einterf, enoise, eartif):
# compute SAR for one song
delta = 1e-7 # avoid numerical errors
num = np.sum(np.square(starget + einterf + enoise), axis=(1, 2))
den = np.sum(np.square(eartif), axis=(1, 2))
num += delta
den += delta
return 10 * np.log10(num / den)
标度不变源失真比(SI- SDR )的目的是通过消除SDR对信号幅度缩放的依赖来解决SDR存在的问题.在这里,我建议使用第4页(2.3 )中发布的计算这里。特别提款权( SDR)
https://stackoverflow.com/questions/72939521
复制相似问题