A drinks machine sounds like the opposite of AI. For us it was one of the most instructive projects, because it forgives nothing.
A vending machine is not a server
When we run a model in the cloud, we have everything: compute, storage, logs, the ability to roll out a new version at any time. If something goes wrong, you see it and you fix it.
A vending machine stands somewhere in a building. It has a small computer, little storage, sometimes a network connection, sometimes not. Nobody looks at its logs. If it recognises something wrong, you notice it weeks later in the numbers, or not at all.
What the machine has to recognise
Smart vending is about the machine understanding what is happening. What was taken out, what needs restocking, whether something is off. That means recognising images, under poor light, with reflections, with products that look alike, and with people who do not put things back the way they should.
My experience: a model that recognises 99 percent in the lab may recognise 90 in the field. The missing nine percent are the cases you did not have in the lab: the afternoon light, the new packaging, the fingerprint on the camera.
AI at the edge
The model has to run on the machine, not in the cloud. Because the network is not always there, because the answer has to come immediately, and because you do not want to pay for an API call every time someone reaches into the machine.
That raises the same questions as back then with the 80 MB model for Apple. How small can the model be without getting worse? What do you leave out? And how do you get a new version onto a hundred machines that are all standing somewhere?
The last question kept us busiest. Retraining a model is easy. Distributing it safely to devices you cannot see, without one of them no longer working afterwards, is operations. And operations is always the bigger job.
What we took away
Three things that apply in every project today.
First: data from the field is worth more than data from the lab. Today we collect from day one what the system sees in reality, and we retrain with it.
Second: a model that does not know when it is uncertain is dangerous. The machine has to be able to say "I am not sure what that was" instead of guessing. That was a training decision, not a technical one.
Third: update processes belong to the product, not behind it. Whoever builds them later builds them under pressure.
A vending machine is the hardest test for a model, because nobody is standing next to it. Whoever gets a system running there has understood what operations means. That helps even when the next system runs in the cloud.
Written by me. The thoughts, the values, the learnings, the mistakes: all mine. Grammar and spelling are corrected by a twin model of my own, trained on my texts. Sometimes that turns into a mix. Of course I read everything again, but nobody is infallible. Whatever stays in is mine too.