You can read an overview of this Numerical Linear Algebra course in this blog post. The course was originally taught in the University of San Francisco MS in Analytics graduate program. Course lecture videos are available on YouTube (note that the notebook numbers and video numbers do not line up, since some notebooks took longer than 1 video to cover).

You can ask questions about the course on our fast.ai forums.

3. Background Removal with Robust PCA

Our goal today: background removal

Getting Started

Let's use the real video 003 dataset from BMC 2012 Background Models Challenge Dataset

Other sources of datasets:

Import needed libraries:

In [31]:
import moviepy.editor as mpe
# from IPython.display import display
from glob import glob
In [32]:
import sys, os
import numpy as np
import scipy
In [33]:
%matplotlib inline
import matplotlib.pyplot as plt
In [34]:
# MAX_ITERS = 10
TOL = 1.0e-8
In [35]:
video = mpe.VideoFileClip("data/Video_003.avi")
In [179]:
video.subclip(0,50).ipython_display(width=300)
100%|█████████▉| 350/351 [00:00<00:00, 1258.81it/s]
Out[179]: