<p>There is a hot field called "object detection" that tries to do what you want. In general, you can detect anything (digits, people, cars, etc) from any images and even videos. </p>

<p>The state-of-the-art techniques roughly fall into two categories:</p>

<ol>
<li><a href="https://arxiv.org/abs/1506.01497" rel="nofollow noreferrer">Faster-RCNN</a>, which first proposes a lot of candidate windows for objects of your interest and then detects what are actually inside these windows. </li>
<li><a href="https://arxiv.org/abs/1512.02325" rel="nofollow noreferrer">SSD</a>, which only scans the images once and detect objects, faster but not that reliable compared to Faster-RCNN. </li>
</ol>

<p>A well-known real-time object detection method is YOLO (You Only Look Once), which falls in the SSD category, and has a very impressive real-time demo <a href="https://pjreddie.com/darknet/yolo/" rel="nofollow noreferrer">here</a>, to give you a sense of object detection. Search these methods' names and you will find a lot of example code that satisfies your needs. </p>

<p>If you are only looking for digit detection, also check out work surrounding Stanford's <a href="http://ufldl.stanford.edu/housenumbers/" rel="nofollow noreferrer">House Number Dataset</a>. However, note that these works are generally from five and more years ago and do not necessarily beat general methods like Faster-RCNN and SSD.</p>
Training on MNIST, detecting sequences of numbers?
<p>After you've trained a model on the MNIST set, how can I now classify an image as having two digits? More generally, how do I train a model to detect any number of digits on an image?</p>