By Julien Despois

Academic courses can teach you the ins and outs of machine learning, but they can't fully prepare you for putting your work into production. To get the experience you need, you need to come up with your own projects from scratch.

Working on toy examples and entering competitions can break the ice, but these approaches often provide a clear path to a well-defined objective. When you’re delivering a machine learning model to real users, the task and metrics of success are often unclear. It’s up to you to find out what your client needs, translate it into a problem, and build a system that solves it. Here are the basic steps:

Identify a project. Find a small task to tackle and determine its inputs and outputs. Put yourself in the shoes of a client so you don’t fall back on toy examples. For instance, classify images of cats and dogs is simplistic and unoriginal, so try something like measure the difference in time onscreen between male and female actors in movies.

Get the data. Find a dataset that matches the task, or build it yourself using web-scraping tools. It’s essential to gather data that suits the problem. Don’t change the problem to fit an available dataset.

Preprocess the data. The data will be messy, and your job is to clean and preprocess it — no shortcuts allowed. Look for weaknesses (incorrect labels, unbalanced classes, low-quality images, etc.) and brainstorm ways to prune or augment the data to address them. Can you flip images? Stretch audio clips? How would that impact the labels?

Set a clear goal. How will you know you’ve solved the problem? No one will tell you what objective to optimize, so you’ll have to figure it out for yourself. Maybe it's accuracy or a simple mean squared error — but maybe your use case requires avoiding false positives at any cost or prioritizing accuracy for certain clusters of examples (such as rendering simulated makeup more accurately on female faces).

Review the literature. How have other teams solved similar problems? Search arxiv.org or paperswithcode.com for relevant publications. Can you fine-tune an existing pretrained model, or must you build one from scratch? (If you can, try both and see which one works best. This is the best way to avoid reinventing the wheel.)

Implement the solution. Once the model is trained, make sure your implementation meets the end-users’ requirements. If they want a mobile app, verify that your model is small enough to fit on a smartphone. If it needs to run in real time, determine the requirement for latency. Identify compromises you would have to make to reach the target and how they would impact the quality of your model’s output. Often building a proof of concept is enough, as long as you see a clear path to optimizing performance. In real life, the final step to production could require months of tuning.

Share your work. Put your code on GitHub to show colleagues, potential collaborators, and future employers the quality of your work. Write a blog post that describes your project from start to finish. Detail your thought process, the roadblocks you faced, and how you overcame them.

Take these steps, and by the end of your first project, you will have gained unique experience in putting your machine learning knowledge to use. By the end of your fifth, you will be well on your way to developing a professional level of expertise.

Julien Despois is a Machine Learning & Deep Learning Scientist at L’Oréal AI Research.

Share

Subscribe to The Batch

Stay updated with weekly AI News and Insights delivered to your inbox