← Archive07 / CASE STUDY

AI · Relation prediction experiments

RelateAnything Lab

Ran an open-vocabulary relation model on an RTX 4090. On a generated clip, I diagnosed missing relation scores caused by changing detector classes, then compared persistent object association and temporal postprocessing separately.

ROLEInference integration · failure analysis · object association · evaluation · recorded-run viewer
PERIOD2026.09
BUILT WITHPython · PyTorch · YOLO11s · RelateAnything · Vercel
Generated footage used for the relation experiment: a person holding a blue bottle above a table
Actual frame from the 20.04-second clip generated for this experiment. The web demo replays this footage and recorded inference.
Bottle-region availability
59.7% → 100%

287/481 → 481/481 · the same generated clip

holding F1
0.120 → 0.825

End to end · before temporal postprocessing · 74 eligible draft labels

on positives detected · unresolved
0 / 56

Threshold 0.5 · recall remains zero after association

01 / DIAGNOSIS

Tracing the missing relation scores

I generated a roughly 20-second clip of picking up a bottle and placing it on a table. YOLO11s and RelateAnything ran on every frame to inspect person–holding–bottle and bottle–on–table relations.

The baseline selected detections classified as bottle in each frame. During the lift, the same object was labeled vase, cell phone, or cup, so valid localizations were dropped from the bottle relation input.

02 / IMPLEMENTATION

Separating object identity and relation scores

A confident bottle detection initializes the object identity. Later observations are associated across detector classes using position, motion, and size. Only boxes actually observed in the current frame enter the relation model; a missing detection remains unobserved.

RelateAnything receives a single image, regions, and predicate strings per frame. Object association, EMA, and hysteresis are separate temporal components. The viewer distinguishes model scores from temporal system state.

  1. 01Video frame

    Original timestamp and frame index

  2. 02Detect and associate

    Currently observed regions

  3. 03RelateAnything

    Ordered object pairs × predicate scores

  4. 04Record and compare

    Unsmoothed output / temporal state

03 / EVIDENCE

Measuring missing observations and false positives

Draft labels were created by reviewing the clip before inference at 0.25-second intervals. Ambiguous contact transitions are marked uncertain and excluded. Evaluation matches exact frame indices; timings requested in the generation prompt are not treated as ground truth.

A missing detection is different from observing a false relation. Conditional and end-to-end metrics are reported separately; missed positive relations count as false negatives end to end. The 0.5 threshold has not been optimized on a separate validation set.

The baseline supplied bottle regions in 287 of 481 frames and reached holding F1 0.120. Class-agnostic association recovered observed boxes in all 481 frames and reached F1 0.825 before temporal postprocessing: precision 70.2%, recall 100%, with 14 false positives remaining.

Temporal postprocessing reduced holding false positives from 14 to 13, yielding F1 0.835. The on relation still missed all 56 positives after association. The result separates recovered object availability from accurate relation decisions and keeps the unresolved failure visible.

On an RTX 4090 with FP32 and batch size 1, the pipeline including association and postprocessing averaged 38.68 ms/frame, with p95 46.14 ms. The inverse mean is about 25.85 FPS; it is not the web playback rate or deployed-server performance.

MeasureAutomatic baselineWith object association
Bottle regions · 481 frames287 / 481481 / 481
holding · TP / FP / FN3 / 14 / 3033 / 14 / 0
holding F1 · before postprocessing0.1200.825
on recall · 56 positives0%0%

04 / RECORDED DEMO

Compare footage, inference, and postprocessing

The public demo aligns source footage with saved run outputs. It distinguishes the detector class observed for the object, availability of a relation score, and changes introduced by temporal postprocessing.

Vercel hosts the results viewer. The public page does not run GPU inference or calculate relations for newly uploaded videos. Displayed inference timings were measured locally on an RTX 4090.

ENGINEERING DECISIONS

Engineering decisions

01

Keep identity when detector labels change

The failure path discarded frames where the bottle had already been localized. After a confident initial observation, association preserves identity while recording detector label changes. The tracking approach does not use color or manual regions.

02

Separate model output and temporal processing

Per-frame scores with the released calibration are saved separately from EMA and hysteresis outputs. Temporal system state is not presented as a probability predicted by the model.

03

Reproduce from recorded runs

Records retain model and detector versions, vocabulary, input-video hash, score formula, and timing scope. The results view can be rebuilt without rerunning the model.

SCOPE & LIMITS

Limitations and scope

  • Box availability is not localization accuracy. Table regions still vary between frames, and localization has not been evaluated against manually labeled boxes.
  • This is a development experiment using one generated clip and draft annotations reviewed on that clip. Generalization has not been tested on separate real-world or held-out footage.
  • Association assumes one target instance per class. Multiple bottles, full occlusion, and camera motion require separate identity tests.
  • Neither the relation model nor the detector was retrained. RelateAnything and RA-4M are Maëlic Neau’s original research; this case contributes integration, diagnosis, association, evaluation, and visualization.
  • Timings use GPU synchronization after warmup and include frame decoding, detection, relation computation, and postprocessing. JSON writes, web rendering, and output-video encoding are excluded.
NEXT CASEVisionEye ↗

Contact

hyunaeee@gmail.com ↗

South Korea · Korean / English

Portfolio PDF

A casebook with roles, engineering decisions, evidence, and source links.

Choose “Save as PDF” in the print dialog.