lbourdois's picture
Upload 174 files
94e735e verified

A newer version of the Streamlit SDK is available: 1.39.0

Upgrade

SegGPT is a vision generalist on image segmentation, quite like GPT for computer vision ✨ It comes with the last release of 🤗 Transformers.
🎁 Technical details, demo and how-to's under this!

image_1

SegGPT is an extension of the Painter, where you speak to images with images: the model takes in an image prompt, transformed version of the image prompt, the actual image you want to see the same transform, and expected to output the transformed image.

SegGPT consists of a vanilla ViT with a decoder on top (linear, conv, linear). The model is trained on diverse segmentation examples, where they provide example image-mask pairs, the actual input to be segmented, and the decoder head learns to reconstruct the mask output. 👇🏻

image_2

This generalizes pretty well! The authors do not claim state-of-the-art results as the model is mainly used zero-shot and few-shot inference. They also do prompt tuning, where they freeze the parameters of the model and only optimize the image tensor (the input context).

image_3

Thanks to 🤗 Transformers you can use this model easily! See here.

image_4

I have built an app for you to try it out. I combined SegGPT with Depth Anything Model, so you don't have to upload image mask prompts in your prompt pair 🤗 Try it here. Also check out the collection.

image_5

Ressources:
SegGPT: Segmenting Everything In Context
by Xinlong Wang, Xiaosong Zhang, Yue Cao, Wen Wang, Chunhua Shen, Tiejun Huang (2023)
GitHub

Original tweet (March 27, 2024)