将Melspectrogram归一化为(0,255),或者没有频率缩放
我将多个日志频谱图从.wav文件转换为图像。 我想破坏尽可能少的信息,以便将结果图像用于计算机视觉任务。 要将数据转换为图像格式,我当前使用简单的sklearn.minmaxscaler(((0,255))
。 为了适应这个缩放器,我在所有频谱图上都使用所有频率的最小和最大能量。
我是否应该以每个特定频率的最小和最大能量来缩放频谱图?
具有不同缩放功能的不同频率是有意义的吗?
I am converting multiple log-mel spectrograms from .wav files to images.
I want to destroy as little information as possible as I plan to use the resulting images for a computer vision task.
To convert the data to an image format, I currently use a simple sklearn.MinMaxScaler((0, 255))
.
To fit this scaler, I use the minimal and the maximal energy of all frequencies on all my spectrograms.
Should I scale my spectrograms with minimal and maximal energy for each specific frequency?
Does it make sense to have different frequencies with different scaling features?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于其偏斜,非正常的分布性质,频谱图用作计算机视觉算法的输入(特别是神经网络)非常棘手。要解决这个问题,您应该:
sklearn.minmaxscaler(((0,1))
。对于经典的计算机视觉,这可以是sklearn.minmaxscaler(((0,255))
so,
是的,一旦归一化完成
,
这取决于。对于CNN,您的输入数据必须保持一致,以获得良好的结果。对于经典的计算机视觉方法,可能是根据您想处理的
Spectrograms are tricky to use as input to computer vision algorithms, specially to neural networks, due to their skewed, non-normal distribution nature. To tackle this you should:
sklearn.MinMaxScaler((0, 1))
. For classic computer vision, this could besklearn.MinMaxScaler((0, 255))
So,
Yes, once the normalization is done
and
It depends. For CNNs your input data needs to be consistent for good results. For classic computer vision approaches, could be, depending on what you want to do with it