Dynamical And-Or Graph Learning for Object Shape Modeling and Detection