Giter Club home page Giter Club logo

multimodal-maestro's Introduction

multimodal-maestro


version license python-version Gradio Colab

๐Ÿ‘‹ hello

Multimodal-Maestro gives you more control over large multimodal models to get the outputs you want. With more effective prompting tactics, you can get multimodal models to do tasks you didn't know (or think!) were possible. Curious how it works? Try our HF space!

๐Ÿ’ป install

โš ๏ธ Our package has been renamed to maestro. Install the package in a 3.11>=Python>=3.8 environment.

pip install maestro

๐Ÿ”Œ API

๐Ÿšง The project is still under construction. The redesigned API is coming soon.

maestro-docs-Snap

๐Ÿง‘โ€๐Ÿณ prompting cookbooks

Description Colab
Prompt LMMs with Multimodal Maestro Colab
Manually annotate ONE image and let GPT-4V annotate ALL of them Colab

๐Ÿš€ example

Find dog.

>>> The dog is prominently featured in the center of the image with the label [9].
๐Ÿ‘‰ read more
  • load image

    import cv2
    
    image = cv2.imread("...")
  • create and refine marks

    import maestro
    
    generator = maestro.SegmentAnythingMarkGenerator(device='cuda')
    marks = generator.generate(image=image)
    marks = maestro.refine_marks(marks=marks)
  • visualize marks

    mark_visualizer = maestro.MarkVisualizer()
    marked_image = mark_visualizer.visualize(image=image, marks=marks)

    image-vs-marked-image

  • prompt

    prompt = "Find dog."
    
    response = maestro.prompt_image(api_key=api_key, image=marked_image, prompt=prompt)
    >>> "The dog is prominently featured in the center of the image with the label [9]."
    
  • extract related marks

    masks = maestro.extract_relevant_masks(text=response, detections=refined_marks)
    >>> {'6': array([
    ...     [False, False, False, ..., False, False, False],
    ...     [False, False, False, ..., False, False, False],
    ...     [False, False, False, ..., False, False, False],
    ...     ...,
    ...     [ True,  True,  True, ..., False, False, False],
    ...     [ True,  True,  True, ..., False, False, False],
    ...     [ True,  True,  True, ..., False, False, False]])
    ... }
    

multimodal-maestro

๐Ÿšง roadmap

  • Rewriting the maestro API.
  • Update HF space.
  • Documentation page.
  • Add GroundingDINO prompting strategy.
  • CovVLM demo.
  • Qwen-VL demo.

๐Ÿ’œ acknowledgement

๐Ÿฆธ contribution

We would love your help in making this repository even better! If you noticed any bug, or if you have any suggestions for improvement, feel free to open an issue or submit a pull request.

multimodal-maestro's People

Contributors

capjamesg avatar deependujha avatar eltociear avatar josephofiowa avatar pedrogengo avatar skalskip 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.