All Projects → sara-nl → attention-sampling-pytorch

sara-nl / attention-sampling-pytorch

Licence: MIT license
This is a PyTorch implementation of the paper: "Processing Megapixel Images with Deep Attention-Sampling Models".

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to attention-sampling-pytorch

AdaSpeech
AdaSpeech: Adaptive Text to Speech for Custom Voice
Stars: ✭ 108 (+332%)
Mutual labels:  pytorch-implementation
OpenNMT-kpg-release
Keyphrase Generation
Stars: ✭ 162 (+548%)
Mutual labels:  pytorch-implementation
Walk-Transformer
From Random Walks to Transformer for Learning Node Embeddings (ECML-PKDD 2020) (In Pytorch and Tensorflow)
Stars: ✭ 26 (+4%)
Mutual labels:  pytorch-implementation
SPAN
Semantics-guided Part Attention Network (ECCV 2020 Oral)
Stars: ✭ 19 (-24%)
Mutual labels:  pytorch-implementation
tldr
TLDR is an unsupervised dimensionality reduction method that combines neighborhood embedding learning with the simplicity and effectiveness of recent self-supervised learning losses
Stars: ✭ 95 (+280%)
Mutual labels:  pytorch-implementation
ConvLSTM-PyTorch
ConvLSTM/ConvGRU (Encoder-Decoder) with PyTorch on Moving-MNIST
Stars: ✭ 202 (+708%)
Mutual labels:  pytorch-implementation
TailCalibX
Pytorch implementation of Feature Generation for Long-Tail Classification by Rahul Vigneswaran, Marc T Law, Vineeth N Balasubramaniam and Makarand Tapaswi
Stars: ✭ 32 (+28%)
Mutual labels:  pytorch-implementation
differentiable-morphogenesis
experimenting with differentiable models of morphogenesis 🔬 🦠
Stars: ✭ 38 (+52%)
Mutual labels:  pytorch-implementation
SpinNet
[CVPR 2021] SpinNet: Learning a General Surface Descriptor for 3D Point Cloud Registration
Stars: ✭ 181 (+624%)
Mutual labels:  pytorch-implementation
SelfOrganizingMap-SOM
Pytorch implementation of Self-Organizing Map(SOM). Use MNIST dataset as a demo.
Stars: ✭ 33 (+32%)
Mutual labels:  pytorch-implementation
DualStudent
Code for Paper ''Dual Student: Breaking the Limits of the Teacher in Semi-Supervised Learning'' [ICCV 2019]
Stars: ✭ 106 (+324%)
Mutual labels:  pytorch-implementation
gan-vae-pretrained-pytorch
Pretrained GANs + VAEs + classifiers for MNIST/CIFAR in pytorch.
Stars: ✭ 134 (+436%)
Mutual labels:  pytorch-implementation
ElasticFace
Official repository for ElasticFace: Elastic Margin Loss for Deep Face Recognition
Stars: ✭ 86 (+244%)
Mutual labels:  pytorch-implementation
kg one2set
Code for our ACL 2021 paper "One2Set: Generating Diverse Keyphrases as a Set"
Stars: ✭ 58 (+132%)
Mutual labels:  pytorch-implementation
Relation-Network-PyTorch
Implementation of Relation Network and Recurrent Relational Network using PyTorch v1.3. Original papers: (RN) https://arxiv.org/abs/1706.01427 (RRN): https://arxiv.org/abs/1711.08028
Stars: ✭ 17 (-32%)
Mutual labels:  pytorch-implementation
ViT-V-Net for 3D Image Registration Pytorch
Vision Transformer for 3D medical image registration (Pytorch).
Stars: ✭ 169 (+576%)
Mutual labels:  pytorch-implementation
DAF3D
Deep Attentive Features for Prostate Segmentation in 3D Transrectal Ultrasound
Stars: ✭ 60 (+140%)
Mutual labels:  pytorch-implementation
MelNet-SpeechGeneration
Implementation of MelNet in PyTorch to generate high-fidelity audio samples
Stars: ✭ 19 (-24%)
Mutual labels:  pytorch-implementation
photometric optimization
Photometric optimization code for creating the FLAME texture space and other applications
Stars: ✭ 271 (+984%)
Mutual labels:  pytorch-implementation
nlp classification
Implementing nlp papers relevant to classification with PyTorch, gluonnlp
Stars: ✭ 224 (+796%)
Mutual labels:  pytorch-implementation

Attention Sampling - Pytorch

This is a PyTorch implementation of the the paper: "Processing Megapixel Images with Deep Attention-Sampling Models". This repository is based on the original repository belonging to this paper which is written in TensorFlow.

Porting to PyTorch

The code from the original repository has been rewritten to to a PyTorch 1.4.0 implementation. The most difficult part was rewriting the functions that extract the patches from the high resolution image. The original version uses special C/C++ files for this, I have done this in native Python. This is probably more inefficient and slower because it requires a nested for-loop. I tested with performing the patch extraction in parallel but this adds so much overhead that it is actually slower.

Furthermore, I hope I implemented the part where the expectation is calculated correctly. This uses a custom backward() function and I hope there are no bugs in it.

Performance

This code repository has been tested on two of the tasks mentioned in the original paper: the Mega-MNIST and the traffic sign detection task. A qualitative analysis of the results show they are comparable to the original work, however a qualitative analysis shows the errors are higher in this code base. A couple of users have alerted me that they can not reproduce the results from the original paper using this code base. I suspect there may still be a couple of bugs in this work. If you intend to use it beware, and any help finding these will be greatly appreciated. Experiments can be run by running mega_mnist.py and speed_limits.py.

Installation

Dependencies can be found inside the requirements.txt file. To install, run pip3 install -r requirements.txt. This code repository defaults to running on a GPU if it is available. It has been tested on both CPU and GPU.

Questions and contributions

If you have any question about the code or methods used in this repository you can reach out to [email protected]. If you find bugs in this code (which could be possible) please also contact me or file an issue. If you want to contribute to this code my making it more efficient (for example, the patch extraction procedure is quite inefficient) please contact me or submit a pull request.

Research

If this repository has helped you in your research we would value to be acknowledged in your publication.

Acknowledgement

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 825292. This project is better known as the ExaMode project. The objectives of the ExaMode project are:

  1. Weakly-supervised knowledge discovery for exascale medical data.
  2. Develop extreme scale analytic tools for heterogeneous exascale multimodal and multimedia data.
  3. Healthcare & industry decision-making adoption of extreme-scale analysis and prediction tools.

For more information on the ExaMode project, please visit www.examode.eu.

enter image description here enter image description here

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