Skip to main content

PyPI - Version PyPI - Python Version PyPI - License PyPI - Downloads PyPI Downloads GitHub Actions

🚧 Under Development

This project is still in an alpha stage. Expect rapid changes, incomplete features, and possible breaking updates between releases.

  • The API may evolve as we stabilize core functionality.
  • Documentation and examples are incomplete.
  • Feedback and bug reports are especially valuable at this stage.
  • GPU implementation currently produces numerical differences compared to the CPU version and might require different parameter settings.

FlowReg logo flowreg3D

Python implementation of volumetric optical flow for motion correction in 3D fluorescence microscopy. Building on the 2D Flow-Registration insights, flowreg3D provides natively 3D dense motion analysis and correction with subpixel-precision for non-rigid motion volumetric microscopy data.

Related projects

Fig1 Alignment of two 2P imaging stacks with difficult, synthetic non-rigid motion patterns.

Features

  • 3D Variational Optical Flow: Directly estimates dense 3D motion fields between volumetric frames, capturing complex non-rigid deformations with subpixel accuracy.
  • GPU Acceleration: Optional torch backend with fully GPU-optimized solver for fast processing of large 3D frames.
  • Parallelized Processing: Efficiently handles long sequences of volumetric data.

Requirements

This code requires python 3.10 or higher.

Initialize the environment with

conda create --name flowreg3d python=3.10
conda activate flowreg3d
pip install -r requirements.txt

Installation via pip and conda

conda create --name flowreg3d python=3.10
conda activate flowreg3d
pip install flowreg3d

To install the project with GPU support, you can install it with the gpu extra:

pip install flowreg3d[gpu]

Getting started

[Examples and notebooks coming soon]

The plugin supports most of the commonly used file types such as HDF5, tiff stacks and matlab mat files. To run the motion compensation, the options need to be defined into a OF_options object.

Dataset

The 3D motion benchmark dataset used for our evaluations will be available for download soon. Meanwhile, synthetic test data with controllable 3D motion fields can be generated using the included motion_generation module, which creates biologically-informed displacement patterns including injection/recoil events, rotations, scanning jitter, and other microscopy-specific artifacts.

Citation

If you use parts of this code or the plugin for your work, please cite

"flowreg3D: Volumetric optical flow for motion analysis and correction in 3D fluorescence microscopy," (in preparation), 2025.

License

flowreg3D Non-commercial License

Copyright (c) 2025 Okinawa Institute of Science and Technology Graduate University. All rights reserved.

Redistribution and use for non-commercial purposes in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. The software is used solely for non-commercial purposes. It may not be used indirectly for commercial use, including operation on or for a website or service that receives advertising, sponsorship, or other revenue. For commercial use rights, contact Okinawa Institute of Science and Technology, OIST Innovation, at  tls@oist.jp.

  2. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  4. Neither the name of the Okinawa Institute of Science and Technology Graduate University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE OKINAWA INSTITUTE OF SCIENCE AND TECHNOLOGY GRADUATE UNIVERSITY AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF PATENTS, TRADEMARKS, OR OTHER PROPRIETARY RIGHTS, ARE DISCLAIMED. NO PATENT RIGHTS ARE GRANTED, WHETHER EXPRESSLY, BY IMPLICATION, ESTOPPEL, OR OTHERWISE. IN NO EVENT SHALL THE OKINAWA INSTITUTE OF SCIENCE AND TECHNOLOGY GRADUATE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Metadata

Release files for flowreg3d 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowreg3d 0.0.0
File Size Uploaded
flowreg3d-0.0.0.tar.gz 104.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flowreg3d 0.0.0
File Interpreter ABI Platform
flowreg3d-0.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 232.7 kB

Release files / flowreg3d-0.0.0.tar.gz

Download URL flowreg3d-0.0.0.tar.gz
Size 104.7 kB
Tags Source
SHA-256 checksum
How to use checksums
82d6cacfe8571c2cf275c8be587398d4ab4b43fc232604ea321ba308e5facea4
BLAKE2b-256 checksum
How to use checksums
de2870923456fd4a63dca3ac269ae10946045251597f89ccb4b80e7a6868ec02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 21, 2026.

Transparency log

Release files / flowreg3d-0.0.0-py3-none-any.whl

Download URL flowreg3d-0.0.0-py3-none-any.whl
Size 128.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c51d7c47da3de8b751770430c9dc697455e41e61e0d081689a0516182ecb9efd
BLAKE2b-256 checksum
How to use checksums
51fca7a5090bd1ea500b8340a5601e67062c13591ba55e8ce08ab5323e6ef519
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page