OpenSfM is an open-source Structure from Motion library that lets you build 3D models from images, programmed in python.
It implements the whole SfM pipeline in an incremental reconstruction way:
finding good init pairs
bootstraping the reconstruction
growing the reconstruction
Besides, it integrates some lightweight post-reconstruction modules including:
undistortion
depth map generation
dense reconstruction
a simple javascript-based frontend to visualize SfM result.
It uses the popular Ceres solver to tackling with non-linear optimization for bundle adjustment.
In one word, it is a great learning material of Struct from Motion.