DeepPBM: Deep Probabilistic Background Model Estimation from Video Sequences

Behnaz Rezaei, Amirreza Farnoosh, Sarah Ostadabbas

TL;DR

DeepPBM introduces an unsupervised framework for background subtraction using Variational Autoencoders (VAEs). By forcing video frames through a low-dimensional latent bottleneck, the model learns to reconstruct the stable background while filtering out transient moving objects, achieving a 23% accuracy boost and 10x speedup over traditional methods like Robust PCA (RPCA).

What Problem Does This Paper Address?

Background subtraction (BS)—the process of separating moving foreground objects from a static or dynamic background—is a fundamental task in computer vision, essential for traffic monitoring and security.

The field has faced a persistent "trilemma":

  1. Traditional Probabilistic Models (e.g., MoG): These are fast but often struggle with complex, dynamic backgrounds (like waving trees or rain).
  2. Subspace Learning (e.g., RPCA): These are robust and unsupervised but rely on computationally expensive iterative optimization, making them too slow for real-time applications.
  3. Supervised Deep Learning: These are highly accurate but require massive amounts of manually labeled "ground truth" data for every new scene, limiting their real-world generalizability.

DeepPBM seeks to bridge these gaps by creating a method that is unsupervised (no manual labels needed), robust to dynamic scenes, and computationally efficient enough for practical use.

Methods

The authors leverage the architecture of a Variational Autoencoder (VAE) to perform what is essentially "non-linear subspace learning."

  • The Bottleneck Principle: The core hypothesis is that background information is redundant and can be compressed into a low-dimensional latent space. Conversely, moving foreground objects are "innovations" or noise that do not fit this compressed model.
  • Encoder/Decoder: A Convolutional Neural Network (CNN) encoder maps video frames into a stochastic latent space (represented by a Gaussian distribution). A decoder then attempts to reconstruct the original frame from this latent representation. Because the latent space is restricted (low-dimensional), the decoder can only reconstruct the "persistent" parts of the image—the background.
  • Loss Function: Unlike standard VAEs that use $L_2$ (Mean Squared Error) loss, DeepPBM uses an $L_1$-norm loss for reconstruction. This choice is deliberate: $L_1$ loss is more robust to outliers (the moving foreground) and encourages the model to treat foreground pixels as sparse noise to be ignored.
  • Inference: Once trained, background subtraction is simple: the difference between the original input frame and the VAE’s reconstructed "background-only" output reveals the foreground mask.

Datasets

The model was evaluated using the BMC2012 (Background Model Challenge) dataset, which contains:

  • 9 Short Videos: Used to compare accuracy against RPCA. These feature challenging outdoor conditions like wind, sun, and rain.
  • 3 Long-term Videos: Ranging from 22 to 78 minutes, used to test the model’s ability to adapt to scene changes over time.

Key Insights and Ideas

  • Foreground as "Filtering Error": The most elegant idea here is treating the VAE as a smart filter. Because the moving objects are transient and vary wildly, the encoder cannot find a compact way to represent them in the narrow latent bottleneck. Consequently, they are "filtered out" during the reconstruction process.
  • Probabilistic vs. Deterministic: While RPCA finds a deterministic low-rank matrix, DeepPBM finds a probabilistic mapping. This allows the model to handle the inherent uncertainty in dynamic backgrounds (like flickering lights or moving leaves) more gracefully.
  • Generative Potential: Since it is a generative model, DeepPBM can sample its latent space to create synthetic backgrounds of a specific scene with varying illuminations or shadows, which could be used to augment training data for other supervised models.
  • Speed via Offline Training: The heavy computational lifting (optimization) happens during the training phase. At "test time" (inference), the model only requires a single forward pass through the network, making it orders of magnitude faster than iterative solvers.

Key Results

  • Accuracy: DeepPBM outperformed RPCA on the BMC2012 short videos by an average of 23% in F-measure score.
  • Efficiency: The method is significantly faster. For a typical sequence, RPCA took ~14.4 minutes to process, while DeepPBM finished in 1.9 minutes (running on a CPU for a fair comparison).
  • Long-term Adaptation: In a 78-minute video, the model successfully adapted to a car that was stationary (part of the background) and then began to move (becoming foreground), demonstrating its ability to update its internal representation of "background."

Limitations and Future Work

  • Hyperparameter Tuning: The dimension of the latent space ($d$) currently needs to be manually tuned based on the complexity of the scene. A very dynamic scene (e.g., a windy day) requires a higher $d$ than a static indoor hallway.
  • Training Requirements: While unsupervised, the model still requires an initial training period on the specific video sequence before it can perform subtraction effectively.
  • Selective Updates: The authors suggest that future versions could implement "selective background updates." Instead of fine-tuning the whole network periodically, the model could adapt only to pixels it identifies as background, further improving robustness against "ghosting" effects where a moved object leaves a trace in the background model.

Summary updated

BibTeX
@inproceedings{rezaei2020deeppbm,
  author = {Behnaz Rezaei and Amirreza Farnoosh and Sarah Ostadabbas},
  title = {{DeepPBM: Deep Probabilistic Background Model Estimation from Video Sequences}},
  booktitle = {Workshops @ ICPR},
  year = {2020},
  doi = {10.1007/978-3-030-68790-8\_47},
}
Figure