During the summer, Tomomi Imura built a Node.js app which captured images from the Raspberry Pi camera module and used animal facial recognition to store them based on whether or not her pet cat was detected. The Pi uses a PIR sensor to detect movement. Read the complete write-up of how she did it.