Finland has been ranked number one among the countries that drink most coffee, and our Helsinki office is no exception. Our office practically runs on coffee and we take it very seriously.
We brew a lot of coffee, around seven cups per person per day to be precise. In addition, our team is also particular about getting their coffee at its very best regarding optimum brew time and temperature.
The coffee supply had never been a bottleneck until we moved office to new premises little over a year ago. Although our new office is otherwise a lot nicer than the old one, the downside was that most teams, consequently, lost direct visibility to the kitchen area and the two coffee makers.
The problem was that in order to get the ‘current coffee availability status’, you had no other alternative than to walk to the kitchen and see for yourself. Besides taking unnecessary time and effort this frequently lead to disappointment and frustration as the coffee jug was often found empty.
Now, one could (and rightly so) argue that this is not a real problem as getting up from your desk chair every once in a while is, as a matter of fact, better for your health than just sitting all day. However, if you keep in mind that we are dealing with a group of playful engineers and data scientists with attitude, you can understand why they immediately saw this as an opportunity to play around with AI.
So, rather than just setting up a webcam and streaming a live feed of the coffee pots, our DevOps engineers and data scientists joined forces and applied AI to turn our run of the mill coffee machine into a fully-fledged ‘coffee bot’.
Why? Well, because we are a company that spends its days focused on the potential for AI and machine learning and this was an excellent way for the entire team to learn and fine-tune the process, while also being fun and useful.
The 'coffee bot' journey: from idea to reality
Otto Nyberg and Kimmo Kiiski are two of the masterminds behind the magic of the 'coffee bot'. They are also the first to admit that using a combination of AI and image recognition was not the easiest solution available for this specific problem. This is, however, the very reason that made the entire project enjoyable to them.
Here's how they progressed from idea to execution to solve the problem:
1. Just as with clients’ websites, they started by setting a goal: to know when there was fresh coffee without the need to leave their desks. They used a Raspberry Pi computer with a webcam to capture images of the coffee maker at regular intervals.
'All the necessary equipment (= Raspberry Pi and a webcam) cost them well under 100 euros. Also, they designed and 3D printed the camera holder rack.'
2. Next, they used a labeller to label the images. They needed thousands of labelled images to train a machine learning model, but they knew it was going to be worth the effort. With this data, they were able to train a Support Vector Machine to predict how much coffee there was in the pot.
'Altogether they estimate that they have labelled around 10 000 images to match one of the four categories; no coffee, little coffee, full of coffee, unknown (for example, if something is blocking the camera view).'.
The predictor was set up as a cloud service with easy integration capabilities and further integrated into Slack. Now, whenever a giosg crew member wants to know whether there is fresh coffee, all he or she needs to do is to write '/coffee' into company general discussion in Slack and the coffee bot will respond. The system also uses the same group chat in Slack to automatically notify whenever there is new fresh coffee available.
The predictor works so that it compares pictures taken every 10 seconds. If a crew member sends an information request, the system replies with the latest picture of the coffee machines.
An automated notification is only sent when there is a change in status. In other words, if the starting point was 'no coffee' and it has now changed to 'full of coffee, an automated notification will be sent through Slack to spread the good news.
Using AI to solve online business problems such as increasing conversion, increasing efficiency, reducing costs or improving customer experience is just as easy (think AI chatbots, for example)! If you want to know more, read our guide.