Building a smarter surveillance system: real-time animal identification using deep learning

Summary

published: SPIE Optical Engineering + Applications, 2023, San Diego, California, United States

Capturing data on animal movements, especially for nocturnal animals, is a time-consuming and arduous task for biologists. They typically rely on trail cameras, and have to manually search through low-quality video feeds to locate the desired footage. Leveraging advancements in artificial intelligence and hardware devices, such as microcontrollers with cameras, can help address this issue. Everyday consumers can also use this technology in their home surveillance cameras. In this study, the automation of animal identification in real-time using a night vision camera with a simple microcontroller such as ESP32 is explored. A motion detection algorithm on the device creates a trigger on the camera, when motion is detected. The captured image is sent to an image classification model to identify the presence of an animal and its type. The image classification model is deployed in the cloud as a REST API service. Finally, the predictions are displayed on the LCD screen on the device. We constructed two deep learning models, MobileNetV2 and ResNet50 for image classification and evaluated their performance. To test their accuracy, we utilized a validation set of images for three distinct species and a smaller test set of images for each of these species. We experimented with various hyper-parameters, such as epochs and learning rate to determine the model with best performance. ResNet50 model with 50 epochs and a learning rate of .0001 produced the most satisfactory results for our objectives. We then deployed the model as a REST API service for animal detection.

Image Gallery