Image processing using conv-neural net
First of all, CNNs are typically used with identical sized inputs. So, you resize your input to a constant size, no matter what.

Next, detecting an object and recognizing an object over many samples are different tasks. For object detection, you could be better of with R-CNNs. Its sources are also available and there is a Caffe tutorial for R-CNNs. Of course there are many other works on the same topic. For example, this one.