Manuscript Offprint
arXiv:2610.41304ART of PIV: Agentic Real-Time Particle Image Velocimetry for Active Flow Control
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Particle image velocimetry (PIV) measures fluid motion from images of tracer particles, but its accuracy depends on choices throughout the estimation pipeline, including image preprocessing, flow estimation, and postprocessing. These choices are typically left to expert tuning, and a fixed configuration can become less accurate as conditions change. This matters especially when PIV supplies feedback for real-time control, where measurements must be both accurate and fast, and flow conditions vary. We introduce ART of PIV—short for Agentic Real-Time and also a nod to the art of tuning a PIV pipeline—which automates pipeline choice for each image pair. A learned agent selects a configuration according to a chosen measurement objective from a library assembled for a specified speed budget. Across cross-correlation, classical optical-flow, and learning-based estimators, ART of PIV reduces average end-point error (AEPE) by 12.2–22.4% relative to the best single estimator at matched speed, with gains extending to 1000–4000 image pair/s. In a simulated local velocity regulation task, it reduces mean normalized closed-loop cost by 13.24–13.59 percentage points relative to a tuned fixed estimator, with the same classical controller in both cases. In a tabletop water channel, we illustrate two ways to tune ART of PIV for a fluidic pinball of three rotating cylinders: selecting between complementary optical-flow tunings for accuracy, and selecting regions of interest with coherent rotation or shear using a common flow estimator. For the first variant, we train a DreamerV3 reinforcement learning controller directly in the physical world and demonstrate tracking of a prescribed flow field in the wake of a fluidic pinball.

Figure 1. ART of PIV casts flow quantification as an agentic decision: given a pair of tracer-particle snapshots, a lightweight agent selects one estimator from a library and returns the selected estimator's flow.
1. Introduction
Particle image velocimetry (PIV) (Adrian, 1991; Raffel et al., 2018; Westerweel et al., 2013; Scharnowski and Kähler, 2020) and related image-based flow-quantification methods (Horn and Schunck, 1981; Liu and Shen, 2008) are among the central tools for measuring flow fields, with applications spanning laboratory (Adrian, 1991), industrial (Raffel et al., 2018), microfluidic (Santiago et al., 1998), and environmental (Fujita et al., 2007) settings. Traditionally, their role has been observational: to reconstruct a velocity field for analysis, validation, and diagnostics. Performance has accordingly been measured almost exclusively through accuracy. For an image pair, the end-point error (EPE) is the distance between the estimated and ground-truth flow, averaged over pixels. Averaging these errors over the image pairs in a dataset gives the average end-point error (AEPE). Throughout, we use algorithm and estimator broadly to include the configured measurement pipeline: image preprocessing, flow estimation, and postprocessing, following the organization of FlowGym (Banelli et al., 2026). Two configurations may therefore differ in their crop, image conditioning, or output resolution while sharing the same underlying flow-estimation method.
Recent results in active flow control invite a broader perspective. Terpin and D'Andrea (in press) showed that, on a real-world flow-control task, an agent equipped with dense flow feedback discovers high-performance strategies within tens of minutes of real-world interaction, whereas an agent without that feedback fails to learn a policy that increases drag. Once flow quantification is embedded in a real-time learning or control loop, latency becomes as consequential as accuracy: a highly accurate but slow estimator simply cannot run online, while a fast but crude one risks yielding feedback too noisy to learn from. With accuracy as the measurement objective, this leads to the speed-accuracy trade-off: the best accuracy attainable at a given inference speed. Three estimator families span this trade-off: classical cross-correlation (Scarano, 2002; Liberzon et al., 2026), optical flow (Kroeger et al., 2016; Horn and Schunck, 1981; Farnebäck, 2003), and learning-based estimators (Cai et al., 2019; Huang et al., 2022; Luo et al., 2024). No single method dominates. For instance, using FlowGym (Banelli et al., 2026), we find that the accurate RAFT32-PIV (Lagemann et al., 2021) runs at only 1.7 image pair/s on an RTX 5090, while fast estimators such as DIS (Kroeger et al., 2016) and OpenPIV run from tens to thousands of image pairs per second at lower accuracy. For representative operating points in these families, Table 1 compares fixed estimators with our approach, which selects an estimator for each image pair.
In this work, we ask how a flow-measurement pipeline can adapt to changing conditions within a given inference-time budget. The preferred configuration can depend on both the flow and what the user wants to measure. Even when accuracy is the objective, the best-performing estimator or parameter setting can vary across flows and regions of a single image pair (Bonomi et al., in press). Tuning a PIV pipeline is therefore an art: as the 2014 PIV Challenge put it, “the largest uncertainties are introduced by the user who selects the evaluation parameters based on knowledge, experience and intuition” (Kähler et al., 2016). One line of work responds by adapting a single estimator’s parameters to the data: the interrogation window in cross-correlation (Scarano and Riethmuller, 1999; Theunissen et al., 2007, 2010), or the regularization in optical flow (Jassal et al., 2025). We build a library of configurations suited to different conditions and learn when to use each. The motivation is practical: tuning a pipeline for a particular regime can be easier than finding a common configuration for all regimes. Human expertise can guide library design and training labels. Alternatively, labels can follow a quantitative criterion, such as minimum estimation error
| Estimator | Library spans | Speed(image pair/s) | AEPE (px) | ||
|---|---|---|---|---|---|
| Best single | ART of PIV | rAEPE (%) | |||
| Learned | |||||
| RAFT32-PIV | flow classes | ≈1.7 | 0.0120 | 0.0096 | 20.3 |
| Classical optical flow | |||||
| DIS | hyperparameters | ≈20 | 0.1498 | 0.1268 | 15.3 |
| DIS | hyperparameters | ≈1000 | 0.1577 | 0.1385 | 12.2 |
| Cross-correlation | |||||
| OpenPIV | hyperparameters | ≈1000 | 0.2544 | 0.1979 | 22.2 |
| OpenPIV | hyperparameters | ≈4000 | 0.2544 | 0.1974 | 22.4 |
Table 1. Selecting an estimator for each image pair improves accuracy at matched speed across three estimator families. The library spans flow-class specialists or hyperparameter tunings of the listed estimator. Speeds are in image pair/s and include the agent in the sequential reference implementation. Errors are AEPE (px; lower is better); rAEPE is the percentage decrease in AEPE relative to the best single estimator (higher is better). The fixed baseline is the best budget-feasible tuning for DIS and OpenPIV, and the pretrained network for RAFT32-PIV. Results are means over three training seeds on the held-out test set of Cai et al. (2019); experimental details are in Section 3.1. Bold marks the lower error at each operating point.
when the true flow is known. The agent learns to predict the preferred configuration for new image pairs.
Our contributions. We introduce ART of PIV, an agent that learns to select a measurement pipeline for each image pair within a specified speed budget. A small convolutional neural network (CNN) predicts the preferred configuration from a supplied library and returns its flow; see Figure 1. The library and supervision encode the user's measurement preferences, including choices of preprocessing, estimator tuning, and postprocessing. Selection can overlap with estimator execution to keep its additional latency small. Adapting the choice on every image pair is particularly relevant in active flow control, where the controller continually changes the flow conditions.
We evaluate selection for accuracy using estimators from three paradigms: classical optical flow, learning-based estimation, and cross-correlation, including DIS, RAFT32-PIV, and OpenPIV. Relative to the best single configuration at matched speed, ART of PIV reduces AEPE by 12.2–22.4%. This gain persists at 1000–4000 image pair/s, where the resulting accuracy could enable control with flow feedback in systems with very fast dynamics, such as combustion instabilities (McManus et al., 1993), aerodynamic flow separation (Greenblatt and Wygnanski, 2000), and gust load alleviation (Regan and Jutte, 2012).
To assess whether these estimation gains translate to active flow control, we first evaluate ART of PIV on a simulated local velocity regulation task. With the same classical controller, ART of PIV increases the time a work area stays near its target velocity and reduces mean normalized closed-loop cost by 13.24–13.59 percentage points relative to a separately tuned fixed DIS reference (see Section 3.2.1). We then deploy ART of PIV on the tabletop water-channel setup of Terpin and D'Andrea (in press), available at https://activefluidcontrol.com, using a fluidic pinball of three rotating cylinders to illustrate two ways of learning our measurement preferences. The first variant selects between DIS A and DIS B, complementary tunings chosen for accuracy in different flow regimes. The second selects regions of interest with coherent rotation or shear using the common flow estimator DIS C. Using flow feedback from the first variant, we train a DreamerV3 reinforcement learning controller directly on the physical setup and demonstrate successful flow tracking (see Section 3.2.2). The method and evaluation infrastructure are available in FlowGym (Banelli et al., 2026), and the deployment code is available in FlowGames .
2.1. Flow quantification as a selection problem
We are given a library of flow estimators, each including its preprocessing and postprocessing. Members can be different DIS (Kroeger et al., 2016) tunings, fine-tuned RAFT32-PIV variants (Lagemann et al., 2021), or a common estimator applied to different regions. Each maps an image pair to a candidate flow on its configured spatial domain. A policy , with learnable parameters , maps the pair to an action , yielding the flow .
Let quantify how well that choice serves the measurement objective, with larger values preferred. We seek to maximize its expectation over the image pairs encountered at deployment:
The library is restricted a priori to pipelines that meet the speed budget (see Section 2.3). We treat each configured pipeline's runtime, including its preprocessing and postprocessing, as a fixed, deterministic cost. Under the overlapping execution schedule of Section 2.2, meeting the budget is then a property of the pipeline alone. This is a contextual bandit formulation (Sutton and Barto, 2018): one measurement decision per image pair. The selection reward specifies which measurement to return; a downstream controller can have a separate task reward, such as tracking a prescribed flow field.
Remark 2.1 (Numerical objectives and expert labels). The selection reward can be specified through a numerical criterion or expert labels. In the first approach, a numerical score directly defines . For example, when a ground-truth flow is available, we measure accuracy using , where EPE is the pixel-averaged error on a common domain , with estimates expressed in the same coordinates and units. We use this objective in the accuracy benchmarks (Section 3.1) and the simulated local velocity regulation task (Section 3.2.1). Other numerical criteria, such as scores for desired flow structures, can define in the same way when available.
Alternatively, an expert can supply a preferred member for each image pair . Setting then makes (1) maximize agreement with those labels, without requiring ground-truth flow. We showcase this use with labels that encode our choices between DIS tunings in the fluidic-pinball experiment of Section 3.2.2, and between regions of interest with a common estimator in Section F.2.2.
2.2. The selection agent
The agent uses a small CNN. Given the image pair , it produces in a single forward pass a vector of scores , one per library member. A higher score indicates a stronger predicted preference under the chosen supervision; the scores are classification logits in our default training scheme. The agent's standalone execution time is reported in Section A.3. At deployment, we return the flow of the highest-scoring member: .
Sequential and speculative execution. In sequential execution, we first evaluate the agent and then run only the selected estimator. The total latency is the sum of their runtimes. The agent and the estimators consume the same image pair, so estimator execution need not wait for the selection decision. A deployment can use speculative execution, analogous to executing instructions ahead of branch resolution in a processor: start the library estimators concurrently with the agent, then retain the selected branch and cancel the others once the decision is available (Algorithm 1). With sufficient parallel resources to avoid slowing the selected estimator, and with the agent finishing before that estimator, the decision is hidden entirely within estimator execution. A very fast estimator may finish before the agent; in that case the decision determines when the output can be returned, motivating a smaller agent or a downsampled agent input (Section A.3).
Algorithm 1 ART of PIV: deployment with optional speculative execution.
Require: image pair , library , trained score network
Require: execution mode: sequential or speculative
1: if execution mode is speculative then
2: for each do
3: Launch asynchronously
4: end for
5: end if
6: Evaluate the scores
7:
8: if execution mode is speculative then
9: Cancel estimator branches
10: Wait for to finish, yielding
11: else
12:
13: end if
14: return
Training from scores or labels. We use classification as a training surrogate for (1). For each image pair , let denote the desired library member. This label is either supplied directly, as in Remark 2.1, or obtained by selecting , with ties resolved consistently. For negative EPE, this recovers the minimum-error label , where is the error of estimator on . A cross-entropy loss drives toward ; Algorithm 2 gives the procedure. Classification uses the preferred member as its target and discards the size of reward differences between members. Regression and bandit alternatives retain numerical reward information; we compare these training paradigms for the accuracy objective in Section A.1.
We train only the agent: the library and the supervision criterion remain fixed. For a fixed image pair, numerical rewards can therefore be computed once and cached, together with the resulting label. Later epochs reuse that label without rerunning the estimators. Directly supplied labels bypass reward evaluation altogether. The cache is valid for unchanged inputs and supervision; transformations that alter the preferred choice require new labels or reward evaluations. We use Adam for the agent updates (Appendix C).
Algorithm 2 Training the agent from numerical rewards or supplied labels.
Require: image pairs , library , optimizer; supplied labels or a reward evaluator ; label cache
1: for each minibatch do 2: for do 3: if then 4: if a label is supplied then 5: 6: else 7: Evaluate and cache for every library member 8: Resolve ties consistently 9: end if 10: end if 11: end for 12: Update on 13: end for 14: return
Learning with limited labeled data. When ground-truth flow fields are available from computational fluid dynamics simulations representative of the intended deployment, tools such as SynthPix (Terpin et al., 2026) can generate arbitrarily many particle-image pairs from those fields, without manual annotation. Training or fine-tuning directly on a physical setup with manually assigned labels, as in our fluidic-pinball experiment (Section 3.2.2), instead relies on a limited set of recordings and annotations. We reduce annotation effort by assigning one label to each recording collected under a fixed actuation setting. Augmentation offers a way to reuse labeled examples (Cubuk et al., 2020), varying illumination and contrast while preserving the intended preference. Validation on separate recordings, or on disjoint time blocks with a gap, helps assess generalization beyond neighboring frames. The collection, augmentation, and validation procedure for our physical experiment is detailed in Section F.3.
2.3. Building the library
It remains to choose the library itself. Fix a pool of candidate pipelines and a speed budget , and write for the candidates fast enough to meet it. When numerical rewards are available for the pool, the best value attainable on image pair by selecting from is the oracle reward . We choose the library to maximize this value in expectation, subject to the budget and a cap on its size:
For negative EPE, this minimizes the expected oracle error. We estimate the expectation on tuning data. The budget keeps every member—and hence whichever flow the agent returns—within the latency target under the schedule of Section 2.2, and the cap keeps the agent's decision and the speculative work small.
For fixed, finite cached rewards independent of library composition, the gain above a common lower baseline is monotone and submodular (Appendix B). We therefore initialize the library greedily by adding the candidate with the largest marginal reward gain until the cap is reached. This attains at least of the optimal gain above that baseline (Nemhauser et al., 1978). The greedy library can be refined to the exact optimum with a combinatorial solver. For our negative-EPE experiments, this takes 6–17 s on the DIS pool; greedy lands within 0.4% of the optimal AEPE from three models on, and the libraries of Table 1 are exact. We perform this selection offline using cached rewards. Sweeping traces the objective attained by the corresponding libraries; for accuracy, Table 1 reports the resulting speed-accuracy trade-off at the tested operating points.
Forming the pool. The candidates in come from varying the flow estimator, its parameters, or its preprocessing and postprocessing. When this is cheap we over-generate and let (2) prune: the patch size, stride, iteration count, and pyramid depth of DIS, for instance, yield a large pool at negligible cost. When it is expensive we cannot screen many, and instead build each candidate deliberately; for example, by fine-tuning a pretrained RAFT32-PIV (Lagemann et al., 2021) into one specialist per flow regime. We give the DIS pool and hyperparameters and the RAFT32-PIV fine-tuning protocol in Appendix C, and release both in the FlowGym repository (Banelli et al., 2026), together with the generic per-algorithm scripts that generate the candidate pools, so a pool can be formed for any new estimator.
An expert can also form a small library directly, retaining configurations preferred in different observed regimes without a numerical reward for screening the pool. Provided every member meets the speed budget, the library can be paired with expert labels to train the same selection agent. The fluidic-pinball experiment in Section 3.2.2 illustrates this approach with manually tuned estimators and labels encoding our choices; Section F.2.2 gives a second example with a library of regions of interest.
3. Results and discussion
We first evaluate ART of PIV in terms of AEPE across estimators and speed budgets (Section 3.1). We then test its use in active flow control (Section 3.2).
3.1. Flow estimation accuracy
We compare ART of PIV with fixed estimators at the matched-speed operating points in Table 1, spanning three estimator families and two specialization strategies.
Estimators. We evaluate three estimators drawn from three paradigms. RAFT32-PIV (Lagemann et al., 2021) is a learned optical-flow network; DIS (Kroeger et al., 2016) is a classical optical-flow method; OpenPIV (Liberzon et al., 2026) is a cross-correlation method. Each estimator contributes one or more operating points, and the library ART of PIV selects from (Section 2.3) is built by specializing that estimator along a different axis:
-
RAFT32-PIV: one fine-tuned specialist per flow class of the benchmark, so the library spans flow regimes (Appendix C).
-
DIS and OpenPIV: a pool of hyperparameter tunings (interrogation window, overlap, and the DIS parameters), from which (2) selects the library (Appendix C).
We also contribute an efficient JAX (Bradbury et al., 2018) implementation of OpenPIV and release it in FlowGym (Banelli et al., 2026) alongside the already-ported RAFT32-PIV and DIS.
At each operating point the baseline is the single best estimator that meets the budget. For the DIS and OpenPIV points, this baseline is the solution of (2) over the budget-feasible pool. For a learned point, the baseline is the corresponding pretrained network (e.g., the pretrained RAFT32-PIV at the accurate end). ART of PIV draws on the same pool at the same budget, but with a library of specialists and selection for each image pair. The effect of library size is studied in Appendix A.
Method. We evaluate on the PIV benchmark of Cai et al. (2019), following its train/test split: every number in this subsection is on the held-out test set, while model selection and the ablations of Appendix A use a 10% validation split carved from the training set (see Appendix C). We average over three training seeds; hardware and training details are in Appendix C. We build a separate library at each operating point. The points span image pair/s (the pretrained RAFT32-PIV) to image pair/s (OpenPIV), with DIS filling the range in between. The reported speeds include both the agent and the selected estimator, measured with the sequential reference implementation. They provide a conservative reference for speculative deployments that hide the agent's execution time as in Section 2.2. We hold the measured pipeline to the same target as the baseline. The classification agent and greedy-versus-exact library selection are ablated in Appendices A and B.
Metrics. We report the AEPE (in px; lower is better), which averages EPE over all image pairs in the test set, and inference throughput (image pair/s, agent included, sequential reference implementation). To compare a method against a baseline at matched speed, we report the relative average end-point error reduction (rAEPE),
where AEPE() is the AEPE of on the test set. Higher rAEPE() is better, and a value of 20% means cuts the average error by a fifth. Following common practice in flow quantification, we summarize results using AEPE or rAEPE; a statistical analysis of the individual EPE values is reported in Appendix D.
Results. At every operating point, selecting an estimator for each image pair beats the best single estimator at matched speed, lowering the AEPE by 12.2–22.4% (Table 1). The gain holds across all three paradigms and both specialization axes: whether the library members are per-class RAFT32-PIV weights or DIS and OpenPIV hyperparameter tunings, selection for each image pair recovers accuracy that no fixed estimator attains on its own. The gap to the oracle—the lowest AEPE achievable by selecting the best estimator for each image pair (Appendix A)—measures the remaining improvement available through more accurate selection, and we invite future work to close it by improving the agent architecture.
3.2. Active Flow Control
We study the effectiveness of ART of PIV as the feedback source in two control tasks: simulated local velocity regulation with a fixed proportional-derivative controller (Section 3.2.1), and flow tracking with a fluidic pinball of three rotating cylinders, using a DreamerV3 reinforcement learning controller trained directly in a physical water channel (Section 3.2.2).
3.2.1. Flow regulation with distributed actuation
Flow feedback can be exploited to create a work area usable for observation or manipulation. For example, hydrodynamic traps use feedback to hold particles near a stagnation point (Tanyeri et al., 2010). We isolate a related requirement: regulate the velocity throughout a fixed work area (Figure 2).

Figure 2. Local velocity regulation setup and image-feedback loop. (a) The forces , of the two actuators act throughout the periodic domain; is transverse position and is time. Arrows show negative commands, normalized per actuator. (b) SynthPix renders images at and , where is the th update time and is the control period. (c,d) ART of PIV selects an estimator; the three actual DIS fields on the same pair are shown for comparison. The blue outline marks the recorded ART of PIV choice, specialist 0. Images and fields show a qualitative example on its own trajectory at , where is the episode duration. Only specialists 0 and 1 are selectable; the reference is a fixed configuration, with lower mean closed-loop cost than either specialist used alone. (e) The selected displacement supplies local feedback to the controller, whose commands drive the fluid until the next update. Every map shows the full domain, with the work area outlined. Flow-field colors show streamwise displacement converted to velocity and normalized by nominal initial amplitude : , clipped at ; their arrows indicate direction. Here is camera calibration in pixels per unit length.
We consider a periodic square box of fluid flowing horizontally. The flow is approximately the sum of two components. The large-scale component forms two regions moving in opposite directions; the small-scale component alternates in direction over much shorter vertical
| Feedback | (pp) | (pp) | Successful episodes |
|---|---|---|---|
| Fixed specialist 0 | +7.16 | -7.38 | 0/30 |
| Fixed specialist 1 | +3.52 | -3.24 | 11/30 |
| Reference | 0.00 | 0.00 | 18/30 |
| ART of PIV | [-12.06, -11.75] | [+11.62, +11.92] | 30/30 |
| Whole-frame oracle | -12.54 | +12.41 | 30/30 |
| Ground-truth feedback | -16.08 | +15.79 | 30/30 |
Table 2. Local velocity regulation outcomes on 30 test episodes, starting from the same initial conditions for all feedback sources. Differences in cost and fraction of time within tolerance are in pp relative to the reference in each episode: negative and positive are better. ART of PIV intervals are min–max ranges of the episode means across 3 training initializations. The number of successful episodes for ART of PIV is the same for every initialization. Bold marks the best deployable feedback for each metric; oracle and ground-truth feedback are reference results.
distances (Figure 3, panel a). Initially, the flow is almost entirely large-scale, with nominal amplitude ; the small-scale component starts negligibly weak. The work area is a relatively small square within the domain, and the task is to reduce the flow there to a weak prescribed target and maintain it at that target: local velocity regulation. A fixed background force maintains the weak target flow, so holding it requires no control effort once it is reached. Two actuators apply forces and throughout the box. Their spatial patterns are fixed, and a controller sets their strengths from camera images through the commands and , respectively. Here, the subscripts and stand for broad and fine, referring to the large-scale and small-scale components, respectively. The broad actuator slows the large-scale component but, as a side effect, also drives the small-scale component. The fine actuator acts only on the small-scale component and can counteract this additional forcing. The images therefore change during an episode, from fast large-scale motion to slow small-scale motion, so the estimator best suited to them may change too. Since this flow model serves only to create such a changing setting, we defer its equations to Appendix E, together with the controller and metric definitions, the training details, and a parameter sensitivity analysis.
Estimators. We compare ART of PIV with three fixed estimators and two idealized feedback sources.
ART of PIV chooses, on each image pair, between two DIS configurations that we call specialists: specialist 0 uses larger patches at half resolution, specialist 1 smaller patches at full resolution (Table 9 in Appendix E). Two baselines use a single specialist on every pair. The third, the reference, is a separately tuned DIS configuration that ART of PIV cannot select. We chose it because it outperformed both specialists in closed loop on separate episodes (Table 10 in Appendix E); on the test episodes, specialists 0 and 1 alone have mean cost differences of +7.16 and +3.52 pp relative to it (Table 2).
The two idealized feedback sources are the whole-frame oracle and ground-truth feedback. Both require access to the ground-truth flow field and cannot be deployed in practice. The whole-frame oracle picks, on each pair, the specialist with lower whole-frame EPE; it is what ART of PIV would do if its selection were perfect according to its training criterion, which measures image error, not closed-loop cost. Ground-truth feedback replaces the estimate with the true velocity at each camera pixel, averaged over the interval between the two images, i.e., the measurement a perfect estimator would provide.
Method. All comparisons use the same controller gains, camera, initial conditions, and tracer realizations, and differ only in how the displacement field is obtained.
At each update time , the estimator converts the latest image pair, rendered with SynthPix (Terpin et al., 2026), into a displacement field in pixels. The images are separated by the control period . Dividing the displacement by camera calibration (pixels per unit length) and by gives a velocity estimate. Within the work area, we measure errors in the large-scale and small-scale components relative to the target flow. A fixed proportional-derivative controller uses these two errors to command the actuators, holding each command until the next update.
Even with perfect feedback, overcoming the flow's inertia can take a substantial part of the episode. The nominal braking time estimates the time needed to slow the nominal initial flow to the target when the first actuator is held at its actuation limit, with the command chosen to reduce the large-scale velocity component. Relative to the episode duration , it is (Figure 3, panel b), leaving the remaining time for settling near the target.
We train the ART of PIV estimator-selection agent by supervised learning from simulated image pairs. We sample 12 combinations of initial flow conditions and tracer realizations for training and a disjoint set of 6 combinations for validation. For each combination, we run the fixed controller with each of the three fixed estimators and both idealized feedback sources, recording the rendered image pairs along every trajectory.
As in Section 3.1, we label each pair with the specialist whose displacement estimate has lower whole-frame EPE against the ground truth, and select the saved agent with the lowest validation AEPE. We deliberately do not restrict this criterion to the work area . Doing so would tailor the selector to this particular controller, whereas we want to test whether the general-purpose accuracy gains of ART of PIV carry over to closed-loop control unchanged. The criterion also scores each image pair independently, rewarding accuracy but not continuity over time. In feedback control, however, a state estimate should be not only accurate but also free of abrupt changes, which propagate to the commands and are amplified by derivative action (Åström and Murray, 2021); switching between estimators can introduce such changes, and exploiting the temporal structure of the image sequence could avoid them.
We repeat agent training with 3 independent network initializations and evaluate each selected agent in closed loop on the same 30 test episodes, unused in training or validation.
Metrics. We assess regulation using the true root-mean-square velocity error relative to the target over . We denote by the fraction of the episode for which this error is within the prescribed tolerance . The normalized closed-loop cost adds a penalty for actuation effort to the fraction of time outside tolerance. An episode counts as successful if the error remains within tolerance throughout a prescribed final hold interval.
We report the cost difference and the difference in fraction of time within tolerance , in percentage points (pp) relative to the fixed reference DIS configuration. Lower and higher are better; both differences are zero for the reference itself.
Here, “true” means computed with access to the ground-truth flow field. In a real-world experiment, this error may instead be evaluated using a very accurate but slower estimator.
a Flow evolution

b Settling toward the target flow
c ART of PIV estimator selection
d Estimation error in the small-scale component

e Actuator 1 command
f Actuator 2 command

— True displacement — Specialist 0 — Specialist 1 — Reference
g
h

i
Figure 3. Flow regulation for one test initial condition. Time and transverse position are normalized by episode duration and domain width , with length scale ; averages over the streamwise coordinate . (a) Mean of instantaneous streamwise velocity , normalized by nominal initial amplitude ; dashed lines bound the work area in . (b) True root-mean-square velocity error over relative to the target, divided by tolerance . The dotted region marks errors within tolerance; the vertical line marks nominal braking time . (c,d) Selected specialist and signed small-scale estimation error. The fitted velocity-error coefficients within use estimated and exact pair displacements, respectively. (e,f) Actuator commands divided by magnitude bounds ; indicates saturation. (g-i) Mean of streamwise pair displacement in pixels, divided by , with camera calibration in pixels per unit length and image interval . Shading marks 's extent. Panels a, c, d, g-i use the ART of PIV trajectory, with identical image pairs for all estimators; b, e, f follow each method's own trajectory.
Results. Across 30 test episodes, ART of PIV gives mean pp and pp. These ranges span the results from the 3 training initializations (Table 2). The cost improvement is consistent: it occurs in every one of the 30 episodes for every initialization. The number of episodes that remain within tolerance throughout the final hold interval rises from 18 out of 30 for the reference to 30 out of 30 for every initialization. The benefit is predominantly additional time within tolerance. The whole-frame oracle gives pp.
Figure 3 illustrates how estimator selection adapts as the flow slows down. Panel a shows the streamwise velocity : as the large-scale velocity component decreases, the small-scale variations become relatively more prominent. ART of PIV initially selects specialist 0, then shifts to specialist 1 as the flow slows and the displacements decrease, with a brief return to specialist 0 during the transition (panel c). The profiles of streamwise displacement show why both specialists are useful: specialist 1 substantially underestimates the large initial displacements (panel g), whereas specialist 0 smooths out the small-scale variations late in the episode, which specialist 1 resolves more accurately (panel i).
The reference captures the initial large-scale profile reasonably well, but shows larger relative deviations from the true displacement in the middle snapshot (panel h). These profiles compare all estimators on the same ART of PIV image pairs. On these pairs, panel d compares the image-based estimate of the small-scale velocity error relative to the target with the corresponding value obtained from ground-truth displacements between the two image times. Their difference, divided by the velocity tolerance , measures the feedback estimation error. This comparison also shows that ART of PIV does not always select the specialist that most accurately estimates the small-scale velocity error within the work area, consistent with training on whole-frame EPE. Once it settles on specialist 1, however, its feedback estimation error is several times smaller than that of specialist 0 on the same pairs.
Panels e, f show each method's commands and during its own control run, normalized by their respective magnitude limits and ; values of mean that the command has reached its actuator limit. With reference feedback, the first actuator's command repeatedly changes sign in the middle of the episode, interrupting its action to slow the large-scale flow. ART of PIV keeps the command directed against this flow more consistently over the same interval. Both image-based feedback sources produce fluctuations in the commands, especially for the second actuator, but the ART of PIV commands decrease in magnitude earlier as the flow approaches the target. Correspondingly, ART of PIV brings the work-area error below tolerance earlier than the reference and keeps it there (panel b), while ground-truth feedback brings the error below tolerance earlier still. This example connects the changing displacement scales and estimator choices to the additional time within tolerance observed across the test episodes.
3.2.2. Flow tracking with a fluidic pinball
We next study flow tracking: controlling a velocity field to follow a prescribed spatial pattern that changes over time. Spatial control of fluid motion is useful for localized reagent delivery (Juncker et al., 2005), cell culture under distinct flow conditions (Zhang et al., 2014), and hydrodynamic trapping of particles (Tanyeri et al., 2010).
For this example, we consider an idealized flushing task followed by local quieting. We first request leftward flow throughout the observed region, representing a flushing phase. We
(a) Apparatus

(b) Three-cylinder configuration

(c) Candidate flow estimates

Figure 4. Water-channel apparatus and flow-estimator selection. (a) Updated tabletop channel based on Terpin and D'Andrea (in press), with component photographs and renders from Active Fluid Control. Insets identify the illuminated test section (1), the three-cylinder actuation assembly (2), external propulsion motors (3), turning vanes (4), honeycomb (5), and contraction (6). The camera and laser are labelled 7 directly on the photograph; connectors link inset 1 to both devices and the test section. Each of the 3 cylinders is driven independently; the 2 propulsion motors circulate water through magnetic couplings across the glass. (b) Updated top and front CAD views of the upstream three-cylinder arrangement. Blue arrows indicate the water circulation direction. (c) Both DIS tunings evaluated on five saved image pairs from training episode 17, at the displayed episode times (approximately one second apart). Red outlines mark the recorded ART of PIV choices, switching B-A-B-A-B. Fields use the 16 × 16 grid supplied to the controller; colour encodes displacement magnitude and equal-length arrows show direction.
then request a stationary upper half while maintaining the same leftward flow in the lower half. This represents creating a quiet work area while preserving fluid transport alongside it.
We implement this task on an updated version of the tabletop circulating water channel developed by Terpin and D'Andrea (in press). The test section contains a fluidic pinball, a configuration of three independently rotating cylinders (Cornejo Maceda et al., 2021; see also Figure 4(a,b)). Here, ART of PIV selects between complementary DIS tunings and supplies flow feedback to a DreamerV3 controller trained directly on the physical setup for flow tracking. Training directly on the apparatus addresses both the computational cost and the modeling difficulty of this setting. Repeated high-fidelity, three-dimensional control rollouts are expensive, and the predicted wake depends on how channel confinement and boundary conditions are represented (Terpin and D'Andrea, in press, Section 2.1 and Appendix A.2). Physical interaction supplies training data that include these boundary effects and the actual hardware dynamics, without first constructing and calibrating a fluid simulator. This also places ART of PIV inside the learning loop, where its estimates must remain useful as the controller changes the flow.
Remark 3.1. We also use this same physical setup, with the limited data available from physical experiments, to illustrate a different use of ART of PIV: selecting regions of interest with coherent rotation or shear while retaining a common flow estimator (Figure 15). We describe the library and our labels in Section F.2, and report the training and validation of the region-selection agent in Section F.3.2. △
Method. We control the three cylinder rotation rates continuously within ±150 RPM, while holding the propellers at -200 and 200 RPM. At each 30 Hz update, ART of PIV selects a DIS tuning for the latest image pair (). Figure 4(c) shows both candidate estimates and the recorded selections during training. We reduce the selected displacement field to and average the latest 3 fields to obtain the feedback . Each 60 s episode requests throughout the grid for 30 s, followed by in the displayed upper half while retaining below (Figure 5(a)). Displacements remain in source-image pixels per pair. Between episodes, we stop the cylinders and allow 60 s of settling with the propellers running.
We construct a library of two complementary tunings (Figure 6) under a common 1 ms budget: DIS A searches at native resolution to retain fine spatial detail, whereas DIS B uses a coarse-to-fine pyramid to accommodate larger particle displacements. We assign our preferred tuning to recordings from prescribed motor settings and train ART of PIV on the resulting image-pair labels, using cross-entropy and photometric augmentation as in Section 2.2. The classifier receives only the images; separate validation recordings select its checkpoint by agreement with our labels. The library, the rationale for our choices and its quantitative consistency check, and the collection and training procedures are detailed in Sections F.2 and F.3.
Remark 3.2 (Library and task design). This library encodes our choices for the prescribed settings; it need not cover every flow attainable with the apparatus, and it may be suboptimal even for this task. We keep this example deliberately simple to illustrate the method and its integration with a learning-based controller, rather than to optimize performance. In fact, future work may choose the collection settings and estimator tunings to match the intended control task. The regimes in Figure 6 suggest that the present library may be better suited to maintaining a quiet observed area and intermittently flushing only its lower half. Other cylinder settings and expert preferences could guide the construction of a library for different
(a) Flushing followed by local quieting
Evaluation episode 1

(b) Physical learning loop

Figure 5. Physical flow tracking with ART of PIV feedback. (a) Targets and recorded estimates from the first evaluation rollout, nearest the phase midpoints and 45.00 s. Flushing requests pixels per pair throughout; local quieting changes only the upper half to . Estimates and targets share the displacement-magnitude colour scale of Figure 4; colours saturate outside the displayed range. Arrows retain a common displacement scale and show every second grid point in each direction; dots denote zero vectors and dashed lines separate the halves. (b) The fixed ART of PIV selector chooses DIS A or DIS B; downsampling and a 3-field running average produce . This estimate and the target supply both the observations and reward. The controller receives four scaled image channels and the eight scalars listed in the box. The reward uses the fields before observation scaling. Dashed grey paths carry measured speeds and the previous command ( denotes a one-step delay); the dashed orange arrow supplies the learning reward, also included in the observations. DreamerV3 commands the three cylinder speeds at 30 Hz. The image pair and candidate thumbnails correspond to the first snapshot in Figure 4; image intensities are inverted for display, and the red outline identifies the selected tuning. The network is schematic; the pinball inset crops the top view in Figure 4(b), retaining the cylinder numbering and incoming flow from the right. These snapshots illustrate the spatial task and its measured error.

Figure 6. DIS tuning-selection pool on separate validation recordings. (a,b) Settings A and B; headers give signed commands for cylinders (1, 2, 3). Columns advance through the consecutive pairs 898–902 of 1799, chosen by temporal position alone. Each tuning has magnitude and vorticity rows. Fields are bilinearly reduced to without rescaling displacement. Blue outlines identify the ART of PIV choice at checkpoint 500; other members are greyed and dashed. Colour scales are shared across settings and tunings. Magnitude is in source-image pixels per pair; vorticity is displacement curl per pair, positive counterclockwise in the displayed view. Equal-length arrows indicate direction; fields are reflected vertically for display.
targets. More broadly, this two-phase example motivates richer tracking tasks on the same apparatus: repeated target switches, flushing different regions, dynamic target selection, flushing on demand to reject disturbances, more complex tracking scenarios. Larger libraries combining additional estimators and tunings could cover the corresponding range of flow regimes. Overall, this task design flexibility renders this setup and ART of PIV a useful testbed for future work on learning-based active flow control. △
With the library and selector fixed, we train a DreamerV3 controller (Hafner et al., 2025) directly on the apparatus, using the feedback loop in Figure 5(b). Its convolutional encoder receives a tensor containing both components of the estimated and target fields, each mapped from pixels per pair to with clipping. Its vector input contains eight scalars: episode time (s), the current tracking reward, the three measured cylinder speeds (RPM), and the three components of the previous command in . The reward is the negative mean pointwise Euclidean distance between and , divided by the target displacement span of 2 pixels per pair, as in Section F.4. Thus both feedback and reward use the same averaged field. We train for 20 episodes with one initialization, then evaluate the final controller in 10 rollouts without further learning.
Results. We first evaluate whether ART of PIV reproduces our preferences. On the separate validation recordings used for checkpoint selection (Section F.3.2), the selected tuning classifier reproduces all 3598 labels (100.00%); the region classifier reaches 99.93% (Table 18). For tuning selection, 5 paired training seeds yield test classification accuracies of with photometric augmentation and without it (mean population standard deviation; Table 20). The 3598 test pairs come from additional recordings collected 35.8 minutes after the initial collection, under nominally unchanged conditions. Both variants can therefore learn our choices.
For control, our aim is to illustrate how ART of PIV's observations support learning of a spatially and temporally structured behavior. We therefore examine the evolution of the feedback fields, using the requested patterns as a visual reference. Figure 7 follows training at regular episode intervals. Early rollouts either retain motion in the upper half when quieting is requested or quiet that half before the target changes. A response aligned with the phase change becomes visible during training.
Figure 8 shows all ten rollouts of the final controller. Across these repetitions, the fields show the same progression: leftward motion throughout the observed area, followed by a relatively quiet upper half while transport continues below. The snapshots around the target switch expose the transition. The corresponding cylinder commands and ART of PIV selections are shown in Figures 9 and 10, using the same episode order.
Although the ART of PIV selector remains fixed, its use of DIS B becomes more frequent overall during control training, and nearly exclusive in the final rollouts (Figures 9 and 10). Under the preferences encoded by our labels, B therefore appears better suited to the flows visited by the learned controller, a choice that was not obvious a priori from the prescribed targets. Exploratory actions during training also produce flows for which the selector chooses A. This suggests that adaptive estimation can be useful throughout controller learning, even when the eventual policy largely visits flow regimes served by a single estimator.
These qualitative results demonstrate that ART of PIV can provide flow feedback for training a controller directly on the physical apparatus. Our deliberately simple configuration leaves room for future work to refine both estimation and control for closer tracking of the prescribed fields (Remark 3.2).
4. Conclusion
We presented ART of PIV, which learns to select a configured flow-measurement pipeline for each image pair within a specified speed budget. Across specialized DIS and OpenPIV tunings and fine-tuned RAFT32-PIV variants we reduce AEPE by 12.2–22.4 % relative to the best single configuration at matched speed. In simulated local velocity regulation, dynamic estimator selection also reduces closed-loop cost and increases time within tolerance relative to a tuned fixed DIS reference, with the same classical controller (Section 3.2.1). We also deploy ART of PIV in the tabletop water channel of Terpin and D'Andrea (in press), using its flow estimates to train a DreamerV3 reinforcement learning controller directly on the fluidic pinball and demonstrate flow tracking (Section 3.2.2).
Limitations. The accuracy of ART of PIV is bounded by its library: it is only as good as the best specialist available at the chosen budget, as the oracle lower bound in Figure 12 of Appendix A makes explicit. Given this dependence on the library, selection and consensus are complementary rather than opposed. Where we commit to a single estimator, the consensus refinement of Bonomi et al. (in press) reconciles the outputs of several, and the two could be combined: one could select a small, complementary subset and then reconcile its outputs within the chosen speed budget. The selector also treats image pairs independently and makes one choice for the whole image. Finally, training requires numerical scores or expert labels (Remark 2.1), which may be costly to obtain on a new setup.
Outlook. Two directions follow directly. First, recurrence: because a control loop observes the same flow over time, the agent should reason over the temporal stream, carrying its choice and the flow estimate across image pairs rather than deciding afresh each time. Second, automatic, self-supervised fine-tuning: from signals available online, such as photometric and temporal consistency and a control performance index, the agent could keep improving after deployment, specializing to the specific setup and flow regime it actually faces, without new labels or human intervention. SynthPixO (Terpin et al., 2026) could complement photometric augmentation by regenerating particle-image pairs from the same flow fields with new particle positions and seeding densities. Selection labels would need to be checked or recomputed. Alongside these developments, future work could expand the estimator library of ART of PIV to include additional estimation methods and specialist configurations, such as LIMA (Manickathan et al., 2023), consensus ADMM refinement (Bonomi et al., in press), and possibly learned refinements with enforced constraints (Grontas et al., 2026). The modular hardware, estimator library, and control algorithms supported by FlowGamesO invite co-design: jointly choosing components and control rewards to improve closed-loop performance under resource constraints (Bonomi et al., 2026). The fluidic-pinball extensions in Remark 3.2 offer a concrete setting for this co-design: adapting the library to repeated spatial target changes, flushing on demand, and disturbance rejection. Pretrained generalist agents could also guide pipeline selection using prior knowledge, visual observations, and a description of the measurement objective, potentially reducing the need for labels from each new setup. Lopez et al. (2026) demonstrate general-purpose vision-language agents making measurement and control decisions in physical optics experiments. Applying this approach to PIV would require assessing both selection reliability and compatibility with the real-time

Figure 7. Development of flow tracking with ART of PIV feedback. Rows show episodes 1, 3, 5, 7, 9, 11, 13, 15, 17, and 19 in chronological order; the top row gives the target. Each column uses the recorded field nearest the displayed time. The vertical dashed line separates the two target phases. Tiles show the 16 × 16 feedback after the online 3-field average; colours, arrow scales, and display orientation match Figure 5. Horizontal dotted lines separate the upper and lower halves.

Figure 8. Repeatability of the final controller with ART of PIV feedback. We show all 10 evaluation rollouts in acquisition order, one per row, using the final checkpoint without learning updates. The target row, snapshot times, and rendering are shared with Figure 7. The columns around the target switch show the transition; subsequent snapshots repeatedly show a relatively quiet upper half alongside continued transport below.

Figure 9. Cylinder commands and ART of PIV selections during flow-tracking training. Rows match episodes 1, 3, 5, 7, 9, 11, 13, 15, 17, and 19 in Figure 7. The first three columns follow the cylinder numbering and colours of Figure 5, showing DreamerV3's commands in RPM on a common vertical scale. The final column shows the DIS tuning selected by ART of PIV for each recorded image pair: A or B. All traces use their recorded episode times, without temporal smoothing. Pale blue and green backgrounds indicate whole-area flushing and upper-half quieting with continued lower-half flushing, respectively; dashed lines mark the target switch at 30 s. Step traces hold values between logged updates, leaving gaps longer than two nominal update periods unconnected.

Figure 10. Cylinder commands and ART of PIV selections in the final controller's 10 evaluation rollouts. Rows correspond to Figure 8, in acquisition order. The last column reports the recorded DIS A/B choices. Cylinder colours, command scales, phase shading, and plotting conventions match Figure 9. The repeated change in command patterns around the target switch accompanies the repeated flow transition shown in Figure 8.
latency budget. More broadly, we view estimator selection as a first, deliberately simple instance of agency in the measurement loop. The same budget-aware, performance-driven formulation that here decides how to estimate could also decide what to measure and where to look, including where to spend the compute budget, how to point the camera, and how to seed the flow. We believe that treating fluid quantification as an active, agentic process, rather than a fixed sensing front-end, is a fertile direction for future work.
Data availability. The hardware designs and the data collected in this study are available at https://activefluidcontrol.com.
Code availability. The method and evaluation infrastructure are available in FlowGym O, and the deployment code is available in FlowGames O.
Acknowledgements. The authors thank Filippo Coletti and Claudio Mucignat for insightful discussions, and Fabian Weber and Alexander Przybysz for their support with the hardware setup.
Funding. This work was supported by the RobotX Research Program 2026.
Author contributions. Conceptualization, visualization, and project administration: A.T. Methodology and formal analysis: A.T. and F.B. Data curation, software, validation, and investigation: A.T., F.B., and A.B. Resources, supervision, and funding acquisition: A.T. and R.D. Writing—original draft: A.T. Writing—review and editing: all authors.
Competing interests. The authors declare no competing interests.
References
Ronald J. Adrian. Particle-imaging techniques for experimental fluid mechanics. Annual Review of Fluid Mechanics, 23(1):261–304, 1991. doi: 10.1146/annurev.fl.23.010191.001401.
Karl Johan Åström and Richard M. Murray. Feedback Systems: An Introduction for Scientists and Engineers. Princeton University Press, Princeton, NJ, 2nd edition, 2021. ISBN 978-0-691-19398-4.
Francesco Banelli, Antonio Terpin, Alan Bonomi, and Raffaello D'Andrea. Flow Gym: A framework for the development, benchmarking, training, and deployment of flow-field quantification methods. SoftwareX, 34:102641, 2026. doi: 10.1016/j.softx.2026.102641.
Alan Bonomi, Antonio Terpin, Yubo Cai, Yujun Huang, Meshal Alharbi, and Gioele Zardini. Compositional sensitivity analysis for multiobjective system co-design. arXiv preprint arXiv:2610.18758, 2026. doi: 10.48550/arXiv.2610.18758.
Alan Bonomi, Francesco Banelli, and Antonio Terpin. Particle image velocimetry refinement via consensus ADMM for active fluid control. In 2026 65th IEEE Conference on Decision and Control (CDC), in press. doi: 10.48550/arXiv.2512.11695.
James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Yash Katariya, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye
Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018.
Shengze Cai, Shichao Zhou, Chao Xu, and Qi Gao. Dense motion estimation of particle images via a convolutional neural network. Experiments in Fluids, 60(4):73, 2019. doi: 10.1007/s00348-019-2717-2.
Guy Y. Cornejo Maceda, Yiqing Li, François Lusseyran, Marek Morzyński, and Bernd R. Noack. Stabilization of the fluidic pinball with gradient-enriched machine learning control. Journal of Fluid Mechanics, 917:A42, 2021. doi: 10.1017/jfm.2021.301.
Ekin D. Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V. Le. RandAugment: Practical automated data augmentation with a reduced search space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, pages 3008–3017, 2020. doi: 10.1109/CVPRW50498.2020.00359.
Gunnar Farnebäck. Two-frame motion estimation based on polynomial expansion. In Image Analysis (SCIA 2003), volume 2749 of Lecture Notes in Computer Science, pages 363–370. Springer Berlin Heidelberg, 2003. doi: 10.1007/3-540-45103-X_50.
Ichiro Fujita, Hideki Watanabe, and Ryota Tsubaki. Development of a non-intrusive and efficient flow monitoring technique: The space-time image velocimetry (STIV). International Journal of River Basin Management, 5(2):105–114, 2007. doi: 10.1080/15715124.2007.9635310.
David Greenblatt and Israel J. Wygnanski. The control of flow separation by periodic excitation. Progress in Aerospace Sciences, 36(7):487–545, 2000. doi: 10.1016/S0376-0421(00)00008-7.
Panagiotis D. Grontas, Antonio Terpin, Efe C. Balta, Raffaello D'Andrea, and John Lygeros. Ilnet: Optimizing hard-constrained neural networks with orthogonal projection layers. In International Conference on Learning Representations (ICLR), 2026. doi: 10.48550/arXiv.2508.10480.
Danijar Hafner, Jurgis Pasukonis, Jimmy Ba, and Timothy Lillicrap. Mastering diverse control tasks through world models. Nature, 640:647–653, 2025. doi: 10.1038/s41586-025-08744-2.
Berthold K. P. Horn and Brian G. Schunck. Determining optical flow. Artificial Intelligence, 17(1–3):185–203, 1981. doi: 10.1016/0004-3702(81)90024-2.
Zhaoyang Huang, Xiaoyu Shi, Chao Zhang, Qiang Wang, Ka Chun Cheung, Hongwei Qin, Jifeng Dai, and Hongsheng Li. FlowFormer: A transformer architecture for optical flow. In Computer Vision – ECCV 2022, volume 13677 of Lecture Notes in Computer Science, pages 668–685. Springer Nature Switzerland, 2022. doi: 10.1007/978-3-031-19790-1_40.
Gauresh Raj Jassal, William Thielicke, and Bryan E. Schmidt. An optical flow algorithm with automatic parameter adjustment for fluid velocimetry. Journal of Open Research Software, 13(1):22, 2025. doi: 10.5334/jors.584.
David Juncker, Heinz Schmid, and Emmanuel Delamarche. Multipurpose microfluidic probe. Nature Materials, 4(8):622–628, 2005. doi: 10.1038/nmat1435.
Christian J. Kähler, Tommaso Astarita, Pavlos P. Vlachos, Jun Sakakibara, Rainer Hain, Stefano Discetti, Roderick La Foy, and Christian Cierpka. Main results of the 4th International PIV Challenge. Experiments in Fluids, 57(6):97, 2016. doi: 10.1007/s00348-016-2173-1.
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. doi: 10.48550/arXiv.1412.6980.
Till Kroeger, Radu Timofte, Dengxin Dai, and Luc Van Gool. Fast optical flow using dense inverse search. In Computer Vision – ECCV 2016, volume 9908 of Lecture Notes in Computer Science, pages 471–488. Springer International Publishing, 2016. doi: 10.1007/978-3-319-46493-0_29.
Christian Lagemann, Kai Lagemann, Sach Mukherjee, and Wolfgang Schröder. Deep recurrent optical flow learning for particle image velocimetry data. Nature Machine Intelligence, 3(7):641–651, 2021. doi: 10.1038/s42256-021-00369-0.
Alex Liberzon, Theo Käufer, Andreas Bauer, Peter Vennemann, Erich Zimmer, and contributors. OpenPIV: Python and Rust acceleration for particle image velocimetry. Zenodo, 2026. doi: 10.5281/zenodo.593157.
Tianshu Liu and Lixin Shen. Fluid flow and optical flow. Journal of Fluid Mechanics, 614: 253–291, 2008. doi: 10.1017/S0022112008003273.
Ryan Lopez, Sachin Vaidya, Seou Choi, Serena Landers, and Marin Soljačić. Vision-language agents for active perception in optics laboratories. arXiv preprint arXiv:2609.32918, 2026. doi: 10.48550/arXiv.2609.32918.
Ao Luo, Xin Li, Fan Yang, Jiangyu Liu, Haoqiang Fan, and Shuaicheng Liu. FlowDiffuser: Advancing optical flow estimation with diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 19167–19176, 2024. doi: 10.1109/CVPR52733.2024.01813.
Lento Manickathan, Claudio Mucignat, and Ivan Lunati. A lightweight neural network designed for fluid velocimetry. Experiments in Fluids, 64(10):161, 2023. doi: 10.1007/s00348-023-03695-8.
K. R. McManus, T. Poinsot, and S. M. Candel. A review of active control of combustion instabilities. Progress in Energy and Combustion Science, 19(1):1–29, 1993. doi: 10.1016/0360-1285(93)90020-F.
George L. Nemhauser, Laurence A. Wolsey, and Marshall L. Fisher. An analysis of approximations for maximizing submodular set functions—I. Mathematical Programming, 14(1):265–294, 1978. doi: 10.1007/BF01588971.
Markus Raffel, Christian E. Willert, Fulvio Scarano, Christian J. Kähler, Steven T. Wereley, and Jürgen Kompenhans. Particle Image Velocimetry: A Practical Guide. Springer, Cham, 3rd edition, 2018. doi: 10.1007/978-3-319-68852-7.
Christopher D. Regan and Christine V. Jutte. Survey of applications of active control technology for gust alleviation and new challenges for lighter-weight aircraft. NASA Technical Memorandum NASA/TM-2012-216008, NASA Dryden Flight Research Center, 2012.
L. Rossi, S. Bocquet, S. Ferrari, J. M. Garcia de la Cruz, and S. Lardeau. Control of flow geometry using electromagnetic body forcing. International Journal of Heat and Fluid Flow, 30(3):505–513, 2009. doi: 10.1016/j.ijheatfluidflow.2009.02.024.
Juan G. Santiago, Steven T. Wereley, Carl D. Meinhart, David J. Beebe, and Ronald J. Adrian. A particle image velocimetry system for microfluidics. Experiments in Fluids, 25 (4):316–319, 1998. doi: 10.1007/s003480050235.
Fulvio Scarano. Iterative image deformation methods in PIV. Measurement Science and Technology, 13(1):R1–R19, 2002. doi: 10.1088/0957-0233/13/1/201.
Fulvio Scarano and Michel L. Riethmuller. Iterative multigrid approach in PIV image processing with discrete window offset. Experiments in Fluids, 26(6):513–523, 1999. doi: 10.1007/s003480050318.
Sven Scharnowski and Christian J. Kähler. Particle image velocimetry – classical operating rules from today’s perspective. Optics and Lasers in Engineering, 135:106185, 2020. doi: 10.1016/j.optlaseng.2020.106185.
Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA, 2nd edition, 2018. ISBN 978-0-262-03924-6.
Melikhan Tanyeri, Eric M. Johnson-Chavarria, and Charles M. Schroeder. Hydrodynamic trap for single particles and cells. Applied Physics Letters, 96(22):224101, 2010. doi: 10.1063/1.3431664.
Antonio Terpin and Raffaello D’Andrea. Privileged observations enable rapid and reliable policy discovery directly in the physical world. npj Artificial Intelligence, in press. doi: 10.48550/arXiv.2512.08463.
Antonio Terpin, Alan Bonomi, Francesco Banelli, and Raffaello D’Andrea. SynthPix: A lightspeed PIV image generator. SoftwareX, 34:102642, 2026. doi: 10.1016/j.softx.2026.102642.
Raf Theunissen, Fulvio Scarano, and Michel L. Riethmuller. An adaptive sampling and windowing interrogation method in PIV. Measurement Science and Technology, 18(1): 275–287, 2007. doi: 10.1088/0957-0233/18/1/034.
Raf Theunissen, Fulvio Scarano, and Michel L. Riethmuller. Spatially adaptive PIV interrogation based on data ensemble. Experiments in Fluids, 48(5):875–887, 2010. doi: 10.1007/s00348-009-0782-7.
Jeffrey Tithof, Balachandra Suri, Ravi Kumar Pallantla, Roman O. Grigoriev, and Michael F. Schatz. Bifurcations in a quasi-two-dimensional Kolmogorov-like flow. Journal of Fluid Mechanics, 828:837–866, 2017. doi: 10.1017/jfm.2017.553.
Jerry Westerweel, Gerrit E. Elsinga, and Ronald J. Adrian. Particle image velocimetry for complex and turbulent flows. Annual Review of Fluid Mechanics, 45:409–436, 2013. doi: 10.1146/annurev-fluid-120710-101204.
X. Zhang, D. J. Huk, Q. Wang, J. Lincoln, and Y. Zhao. A microfluidic shear device that accommodates parallel high and low stress zones within the same culturing chamber. Biomicrofluidics, 8(5):054106, 2014. doi: 10.1063/1.4894783.
Contents
1 Introduction 2
2 Our method 4
2.1 Flow quantification as a selection problem ..... 4
2.2 The selection agent ..... 5
2.3 Building the library ..... 6
3 Results and discussion 7
3.1 Flow estimation accuracy ..... 7
3.2 Active Flow Control ..... 9
4 Conclusion 19
A Ablations 29
A.1 Learning signal: classification, regression, and bandit ..... 29
A.2 Parameters of the regression and bandit agents ..... 30
A.3 Agent architecture ..... 31
B Library construction: why greedy is near-optimal 32
C Training details 32
D Statistical analysis of end-point errors 33
E Local velocity regulation: parameters and sensitivity 33
E.1 Model and parameters ..... 34
E.2 Training and evaluation of ART of PIV ..... 36
E.3 Sensitivity analysis ..... 38
F Fluidic pinball experiment 40
F.1 Experimental apparatus and measurement pipeline ..... 40
F.2 Constructing the two libraries ..... 41
F.3 Data collection, training, and validation ..... 43
F.4 DreamerV3 control-agent training ..... 47
A. Ablations
We compare training signals and agent sizes for the experiments in Section 3.1. All ablations use the validation split of Cai et al. (2019); the training-signal comparisons use DIS libraries.
A.1. Learning signal: classification, regression, and bandit
Figure 11 compares classification, regression, and contextual bandit training. We write for the EPE of library estimator on image pair , with . As in Section 2.2, the network produces one score per estimator, and the deployed policy chooses . The three training signals differ in how they train these scores; all use this same selection rule.

Figure 11. The three training signals for the agent. Classification uses the best estimator for each image pair as its label; regression fits scores to all error-derived targets ; the contextual bandit fits only the score of the selected estimator. Targets negate the transformed errors, so larger scores indicate better estimators. Here is the Huber loss and is the softmax of the scores. Each card lists the training target, per-pair loss, and deployed selection rule.
Classification. We label each image pair with its best estimator, , using the precomputed errors. We train with cross-entropy , where . Maximizing this probability gives the same estimator as maximizing the score. Labels depend only on the error ordering.
Regression. The agent fits every score to a target obtained by negating the estimator's error after the chosen target transformation. With raw errors, ; target transformations are compared in Section A.2. These transformations preserve the within-pair error ordering. The per-pair regression loss used in our experiments is . Here is the Huber loss: for and otherwise. We average the loss over image pairs in each training batch. Regression must fit both the ordering and scale of the transformed targets.
Bandit. Both signals above require every at training time. The bandit variant needs only the error of the estimator it actually ran: after choosing , it computes and the corresponding target . It fits that score with , averaged over the
| # models | Baseline (px) | Oracle (px) | Classification (px) | Regression (px) | Bandit (px) |
|---|---|---|---|---|---|
| 1 | 0.1370 | 0.1370 | — | — | — |
| 2 | 0.1370 | 0.1196 | 0.1208 | 0.1211 | 0.1219 |
| 3 | 0.1370 | 0.1073 | 0.1086 | 0.1090 | 0.1096 |
| 4 | 0.1370 | 0.1064 | 0.1081 | 0.1081 | 0.1101 |
| 5 | 0.1370 | 0.1056 | 0.1079 | 0.1080 | 0.1102 |
| 10 | 0.1370 | 0.1041 | 0.1075 | 0.1068 | 0.1101 |
| 15 | 0.1370 | 0.1036 | 0.1076 | 0.1066 | 0.1097 |
| 20 | 0.1370 | 0.1034 | 0.1076 | 0.1067 | 0.1106 |
Table 3. AEPE (in px; lower is better) versus the number of DIS models in the library, on the validation split, for each learning signal and the oracle (the best achievable by any selection). The baseline is the single DIS model; the bandit is trained only on the error of the estimator it ran. These are the data plotted in Figure 12. Bold marks the best learned selector for each library size.

Figure 12. AEPE (relative to the single-DIS baseline) versus the number of models in the library, on the validation split. The oracle is the best achievable by any selection. Regression leads at the largest library sizes tested.
training batch. The raw-error target equals the reward defined in Section 2.1; a transformed target changes its scale while preserving the estimator ordering.
During training, the bandit selects a uniformly random estimator with probability and the highest-scoring estimator otherwise.
Method. We compare validation AEPE using the same greedily constructed libraries (Section 2.3) and image pairs (Appendix C). Greedy libraries are nested, so each size adds one estimator to the previous library.
Results. All three signals improve over the single-model baseline (Table 3 and Figure 12). The better of classification and regression depends on library size; regression leads for the largest libraries tested, where the bandit trails both.
A.2. Parameters of the regression and bandit agents
Method. For the bandit we sweep the initial exploration rate , which decays linearly to 0 over the first 4,000 of the 5,000 training steps (the deployed agent does not explore); for the regression agent we vary the target normalization. We report validation AEPE.

Figure 13. Exploration rate of the bandit agent on the DIS library (validation split, 20-model library, 3-seed mean). The bandit's AEPE is flat for every nonzero initial exploration rate and degrades sharply without exploration. Classification (dashed) and oracle (dotted) at 20 models for reference; the bandit trails both, consistent with its partial-information training.
| Regression target | Reference | ||||
|---|---|---|---|---|---|
| None (raw EPE) | Per-pair mean | Log | Classification | Oracle | |
| AEPE (px) | 0.1084 | 0.1072 | 0.1067 | 0.1076 | 0.1034 |
Table 4. Regression target normalization on the DIS 20-model library (validation split, 3-seed mean). The log target gives the lowest regression AEPE. Classification and oracle at 20 models are included for comparison (AEPE in px; lower is better). Bold marks the best regression target.
For image pair , let be the mean error across the library. The raw, per-pair-mean, and log targets are, respectively, , , and . Here is a small offset that keeps the logarithm finite when an estimator has zero error.
Results. Figure 13 and Table 4 summarize the sweeps. The bandit is essentially insensitive to once it is nonzero, and clearly worse without exploration (Figure 13). Both per-pair-mean and log normalization improve regression over the raw target and outperform classification at this library size; the log target gives the lowest regression AEPE (Table 4).
A.3. Agent architecture
At the high-rate operating points (1000–4000 image pair/s), the deployed agent uses a single convolutional block (width 32) feeding a shared multilayer perceptron (MLP) head of width 512, with one set of head weights across all arms. For DIS at 20 image pair/s and for RAFT32-PIV, where the agent's execution time is negligible next to the estimator's, it uses three convolutional blocks (widths 32/64/64) and a separate head per arm; so do the ablations of Sections A.1 and A.2. At the high-rate operating points we compare the two, retraining the larger agent on the same libraries (Table 5). Accuracy changes little, while standalone agent execution time increases (DIS 0.16 → 0.27 ms, OpenPIV 0.11 → 0.21 ms). The smaller agent is more likely to finish before the selected estimator, allowing speculation to hide its execution time (Section 2.2).
| Estimator | Speed (image pair/s) | Agent | AEPE (px) | rAEPE (%) | Agent time (ms) |
|---|---|---|---|---|---|
| DIS | 1000 | deployed | 0.1279 | 15.1 | 0.16 |
| larger | 0.1272 | 15.6 | 0.27 | ||
| OpenPIV | 1000 | deployed | 0.1827 | 21.0 | 0.11 |
| larger | 0.1823 | 21.2 | 0.21 | ||
| OpenPIV | 4000 | deployed | 0.1828 | 21.0 | 0.11 |
| larger | 0.1824 | 21.2 | 0.21 |
Table 5. Agent-size comparison using the same libraries (3-seed mean, validation split) at the three high-rate operating points. AEPE in px; rAEPE(ART of PIV, b) in %; standalone agent execution time in ms, measured on an RTX 5090. The larger agent increases execution time with little change in accuracy. Bold marks the better value for each metric at each operating point.
B. Library construction: why greedy is near-optimal
Section 2.3 builds the library by greedily solving (2): starting from the empty set, it repeatedly adds the candidate with the largest expected gain until the cap is reached, at a cost of evaluations against the cached rewards. We show this is near-optimal for a fixed reward and compare it to the exact optimum in the negative-EPE experiments.
The gain is monotone and submodular. Fix finite rewards on the cached image pairs and budget-feasible candidates, and choose a constant no larger than any of these rewards. For an image pair , define the gain and for nonempty . Adding an estimator to a nonempty set raises this gain by , which is non-negative and non-increasing as grows. From the empty set, the gain is , which is no smaller. Thus is monotone and submodular. These properties are preserved under non-negative combinations, so is monotone and submodular too, where the expectation is over the cached pairs. Maximizing the expected oracle reward in (2) is equivalent to maximizing under the same cardinality cap. Greedy therefore attains at least of the optimal gain (Nemhauser et al., 1978). For , the gain is the reduction in oracle error relative to the common upper error bound .
Greedy versus exact. The exact optimum is obtained by enumerating subsets for small pools or by a mixed-integer program for larger ones. On the DIS pool, for libraries of one to 20 models, the gap between the greedy and the optimal AEPE is largest at two models (6.7%) and at most 0.4% from three models on. The exact mixed-integer program solves in 6–17 s. Since refining is this cheap, the libraries in Table 1 are the exact optima. The library-size ablation (Section A.1) uses the nested greedy libraries instead.
C. Training details
Data and splits. The offline comparisons in Section 3.1 use the PIV dataset of Cai et al. (2019): px image pairs with ground-truth flow, spanning a range of flow regimes. We follow the split of Cai et al. (2019): 97% of the pairs form the training set and the remaining 3% the held-out test set. For model selection and the ablations of Appendix A we further hold out a 10 % validation split from the training set, and a separate 10 % tuning split on which the libraries are selected (Section 2.3 and Appendix B).
Optimization and hardware. For these comparisons, we train agents in JAX (Bradbury et al., 2018) with Adam (Kingma and Ba, 2015) (batch size 16, learning rate decayed exponentially to over 4,000 steps) for 5,000 steps on an RTX 5090, and keep the checkpoint with the lowest validation AEPE. The agents of the high-rate operating points are smaller (Section A.3) and use batch size 64 and learning rate decayed to . We average over 3 seeds.
RAFT fine-tuning: flow-class specialists. Starting from a pretrained RAFT32-PIV (Lagemann et al., 2021), we fine-tune one specialist on each flow subcategory of Cai et al. (2019) for 50,000 steps, varying only the fine-tuning data; this yields a small library with one member per flow class. We use Adam (batch size 25, gradient clipping at global norm 0.5) with a one-cycle learning rate peaking at , and keep the checkpoint with the lowest validation AEPE.
Classical estimator pools. We form the DIS candidate pool of 565 configurations by varying patch size, patch stride, number of gradient-descent iterations, and pyramid levels. In our experiments these span patch sizes 5–37 px, strides 1–31 px, 1–21 gradient-descent iterations, 1–3 pyramid levels, and a finest level of full or half resolution. We select the subset meeting the speed budget as in Section 2.3.
For OpenPIV (Liberzon et al., 2026), we form a pool of 1080 configurations by varying interrogation-window size (12–32 px), overlap, search-area size, the number of passes (1–3), the correlation (circular or linear), the sub-pixel estimator, and whether signal-to-noise validation is applied, then select the subset meeting the speed budget as in Section 2.3.
D. Statistical analysis of end-point errors
We report the distribution of the EPE over the test image pairs, from the runs of Table 1 (3-seed mean).
Spread and tails. Table 6 gives the spread and tails of the EPE. ART of PIV lowers every statistic at every operating point. For OpenPIV, the largest reduction is in the tails: at 1000 image pair/s, the 95th percentile drops from 0.8557 to 0.4905 px and the AEPE from 0.2544 to 0.1979 px.
Per image pair. Table 7 compares the two on each test image pair. ART of PIV is better on most image pairs at every operating point; ties are image pairs where the agent selects the best single estimator.
E. Local velocity regulation: parameters and sensitivity
We specify the local velocity regulation experiment and assess its parameter sensitivity.
| Estimator | Speed(image pair/s) | Method | Mean | Std | Median | p90 | p95 | p99 | Max |
|---|---|---|---|---|---|---|---|---|---|
| RAFT32-PIV | ≈1.7 | Best single | 0.0120 | 0.0090 | 0.0103 | 0.0200 | 0.0270 | 0.0451 | 0.0790 |
| ART of PIV | 0.0096 | 0.0073 | 0.0077 | 0.0179 | 0.0227 | 0.0365 | 0.0424 | ||
| DIS | ≈20 | Best single | 0.1498 | 0.1270 | 0.1055 | 0.2767 | 0.3793 | 0.6275 | 1.4324 |
| ART of PIV | 0.1268 | 0.0967 | 0.0944 | 0.2384 | 0.3210 | 0.5130 | 0.6733 | ||
| DIS | ≈1000 | Best single | 0.1577 | 0.1219 | 0.1133 | 0.3016 | 0.3882 | 0.6307 | 1.0053 |
| ART of PIV | 0.1385 | 0.1058 | 0.1023 | 0.2648 | 0.3499 | 0.5973 | 0.7854 | ||
| OpenPIV | ≈1000 | Best single | 0.2544 | 0.2559 | 0.1656 | 0.4993 | 0.8557 | 1.4207 | 1.9545 |
| ART of PIV | 0.1979 | 0.1575 | 0.1423 | 0.3910 | 0.4905 | 0.8317 | 1.0057 | ||
| OpenPIV | ≈4000 | Best single | 0.2544 | 0.2559 | 0.1656 | 0.4993 | 0.8557 | 1.4207 | 1.9545 |
| ART of PIV | 0.1974 | 0.1558 | 0.1428 | 0.3899 | 0.4882 | 0.8223 | 0.9795 |
Table 6. Per-image-pair EPE (px) on the test set (3-seed mean). The mean is the AEPE; p90–p99 are percentiles. Bold marks the lower mean, median, and tail errors within each operating point.
| Estimator | Speed (image pair/s) | Better | Tie | Worse |
|---|---|---|---|---|
| RAFT32-PIV | ≈1.7 | 98.1 | 0.0 | 1.9 |
| DIS | ≈20 | 68.9 | 13.7 | 17.4 |
| DIS | ≈1000 | 78.5 | 0.2 | 21.3 |
| OpenPIV | ≈1000 | 65.6 | 21.9 | 12.4 |
| OpenPIV | ≈4000 | 61.5 | 27.3 | 11.2 |
Table 7. Share of test image pairs (%, 3-seed mean) on which ART of PIV has a lower (better), equal (tie), or higher (worse) EPE than the best single estimator.
E.1. Model and parameters
Let denote position in a periodic square domain, where is a length scale, and let denote time. The work area is a fixed square in which we measure feedback and velocity error. We model two idealized actuators: each applies a fixed spatial force pattern throughout the domain, and a single command sets its strength. The actuator forces per unit mass are
with the fixed spatial profiles
Both profiles point along the streamwise unit vector and vary only across . The large-scale profile pushes two wide bands in opposite directions; approximately sets the thickness of the transition layers where the profile changes sign. The small-scale profile varies sinusoidally with dimensionless wavenumber . The constants normalize both profiles to unit root-mean-square magnitude over (Figure 2). Actuator 1 combines both patterns with fixed coupling ; actuator 2 applies the small-scale profile alone. The signed commands and set their respective strengths, with and , where are the maximum command magnitudes.
The initial velocity is , where and are the amplitudes of the initial large-scale and small-scale velocity components, respectively. For these initial conditions, the velocity and all prescribed forces point along and vary only across , so the flow retains the form . Incompressibility then holds automatically, and both nonlinear advection and the pressure gradient vanish. The forced incompressible Navier–Stokes equations therefore reduce to a one-dimensional diffusion equation with forcing:
where is kinematic viscosity. The fixed background force keeps the weak target flow , of prescribed amplitude , steady without actuation. The controller therefore only has to bring the flow to the target; maintaining it requires no actuator effort.
We compute the normalization constants of the force profiles (4) by numerical integration over on a sampling grid independent of the fluid grid. For numerical integration in time, we retain the full two-dimensional vorticity equation, with a two-thirds Fourier cutoff and fourth-order Runge–Kutta steps of duration . The ratio , where is episode duration, means that viscosity alone damps the small-scale velocity component only slowly. Tables 8 and 9 give the parameters.
Coupled actuation. Together, the two actuators apply the small-scale force profile with net amplitude . When actuator 1 slows the large-scale flow (), it also applies small-scale forcing, which actuator 2 can cancel by setting . We call the nominal braking time: an estimate of the time actuator 1 needs, with its command held at the negative actuation limit , to slow the flow in the work area from the nominal initial amplitude to the target amplitude , neglecting viscosity and the fixed background force. For the nominal parameters, .
Remark E.1 (Relation to laboratory forcing). Electromagnetic shallow-layer experiments apply fixed spatial force patterns whose strengths are set by electric current (Tithof et al., 2017, Sec. 2); magnet geometry can also shape forcing at multiple length scales (Rossi et al., 2009). This motivates our separation of spatial profiles and actuator commands. The mixture of spatial scales, the coupling between them, and the second independent command are numerical design choices that define a simple, controlled setting for studying estimator selection in closed loop. Section E.3 assesses the sensitivity of the closed-loop results to the parameter values. Quantitatively reproducing those experiments requires modelling bottom friction, depth dependence, and wall boundaries (Tithof et al., 2017).
Feedback and controller. For numerical convenience, adjacent pairs and share the image at , so is both the time between images in a pair and the time between control updates. Laboratory PIV can acquire separate pairs at a different rate, as in Section 3.2.2 (Terpin and D'Andrea, in press, Fig. 8). The flow evolves without actuation over to supply the first image pair. We track the same tracers throughout each episode and render them as Gaussian spots. Copies across the periodic boundaries fill a padded image border (the halo), which we crop after rendering. At time , the estimator sees only the completed pair and returns a displacement field . Dividing by camera calibration (in pixels per unit length) and by gives the velocity estimate . We fit the difference from the target over by least squares as a weighted sum of the large-scale and small-scale profiles. The fitted weights are the large-scale and small-scale velocity errors, with
where is the area of and . For ground-truth feedback, is instead the exact displacement: at , we place a virtual tracer at every camera pixel, advect it with the simulated flow to , and take its displacement in pixels. The rest of the feedback path is unchanged. For the parallel flows of the nominal setting, a tracer keeps its coordinate, so equals the true velocity at the pixel averaged over ; with the non-parallel perturbations of the sensitivity analysis, this holds approximately. When is the exact displacement, we denote the resulting coefficient by . Its fine component is , abbreviated as in plots where the time index is implicit. The small-scale coefficient is written in Figure 3, with time given by the horizontal axis. The controller smooths the rate of change of these errors as , with , and sets the commands to . Here and are the proportional and derivative gains, sets the smoothing time, and clip limits each command to . We initialize and keep constant over . The nominal integral gain is zero. For the nonzero- sensitivity tests, we initialize the integral contribution and compute . The command before clipping is , and . We retain the candidate integral contribution as if the command is not clipped or if ; otherwise, . This prevents accumulation when the integral update would push the command further beyond an actuator limit (conditional anti-windup). We neglect computation time, so the commands take effect immediately at .
Metrics. For episode duration , velocity tolerance , and effort weight , we define the fraction of time within tolerance and normalized closed-loop cost as
Here the error uses the true velocity ; the effort penalty normalizes each actuator command by its magnitude limit . Success additionally requires that the true root-mean-square velocity error remain within tolerance throughout the final interval of prescribed duration .
For each episode, and denote the values obtained with the fixed reference DIS configuration, starting from the same flow and tracer positions. The reported differences in percentage points are and . Lower and higher are better.
E.2. Training and evaluation of ART of PIV
We train the ART of PIV estimator-selection agent on image pairs collected from simulated closed-loop episodes. Training and validation use disjoint sets of 12 and 6 combinations of initial flow condition and tracer positions, respectively. For each combination, we run the fixed controller in 5 separate episodes, using ground-truth feedback, each of the three fixed estimators, and the whole-frame oracle. We record the image pairs rendered by SynthPix along these trajectories, yielding 22,800 training and 11,400 validation pairs. We evaluate both specialists on every pair and label it with the one whose displacement estimate has lower whole-frame EPE against the ground truth.
| Component | Symbol or quantity | Nominal value |
|---|---|---|
| Fluid and forces | Viscosity Width ; dimensionlesswavenumber ; coupling | 0.3; 16; 0.3 |
| Initial condition | Episode variation | ; Independent uniform draws: amplitudes , viscosity |
| Target and work area | ; side of Work-area centerFeedback and force integration | ; , sample points over |
| Controller | ; ; 0.02; ; | |
| Timing and integration | Fluid grid | ; 45.6 s; 0.00125 s |
| Imaging | Image side; calibration Particle density; diameterSpot intensity; bit depthHaloAdded image noise; changes in tracer appearance; tracer loss | 512 px; px/0.04 particles/px; 2.5 px65 gray levels; 8 bits16 pxAll disabled |
| Objective | ; 0.01; 0.72 s |
Table 8. Nominal local velocity regulation parameters. Lengths use the simulation unit and times use seconds. Spot intensity is a peak value in camera gray levels.
| Estimator | Patch (px) | Stride (px) | Search iterations | Pyramid levels | Finest level |
|---|---|---|---|---|---|
| Specialist 0 | 15 | 7 | 16 | 4 | 1 |
| Specialist 1 | 9 | 8 | 12 | 4 | 0 |
| Reference | 13 | 10 | 8 | 5 | 0 |
Table 9. DIS configurations. Variational refinement and reuse of the previous displacement estimate (temporal propagation) are disabled. Patch side lengths and strides are in pixels at the image resolution used for estimation. Finest level 0 uses full resolution; level 1 estimates at half resolution and upsamples to the full image size.
The selector uses convolutional layers with (16, 32) channels and initial stride 4 to produce a 32-dimensional feature vector. Its classifier has a hidden layer with 64 units and rectified linear activations. We train with Adam at learning rate 0.001 for 5,000 steps, using batches of 16 uniformly sampled pairs. For each of 3 independent network initializations, we select the saved network with the lowest validation AEPE and evaluate the agent in closed loop on the same 30 test episodes, unused in training or validation. All feedback sources start from the same flow and tracer positions in each test episode. Qualitative figures use the model with lowest validation AEPE.
E.3. Sensitivity analysis
With the estimator library fixed, we vary one parameter at a time and compare the whole-frame oracle with the reference, starting each episode from the same flow and tracer positions. Tables 11 and 12 give the nominal and tested values. They also report the min-max ranges of the setting-wise mean and . Table 10 reports nominal comparisons on 30 episodes.
| Feedback | (pp) | (pp) | Successful episodes |
|---|---|---|---|
| No control | +4.83 | -6.01 | 0/30 |
| Fixed specialist 0 | +5.78 | -6.01 | 0/30 |
| Fixed specialist 1 | +4.05 | -3.71 | 7/30 |
| Reference | 0.00 | 0.00 | 15/30 |
| Whole-frame oracle | -12.46 | +12.33 | 29/30 |
| Window oracle | -13.98 | +13.81 | 30/30 |
| Ground-truth feedback | -16.20 | +15.91 | 30/30 |
Table 10. Nominal comparisons on 30 episodes used in the sensitivity analysis. Differences are in pp relative to the reference; successful episodes satisfy the final-interval criterion. The window oracle minimizes EPE in . Bold marks the best deployable feedback for each metric; oracle and ground-truth feedback are reference results.
Physical and numerical parameters. Varying the fluid grid, integration time step, and image padding yields mean pp, indicating low sensitivity to numerical resolution. Slower imaging and lower camera resolution can prevent the error from reaching tolerance; larger initial motion or weaker large-scale actuation can leave too little time to reach tolerance, even with ground-truth feedback.
| Parameter | Nominal | Tested values | (pp) | (pp) |
|---|---|---|---|---|
| Fluid and initial condition | ||||
| 0.3 | 0, 0.15, 0.45 | [-14.15, -2.04] | [+1.87, +13.82] | |
| 16 | 8, 24 | [-12.73, -8.42] | [+8.21, +12.54] | |
| 0.3 | 0.15, 0.6 | [-12.73, -7.45] | [+7.22, +12.54] | |
| () | , | [-12.73, -12.37] | [+12.16, +12.54] | |
| () | 2.1 | 1.575, 2.625 | [-13.08, -0.23] | [0.00, +12.93] |
| () | 0.01 | 0, 0.05 | [-12.73, -12.27] | [+12.08, +12.54] |
| () | 0.02 | 0, 0.04 | [-13.76, -11.97] | [+11.78, +13.53] |
| Variation multiplier | 1 | 0, 2 | [-13.77, -5.16] | [+5.02, +13.63] |
| Controller and actuation | ||||
| () | 0.5 | 0.25, 1 | [-15.14, -1.88] | [+1.71, +14.89] |
| () | 0 | 0.005, 0.02 | [-15.13, -12.73] | [+12.54, +14.88] |
| 0.02 | 0, 0.04 | [-13.12, -11.86] | [+11.67, +12.90] | |
| (s) | 0.48 | 0, 0.96 | [-13.00, -10.41] | [+10.21, +12.78] |
| () | 0.06 | 0.045, 0.075 | [-20.74, -0.10] | [0.00, +20.50] |
| () | 0.04 | 0.024, 0.06 | [-12.73, -5.47] | [+5.25, +12.54] |
Table 11. Sensitivity to physical and controller parameters, 3 episodes per setting. Ranges span mean oracle differences from the reference across nominal and tested settings; nominal differences are pp and pp. The variation multiplier scales the amplitude and viscosity ranges.
| Parameter | Nominal | Tested values | (pp) | (pp) |
|---|---|---|---|---|
| Observation and imaging | ||||
| Work-area side for feedback (px) | 64 | 32, 128 | [-12.73, -11.88] | [+11.68, +12.54] |
| Work-area center for feedback | [-12.73, -11.57] | [+11.50, +12.54] | ||
| (s) | 0.12 | 0.06, 0.24 | [-13.79, -0.06] | [0.00, +13.45] |
| Particle density (particles/px) | 0.04 | 0.02, 0.08 | [-12.73, -11.89] | [+11.72, +12.54] |
| Spot diameter (px) | 2.5 | 1.5, 3.5 | [-12.73, -0.80] | [+0.62, +12.54] |
| Spot intensity (gray levels) | 65 | 32.5, 130 | [-13.19, -11.53] | [+11.35, +12.98] |
| Image side (px) | 512 | 256, 384 | [-12.73, -0.16] | [0.00, +12.54] |
| Work-area side for evaluation (px) | 64 | 24, 32, 128 | [-12.75, -12.33] | [+12.13, +12.55] |
| Numerics and disturbances | ||||
| Grid side (nodes) | 256 | 128, 512 | [-13.23, -12.22] | [+12.02, +13.01] |
| (s) | 0.00125 | 0.000625, 0.0025 | [-12.86, -12.66] | [+12.46, +12.66] |
| (s) | 45.6 | 57.6 | [-16.79, -12.73] | [+12.54, +16.59] |
| Halo (px) | 16 | 8, 32 | [-12.95, -12.73] | [+12.54, +12.74] |
| Pulse timing | none | 1/3, 2/3 | [-12.73, -9.36] | [+9.18, +12.54] |
Table 12. Sensitivity to observation, imaging, and numerical settings. Format follows Table 11; pixel lengths use the nominal camera. Resolution changes preserve force normalization and physical work-area size, with tracer density and diameter fixed in pixels. Work-area dimensions for feedback and evaluation coincide nominally; the indicated feedback or evaluation dimension varies separately in these tests. Large-scale force pulses have amplitude , duration , and timing variation . The longer episode uses its own duration for normalization.
Evaluation sensitivity. We recompute the metrics from these 30 episodes under 13 evaluation settings, without rerunning the simulations (Table 13 and Figure 14). Removing the effort penalty gives pp, and the oracle retains its advantage across the tested tolerances. Ending the evaluation earlier, before the error reaches tolerance, gives differences near zero.
| Parameter | Nominal | Tested values | (pp) | (pp) |
|---|---|---|---|---|
| () | 0.04 | 0.02, 0.03, 0.06, 0.08 | [-13.18, -10.68] | [+10.55, +13.05] |
| 0.01 | 0, 0.001, 0.1 | [-13.64, -12.33] | +12.33 | |
| (s) | 0.72 | 0.36, 1.44, 2.88 | -12.46 | +12.33 |
| (s) | 45.6 | 22.8, 34.2 | [-12.46, -0.02] | [0.00, +12.33] |
Table 13. Evaluation sensitivity on 30 episodes. Format follows Table 11, with nominal outcomes pp and pp. Each evaluation uses its own duration for normalization; the required final interval within tolerance affects success but not cost.

Figure 14. Sensitivity to the metric definitions and episode duration. Teal points use metrics recomputed from 30 recorded episodes; the diamond uses 3 additional, longer episodes. Points give mean oracle in pp; the dashed line marks nominal braking time. The subscript ref denotes the nominal parameter values in Table 8.
F. Fluidic pinball experiment
We describe the experimental apparatus and measurement pipeline, the procedure used to construct the tuning-selection and region-selection libraries, and the training of their selection agents. The physical controller uses tuning selection, as in Section 3.2.2.
F.1. Experimental apparatus and measurement pipeline
We collect data using a workstation running Ubuntu 22.04, equipped with an AMD Ryzen Threadripper PRO 5995WX processor and 4 NVIDIA RTX 4090 GPUs. Following Terpin and D'Andrea (in press, Appendix A.1), we run flow estimation, policy inference, and policy training on separate dedicated GPUs.
We use an updated version of the tabletop circulating water channel designed by Terpin and D'Andrea (in press). The design and fabrication files are available at https://activefluidcontrol.com. Figure 4 shows the channel and labelled close-ups of its components. The mean incoming flow speed at the entrance to the test section is 0.13 m/s. The apparatus combines off-the-shelf components with 3D-printed parts. It is housed in an Olibetta Long Aquarium (90L) measuring 0.90 × 0.30 × 0.30 m³.
The channel has an upper test branch and a lower return branch. The test section (1) contains the fluidic pinball (2). The circulation propellers (3) are driven by 2 external MyActuator L4010-2 motors through magnetic couplings across the glass wall, producing a right-to-left flow through the test section. Throughout selection-data collection and control training, we hold the two propellers at -200 and +200 RPM (hardware identifiers 8 and 20, respectively). Turning vanes (4) guide the water between the two branches. A honeycomb (5) aligns the flow and attenuates large vortical structures, while the flow contractions (6) accelerate the stream and elongate the remaining smaller vortices. The PIV camera (7) records 1028 × 896-pixel images (width × height) at 60 Hz.
Each of the 3 cylinders is driven independently by a MyActuator L4010-2 motor, of the same type used for the circulation propellers. All 5 motors share a controller area network (CAN) bus connected to the host through a Kvaser interface. FlowGames O sends individually addressed rotation-rate commands and receives motor-speed feedback over this bus. The cylinders have radius m. We limit their angular velocities to , , with rad/s. The resulting maximum surface speed is m/s, corresponding to 3.62 times the mean incoming flow speed. We update the cylinder rotation-rate commands at 30 Hz.
Modular motor mount. All 3 cylinder motors are mounted on a common aluminum plate. Exchanging the plate allows the apparatus to switch between the fluidic pinball and a single-cylinder configuration.
Image processing and flow observations. We correct the acquired 1028 × 896-pixel frames (width × height) using the homography calibrated from AprilTags. From each corrected frame, we retain a 768 × 720-pixel crop, starting at column 255 and row 156 in the native array. The crop excludes the channel boundary and is passed to the estimator without image resizing. The displayed camera view is reflected vertically: the same crop starts at row 896 – 156 – 720 = 20 in that view. We cap each cropped image at its median intensity plus 3.0 standard deviations, then linearly stretch its intensity range to [0, 255.0] (Table 14).
We form pairs from consecutive frames separated by the short laser-pulse interval of 2.5 ms, giving approximately 30 image pairs and flow estimates per second. The tuning-selection library estimates flow over the whole retained crop; the region-selection library estimates flow within one of the subregions in Table 17. After estimation, we reduce the selected vector field to grid points by antialiased linear interpolation, without rescaling its components: flow remains a displacement in source-image pixels per image pair. The grid covers the parent crop for tuning selection and the selected subregion for region selection.
For the physical flow-tracking controller, we then take a causal running average of the latest 3 reduced fields. The averaging history is reset at each episode; the first outputs average only the samples available so far. This averaged field, in source-image pixels per pair, supplies the reward measurement in Section F.4. For the controller observation, we map both the averaged field and the current target componentwise from pixels per pair to , clipping values outside this range. We stack their two displacement components into a tensor, which DreamerV3 receives through its convolutional encoder at 30 Hz.
| Step | Operation | Parameters |
|---|---|---|
| 1 | intensity_capping | |
| 2 | stretch_contrast | scale = 255.0 |
| 3 | Spatial reduction | , antialiased linear |
| 4 | Temporal averaging | 3 fields at 30 Hz |
| 5 | Observation scaling | , clipped |
| 6 | Controller input | , CNN at 30 Hz |
Table 14. Processing in the physical flow-tracking pipeline, in execution order. Steps 1–2 act on each cropped image; steps 3–4 act on the selected flow; steps 5–6 prepare the averaged flow and target for the controller. Intensity-routine names follow FlowGym O; temporal averaging uses the AverageFilter provided by Goggles O.
F.2. Constructing the two libraries
We manually tune the estimator parameters for both libraries, then fix the libraries, preprocessing, and our labels before collecting the selection-agent training recordings. Both libraries use the same parent crop and intensity processing of Section F.1. Table 15 gives the DIS parameters; Table 16 associates each of our choices with the constant cylinder commands used to collect its examples. We number the cylinders as in Figure 5: 1 is upstream, 2 is downstream right, and 3 is downstream left when looking downstream. All command tuples and table columns follow the order .
F.2.1. DIS tuning selection
We retain two configurations with different allocations of computation, each applied to the same preprocessed parent image pair. DIS A uses one native-resolution search level; DIS B searches from one-eighth to one-half resolution and interpolates its output to the native grid. DIS A retains particle-image detail that DIS B discards; DIS B can initialize its search on smaller pixel displacements at the coarsest level. We manually tune both
| Configuration | Finest level | Levels | Patch size (px) | Patch stride (px) | Iterations |
|---|---|---|---|---|---|
| A | 0 | 1 | 19 | 11 | 4 |
| B | 1 | 3 | 13 | 9 | 4 |
| C | 0 | 2 | 13 | 7 | 6 |
Table 15. Manually tuned DIS configurations. DIS A and DIS B form the tuning-selection library; DIS C is shared by all region-selection members. Level zero is native resolution, and each successive pyramid level halves each image dimension. All configurations disable variational refinement and temporal flow propagation.
| Variant | Label | Cylinder 1 (RPM) | Cylinder 2 (RPM) | Cylinder 3 (RPM) |
|---|---|---|---|---|
| Tuning | A | 150 | -150 | -150 |
| Tuning | B | 0 | 150 | -150 |
| Region | R1 | 150 | 150 | 150 |
| Region | R2 | 150 | 150 | -150 |
| Region | R3 | 150 | -150 | 150 |
Table 16. Recording labels and constant cylinder commands. Columns give cylinder numbers 1, 2, and 3; the circulation-propeller commands remain fixed.
configurations to meet a common 1 ms budget for warmed estimator execution on resident, already-preprocessed image pairs.
We check our tuning choices against a slower reference in Section F.3.3.
F.2.2. Region selection
Here, the library varies where to measure the flow while retaining a common estimator. We choose the three -pixel regions in Table 17. Each member extracts its region from the preprocessed parent image pair and applies DIS C, with the identical numerical parameters listed in Table 15. We downsample the selected field to grid points while preserving source-pixel displacement units. Equal crop sizes allocate the same number of output grid points to each region. They also limit the area on which dense flow estimation is performed.
The measurement objective is to observe coherent spatial variation, where neighboring parts of the fluid move at different speeds or in different directions, as in rotation or shear. We identify the preferred region under each of the three prescribed actuation settings in Table 16. The selection agent sees the common parent image pair and learns where to direct the measurement.
In exploratory checks, we inspect the coherent spatial variation by removing each region's mean displacement and fitting an affine displacement field on particle-supported locations. The trace-free spatial gradient of this fit summarizes rotation and anisotropic stretching, with uniform drift and isotropic expansion removed. We inspect fields before and after downsampling, using the same source-image support when comparing resolutions, so a change of sampling locations does not itself change the comparison. These checks support our choice of a region; they are not labels recomputed during classifier training, nor evidence that the preferred region is necessarily the most useful one for control.
| Region | Left column (px) | Top row (px) |
|---|---|---|
| R1 | 256 | 64 |
| R2 | 0 | 256 |
| R3 | 512 | 384 |
Table 17. Region offsets within the common parent crop. Coordinates are native array coordinates before the vertical display reflection: columns increase rightward and rows downward. Every region has side length 256 pixels.
Visualizing the libraries. We visualize the two pools of estimators in Figures 6 and 15. Blue outlines indicate ART of PIV's choices on separate validation recordings, using the selectors trained in Section F.3.2.
F.3. Data collection, training, and validation
We first describe the labelled recordings, then the shared classifier-training procedure and validation agreement. We subsequently check the DIS tuning preferences against a slower reference and assess photometric augmentation on later test recordings.
F.3.1. Labelled recordings
Each recording inherits the preferred library member assigned to its actuation setting in Table 16. For every setting, we collect 3 training recordings and 1 separate validation recording, each containing approximately 60 s of data. We allow 30 s of settling before each recording. We collect all tuning-selection training recordings first, then all region-selection training recordings, followed by validation recordings for the two variants in the same order. This increases the time separation between training and validation for each library, helping reduce temporal correlation between the splits.
Each image pair contains the frames illuminated by the two pulses of the same laser cycle, separated by 2.5 ms, giving approximately 30 pairs per second. We verify the pulse phase in each recording before forming pairs. Each recording provides 1799 complete image pairs. This gives 5 397 training pairs and 1 799 validation pairs per class. The tuning-selection dataset therefore contains 10 794 training and 3 598 validation pairs; the region-selection dataset contains 16 191 and 5 397, respectively. Splitting by recording keeps adjacent frames out of different splits, although pairs within a recording remain temporally correlated.
For the augmentation ablation in Section F.3.4, we collect one additional test recording of approximately 60 s per tuning-selection setting, after 30 s of settling, giving 3 598 test pairs. The additional collection began 35.8 minutes after the original collection ended. We kept the camera, optics, and illumination settings unchanged and made no deliberate change to seeding density. Thus this evaluates transfer to a later acquisition block under nominally unchanged conditions. Test recordings are excluded from training and checkpoint selection.
F.3.2. Selection-agent training and validation
We train a separate ART of PIV classifier for each library. Each classifier receives the parent image pair and learns the supplied library-member label. We use the small convolutional

Figure 15. Region-selection pool on separate validation recordings. (a–c) Settings R1–R3; headers give signed cylinder commands in the same order as Figure 6. Within each motor panel, columns advance through consecutive pairs 899–901. For each region, the upper row shows displacement magnitude and the lower row shows vorticity, both obtained with DIS C on its 256 × 256-pixel support. The displayed grid is 16 × 16; an otherwise identical native-resolution counterpart is retained in the figure sources. Blue outlines identify the actual archived classifier choice at checkpoint 3000; unselected tiles use the same grey and dashed treatment as Figure 6. Pair selection, arrows and display orientation follow that figure; scalar colour scales are shared within each figure. The regions have different spatial supports: their fields illustrate what each choice measures, rather than alternative estimates of one common velocity field.
architecture of the main experiments, cross-entropy, and Adam, with batch size 16 and 3000 steps per run. The tuning selector uses a constant learning rate of 0.001.
Photometric augmentation. We vary the illumination of every training pair. For images with intensities in [0, 255], we apply a gain drawn uniformly from [0.4, 1.6] and an offset from [-20, 20], both shared by the two frames, and an extra gain drawn independently per frame from [0.9, 1.1], as the two laser pulses are never equally bright. Intensities are clipped to [0, 255] after augmentation. We apply no random spatial flips or crops. Validation uses unaugmented image pairs.
Region-selector training. For the region selector, we reduce the learning rate to 0.0001.
Checkpoint selection and validation agreement. We select checkpoints by the lowest classification error over every pair in the validation recordings. The selected tuning and region classifiers are saved at steps 500 and 3000, respectively. Table 18 gives their agreement with our labels by setting. These recordings are separate from training but also select the checkpoint, so the results measure agreement within the collection session. Generalization to later recordings is assessed separately for tuning selection in Section F.3.4.
| Library | Our choice | Correct/total | Agreement (%) |
|---|---|---|---|
| Tuning | A | 1 799/1 799 | 100.00 |
| Tuning | B | 1 799/1 799 | 100.00 |
| Region | R1 | 1 795/1 799 | 99.78 |
| Region | R2 | 1 799/1 799 | 100.00 |
| Region | R3 | 1 799/1 799 | 100.00 |
Table 18. Agreement with our labels for the selected tuning and region classifiers. Each setting contributes one validation recording, held out from training and used for checkpoint selection.
F.3.3. Reference-based check of the DIS tunings
We compare both library members with a slower DIS reference on all 3 598 image pairs in the tuning-selection validation recordings defined in Section F.3.1. This checks the flow estimates associated with our tuning preferences. The classifier learns the fixed labels; reference agreement supplies supporting evidence for those choices.
Common spatial support and output scales. We score only particle-rich locations, using a mask computed independently of the candidate flow from the mean of the two preprocessed images. For mask construction only, we smooth this mean with Gaussian standard deviation five pixels, threshold at intensity 12 on the [0, 255] scale, and discard a 24-pixel border. The estimator images themselves remain unblurred. We compare native fields and their bilinear reductions to and grids, retaining displacement in source-image pixels per pair. For each reduced grid, we reconstruct the field on the native grid before scoring. The same particle-supported locations are therefore used at every scale.
Agreement with a slower reference. We use OpenCV DIS with native finest scale, patch size 12, stride three, 64 gradient-descent iterations, and 20 variational-refinement iterations, with mean normalization and spatial propagation enabled (R12). For each scale, we apply the same reduction and reconstruction to both the candidate and reference fields, then average their Euclidean discrepancy on the fixed particle support. Table 19 reports its mean over image pairs, in source-image pixels. This reference discrepancy has the form of EPE, but uses an estimated field in place of ground truth. Agreement can inherit shared DIS errors, so we use it as a consistency check alongside our assessment of the observed flow structure.
| Setting | Configuration | Native | ||
|---|---|---|---|---|
| A | A | 0.3666 | 0.3248 | 0.4609 |
| A | B | 0.4585 | 0.4511 | 0.4861 |
| B | A | 0.6170 | 0.6095 | 0.9951 |
| B | B | 0.4864 | 0.4765 | 0.5359 |
Table 19. Mean discrepancy from the slower R12 reference on the separate DIS validation recordings (px; lower is better). Both fields undergo the same resampling, and all scales use the same native particle support. These are reference-agreement errors, not ground-truth AEPE. Bold marks the lower discrepancy between A and B for each setting and scale.
Results. The comparison with R12 supports the preference reversal at all three output scales: DIS A has lower mean reference discrepancy in setting A, while DIS B has lower discrepancy in setting B. At , the discrepancies in setting A are 0.4609 px for DIS A and 0.4861 px for DIS B; in setting B they are 0.9951 px and 0.5359 px, respectively. The preferred tuning has lower discrepancy on 55.5% and 98.8% of pairs in the respective recordings.
F.3.4. Photometric augmentation ablation
We assess photometric augmentation for the tuning-selection library using the additional test recordings defined in Section F.3.1. We train with and without it over five paired seeds, holding the architecture, optimizer, training examples, and validation procedure fixed. Each run uses 3000 updates; the lowest validation label error selects its checkpoint, with ties resolved in favor of the earliest step.
We evaluate every test pair exactly once for each selected checkpoint and report mean label agreement and its population standard deviation across completed seeds, with the completion count shown explicitly (Table 20). The variation across seeds reflects training variability on the same test recordings.
| Training | Completed seeds | Test agreement (%) |
|---|---|---|
| With augmentation | 5/5 | |
| Without augmentation | 5/5 |
Table 20. DIS-selector augmentation ablation on the additional test recordings. Agreement with our labels is reported as mean ± population standard deviation over the completed seeds, out of five planned paired seeds per variant. Bold marks the higher mean agreement. All five paired seeds per variant are complete.
Across all five paired seeds, test agreement is with augmentation and without it.
F.4. DreamerV3 control-agent training
We give the reward and training details for the physical flow-tracking experiment of Section 3.2.2. The target schedule, observations, and episode protocol are specified there; image processing and flow normalization are detailed in Section F.1.
Reward and actions. The reward penalizes the spatial mean of the pointwise vector error between the averaged estimate and target :
Here, and index the 256 grid points, and both fields retain source-image pixels per pair. Dividing by the horizontal target span of 2 pixels per pair makes the reward dimensionless; zero indicates perfect tracking according to the deployed measurement pipeline. Taking the norm before spatial averaging prevents opposite local errors from cancelling. Each of the three continuous actions lies in and maps linearly to its cylinder's rotation-rate limits.
Model and optimization. We use DreamerV3O (Hafner et al., 2025) with the size25m preset. Relative to this preset's defaults, we reduce the convolutional encoder and decoder to two stages (48, 72 channels) for the fields, reduce replay capacity to 1 000 000 sequence starts, and set train_ratio=-1. The remaining model and optimizer parameters retain their default values.
Training and evaluation. The selector and library remain fixed while the controller learns from scratch. The training schedule in Section 3.2.2 provides 20 minutes of controlled interaction (36 000 nominal control steps), excluding settling. Evaluation uses the final checkpoint. The training and evaluation sequences are shown in Figures 7 and 8.