cocogold: training Marigold for text-grounded segmentation
pcuenq
• • 31How to use pcuenq/marigold-coco-segmentation with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("pcuenq/marigold-coco-segmentation", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]This is a model trained with a repurposed version of Marigold that can do text-grounded object segmentation, i.e., you provide the name of the object you want to segment and the model will draw a segmentation mask on it.
The model was trained on the COCO dataset using this library to extract random crops and segmentation masks.
For more details, please refer to the post.
main branch of the repo contains a diffusers pipeline with a UNet trained after ~18,000 steps.