HTTPS SSH

ProbFlow, v1.00

This source code release accompanies the paper

ProbFlow: Joint Optical Flow and Uncertainty Estimation
Anne S. Wannenwetsch, Margret Keuper, Stefan Roth. In ICCV 2017.

Requirements

The implementation of ProbClassicA (and ProbFlowFields without SOR solver) requires flow code from Sun et al. [43]: http://www.cs.brown.edu/~dqsun/code/flow_code.zip. Please download their code and add the directory to your search path, i.e. addpath(genpath('path/to/flow_code/utils'))

To use ProbFlowFields with the given SOR solver you have to compile the corresponding mex file in ./probFlowFields/mex, i.e. mex -O sor_probflow.c

Usage

An exemplary usage of ProbClassicA and ProbFlowFields can be found in probFlow_demo.m. Please adapt the search path in line 9 appropriately.

ProbClassicA:
Given input images im1, im2 and an initial estimate muInit, ProbClassicA(im1,im2,muInit) returns the variable sets (mu, sig, kd, ks) and (muHat, sigHat, kHat). kd, ks and kHat are the parameters of the latent variables as introduced in Eq. (10) of our paper. mu, muHat and sig, sigHat are flow estimates and variances, respectively. The corresponding uncertainty predictions psi can be obtained as psi = sum(log(sig),3). Following Sun et al. [43], we used estimates (muHat, sigHat, kHat) for our experiments and set muInit to zero.

ProbFlowFields:
The function call ProbFlowFields(im1,im2,muInit) returns the latent variable parameters kd1 (brightness constancy), kd2 (gradient constancy) and ks (smoothness prior). As for ProbClassicA, mu and sig are flow estimates and variances, respectively. The uncertainty estimate is obtained as psi = sum(log(sig),3). In our experiments, we used FlowFields [1] matches, densified with the EpicFlow [36] interpolation for muInit. The necessary code can be downloaded here:

Parameters

All default parameters as well as the provided GSM penalties (cf ./gsm_params) are the ones used in our ICCV 2017 paper.

ProbClassicA:

  • nWarp: number of warping steps per pyramid level, default = 10
  • lamD: weighting parameter data term, default = 0.0959
  • lamS: weighting parameter smoothness terms, default = 0.1000
  • lamC: weighting parameter coupling term, default = logspace(log10(1e-4), log10(1e2), nWarp)
  • lamN: weighting parameter nonlocal terms, default = 0.0053
  • nIter: number of updates (mu, sig, k) in block-coordinate descent scheme, default = 5
  • initSig: initial value for variances sig, default = 1e-7
  • nbhSize: neighbourhood size of nonlocal term, default = 5
  • nIterHat: number of updates (muHat,sigHat,kHat), default = 3
  • strucTextDec: if true, structure-texture decomposition is applied for image pre-processing
  • pathGSM: path of GSM penalty parameters, default = './gsm_params'
  • nameGSMd: name of GSM penalty used for data term, default = L5_probClassicA_data
  • nameGSMs: name of GSM penalty used for smoothness terms, default = L5_probClassicA_smooth
  • nameGSMn: name of GSM penalty used for nonlocal term, default = L5_probClassicA_nonlocal
  • h: derivative filter used to compute image derivatives, default = [1 -8 0 8 -1]/12)
  • tempAv: factor used for temporal averaging of spatial image derivatives, default = 0.5
  • interMeth: interpolation method used for image derivatives, default = 'bi-cubic'
  • minPixelPyramid: minimal number of pixels on smallest pixel level, default = 6
  • maxPixelPyramid: maximal number of pixels on smallest pixel level, default = 16
  • pyramidScale1: pyramid scale used for pyramid of quadratic gnc step, default = 0.5
  • pyramidLevels1: number of levels for pyramid of quadratic gnc step, default = [] (automatic computation)
  • pyramidScale2: pyramid scale used for pyramid of remaining gnc step, default = 0.8
  • pyramidLevels2: number of levels for pyramid of remaining gnc step, default = 2

ProbFlowFields:

  • nWarp: number of warping steps, default = 5
  • lamD1: weighting parameter data term 1 (brightness constancy), default = 0
  • lamD2: weighting parameter data term 2 (gradient constancy), default = 0.01
  • lamS: weighting parameter smoothness terms, default = 0.42
  • epsD1: small constant for normalization of data term 1, default = 0.001
  • epsD2: small constant for normalization of data term 2, default = 0.001
  • filter_smooth: filters smoothness terms, default = {[1;-1],[1,-1]}
  • kappa: parameter of spatially varying lamS(x), default = 0.01
  • nIter: number of updates (mu, sig, k) in block-coordinate descent scheme, default = 5
  • initSig: initial value for variances sig, default = 1e-7
  • sorSolver: if true, sor-solver is used to solve the equation system, otherwise Matlab backslash operator is applied. Please note that results might differ according to the solver, default = true
  • sigmaFilt: standard deviation of Gaussian image pre-processing, default = 1.1
  • pathGSM: path of GSM penalty parameters, default = ./gsm_params
  • nameGSMd1: name of GSM penalty used for data term 1, default = L10_probFlowFields_data
  • nameGSMd2: name of GSM penalty used for data term 2, default = L10_probFlowFields_data
  • nameGSMs: name of GSM penalty used for smoothness terms, default = L10_probFlowFields_smooth
  • h: derivative filter used to compute image derivatives, default = [1 -8 0 8 -1]/12)

Citation

If you use our code, please cite our ICCV 2017 paper:

@inproceedings{Wannenwetsch:2017:PJO,
    title = {ProbFlow: Joint Optical Flow and Uncertainty Estimation},
    author = {Anne S. Wannenwetsch and Margret Keuper and Stefan Roth},
    booktitle = {Proceedings of the Sixteenth IEEE International Conference on Computer Vision},
    year = {2017}}