1. A method for adaptive detection by a processor of an object in an image represented by image data, by using a plurality of data-driven clusters, each of the plurality of data-driven clusters being characterized by a range of values of one or more statistical parameters associated with a plurality of prior images, each data-driven cluster being part of a context category, a context category being part of a plurality of context categories, the plurality of data-driven clusters being greater than the plurality of context categories, comprising: receiving the image; determining a value for each of the one or more statistical parameters of a part of the image that contains the object by the processor; the processor learning the data-driven clusters from the plurality of prior images, each of the prior images being acquired in a different lighting condition, a different traffic condition or a different camera setting; assigning the image to one of the plurality of data-driven clusters according to the determined value of each of the one or more statistical parameters of the part of the image; associating by the processor of the one of the plurality of data-driven clusters with one of at least three context categories, the at least three categories including a daylight, a lowlight and a nightlight category; context adaptive learning of a classifier for detecting the object based on the one of at least three context categories associated with the assigned one of the plurality of data-driven clusters; and detecting the object using the classifier.