# Multiple digits MNIST and transfer learning

I have a sample of 50,000 images, some of which are shown below:

$\qquad$ $\qquad$ $\qquad$ $\qquad$

Associated to these images are labels for the digit with the largest pixel size. My goal is to build a machine learning model to predict the largest digit in an image by pixel size.

To that end, I used transfer learning on the resnext model, but only found an accuracy of 60%.

Given that this implementation uses transfer learning to train a model to predict MNIST digits, I would now like to crop each training image to retain only the largest digit and then train the model using the linked implementation.

So, my question is, how I do crop the training images to retain only the digit in each image with the largest size.

• you mean most number of pixels? CNNs would need labelled data. Do you have data with each image labelled with the boxes around the largest digit? – MiloMinderbinder Mar 17 '18 at 17:18
• I don't actually. I have attached images above. I need to draw bounding boxes and crop to retain only the digit with the most number of pixels, so that I can transfer learning using rxtnet to train the network. – nightmarish Mar 17 '18 at 18:29
• are all the digits necessarily disconnected in the images? for example: in the first image was there necessarily no trail of continuous black pixels running from one digit to the next? – MiloMinderbinder Mar 18 '18 at 0:25
• Cross-posted: datascience.stackexchange.com/q/29180/8560, stats.stackexchange.com/q/335107/2921, cs.stackexchange.com/q/89470/755. Please do not post the same question on multiple sites. Each community should have an honest shot at answering without anybody's time being wasted. – D.W. Mar 18 '18 at 19:49