Animal Detector System For Forest Monitoring Using OpenCV and Raspberry-Pi
Animal Detector System For Forest Monitoring Using OpenCV and Raspberry-Pi
https://doi.org/10.22214/ijraset.2022.47012
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue X Oct 2022- Available at www.ijraset.com
Abstract: Today, even without the help of technology, monitoring wildlife has become a challenging job. To address this
problem, we have developed a solution for animal classification cameras that can detect and store data of these animals in SD
card. The system can also be used to protect wildlife in zoos. The system is also able to identify new species. When a new species
is discovered, it stores its data in a separate database for further study. It is also possible to control the system remotely if there is
internet in the area.
The system uses Python-based code that includes pretrained classification models. We have used the pi camera to feed live
footage to the Raspberry Pi. It then uses the OpenCV module to segment the image into frames and compares the obtained
frames with the pretrained module and gives labels accordingly. The system and stored data can also be accessed through the
mobile application Rasp Controller and through computer using the software named VNC viewer. The system is also able to
move from one place to another and also as it is a part of whole system it is also remotely monitored.
Keywords: Raspberry-pi, OpenCV modules, Rasp Controller, VNC viewer
I. INTRODUCTION
Wildlife monitoring is very important these days as many animal species are threatened with extinction, some of which have already
disappeared. Therefore, it is necessary to keep records of wild animals. But keeping these records becomes a daunting task without
the help of technology. Traditional methods, such as setting up camera traps in the forest, manually clicking on photos, and then
classifying and tagging animals by looking at the images, require too much time and effort. Also, it is impossible for a person to
take pictures in the forest around the clock.
With modern techniques such as machine learning, we can classify animals based on images and videos taken by them. Information
can also be stored in the system.
Therefore, we developed an animal classification system in the project. Our devices are able to identify animals by capturing real-
time images of the animals and storing the data in a database.
We have used Python Idle of Raspbian OS, Raspbian OS Buster, OpenCV module, pretrained detection model and Raspberry Pi,
camera as hardware. The objectives of this work are aiming to classify animals using their images/ live video and store the
respective data to help forest monitoring process
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 477
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue X Oct 2022- Available at www.ijraset.com
This type of system is useful for monitoring wildlife and also contribute to wildlife conservation in zoos. It is also useful to maintain
safety of animals in zoos as well as domestic animals also, there are so many threats for the domestic animals such as attack by other
wild animals, person trying to steal them etc.
This paper is organized as follows: The section 2 discusses the literature survey. In section 3, Machine learning is discussed
followed by OPEN CV in section 4. Raspberry Pi module description is provided in section 5. The proposed system is discussed in
section 6 followed by methodology in section 7. Results are discussed in section 8. The paper is concluded in section 9.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 478
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue X Oct 2022- Available at www.ijraset.com
In summary, many researchers have proposed their work for animal monitoring and detection. Most of the work carried out in
literature focuses on controlling in a specific geographical area within a certain range. Our proposed system can be controlled
remotely from any place of the world using pitunnel that allows raspberry-pi to be controlled from any host or network. Some of the
machine learning algorithms used cannot work properly on raspberry-pi as they require high computing power but they are accurate,
they might take time to classify but the time varies from model to model. There are other models that require very less time but are
not accurate. So, to meet these both requirements i.e., computing power and the time required we are using ssd-Mobilenet v3.
V. RASPBERRY-PI
The Raspberry Pi is a cheap, small-sized computer but have low performance compared to laptops and desktops. Raspbian OS is the
official OS which is installed in this small computer. This small sized computer is able to perform all the operations that a computer
performs in a day-to-day life. Also, this computer can be used for machine learning, computer vision, real time applications and
many more. As it is compact in size it is possible to reduce the hardware in the robotics applications.
Raspberry Pi comes with ram size ranging from 512mb up to 8 GB depending upon the model of Raspberry pi. Raspberry pi has a
clock frequency/CPU speed which can ranges from 700MHz up to 1.2GHz again depending on the model of Raspberry pi. The
figure 1 shows the Raspberry Pi module.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 479
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue X Oct 2022- Available at www.ijraset.com
A. Algorithm
1) Taking Image/video as input from the pi-camera.
2) Converting input into necessary formats/frames which are required for OpenCV.
3) Comparing the obtained output after processing with the pretrained model.
4) Storing the information about the detected animal like time of occurrence, images etc in a separate folder.
5) Storing the information of undetected animals in a separate folder named as ‘New Animals’.
6) Displaying the obtained results after performing operations on the camera inputs using python code on the smartphone/ mobile
(using Rasp controller and VNC viewer).
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 480
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue X Oct 2022- Available at www.ijraset.com
B. Flowchart
VII. METHODOLOGY
A. Step 1: Set up Raspberry-pi
Set up the raspberry-pi using Raspberry pi imager software which is available on www.raspberrypi.com To set up Raspberry-pi a
SD-card of 16 GB or more than that storage capacity should be used for better performance. There are number of Raspberry-pi OS
are available install the required OS. The ‘Raspbian OS
Buster’ is used in our system.
Insert the micro-SD card in the pc (Format the SD card before using it for set up). Open Raspberry-pi imager and select the OS.
Select storage type as your inserted SD card. Click on the gear icon and make necessary settings there (if you are not using any
external monitor for set up). Click on the write button and OS will be installed on the SD card. Insert the SD card in Raspberry pi
and power on.
(Note: Need not to follow Step 2 if external monitor is connected to Raspberry-pi)
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 481
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue X Oct 2022- Available at www.ijraset.com
D. Step 4: Coding
Prepare a code for animal detection in such a way that it will process the image/video sent by camera. After processing the
processed image should compared with the pretrained model and if animal is detected the data should be stored accordingly and if
not, then its data should be stored separately.
The figure 4 shows the movable robot attached along with the system. So that, it can travel a particular distance. The purpose of this
robot is to study the wild animals closely so that the researchers can extract more information about that animal. The robot consists
of 2 DC motor, L293d motor driver ic and a robot chassis.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 482
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue X Oct 2022- Available at www.ijraset.com
REFERENCES
[1] S. Matuska, R. Hudec, M. Benco, P. Kamencay and M. Zachariasova, "A novel system for automatic detection and classification of animal," 2014
ELEKTRO, 2014, pp. 76-80, doi: 10.1109/ELEKTRO.2014.6847875.
[2] Priya Sharma, Sirisha C K, Soumya Gururaj, and Padmavathi C, “Neural Network Based Image Classification for Animal Intrusion Detection
System”, IJPRSE, vol. 1, no. 4, pp. 1–7, Jul. 2020.
[3] Morrow-Tesch J, Dailey JW, Jiang H. A video data base system for studying animal behavior. J Anim Sci. 1998 Oct;76(10):2605-8. doi:
10.2527/1998.76102605x. PMID: 9814900.
[4] D. P. Gibson, N. W. Campbell and B. T. Thomas, "Quadruped gait analysis using sparse motion information," Proceedings 2003 International Conference on
Image Processing (Cat. No.03CH37429), 2003, pp. III-333, doi: 10.1109/ICIP.2003.1247249.
[5] Burghardt, T. & Calic, Janko. (2006). “Analysing animal behaviour in wildlife videos using face detection and tracking”, Vision, Image and Signal
Processing, IEE Proceedings -. 153. 305 - 312. 10.1049/ip-vis:20050052.
[6] Zeppelzauer, M., “Automated detection of elephants in wildlife video”, J Image Video Proc 2013, 46 (2013). https://doi.org/10.1186/1687-5281-2013-46
[7] Prajna. P, Soujanya B.S, Mrs. Divya, “IoT-based Wild Animal Intrusion Detection System”, International Journal Of Engineering Research & Technology
(IJERT) ICRTT – 2018 (Volume 06 – Issue 15).
[8] Sk. Nayab Rasool and T. SR.CH.Murthy, “Wildlife Monitoring in Zoological Parks Using RASPBERRYPI and Machine Learning”, International Journal of
Recent Technology and Engineering (IJRTE), ISSN: 2277-3878, Volume-8, Issue-2S11, September 2019
[9] Depu Zhou, “Real-time Animal Detection System for Intelligent Vehicles”, Depu Zhou, Ottawa, Canada, 2014
[10] Sk. Almas Tabassum, B. Sri Vaishnavi, Dr. K. S. Sagar Reddy, “SMART CROP PROTECTION WITH IMAGE CAPTURE OVER IOT”, International
Journal of Research in Engineering, IT and Social Science, ISSN 2250-0588, Impact Factor: 6.565, Volume 09, Special Issue 2, May 2019.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 483