(Photo by Alina Grubnyak on Unsplash)

How neural networks learn to predict your body measurements: Part I

Trim (formerly ZyseMe)
5 min readJun 16, 2021


The following is adapted from a series of presentations by ZyseMe CTO Moritz Borgmann intended to explain how the ZyseMe AI works to colleagues outside the tech team.

(Note that all data points presented herein are hypothetical and not intended to replicate genuine input or output data.)

Understanding the problem

Artificial neural networks, just like any other piece of software, exist to solve a problem.

The problem we solve at ZyseMe is the need to calculate a user’s unknown body measurements from the measurements they do know, in order to produce clothing to their exact size. For instance, most users know their height, weight, and how they want a product to fit, so we can use those data points to determine potential unknowns, like their ideal shirt length, for example.

So how do we achieve this?

As a starting point, we use a very basic principle of programming: “If this, then that.” Or in other words, “if this condition is met, then the outcome will be that.”

The foundation of our code is human knowledge. For example, Anita [Heiberg, Pattern and Production Manager] knows that if a user’s height is more than 190 cm, then their shirt length should be around 73 cm. This knowledge is entered into the code:

What we have here is:

· An input variable (user height)

· A threshold for the input condition (190 cm)

· An output based on the input condition (73 cm)

Of course, bodies are more complex than that. Weight and fit preference (i.e. slim, regular or relaxed) will also have an effect on the user’s ideal shirt length. This needs to be coded in as well:

Now, a weight of more than 120 kg will add 10 cm to the shirt length and a further 5 cm will be added if a user prefers a regular fit over slim.

That’s a start, but we’re unlikely to be satisfied with the outputs of this code so far. We need to improve the algorithm output by refining these parameters. But how do we identify the changes that need to be made? Do we change the input thresholds? The outputs? Do we maybe even need a whole new set of input conditions?

Controlling chaos

Of course, there are far more than the three variables outlined above. There are several input variables with many thresholds for each. That leaves a complex web of calculations. Changing the parameters for one can have unforeseen consequences on the others.

This web will inevitably grow too complex for any human to make sense of, but it’s important we bring it under some level of control. But how?

First off, we need to confirm as much of our data as possible. If we confirm that a male user who’s 191 cm tall, weighs 121 kg, and prefers a regular fit, really does have an ideal shirt length of 85 cm, then we can add that to a table. We can also prioritize data points we know to be most accurate by assigning them a weight (not to be confused with body weight).

From here on, all data inputs will be fed into our artificial neural network:

Here is a visual representation of how that might look under the hood, based on our three-input example:

The hidden layers shown are essentially stops in the calculation that will be unintelligible to most people. (These can number in the dozens, but can quickly eat up processing capacity, so it’s best to limit them.)

In this example, hidden layer 1 processes the weight (importance) of the data input and hidden layer 2 will address biases in the data. So the data we know to be most reliable can be processed differently to less reliable data.

When computer scientists talk about machine learning or training a neural network, what they really mean is finding the weights and biases that will help achieve the desired outcomes. (Note that, despite its negative connotations, a bias isn’t necessarily unwanted. For instance, the neural network may learn that biasing height over body weight is preferred when combined inputs generate an error.)

To get a better idea of how complex this might be, here is a visual representation of a neural network with 784 inputs:

This isn’t unrealistic. If, for example, your neural network is learning to recognize images, each pixel in the target image will be an individual input.

Fortunately, the ZyseMe neural network doesn’t require that many inputs. We’ll look at what goes into training it in Part II, so follow us to stay notified when we publish.



Trim (formerly ZyseMe)

We build digital solutions for a demand-responsive and more sustainable fashion and apparel industry. Learn more at be-trim.com.