Coder Social home page Coder Social logo

pearl_v1's Introduction

Pretrained Encoders are All You Need

Mina Khan, P Srivatsa, Advait Rane, Shriram Chenniappa, Rishabh Anand, Sherjil Ozair, Pattie Maes

This repo provides code for the benchmark and techniques from the paper Pretrained Encoders are All You Need

Install

$ git clone https://github.com/PAL-ML/PEARL_v1.git pearl
$ cd pearl
$ pip install -r requirements.txt

Complete installation to run on colab can be found in any of the notebooks in notebooks/experiments.

Usage

  1. In your Google Drive, add a shortcut to our processed clip embeddings drive folder
  2. Open any of the jupyter notebooks in notebooks/experiments in Google Colab and update the section Initialization & constants. Make sure the paths point to where the clip embeddings are saved as in step 1 and where probe and encoder checkpoints should be saved in your drive.
  3. Run the notebook

To run without using our saved clip embeddings, change training_input in Initialization & constants from embeddings to images. Note that making this change would require you to make several changes to the notebooks we provide, including the encoder used (to CLIPEncoder).

Change configurations

Change game

To run a different game using the same parameters, change the env_name in Initialization & constants. Refer to game_names.txt for complete list of supported games.

Change parameters

To change parameters, refer to relevant section in Initialization & constants.

Change training methods for encoder/probe

To change the training methods for encoders, refer to template notebooks in notebooks/experiments.

Change probe used

Change probe_type in Initialization & constants to match any of the available probes in src/benchmark/probe.py

Save embeddings

To generate and save the CLIP embeddings we used in our experiments, refer to the notebooks in notebooks/save_embeddings. These would save the embeddings to Google Drive. Before running these notebooks , make sure to add a link to your drive folder as the parameter drive_link. The link to a folder on drive can be obtained by right-clicking on a folder and choosing the Get Link option.

Acknowledgement(s)

A significant part of the code in this repo was adapted from the codebase of AtariARI

pearl_v1's People

Contributors

sri-vatsa avatar crimsontrigger avatar minakhan01 avatar advaitrane avatar

Stargazers

ε€šεŠ η‚ΉθΎ£ζ€’ε§ avatar Manasvi Saxena avatar  avatar  avatar seven8827 avatar zero alpha avatar HoTaek Joo avatar Rish avatar Xiaojian Ma avatar Casey-Shi avatar Theodore Galanos avatar  avatar  avatar Noor Sajid avatar  avatar Abhay Shukla avatar Rishabh Anand avatar Derrick avatar Panagiotis Tigas avatar Tomek Korbak avatar Himanshu Chaudhary avatar Danijar Hafner avatar  avatar  avatar 爱可可-ηˆ±η”Ÿζ΄» avatar Future Infinity avatar Nikita avatar  avatar Dan avatar

Watchers

 avatar  avatar Rishabh Anand avatar

pearl_v1's Issues

Add notebooks to reproduce experiments

Experiment Notebooks:

  1. Vanilla 1x1
  2. Vanilla 2x2
  3. Vanilla 4x4
  4. Vanilla 2x2 + 1x1
  5. Vanilla 4x4 + 1x1
  6. Vanilla 4x4 + 2x2 + 1x1
  7. CPC Linear 1x1
  8. SDIM 2x2
  9. TDIM 1x1
  10. TDIM 2x2
  11. STDIM 1x1, 2x2
  12. Contrastive Augmentations - Random Crop 1x1
  13. Contrastive Augmentations - Color Jitter 1x1
  14. Contrastive Augmentations - Gaussian Blur 1x1
  15. Optical Flow Mask
  16. Optical Flow Mask + 1x1
  17. Optical Flow 5
  18. Image Difference Mask
  19. Image Difference Mask + 1x1
  20. Image Difference 5

Save Embeddings Notebooks:

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.