Pre-requirements for machine learning projects

Kornel Dylski
December 21, 2020

Machine learning projects are currently among the most exciting ways of using computing power to perform specific, clearly defined tasks. If your goal is to create a narrow, one-purpose program that consistently and efficiently yields great results, machine learning may be the right choice.

But before you start, make sure your goal is defined very precisely in the first place. Here are a couple of considerations and important pre-requirements for starting your first machine learning project.

Do you really need to create a new project? #

Machine learning is gaining popularity in specific applications, but it’s important to remember that not every project needs to leverage machine learning.

Machine learning offers great results in image analysis applications (object detection, recognition, classification) and handling tabular data in general (e.g. for optimization, predictions, identification of trends). It can be successfully applied in text analysis and inference from data too, but the results, albeit helpful, are less impressive than in image recognition and analysis.

Image analysis alone is actually a really broad category. It actually covers projects which don’t directly involve image processing at all. For example, if you can transform your data (any data actually, even unrelated to the “image” category), and represent it using a 2D colored picture – this would still fall under the “image analysis” category.

For example, audio can be easily transformed (through a process called Fourier Transformation) into a visual representation of the sound spectrum, which is nothing more than a 2D image. Such an image – just like any other image – can then be compared, classified and analysed using various machine learning models against many other similar images.

Does “image analysis” fit your purpose? #

When using the phrase “image analysis” I typically mean the model’s ability to answer various questions about an image, ranging from the basic “what is in the picture?”, to the more sophisticated questions like:

  • Where is the person in the picture?
  • Is it winter in the picture?
  • In what style is this painting?
  • How fast the object in the picture is moving?

The list of questions can go on and on. But if your goal can roughly fit into any of these categories or questions, it would probably be more effective to adapt an existing model rather than trying to create something entirely from scratch.

Picture labelled as “Dog is running”

What are the pre-requirements for a machine learning project? #

To decide whether what you’re trying to achieve fits an existing machine learning model, you will have to answer a number of questions first. This will help you find an existing model that you could adapt to your needs and save a lot of time in the process.

Take, for example, a project which enables object detection in real-time using a webcam.

  • What should your project return as an answer?
  • What is the list of objects/categories (e.g. all possible hand gestures) that will be detected?
  • Is the list of gestures finite or not?
  • Does object detection consider the “unknown” category?
  • Do you want to be able to recognize multiple objects simultaneously?

Based on these answers, a machine learning developer (or data scientist) can narrow down the available loss functions and models to a few that could be used in the project.

How adaptive should your model be? #

In an ideal world, gesture recognition should be based on a high-quality, still photo of a hand showing only. There is only a single gesture shown against a clear background in well-lit conditions. But we all know real-life conditions never like that.

When designing the model, you need to consider many factors like camera image quality, skin and clothing colors, background, distance from the camera – as well as different times of day and lighting conditions. A well-trained model should take into account all these aspects and consistently offer great accuracy.

But if you’re not planning to use the app outside of your office, it’s a whole different story, and could save you a lot of work trying to factor in all the variables. If all you want to achieve is to make the model recognize the simple “thumb up” sign shown in front of the camera in your office, preparing for all other environments will be redundant?

What is the goal of the model? #

Try to find a way to determine if your model is effective and what is its accuracy. This will involve defining a threshold for “passable” recognition. This will help you determine if it’s improving.

It’s important to create certain design metrics that will tell you that you are progressing. This can provide valuable feedback for improving your model and refining it so it better serves the purpose.

Collect and prepare data #

For machine learning to work, you will need to feed it with data to train the model. The data set has to be adjusted to your needs, but carefully-selected data sets can be very helpful for the project.

Fortunately there are already plenty of free-to-use datasets. Amazon, Google, Kaggle, public universities, state offices and many other companies collect ready-to-use datasets. If you are lucky, you can just fetch images from search engines. Nevertheless, the dataset always has to be prepared for training. And do not forget to prepare a test set with examples of real usage.

If you’ve got any questions about machine learning or are considering starting an ambitious ML project that’s uncomfortably beyond your expertise, don’t hesitate to drop us a line. Our machine learning experts are ready to help (and really like challenges)

Now, let's talk about your project!

We don't have one standard offer.
Each project is unique, rest assured that we will approach the next one full of energy and engagement.