From Partial Shape Matching through Local Deformation to Robust Global Shape Similarity for Object Detection