Backflow
Cities plan their drains with flood simulations.
Core trick
Renders three simulated flood versions from real camera angles and tunes drainage parameters toward the closest match.
Description
Cities plan their drains with flood simulations. Some settings in those simulations cannot be measured, so engineers guess them. Checking the guesses normally needs water sensors underground, which almost nobody has. Backflow checks and corrects a flood simulation using only video.
We used a real flood test site in Switzerland (the FloodX dataset), which is filmed from several cameras. Gemini 4 Argon read the site's engineering drawing and built the whole site in 3D. It noticed a drain was missing from its own scene and fixed its own code. The simulation (EPA SWMM) makes three versions of the flood. We draw each one in Argon's 3D site, from the real camera's angle, next to the real footage. Argon watches the whole flood, picks the closest version, and says what is still wrong. The settings move toward its pick, and the loop repeats. Then we freeze the model and test it on a different flood it has never seen, and only then compare it with the real water sensors. After watching one flood, the prediction was more than five times more accurate. That is in the range researchers reach when they tune with sensors.
README excerpt
# Backflow Live demo: https://n45r.github.io/backflow/ (a recorded run, replayed in your browser, no server needed) Cities use computer models to decide where to spend money on drains, flood walls and basement protection, but those models are often never checked against a real flood, because measuring floods is expensive. Cameras are cheap, and many already point at places that flood. Backflow is an agent that watches real flood video, builds a 3D scene of the site whose water comes only from a drainage simulation, and fixes the simulation until its render matches the video. It then predicts a flood it has never seen, and that prediction is scored against water-level sensors the agent never saw. Headline: using only camera video, Backflow corrected a flood model to within the range of the researchers' own sensor-based calibrations, and its prediction held on a flood it never saw. The inflow is a measured input and the model structure comes from the researchers' published template, so this is calibration, not prediction from video alone. ## Status Work in progress. Built during the Gemini 4 Argon SF hackathon on 25 October 2026. ## How it works - **Argon writes the world.** From the 1:50 site plan PDF and one dry camera frame, Argon writes the full Three.js scene of the site in one pass. - **Water comes only from physics.** EPA SWMM (through PySWMM) computes depths at the pond, manholes and basement. A locked harness turns those depths into water in the scene. Argon can