Table of Contents
Fetching ...

Flow Gym

Francesco Banelli, Antonio Terpin, Alan Bonomi, Raffaello D'Andrea

TL;DR

Flow Gym presents a unified, RL-inspired framework for flow-field quantification that combines a FluidEnv deployment-style environment with a flexible Estimator interface, enabling both learning-based and classical estimators to be trained, evaluated, and benchmarked on SynthPix-generated images. The core architecture is implemented in JAX and designed to support both consecutive and independent estimation, with extensible pre-processing, processing, and post-processing pipelines and interoperability with OpenCV and PyTorch methods. Key contributions include the FluidEnv and Estimator abstractions, a config-driven deployment workflow, and wrappers around existing PIV technologies to facilitate fair comparisons and large-scale training with minimal storage. This framework aims to standardize, accelerate, and scale research and real-time applications in flow-field quantification, bridging the gap between algorithmic development and deployment.

Abstract

Flow Gym is a toolkit for research and deployment of flow-field quantification methods inspired by OpenAI Gym and Stable-Baselines3. It uses SynthPix as synthetic image generation engine and provides a unified interface for the testing, deployment and training of (learning-based) algorithms for flow-field quantification from a number of consecutive images of tracer particles. It also contains a growing number of integrations of existing algorithms and stable (re-)implementations in JAX.

Flow Gym

TL;DR

Flow Gym presents a unified, RL-inspired framework for flow-field quantification that combines a FluidEnv deployment-style environment with a flexible Estimator interface, enabling both learning-based and classical estimators to be trained, evaluated, and benchmarked on SynthPix-generated images. The core architecture is implemented in JAX and designed to support both consecutive and independent estimation, with extensible pre-processing, processing, and post-processing pipelines and interoperability with OpenCV and PyTorch methods. Key contributions include the FluidEnv and Estimator abstractions, a config-driven deployment workflow, and wrappers around existing PIV technologies to facilitate fair comparisons and large-scale training with minimal storage. This framework aims to standardize, accelerate, and scale research and real-time applications in flow-field quantification, bridging the gap between algorithmic development and deployment.

Abstract

Flow Gym is a toolkit for research and deployment of flow-field quantification methods inspired by OpenAI Gym and Stable-Baselines3. It uses SynthPix as synthetic image generation engine and provides a unified interface for the testing, deployment and training of (learning-based) algorithms for flow-field quantification from a number of consecutive images of tracer particles. It also contains a growing number of integrations of existing algorithms and stable (re-)implementations in JAX.
Paper Structure (20 sections, 1 equation, 5 figures, 1 table)

This paper contains 20 sections, 1 equation, 5 figures, 1 table.

Figures (5)

  • Figure 1: Overview of the Flow Gym pipeline, modeled after rl environments. Modular, stateless observation and action interfaces between environment and estimator provide a unified, JAX-compatible framework for the development and benchmarking of learning-based and classical estimators. The State supports both consecutive and independent piv estimations via reset, with learning-based parameters stored in the Trainable state. Images are rendered white on black for visualization purposes.
  • Figure 2: Example usage of make_estimator for deployment.
  • Figure 3: Example of training loop with FluidEnv and Estimator.
  • Figure 4: Effects of the pre-processing techniques when applied on images from the real setup in terpin2025ff ($1064\times904$).
  • Figure 5: Effects of a selection of the data validation techniques implemented in Flow Gym, when applied to a flow estimated with our implementation in JAX of RAFT32-PIV from a pair of images generated with SynthPix terpin2025synthpix. The colormap shows the vorticity of the flow.