Large Scale Image-based Modeling through Learning & Inference of Shape Grammars