1. A computer-implemented method for recognizing class instances in a 2D image, comprising the steps of: (a) constructing a plurality of 3D class models, each model having one or more class parts, and storing the models in a database in a memory; (b) acquiring a 2D image; and (c) using a processor to match class instances appearing in the 2D image to the 3D class models, by identifying one or more image features in the 2D image and comparing the identified image features with one or more class parts belonging to the 3D class models.