Maelic/RelateAnything

RelateAnything: Real-Time Open-Vocabulary Relation Prediction From Any Inputs

What it solves

RelateAnything provides a way to predict the relationships between objects in an image in real-time. Unlike traditional systems, it is "open-vocabulary," meaning you can define the specific relations you want to look for (e.g., "riding", "beside", "in front of") at inference time without needing to retrain the model.

How it works

The system uses a DINOv3 backbone to process the image and turn object regions into visual tokens. A pair sampler identifies candidate relations, and a transformer refines these using the scene context. A vocabulary head then scores these pairs against text embeddings of the user-provided predicate strings. This allows the model to identify both spatial relations (where things are) and semantic relations (what they are doing) from a single forward pass.

Who it’s for

This tool is designed for developers and researchers working on scene graph generation, computer vision, and real-time object relationship analysis.

Highlights

  • Open-Vocabulary: Define custom relation phrases at runtime without retraining.
  • Real-Time Performance: High-speed inference (e.g., 16.8ms per image with ViT-S+ on an RTX 3080).
  • Flexible Inputs: Works with any object detector or segmenter; it only requires image pixels and bounding boxes.
  • Multiple Graph Types: Can produce a single ranked list of relations or separate spatial and semantic graphs.
  • Browser-Ready: Includes a demo that runs locally on the device using WebGPU or WASM.

Related

  • Project
  • Project
  • Project
  • Project
  • Project