MyGit

0.1.0

roboflow/maestro

版本发布时间: 2023-11-29 20:54:56

roboflow/maestro最新发布版本:0.1.0(2023-11-29 20:54:56)

multimodal-maesto is out 🔥 🔥 🔥

🚀 Added

>>> import cv2
>>> import torch
>>> import multimodalmaesto as mm

>>> image = cv2.imread("...")

>>> generator = mm.SegmentAnythingMarkGenerator()
>>> visualizer = mm.MarkVisualizer()

>>> marks = generator.generate(image=image)
>>> marks = mm.refine_marks(marks=marks)

>>> image_prompt = visualizer.visualize(image=image, marks=marks)
>>> text_prompt = "Find dog."

>>> response = mm.prompt_image(api_key=api_key, image=image_prompt, prompt=text_prompt)
>>> response

"The dog is prominently featured in the center of the image with the label [9]."

>>> masks = mm.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-2

🏆 Contributors

@SkalskiP @deependujha

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-11-29发行的版本