Skip to content
/ GASA Public

Fine-Grained Cross-Modal Retrieval based on generative and adversarial network

Notifications You must be signed in to change notification settings

gasanet/GASA

Repository files navigation

Introduction

source code for our paper GASAnet: Generative Adversarial and Self Attention Based Fine-Grained Cross-Modal Retrieval

Network Architecture

Installation

Requirement

  • pytorch, tested on [v1.0]
  • CUDA, tested on v9.0
  • Language: Python 3.6

How to use

The code is currently tested only on GPU.

  • Download dataset
    Please visit dataset.
  • Prepare audio data
    python audio.py
  • Training
    • If you want to train the whole model from beginning using the source code, please follow the subsequent steps.
      • Download dataset to the dataset folder.
      • In main_gan_lstm_resnet.py
      • modify lr in params1 to 0.001, lr in params2 and lr in discriminator to 1.
      • modify model_path to the path where you want to save your parameters of networks.
      • Activate virtual environment (e.g. conda) and then run the script
        python main_gan_lstm_resnet.py
  • Testing
    • If you just want to do a quick test on the model and check the final retrieval performance, please follow the subsequent steps.
      • The trained models of our work can be downloaded from Baidu Cloud, and the extraction code is v99c.
      • Activate virtual environment (e.g. conda) and then run the script
        python test_gan.py

About

Fine-Grained Cross-Modal Retrieval based on generative and adversarial network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages