Machine Learning: I Was Doing It Wrong…

ML Buddy
2 min readSep 2, 2021
Me after spending an hour labelling images

As I mentioned yesterday, the training of a model can be both CPU/GPU intensive as well as time intensive. Depending on the number of classes you have in your dataset and the number of images in each class, it could take anywhere from an hour to over a day to get a sufficiently accurate model trained. Coming into this field this is where I thought most of my time would be spent just waiting at the computer for an hour or two for my model to emerge from training like a freshly baked loaf of bread emerges from the oven.

It’s the image collection, management, and labelling that takes the most time.

How I imagined my model would emerge from training like a freshly baked loaf of bread emerges from the oven

Unfortunately, I was sorely mistaken and quickly realized that it’s everything that happens before you start training that’s so time intensive. It’s the image collection, data management, and labelling that takes the most time. Just to give an idea of what I’m talking about here, in order to create that first model using CreateML I had to:

  1. Snap a bunch of pictures with my phone
  2. Crop and resize each one down to the proper image dimensions
  3. Copy them over to my computer to be labelled by a different program
  4. Label each object by drawing a rectangle around each point of interest in an image
  5. Output the images and labels in the proper format so that the training framework I was using could ingest the data to train the model.

Those individual steps took many hours for the 4 classes of 100 images each that I was going to train this model on. That’s waaay too much time to spend on data preparation to make the trained model worth it. There had to be a way to streamline the process, to make the collection and labelling take less time. The services that existed were either free, open-source and not good or really nice, but super expensive (e.g. $1000 a month), neither of those were very appealing to me. So I decided to write my own tools to assist me in the creation of the models.

Which I’ll talk more about tomorrow.

See ya later Buddy!

--

--

ML Buddy

Attempting to make machine learning more accessible than it was when I arrived.