Code Monkey home page Code Monkey logo

audio-classification's Introduction

多标签声音识别任务内容

《神经网络与深度学习》期末大作业

问题描述

  • 建立深度学习模型,对给定的测试音频文件,进行分类
  • 本次大作业提供了 20 个类别的训练数据和测试数据
  • 训练集说明:训练集包含 20 个类别,1300+ 音频文件(大部分音频时长 5s,有些音频片段不足 5s)
  • 测试集说明:
    • 测试集的每个音频文件时长为 5 秒,单个音频中可能是鸟叫声,也可能不包含任何训练集中的类别的声音。如果测试音频不包含训练集中的20个类别,则输出标签为0。
    • 测试集包含 2 个独立的子集(一个容易一些,一个难一些),需要对这两个子集分开测试并给出评价指标的数值。

问题求解

数据预处理

首先将每个ogg转换成具有高通滤波器的梅尔频谱图,然后将其转换成数据集(dataset)。

训练模型

使用 efficientnet-b3 模型进行对数据集进行预训练.

在每个训练周期中,函数会遍历训练数据,对每批数据进行前向传播、计算损失、反向传播和优化步骤。同时,它还会计算每个周期的损失和准确率,并保存最佳模型的权重。

在所有训练周期结束后,函数会保存最佳模型,并返回训练损失和最佳模型的权重。

验证模型

使用验证集对模型进行验证,计算模型的准确率和损失。

最终 acc 为 48.20%。

测试模型

将测试集中的音频文件转换成梅尔频谱图,然后使用训练好的模型进行预测。

Task

  • 成功跑通模型并提交结果
  • 将 ipynb 文件转换成 py 文件
  • 完善 README

Reference

audio-classification's People

Contributors

jujimeizuo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.