All Projects → fartashf → Vsepp

fartashf / Vsepp

Licence: apache-2.0
PyTorch Code for the paper "VSE++: Improving Visual-Semantic Embeddings with Hard Negatives"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Vsepp

Snapshot Ensembles
Snapshot Ensemble in Keras
Stars: ✭ 289 (-18.36%)
Mutual labels:  paper
Paper
High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies
Stars: ✭ 5,293 (+1395.2%)
Mutual labels:  paper
Action Recognition Visual Attention
Action recognition using soft attention based deep recurrent neural networks
Stars: ✭ 350 (-1.13%)
Mutual labels:  paper
Purpur
Purpur is a fork of Paper, Tuinity, and Airplane with the goal of providing new and interesting configuration options, which allow for creating a unique gameplay experience not seen anywhere else
Stars: ✭ 286 (-19.21%)
Mutual labels:  paper
Vime
Code for the paper "Curiosity-driven Exploration in Deep Reinforcement Learning via Bayesian Neural Networks"
Stars: ✭ 310 (-12.43%)
Mutual labels:  paper
Akarin
Akarin is a powerful (not yet) server software from the 'new dimension'
Stars: ✭ 332 (-6.21%)
Mutual labels:  paper
Plotsquared
PlotSquared - Reinventing the plotworld
Stars: ✭ 284 (-19.77%)
Mutual labels:  paper
Healthcare ml
A curated list of ML|NLP resources for healthcare.
Stars: ✭ 351 (-0.85%)
Mutual labels:  paper
React Native Paper Onboarding
Paper Onboarding is a material design UI slider for `React Native`.
Stars: ✭ 310 (-12.43%)
Mutual labels:  paper
Bestofml
The best resources around Machine Learning
Stars: ✭ 349 (-1.41%)
Mutual labels:  paper
Surface Defect Detection
🐎📈 Constantly summarizing open source dataset and important critical papers in the field of surface defect research which are very important. 🐋
Stars: ✭ 287 (-18.93%)
Mutual labels:  paper
Sgx Papers
A list of system papers using/about Intel SGX
Stars: ✭ 306 (-13.56%)
Mutual labels:  paper
Cyclegan
Tensorflow implementation of CycleGAN
Stars: ✭ 348 (-1.69%)
Mutual labels:  paper
Speech Separation Paper Tutorial
A must-read paper for speech separation based on neural networks
Stars: ✭ 288 (-18.64%)
Mutual labels:  paper
Inception V4
Inception-v4, Inception - Resnet-v1 and v2 Architectures in Keras
Stars: ✭ 350 (-1.13%)
Mutual labels:  paper
Summary Of Recommender System Papers
阅读过的推荐系统论文的归类总结,持续更新中…
Stars: ✭ 288 (-18.64%)
Mutual labels:  paper
Languagedetector
PHP Class to detect languages from any free text
Stars: ✭ 317 (-10.45%)
Mutual labels:  paper
Benchmark results
Visual Tracking Paper List
Stars: ✭ 3,672 (+937.29%)
Mutual labels:  paper
Tg Reading List
A text generation reading list maintained by Tsinghua Natural Language Processing Group.
Stars: ✭ 352 (-0.56%)
Mutual labels:  paper
Weightnorm
Example code for Weight Normalization, from "Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks"
Stars: ✭ 347 (-1.98%)
Mutual labels:  paper

Improving Visual-Semantic Embeddings with Hard Negatives

Code for the image-caption retrieval methods from VSE++: Improving Visual-Semantic Embeddings with Hard Negatives , F. Faghri, D. J. Fleet, J. R. Kiros, S. Fidler, Proceedings of the British Machine Vision Conference (BMVC), 2018. (BMVC Spotlight)

Dependencies

We recommended to use Anaconda for the following packages.

import nltk
nltk.download()
> d punkt

Download data

Download the dataset files and pre-trained models. We use splits produced by Andrej Karpathy. The precomputed image features are from here and here. To use full image encoders, download the images from their original sources here, here and here.

wget http://www.cs.toronto.edu/~faghri/vsepp/vocab.tar
wget http://www.cs.toronto.edu/~faghri/vsepp/data.tar
wget http://www.cs.toronto.edu/~faghri/vsepp/runs.tar

We refer to the path of extracted files for data.tar as $DATA_PATH and files for models.tar as $RUN_PATH. Extract vocab.tar to ./vocab directory.

Update: The vocabulary was originally built using all sets (including test set captions). Please see issue #29 for details. Please consider not using test set captions if building up on this project.

Evaluate pre-trained models

python -c "\
from vocab import Vocabulary
import evaluation
evaluation.evalrank('$RUN_PATH/coco_vse++/model_best.pth.tar', data_path='$DATA_PATH', split='test')"

To do cross-validation on MSCOCO, pass fold5=True with a model trained using --data_name coco.

Training new models

Run train.py:

python train.py --data_path "$DATA_PATH" --data_name coco_precomp --logger_name 
runs/coco_vse++ --max_violation

Arguments used to train pre-trained models:

Method Arguments
VSE0 --no_imgnorm
VSE++ --max_violation
Order0 --measure order --use_abs --margin .05 --learning_rate .001
Order++ --measure order --max_violation

Reference

If you found this code useful, please cite the following paper:

@article{faghri2018vse++,
  title={VSE++: Improving Visual-Semantic Embeddings with Hard Negatives},
  author={Faghri, Fartash and Fleet, David J and Kiros, Jamie Ryan and Fidler, Sanja},
  booktitle = {Proceedings of the British Machine Vision Conference ({BMVC})},
  url = {https://github.com/fartashf/vsepp},
  year={2018}
}

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].