Sound Classification with TensorFlow总结
来源:互联网 发布:川普 好莱坞 知乎 编辑:程序博客网 时间:2024/06/05 21:56
audioSet 是2017年发布的音频事件数据集。
sound Classification借用了tensorflow中的音频处理模块,利用原始语音信号,提取原始特征->embedding features->利用youtube-8m中的模型,对audioSet中527个样本做分类。因此,这篇博客讲解的还是如何对audioSet数据集做分类。
注意:tensorflow官网同样给出了音频处理模块,只是给audio数据,得到embedding后的128维度特征,该特征经过了pca以及量化的处理,但是没有给出分类的操作。
- python引用路径
name,绝对路径,指的是从python xx.py路径中xx的路径. 相对路径,值得从这个文件开始的路径from audio import params 其中audio是一个子文件夹,里面有个params.py的文件,这是绝对路径
- 音频,多通道转单通道(取平均,或者随机挑选一路信号)
# Convert to mono.if len(data.shape) > 1: data = np.mean(data, axis=1)
- 对原始audio重采样,使得音频具有相同的采样率
# Resample to the rate assumed by VGGish. if sample_rate != params.SAMPLE_RATE: data = resampy.resample(data, sample_rate, params.SAMPLE_RATE)
- 代码用VGGish model 产生audioSet embedding features,但是它只是用了PCA,但是没有做量化,如果希望看见量化效果,还请移步tensorflow官网。VGGish采用的是VGG11模型的结构,代码中给出了模型结构。
def _get_features(self, examples_batch): sess = self._vggish_sess features_tensor = sess.graph.get_tensor_by_name( params.VGGISH_INPUT_TENSOR_NAME) embedding_tensor = sess.graph.get_tensor_by_name( params.VGGISH_OUTPUT_TENSOR_NAME) [embedding_batch] = sess.run( [embedding_tensor], feed_dict={features_tensor: examples_batch} ) # [3, 128] postprocessed_batch = np.dot( self._pca_matrix, (embedding_batch.T - self._pca_means) ).T # [3, 128] using pca transformation # different from orginal methods, which does not have quanlify return postprocessed_batch
用于做分类的_youtube_sess,没有给出模型结构,只提供了代码。处理的时候,先补成了300s的时长,不够的加0。然后拿去分类。
音频数据采集,采用Capture。不停的采集数据,可以用在麦克风实时采集数据并处理上面
阅读全文
0 0
- Sound Classification with TensorFlow总结
- (二) Basic Classification Example with TensorFlow
- Sound play with stream
- Tensorflow Classification 分类学习
- Tensorflow学习--Classification 分类
- ImageNet Classification with Deep Convolutional Neural Networks泛读总结
- ImageNet Classification with Deep Convolutional Neural Networks翻译总结
- 论文《Aspect Level Sentiment Classification with Deep Memory Network》总结
- AlexNet论文《ImageNet Classification with Deep Convolutional Neural Networks》总结
- Classification with Imbalanced Data
- Classification: Instant Recognition with Caffe
- neuron classification with feature selection
- Playing a sound with AVAudioPlayer播放本地文件
- Introduction to Sound Programming with ALSA
- map sound to linux with rdesktop
- Introduction to Sound Programming with ALSA
- Introduction to Sound Programming with ALSA
- Introduction to Sound Programming with ALSA
- hadoop学习(五)----HDFS的java操作
- Django框架学习笔记(2.实现用户登录(上))
- mybatis获取自增主键的值
- Python基础-单元测试-unittest.TestCase(setUp和tearDown)
- 基于讯飞语音API应用开发之——离线词典构建
- Sound Classification with TensorFlow总结
- SQL转换
- 189. Rotate Array
- 【C++练习】贪吃蛇
- NOY 139 康托展开
- Flask框架项目实例:**租房网站(二)
- Python基础-文档测试(自动执行注释中的代码)
- 千万别按照用户的要求直接设计产品!
- 用Homebrew装东西的时候,遇到的错误