Knowing when their sows are pregnant or not is critical for pig farmers, as it allows them to determine farrowing date, and prepare for the ensuing gestation process and the birth of a litter of healthy piglets. Breeding involves a few steps within a one month span — choosing a time, impregnating sows with artificial insemination, detecting pregnancy, and repeating the process in case of a reproduction failure.

While previous pregnancy detection techniques relied heavily on human labour, Alibaba’s new “pregnancy diagnosis algorithms” can help. The AI system was developed by Alibaba Cloud engineers in a joint effort with pig farming scientists.

The system deploys smart surveillance cameras in barns, and machine learning algorithms come up with results based on observation of sows’ sleeping behaviors, standing positions and eating conditions. For example, a sow is likely to be gestated if it sleeps on its back, stands still and runs little, and consumes a steady amount of food. Alibaba engineers also plan to add litter-number prediction based on the mother pig’s hip characteristics.

The new algorithms are part of Alibaba’s larger AI pig farming ambition. Last February Alibaba Cloud signed a partnership with Sichuan pig farming corporation Dekon Group and pig feed supplier Tequ Group to apply its home-grown AI-powered “ET Agricultural Brain” to pig farming. The trio are investing tens of millions of USD in the project, and by 2019, ET Brain will be deployed in each affiliated farm with more than 50 pigs.

Alibaba AI pig farming campaign slogan: “Rise Early to Farm Pigs, Call AI to Help!”

A team of Alibaba Cloud engineers have been dispatched to local farms, and have developed machine learning algorithms for herd behavior analysis, inventory count, health monitoring, and automatic weighing.

The system uses computer vision techniques to set up profiles for each pig — documenting their breed, age, weight, eating conditions, exercise intensity and frequency, and movement trajectory. Meanwhile, voice recognition algorithms are employed to monitor the piglets’ health and guard against suffocation, which lowers death rate by three percent and increases annual production rate by three piglets per sow.

Following in Alibaba’s footsteps, China’s other tech giants are jumping on the animal farming bandwagon. This April Tencent announced a geese production facility in Guizhou to explore the potential of “Agriculture + AI + Internet Smart Retail.” JD.com’s finance unit meanwhile has also set its sights on stockbreeding and last month introduced a set of AI-powered farming solutions aimed at raising better animals at lower cost.