AI-powered cat flap stops cat bringing home prey

Does your cat bring home little presents?

If your furry friend has a tendency to catch rodents or birds and bring them home, you’ll admire the work of Amazon employee Ben Hamm, who has spent hours (and hours) training a machine-learning system to stop his ‘sweet, murderous’ cat Metric from coming in through the cat flap when carrying prey.

As tech news site The Verge reports, the system recognises when Metric is approaching with a small animal in his mouth, and locks him out of the house for 15 minutes.

Hamm unveiled his invention at a tech event in Seattle, where he gave an entertaining presentation explaining how the system works.

Developing it was a time-consuming process as Hamm had to supply more than 23,000 images, each of which had to be manually sorted to determine whether the cat was in view, whether he was coming or going, and if he was carrying prey. Hamm learned coding in order to build the machine-vision algorithms.

Cat looking through open cat flap

But this effort has paid off.  

Now, when Metric approaches the cat flap the system identifies whether he has caught anything. If he is carrying prey, the flap automatically locks for 15 minutes and Hamm is sent a text with pictures from the camera. The system also sends a small donation, or ‘blood money’ as Hamm calls it, to conservation group the National Audubon Society.

It’s not 100% accurate: over a five-week period, Metric was unfairly locked out once. The cat was also able to gain entry once out of the six times he had caught an animal.

When a software engineer suggested that it might have been easier to teach the cat to change his behaviour, Hamm defended his work, according to BBC News.

“Negative reinforcement doesn’t work for cats, and I’d challenge you to come up with a way to use rewards to prevent a behaviour that an animal exhibits once every 10 days at 3am!” he tweeted in response.

Watch Hamm’s five-minute presentation here.

Protect your own mischievous moggy with great value cat insurance from Purely Pets. Get a quote

What our customers say about us

icon-facebook icon-instagram icon-twitter