After learning how to sort himself, Koike started to build a machine that would identify and sort the cucumbers automatically. He relied on Google’s open source machine learning library, TensorFlow, after learning about the technology when Google DeepMind’s AlphaGo AI beat world champion Go player Lee Sedol.

“When I saw the Google’s AlphaGo,” Makoto told Google, “that was the trigger for me to start developing the cucumber sorter with deep learning technology.”

Training data from Koike’s cucumber sorting machine.
Training data from Koike’s cucumber sorting machine.
Image: Google

Google’s description of the cucumber project’s ease could be called generous. “Just download the sample code and read the tutorials and you can get started in no time,” according to the blog post telling Koike’s story.

But Koike, a former embedded systems designer, built a highly-complex machine that transmits data from three cameras to a small onboard computer, then to Google’s cloud processing servers. The decisions made by the algorithms in the cloud control the machine’s sorting arm, which manually moves the cucumbers into one of the nine groups.

Before the machine could work, Koike spent three months taking and labelling more than 7,000 images of cucumbers—the algorithms need to learn from examples of good and bad cukes. The machine is 70% effective in real world production, which started in July. The cucumber sorting software can be replicated across Japan, used to sort mushrooms or cabbage or anything else.

The tale of the cucumber farmer is a humanizing story for a large internet company touting its cloud services, but it does show why open source systems are important, other than measuring the impact of research labs. Posting code for free online democratizes the field of artificial intelligence, meaning anyone with a computer and some time can learn how give their machine a brain.

📬 Sign up for the Daily Brief

Our free, fast, and fun briefing on the global economy, delivered every weekday morning.