Notes on Computer Vision: Models, Learning and Inference