Hybrid Code-and-Diffusion Visual Reasoning for Real-World Occluded and Textured Video Tasks
Pair a code-writing agent with a generative video renderer so visual reasoning systems can handle textured, occluded, real-world scenes beyond flat synthetic graphics.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
The evaluation is conducted entirely on VBVR-Pro-Bench, whose tasks are procedurally rendered with flat colors, crisp boundaries, and exact geometry, allowing agents to decompose scenes via simple color-saturation masks and connected-component labeling.
“Beyond these, it remains open whether the advantage holds on real-world footage and whether hybrid systems that pair a coding agent with a generative renderer can combine the strengths of both.”
Limitation
Programmatic pixel-editing pipelines using standard imaging libraries cannot photorealistically synthesize or modify textured, variably lit, or occluded real-world objects where no clean symbolic decomposition exists.
Proposed Solution
Build a dual-engine neuro-symbolic pipeline in which a coding agent first parses the input frame using pretrained vision foundation models (e.g., SAM2 for segmentation and Depth Anything V2 for geometry) to compute symbolic plans, trajectories, or control masks in Python, and then conditions a controllable video diffusion model (e.g., Wan2.2-I2V or ControlNet-style flow models) to render the final photorealistic frames.
The paper’s authors list this direction as future work, so they may already be pursuing it.
Why This Matters
If successful, this hybrid architecture could combine the exact logical and spatial planning reliability of code synthesis with the photorealistic rendering capacity of generative video models on natural footage.
How to Get Started
How to test it: Test the hypothesis that a code-conditioned video diffusion renderer outperforms both pure video generation and pure pixel-editing code on textured, occluded scenes by comparing against standalone Wan2.2-I2V and pure-Python coding agents using VLM-judge accuracy and FVD/SSIM; stop if the conditioning overhead degrades logical task accuracy below standalone video models.
- Curate an evaluation subset pairing VBVR-Pro-Bench transformation tasks with photorealistic textured overlays or Blender-rendered equivalents such as WROP or BVB tasks.
- Implement a Python tool wrapper exposing SAM2 segmentation and depth estimation inside the coding-agent sandbox to extract dynamic control masks and bounding-box trajectories.
- Integrate the extracted trajectory/mask video drafts as conditioning inputs to an open video model such as Wan2.2-I2V-A14B or VideoCoCo-style conditioning pipelines.
- Benchmark the hybrid system against standalone Wan2.2-I2V and unmodified coding agents on both logical task completion and visual fidelity.
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Works like Lighting-grounded Video Generation with Renderer-based Agent Reasoning and Tora: Trajectory-oriented Diffusion Transformer for Video Generation combine agent-based reasoning or trajectory generation with video diffusion models. However, they leave open the specific dual-engine neuro-symbolic pipeline utilizing Python code generation from vision foundation models to control modern video diffusion models.
- Lighting-grounded Video Generation with Renderer-based Agent Reasoning · 2026 · 6 citations
- Tora: Trajectory-oriented Diffusion Transformer for Video Generation · 2025 · 206 citations
We searched OpenAlex and arXiv for “coding agent hybrid video diffusion visual reasoning” and “Hybrid Code-and-Diffusion Visual Reasoning for Real-World Occluded and Textured Video Tasks” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Solve Vision with Code: Coding Agents Are Stronger Visual Reasoners Than Video ModelsDezhi Luo, Fengyuan Yu, Haotian Zhang +11 more · 2026
This paper evaluates whether off-the-shelf coding agents outperform native video generation models on visual reasoning tasks when evaluated under identical inputs, output video format, and an unmodified deterministic evaluator on VBVR-Pro-Bench. By writing Python programs that render answer videos in a CPU sandbox, three closed-model coding agents achieve scores of 0.893 to 0.923, surpassing the best RL-trained video model (0.670) by over 0.22, while the strongest open-weight model (GLM-5) reaches 0.572.
Related Ideas
- Decoupled 4D Perception-to-Code Pipeline Using Geometric and Body Reconstruction PriorsVibePrevisBench: Evaluating Agentic Coding for 4D Scene Generation in Blender🔴Hard
- Hybrid Neuro-Symbolic Rendering for Statistical PlotsPaperBanana: Automating Academic Illustration for AI Scientists🟡Fairly easy
- Action-Conditioned Visual Diffusion Planning with Closed-Loop Inverse Dynamics ExecutionViDecide: Teaching Video Diffusion Models to Reason and Plan Step by Step🔴Hard
- Decoupling Pixel-Aligned Decoder Conditioning for Open-Ended Single-Pass Image EditingJeveration: System One Models Now Generate🟠Medium
- Temporal-Native Tools for Motion AnalysisPyVision-RL: Forging Open Agentic Vision Models via RL🟠Medium