Learning and Composing Primitives for the Visual World