On Hierarchical Models for Visual Recognition and Learning of Objects, Scenes, and Activities