This repository contains source code supplementing the ICASSP 2023 paper "Bayesian Methods For Optical Flow Estimation Using a Variational Approximation, With Application to Ultrasound"
contrib
directory contains python implementations of the VB and MAP methods.sor
directory contains an extension module written in c which implements the Successive over-relaxation solver. The c code was mostly taken over from epicflow.STRAUS.zip
file contains 2D data extracted from the STRAUS dataset in the MATLAB's .mat format. This includes the B-mode images (with values from -65 to 0 dB) and the ground-truth optical flow (displacement vectors in pixels).demo.py
runs the VB method and visualizes results.evaluation.py
should replicate the results presented in the paper.
# Install the required packages
REPO=$(pwd) # The root directory of the cloned repository
pip install -r requirements.txt
# Build the c extension
mkdir $REPO/sor/build
cd $REPO/sor/build
cmake ..
make install # This will build and install the module into $REPO/sor
# Run the demo/evaluation
cd $REPO
unzip STRAUS.zip
python demo.py
python evaluation.py