Code Monkey home page Code Monkey logo

kama_ac's Introduction

The code of master's thesis

This is the code of master's thesis which contains my previous two work (MAAC and FeatureCut).

Setting up the Code and Environment

  1. Clone this repository: https://github.com/Vancause/KAMA_AC.git
  2. Install pytorch >=1.8.0
  3. Use pip to install dependencies: pip install -r requirements.txt

Preparing the data

Clotho

  • Download the Clotho dataset for DCASE2021 Automated Audio Captioning challenge. And how to prepare training data and setup coco caption, please refer to Dcase2020 BUPT team's
  • Enter the audio_tag directory.
  • Firstly, run python generate_word_list.py to create words list word_list_pretrain_rules.p and tagging words to indexes of embedding layer TaggingtoEmbs.
  • Then run python generate_tag.py to generate audioTagName_{development/validation/evaluation}_fin_nv.pickle and audioTagNum_{development/validation/evaluation}_fin_nv.pickle

AudioCaps

Configuration

The training configuration is saved in the hparams.py and you can reset it to your own parameters.

Train the KAMA-AC model.

  • Run python run_newtransformer.py to train the KAMA-AC-T model.
  • Run python run_lstm.py to train the KAMA-AC-L model.
  • In the files run_lstm.py or run_newtransformer.py, you can modify hyper-parameters directly to run the ablations.

Train the KAMA-AC model with FeatureCut.

  • Run python run_featurecut.py to train the KAMA-AC-L model.
  • In the files run_lstm.py or run_newtransformer.py, you can modify hyper-parameters directly to run the ablations

kama_ac's People

Contributors

vancause avatar

Stargazers

 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.