Giter VIP home page Giter VIP logo

Comments (1)

ofkar avatar ofkar commented on August 10, 2024 1

Hi @SecretMG,

You can repurpose the demo notebook for this by defining 'tok_imagebind@224' as conditioning domain and 'tok_rgb@224' as the target domain. Here is a minimal example to do that (you can add more target domains before predicting RGB too, e.g. for better grounding).

cond_domains = ['tok_imagebind@224']
target_domains = ['tok_rgb@224']
tokens_per_target = [196]
autoregression_schemes = ['roar']

You can play with other generation parameters, e.g. 'decoding_steps', 'token_decoding_schedules', 'temps', etc to control the generation diversity vs fidelity. Please take a look at the generation readme for tips and details.

To compute 'tok_imagebind@224' for a given image, you can first compute the ImageBind features using the pretrained ImageBind model and then tokenize the features using the ImageBind tokenizer we provided (you can see it under Load tokenizers section of the notebook):

'tok_imagebind': VQVAE.from_pretrained('EPFL-VILAB/4M_tokenizers_ImageBind-H14_8k_224-448').eval().to(device),

Alternatively, you can predict 'tok_imagebind@224' directly from the RGB input using the same notebook, and then use it as the conditioning as exemplified at the top. This would be a circular generation of course, i.e. RGB->ImageBind tokens->RGB tokens, but you can use it as a sanity check for how the generation should behave.

Best,
Oguzhan

from ml-4m.

Related Issues (18)

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.