You can download here the code for the paper Structure from Motion with Objects presented at CVPR 2016. The code (SfMwO.zip) and data (dataset.zip) provide the MATLAB functions and evaluation to replicate the results of the paper (SfMwO.pdf).
You can download the code for the BALM matrix factorization algorithm here: BALM CODE.
The approach solves factorization with missing data, in particular when one of the matrices involved in the factorization have a special known structure (i.e. it belongs to a matrix manifold). The code is applied to several problems in Computer Vision such as Rigid and Non-rigid Structure from Motion, Photometric Stereo and image registration.