<p>What you are looking for is called <strong>object detection</strong>. A starting point can be <a href="https://papers.nips.cc/paper/5207-deep-neural-networks-for-object-detection.pdf" rel="noreferrer">Deep Neural Networks for Object Detection</a> or <a href="https://www.cs.berkeley.edu/~rbg/papers/pami/rcnn_pami.pdf" rel="noreferrer">Region-based Convolutional Networks for Accurate Object Detection and Segmentation</a>.</p>

<p>A similar, but much more difficult task is <strong>instance segmentation</strong>. One of the latest papers I've seen in this area is <a href="http://arxiv.org/abs/1604.05096" rel="noreferrer">Pixel-level Encoding and Depth Layering for Instance-level Semantic Labeling</a>.</p>

<p>Instance segmentation is probably the hardest tasks in Computer Vision. When you're new to machine learning / computer vision, you might first want to do image classification. If you want to go into the direction of instance segmentation, then you should continue with semantic segmentation and then instance segmentation.</p>

<p>A simple sliding window approach, where you only predict "car" / "no car" will not work, because in the image the cars are not separated by any "no car".</p>
Counting the number of vehicles from an image with machine learning
<p>I am new to machine learning. I got a task to find the total number of vehicles from an image using machine learning concept. I am using neural network. My image of worst case is given here.</p>

<p><a href="http://i.stack.imgur.com/A36Zw.jpg" rel="nofollow">Traffic Image</a>  </p>

<p>I need to find the total number of cars from this image. My idea is to cut this big image into small patches of image and train the network to count the vehicles from the small patches. Each patch will be having count less than 5. Then in the processing of new image, I could make use of a sliding window to get the total count of vehicles. </p>

<p>I just want to know whether this idea is possible or not OR should I go for feature extraction and training neural network with those features. If possible, whether there is any conditions for the dataset and training.</p>