Coder Social home page Coder Social logo

ryanchankh / stam-sequential-transformers-attention-model Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samrudhdhirangrej/stam-sequential-transformers-attention-model

0.0 0.0 0.0 4.59 MB

Official implementation of "Consistency driven Sequential Transformers Attention Model for Partially Observable Scenes" [CVPR'22]

Shell 2.73% Python 97.27%

stam-sequential-transformers-attention-model's Introduction

Consistency driven Sequential Transformers Attention Model for Partially Observable Scenes

Authors: Samrudhdhi Rangrej, Chetan Srinidhi, James Clark Accepted to: CVPR'22  

 

architecture  

An overview of our Sequential Transformers Attention Model (STAM). The STAM consists of a core T, classifiers G and D, an actor A, and a critic C (only used during training). Each training iteration consists of three steps: Step 1 (green path): Given a complete image X, the teacher model predicts a soft pseudo-label q(y|X). Step 2 (blue path): Given glimpses g0:t, STAM predicts class distributions pg(yt|fgt) and pd(yt|fdt), value V(st), and attention policy π(lt+1|st). Step 3 (orange path): An additional glimpse is sensed. Step 2 is repeated using all glimpses (including the additional glimpse) and the losses are computed. The model parameters are updated using the gradients from Step 2.

Requirements

  • torch==1.8.1
  • torchvision==0.9.1
  • tensorboard==2.5.0
  • timm==0.4.9
  • fire==0.4.0

Datasets

  • ImageNet
  • fMoW (Download and prepare the dataset following the instructions provided in PatchDrop repository)

Training

  • Adapt paths.py
  • Teacher models:
    • ImageNet: Download weights for DeiT-small distilled model from deit.
    • fMoW: Finetune DeiT-small model from deit on the fMoW dataset for 100 epochs using the default hyperparameter setting and vertical flip augmentation.
  • Student models (STAM):

Evaluation

Visualization

imagenet_visualization fmow_visualization Visualization of glimpses selected by STAM on example images from t=0 to 15. (top) ImageNet; (bottom) fMoW. Complete images are shown for reference only. STAM does not observe a complete image.

Acknowledgement

Our code is based on deit.

stam-sequential-transformers-attention-model's People

Contributors

ryanchankh avatar samrudhdhirangrej avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.