Farming in Japan is different than the United States. The average Japanese farm is just 4.8 acres, and more than 1.5 million small-scale food producers punctuate Japan’s mountainous islands. In contrast, the average US farm size is 434 acres.

Japan’s distributed model poses an issue: The price of modern, high-efficiency farm equipment demands a large operation to cover costs. One small farm, however, is turning to homebrew artificial intelligence instead of buying the standard machinery.

Makoto Koike, a Japanese farmer who previously worked as an embedded systems designer in the auto industry, found a common farming problem: sorting produce. The nine categories of spiky cucumbers his family farm produced was time-consuming to sort by hand. Koike told Google that it could take months to learn how to properly sort the cucumbers, a task that mainly fell to his mother.

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.”

Google Training data from Koike’s cucumber sorting machine.

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.