Learning Inhomogeneous Frame Models For Object Patterns