After our cats brought several mice (dead or alive) through the cat's flap, we decided to find a sustainable solution for that problem. My wife's suggestion to close the cat's flap forever would work of course, but it's uncool, and we'll have to open the door every few minutes when one of the cats wants to come in or out.
The much simpler (and a little more nerdy) solution is a camera, an image recognition software and a computer controlled cat flap that only opens if the cat comes without a mouse or any other hunting trophy. The idea is old, and about 10 years ago someone builds a cat tab called Flo control. Its configuration (camera from the side, backlight illumination) seems easy to analyze, but I doubt, if one can really recognize any mouse just by the silhouette. So our cat flap has an LED illumination next to the webcam and a blue screen in the background. The software will be developed in an open source project.