Learning models of object structure