An AI story: from sorting croissants to fighting cancer

What’s the difference between fresh bakery products and cancer cells? Apparently, not much. This is a story of how the same pastry AI which was used to differentiate croissants from strudels and pretzels turned out to be capable of helping with cancer research. 

The origins of BakeryScan

In Japan, the success of a bakery often depends on the variety of products offered. Through a market research study, it was determined that the more different products a bakery sold, the more sales it made. Pastry products and breads were also preferred unwrapped, because to customers they seemed to be more fresh than their plastic-wrapped variants. With the wide range of over 50 or 100 different pastries in similar shapes and colors, and the preference for unwrapped items with no barcodes, the checkout seemed to be a nightmare. The personnel required intense training to be able to identify the different products and the process was not the most sanitary due to the individual handling of each item by the cashier.

In 2007, a restaurant chain that was planning to launch a line of bakeries approached Hisashi Kambe, owner of a company called Brain which worked on computer vision and developed algorithms for different projects and systems. They were tasked with automating the checkout process, and with quality image recognition deep learning still in the future, the team at Brain went through years of problems surrounding the changing lighting in the stores, the differences between variants of the same product as well as the similarities between different products.

After 5 years of work on the development of complicated algorithms and several prototypes, BakeryScan was officially launched in 2013. It had the capacity to identify the chosen pastries with nearly perfect results, and the ability for manual feedback when the program was unsure. The cashier could choose between the few variants the program suggested, which offered a way for the system to improve when it was unsure and achieve even greater accuracy.

BakeryScan turned out to be an incredibly successful product which could be bought for around $20,000, and it was implemented in many bakeries across the country, as well as talked about by the public and different media.

Unexpected application

In 2017, a doctor at the Louis Pasteur Center for Medical Research in Kyoto saw an advertisement about BakeryScan and realized that cancer cells actually look similar to bread and pastries when placed under the microscope. He reached out to Brain and expressed his interest in the technology.

The system was adapted so that instead of donuts on a check-out desk it could take a microscope slide and measure the nucleus and other properties of cells, trying to identify cancer cells among them. This cancer cell detector came out under the name Cyto-Aiscan, and went on to be tested in two big hospitals in Kobe and Kyoto. It is apparently 99% accurate, requires only a limited number of examples to learn and compare, and the core principle isn’t much different than what the original BakeryScan used to check out bread.

The core technology

Conclusion

Brain continued developing their core technology, called AI-Scan, and adapting it to other similar uses. The algorithms have been used to differentiate pills in hospitals, label amulets for sale in shrines, detect incorrectly wired bolts in jet-engines as well as count the number of people in an old woodblock print. What makes AI-Scan so interesting is that it came at a time when deep learning and image recognition were not developed, but also the fact that for some of these uses deep learning might have proved to be less effective.

Deep learning requires thousands of examples to become effective, while BakeryScan could almost perfectly distinguish pastries after barely 20 examples. The technology requires much more complicated programming to be able to use it for different purposes, and the adaptation of not only new data, but new algorithms and rules as well. However, it’s exciting to see what came out of a not-so-simple bakery scanner, and what possible innovations we will see in the future that might be completely unexpected today.

Resources