All Projects → Paranioar → SGRAF

Paranioar / SGRAF

Licence: other
The code of “Similarity Reasoning and Filtration for Image-Text Matching” [AAAI2021]

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to SGRAF

vse infty
Code for "Learning the Best Pooling Strategy for Visual Semantic Embedding", CVPR 2021
Stars: ✭ 77 (-43.38%)
Mutual labels:  cross-modal-retrieval, image-text-matching
SnapMix
SnapMix: Semantically Proportional Mixing for Augmenting Fine-grained Data (AAAI 2021)
Stars: ✭ 127 (-6.62%)
Mutual labels:  aaai2021
proxy-synthesis
Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning" (AAAI 2021)
Stars: ✭ 30 (-77.94%)
Mutual labels:  aaai2021
MAN
Multimodal Adversarial Network for Cross-modal Retrieval (PyTorch Code)
Stars: ✭ 26 (-80.88%)
Mutual labels:  cross-modal-retrieval
AGAH
Source code for paper "Adversary Guided Asymmetric Hashing for Cross-Modal Retrieval".
Stars: ✭ 34 (-75%)
Mutual labels:  cross-modal-retrieval
deep-blind-watermark-removal
[AAAI 2021] Split then Refine: Stacked Attention-guided ResUNets for Blind Single Image Visible Watermark Removal
Stars: ✭ 83 (-38.97%)
Mutual labels:  aaai2021
SlimGAN
Slimmable Generative Adversarial Networks (AAAI 2021)
Stars: ✭ 20 (-85.29%)
Mutual labels:  aaai2021
SemCKD
This is the official implementation for the AAAI-2021 paper (Cross-Layer Distillation with Semantic Calibration).
Stars: ✭ 42 (-69.12%)
Mutual labels:  aaai2021
SelfSupervisedLearning-DSM
code for AAAI21 paper "Enhancing Unsupervised Video Representation Learning by Decoupling the Scene and the Motion“
Stars: ✭ 26 (-80.88%)
Mutual labels:  aaai2021
lffont
Official PyTorch implementation of LF-Font (Few-shot Font Generation with Localized Style Representations and Factorization) AAAI 2021
Stars: ✭ 110 (-19.12%)
Mutual labels:  aaai2021
AttaNet
AttaNet for real-time semantic segmentation.
Stars: ✭ 37 (-72.79%)
Mutual labels:  aaai2021
EC-GAN
EC-GAN: Low-Sample Classification using Semi-Supervised Algorithms and GANs (AAAI 2021)
Stars: ✭ 29 (-78.68%)
Mutual labels:  aaai2021

SGRAF

PyTorch implementation for AAAI2021 paper of “Similarity Reasoning and Filtration for Image-Text Matching”.

It is built on top of the SCAN and Cross-modal_Retrieval_Tutorial.

We have released two versions of SGRAF: Branch main for python2.7; Branch python3.6 for python3.6.

If any problems, please contact me at [email protected]. ([email protected] is deprecated)

Introduction

The framework of SGRAF:

The updated results (Better than the original paper)

Dataset Module Sentence retrieval Image retrieval
R@1R@5R@10 R@1R@5R@10
Flick30k SAF 75.692.796.9 56.582.088.4
SGR 76.693.796.6 56.180.987.0
SGRAF 78.494.697.5 58.283.089.1
MSCOCO1k SAF 78.095.998.5 62.289.595.4
SGR 77.396.098.6 62.189.695.3
SGRAF 79.296.598.6 63.590.295.8
MSCOCO5k SAF 55.583.891.8 40.169.780.4
SGR 57.383.290.6 40.569.680.3
SGRAF 58.884.892.1 41.670.981.5

Requirements

We recommended the following dependencies for Branch main.

import nltk
nltk.download()
> d punkt

Download data and vocab

We follow SCAN to obtain image features and vocabularies, which can be downloaded by using:

wget https://iudata.blob.core.windows.net/scan/data.zip
wget https://iudata.blob.core.windows.net/scan/vocab.zip

Another download link is available below:

https://drive.google.com/drive/u/0/folders/1os1Kr7HeTbh8FajBNegW8rjJf6GIhFqC

Pre-trained models and evaluation

Modify the model_path, data_path, vocab_path in the evaluation.py file. Then run evaluation.py:

python evaluation.py

Note that fold5=True is only for evaluation on mscoco1K (5 folders average) while fold5=False for mscoco5K and flickr30K. Pretrained models and Log files can be downloaded from Flickr30K_SGRAF and MSCOCO_SGRAF.

Training new models from scratch

Modify the data_path, vocab_path, model_name, logger_name in the opts.py file. Then run train.py:

For MSCOCO:

(For SGR) python train.py --data_name coco_precomp --num_epochs 20 --lr_update 10 --module_name SGR
(For SAF) python train.py --data_name coco_precomp --num_epochs 20 --lr_update 10 --module_name SAF

For Flickr30K:

(For SGR) python train.py --data_name f30k_precomp --num_epochs 40 --lr_update 30 --module_name SGR
(For SAF) python train.py --data_name f30k_precomp --num_epochs 30 --lr_update 20 --module_name SAF

Reference

If SGRAF is useful for your research, please cite the following paper:

@inproceedings{Diao2021SGRAF,
  title={Similarity Reasoning and Filtration for Image-Text Matching},
  author={Diao, Haiwen and Zhang, Ying and Ma, Lin and Lu, Huchuan},
  booktitle={AAAI},
  year={2021}
}

License

Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].