Skip to content

ypqhappy/attend-and-compare

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attend And Compare

This is an official implementation of the paper Learning Visual Context by Comparison.

acm module diagram

Usage

import torch
from context_module import ACM
x1 = torch.randn(256 * 20 * 20 * 5).view(5, 256, 20, 20).float()
acm = ACM(num_heads=32, num_features=256)
acm.init_parameters()
y, dp = acm(x1)
print(y.shape)   # output
print(dp.shape)  # dot product for orthogonal loss

Examples

CXR14 and COCO experiment codes are provided in the directories below.

  1. cxr14
  2. coco

Citation

Minchul Kim*, Jongchan Park*, Seil Na, Chang Min Park, and Donggeun Yoo (* equal contribution). Learning Visual Context by Comparison. In The European Conference on Computer Vision (ECCV), August 2020.

Bibtex

@inproceedings{kim2020acm,
  title={Learning Visual Context by Comparison},
  author={Kim, Minchul and Park, Jongchan and Na, Seil and Park, Chang Min and Yoo, Donggeun},
  booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
  pages={},
  year={2020}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.3%
  • Cuda 7.2%
  • C++ 4.0%
  • Other 0.5%