China’s top search engine company Baidu made a smart cat shelter in Beijing that uses AI to verify when a cat is approaching and open its door. The cat shelter is heated and also offers cats food and water.

Besides running China’s main search engine, Baidu also works on AI tools in general and owns iQiyi, a Netflix-like rival that uses algorithms to determine what viewers may be interested in watching next. While cat shelters ordinarily seem out of the scope of what Baidu does, the company says that the idea first came to one employee, Wan Xi, who uncovered a small cat hiding in his car last winter and began to sympathize with the plight of other stray cats. Wan then apparently shut himself at home to develop software and work on a possible solution, using tools from Baidu’s AI team. Then, consulting with volunteer groups, Baidu created the actual physical shelters as a team effort.

The cameras have night vision for cats that like to wander around at night

Baidu is based in Beijing, where temperatures can drop to 15 degrees Fahrenheit (-9 degrees Celsius) in the winter, leaving stray cats in pretty dire conditions. Baidu wrote in a blog post that only 40 percent of stray cats survive the winter on average. While the backstory and the technology itself feels a bit gimmicky, this does appear to be a genuinely good application of artificial intelligence to benefit stray animals.

While scanning a cat’s face at the door, the cameras are also apparently capable of checking the cat for diseases and also to see if the cat has been neutered by trying to spot an ear tag. If a sick or non-neutered cat is discovered, the system will ping a nearby volunteer group to provide aid to the cat. Baidu also mentions in its blog post that many stray cats tend to not be neutered, meaning that they can just continue to mate and spawn more cats, worsening the living conditions of the cats overall.

After the cat enters the shelter, the door will shut behind it to prevent any other critters or stray dogs from entering. (The developers seem a little biased against stray dogs.) The cats themselves can venture onward to a living room of sorts.

The AI system is apparently capable of recognizing 174 different kinds of cats. The cameras also are equipped with night vision so that if any cats wander around at night, they can still enter or exit the shelters. The system can recognize four common kinds of cat disease, including stomatitis, skin disease, and external injuries.

AI is being used on animals more and more. There are examples of it being used in projects aimed at wildlife preservation and even in reuniting owners with lost pets. Most of these efforts are trials and experiments with the nascent technology.

One of the challenges of capturing the faces of animals with AI is to get them to point their faces to the camera. In Baidu’s case, however, it seems that the doors to the cat-sized shelters are small enough that the camera perched on top should be able to get a good view of the cat’s face.