1. A method for object detection, the method comprising: obtaining images of an object; defining an input layer and a plurality of sequential feature layers subsequent to the input layer of a multi-layer feature learning network, features from the input layer provided directly to a first of the sequential feature layers, features from each of the sequential feature layers provided directly to a next of the sequential feature layers, the sequential feature layers comprising hidden layers; providing an aggregator layer receiving the features directly from multiple layers of the sequential feature layers of the multi-layer feature learning network, the features from different ones of the sequential feature layers provided to subsequent ones of the sequential feature layers and also provided directly to the aggregator layer without processing by the subsequent ones, the aggregator layer aggregating the received features; optimizing, jointly and by a processor, the multi-layer feature learning network and the aggregator layer using the images of the object; and outputting, by the processor, a set of learned features represented by the optimized multi-layer feature learning network and a detector that makes use of the generated features by the optimized aggregator layer, the set of learned features being for distinguishing the object and the detector being for classifying the object.