Giter Site home page Giter Site logo

asif's Introduction

ASIF

Coupled Data Turns Unimodal Models to Multimodal without Training

Open In Colab

This repository contains a demo of ASIF by me (first author of the paper).

It is a self-contained notebook useful to run ASIF models based on different backbones and datasets, sufficient to reproduce the main results reported in the paper within minutes. The free GPU runtime of colab is sufficient to run all the code, dataset embeddings are precomputed and downloaded from my google drive.

Notebook content

  • Setup of the ASIF model
  • DEMO1: Zero-shot classification experiment (Fig. 5 in the paper)
  • DEMO2: Calculate the similarity between uploaded images and texts
  • DEMO3: Interpretability demo: deep dive into a classification
  • DEMO4: Universal classifier using images from your webcam

Paper

Paper: ASIF: Coupled Data Turns Unimodal Models to Multimodal Without Training

By: Antonio Norelli, Marco Fumero, Valentino Maiorca, Luca Moschella, Emanuele Rodolà, Francesco Locatello

Image

TLDR: The meaning was already there: connecting text and images without training a neural network to do so.

Abstract: CLIP proved that aligning visual and language spaces is key to solving many vision tasks without explicit training, but required to train image and text encoders from scratch on a huge dataset. LiT improved this by only training the text encoder and using a pre-trained vision network. In this paper, we show that a common space can be created without any training at all, using single-domain encoders (trained with or without supervision) and a much smaller amount of image-text pairs. Furthermore, our model has unique properties. Most notably, deploying a new version with updated training samples can be done in a matter of seconds. Additionally, the representations in the common space are easily interpretable as every dimension corresponds to the similarity of the input to a unique entry in the multimodal dataset. Experiments on standard zero-shot visual benchmarks demonstrate the typical transfer ability of image-text models. Overall, our method represents a simple yet surprisingly strong baseline for foundation multi-modal models, raising important questions on their data efficiency and on the role of retrieval in machine learning.

Instructions

Click on the big blue button Open In Colab and run all the cells of the notebook. That's it.

You can adjust backbones and datasets using the convenient drop-down menus.

Cite

If you liked our work and want to cite it in yours:

@article{norelli2024asif,
  title={ASIF: Coupled data turns unimodal models to multimodal without training},
  author={Norelli, Antonio and Fumero, Marco and Maiorca, Valentino and Moschella, Luca and Rodola, Emanuele and Locatello, Francesco},
  journal={Advances in Neural Information Processing Systems},
  volume={36},
  year={2024}
}

asif's People

Contributors

noranta4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.