gitwtfhub

wtf is som?

roboflow/som — explained in plain English

Analysis updated 2026-08-07 · repo last pushed 2023-11-14

2Audience · developerComplexity · 3/5DormantSetup · moderate

TL;DR

Set-of-Mark overlays numbered labels onto objects in images so AI vision models like GPT-4V can reference exact regions by number, enabling precise visual reasoning and instruction-following.

Mindmap

mindmap
  root((repo))
    What it does
      Overlays numbered marks
      Segments image objects
      Works with GPT-4V
    Tech stack
      Python
      Segmentation models
      GPT-4V API
    Use cases
      Solve CAPTCHAs
      UI guidance
      Game planning
    Audience
      App builders
      AI researchers
      Vibe coders
    Setup
      Install dependencies
      Run demo script
    Approach
      Automatic or interactive
      Tunable label detail

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Solve CAPTCHA puzzles by labeling numbered squares and asking GPT-4V which match a description.

REASON 2

Guide users through phone interfaces by marking each button with a number the AI can reference.

REASON 3

Label every control on a game controller so the AI can explain what each one does.

REASON 4

Plan moves in a 2D game by marking on-screen elements the AI can refer to by number.

What's in the stack?

PythonSegmentation ModelsGPT-4V

How it stacks up

roboflow/som0-bingwu-0/live-interpreter010zx00x1/faresnipe
Stars222
LanguagePythonPython
Last pushed2023-11-14
MaintenanceDormant
Setup difficultymoderatemoderateeasy
Complexity3/52/52/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires installing several segmentation model dependencies and an OpenAI API key for GPT-4V calls.

The license terms are not specified in the repository documentation.

Wtf does this do

Set-of-Mark (SoM) is a technique that helps AI vision models like GPT-4V understand and reference specific parts of an image. It works by overlaying numbered labels directly onto objects in a picture, so the AI can point to and talk about exact regions instead of guessing. At a high level, the project uses segmentation models to identify objects and regions in an image, then draws numbered marks on each one. You can run a demo that generates these marked images automatically or interactively, choosing how detailed the labels should be. Once the image is marked, you send it to GPT-4V along with a text prompt, and the model can refer to specific objects by their numbers, answer questions about them, or follow instructions tied to particular regions. This would be useful for anyone building applications where an AI needs to reason about specific things in a photo. For example, it can help solve CAPTCHA puzzles by identifying which numbered squares match a description, guide users through smartphone interfaces by labeling each button, teach someone what every control on a game controller does, or plan moves in a 2D game by referencing marked elements on screen. It also handles food identification, knowledge sharing about dish ingredients, and simulated navigation tasks. What makes this approach notable is that it bridges a gap in vision models: GPT-4V alone can describe images but struggles to ground its answers to specific regions. By adding numbered visual marks, the model gains precise spatial references, and the authors found it outperforms specialist models on most vision tasks they tested. The project itself is built on top of several existing segmentation models, and the README provides install commands for those dependencies along with a demo script to try it locally.

Yoink these prompts

Prompt 1
I have an image with several objects. How do I use Set-of-Mark to overlay numbered labels on each object and send the marked image to GPT-4V so it can reference specific regions by number?
Prompt 2
Help me set up and run the Set-of-Mark demo script locally. What segmentation model dependencies do I need to install and how do I choose the label detail level?
Prompt 3
I want to use Set-of-Mark to solve a visual CAPTCHA where I need to identify which numbered squares in an image match a text description. Walk me through generating the marked image and prompting GPT-4V to select the right squares.
Prompt 4
Using Set-of-Mark, how can I mark buttons on a smartphone screenshot with numbers and then ask GPT-4V to explain what each numbered button does?

Frequently asked questions

wtf is som?

Set-of-Mark overlays numbered labels onto objects in images so AI vision models like GPT-4V can reference exact regions by number, enabling precise visual reasoning and instruction-following.

Is som actively maintained?

Dormant — no commits in 2+ years (last push 2023-11-14).

What license does som use?

The license terms are not specified in the repository documentation.

How hard is som to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is som for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.