A method for automatic surveying of a real word object by a surveying or metrology instrument. It comprises an acquiring of a picture by the surveying or metrology instrument, which picture is comprising the real world object to be surveyed, and an automatic detecting and classifying of the detected real world object to be surveyed in the picture, and also an automatic surveying of the detected real world object by the surveying or metrology instrument for determining a location and/or a geometrical property of the real world object. The automatic detecting and classifying is done with a classifier based on data acquired by machine learning, which machine learning is based on machine learning training data derived from a virtual digital 3d-model which is representing the real world object and which comprises meta information of this 3d-model.