Recursive Segmentation and Recognition Templates for 2D Parsing