1. A method for detecting an object in an image, comprising: determining convolutional neural network responses on the image; mapping the responses back to their spatial locations in the image; constructing features densely extract shift invariant activations of a convolutional neural network to produce dense features for the image; and determining a horizontal location x of a neural pattern feature as: x i = x i - 1 + ( W i - 1 2 - P i ) ⁢ S i - 1 where i>1, x 1 = W i - 1 2 , x i-1 is a top-left location of a previous layer, W i is the window size of a convolutional or pooling layer, P i is a padding of a current layer, S i-1 is actual pixel stride of two adjacent neural patterns output by the previous layer.