You are on page 1of 9

FYP Proposal

VISION BASED ANIMAL DETECTION CONVOLUTION NEURAL NETWORKS

Submitted by:
Student 1 RAHIM BAIG
AUIC-19FALL-BSCS-3501
Student 2 HABIBULLAH
AUIC-20FALL-BSCS-3984

Supervised by:
MUHAMMAD HASSAN ASHRAF

Final Year Project proposal submitted to the Department of Computing, Abasyn


University Islamabad Campus in partial fulfillment of the requirements for the degree of
Bachelor of Science in Computer Science (BSCS) or Bachelor of Science in Software
Engineering (BSSE).

Department of Computing
Abasyn University Islamabad Campus

Spring 2023

i
Table of Contents

1 Introduction..........................................................................................................1
2 Problem Statement ...............................................................................................1
3 Literature Review ................................................................................................2
4 Research Objectives.............................................................................................3
5 Significance of the Research ...............................................................................3
6 Research Methodology ........................................................................................4
6.1 Hardware Requirements: ...............................................................................4
6.2 Software Requirements: ................................................................................4
6.3 CONVOLUTIONAL NEURAL NETWORKS (CNN) ................................5
6.3.1 Conv2D: ..................................................................................................5
6.3.2 Convolutional Layer ...............................................................................5
6.3.3 Pooling ....................................................................................................5
6.3.4 Flattening.................................................................................................5
6.3.5 Fully Connected ......................................................................................5
6.4 Setup Raspberry pi: .......................................................................................5
6.5 Installation and Coding: ................................................................................6
7 Reference .............................................................................................................6
8 FYP Timeline.......................................................................................................7

ii
1 Introduction
Vision-based animal detection is an emerging field that involves the use of computer vision
algorithms to detect and recognize animals. It is an important area of research for many
applications, such as wildlife conservation, animal-vehicle collision, and agricultural monitoring.

The objective of this project is to develop an animal detection system that can detect animals in
three different scenarios: vehicle collision, farm monitoring, and private areas. In the case of
vehicle collision, the system will detect animals on or near roads and alert drivers to prevent
collisions.
In the private areas scenario, the system will detect animals that enter private property and alert
the property owners. This will help in maintaining security and safety on private premises.

Moreover, vision-based animal detection systems can also help to reduce human-wildlife
conflicts by providing early warning systems for farmers and ranchers, and by assisting in the
development of non-lethal wildlife management strategies.

The animal detection system will be developed using machine learning and computer vision
techniques. We will use deep learning models to train the system to detect different types of
animals, including livestock, wildlife, and pets. The system will be designed to work in real-
time, using cameras and sensors to detect animals and trigger alerts.
In conclusion, this project has a significant potential impact on animal welfare, public safety, and
security. It will contribute to reducing the number of vehicle collisions involving animals,
improving the management of farm animals, and enhancing security in private areas. This
problem must be attended immediately and an effective solution must be created and
accomplished. Thus, this project aims to address this problem

2 Problem Statement
Animal detection plays a crucial role in various fields, including agriculture, farming, and
wildlife management, to prevent potential economic losses and safety hazards caused by animal-
related incidents. Traditional methods of animal detection are time-consuming, labor-intensive,
and prone to errors, which necessitates the development of an accurate and efficient animal
detection system. The system must be capable of detecting and classifying different types of
animals, including wild and domesticated animals, and provide real-time alerts to farmers,
landowners, and wildlife officials to take prompt and effective action to prevent any potential
damage or harm. The system should also be cost-effective, easy to install and maintain, and
should not harm the animals or disrupt their natural habitats. Therefore, there is a need for an
efficient animal detection system that can accurately identify and classify animals and provide

1
real-time alerts, ultimately reducing human-wildlife conflicts and improving animal management
and conservation efforts.

3 Literature Review
There has been a significant amount of research and surveys conducted on animal detection,
especially in the context of wildlife conservation, Roadside animal detection, Camera trapping.

In [1] Butale et al. used CNN, XGBOOST and PSO as a classification algorithms. The result is
animal name and accuracy of detection. The result obtained training and validation accuracies of
98.1% and 91.4% using CNN, 100% and 89.19% using XGBoost , 48.72% and 91% using PSO
respectively. On test data CNN showed an accuracy of 87%, XGBoost showed an accuracy of
86% and PSO showed an accuracy of 60%.

[2].S Santhiya, M Surekha et al, proposed the method to protect the farmland by using raspberry
pi. They utilizes the RFID (Radio Frequency Identification) module and GSM (Global System
Mobile) modem for this purpose. It is inject in the animal skin, if the animals enter into the farm
land the RFID reader detect the animal and send the message to the forest officer and farmers
using GSM. And also the animals repellent to the forest by using irritation noise by speaker and
creating smoke by fogging machine. This method can be dangerous to the wild animals since the
injected tags can create infection. Also it is highly impossible to inject RFID tags to all the wild
animals in any forest area.

To mitigate the limitations of RCNN, authors present Fast-RCNN . Although, Fast-RCNN is fast
as compare to RCNN, but still not suitable for real-time applications. Because, handcrafted
features cause bottleneck in detection process. Moreover, it utilize VGG-16 model as a backbone
architecture that neglect multi-scale features. To overcome the limitation of RegionCNN and
Fast-RCNN , authors design another region proposal network based detector known as Faster-
RCNN . It utilize VGG-16 CNN model as a backbone architecture. And it fails to detect partially
occluded objects. So in authors proposed a scale-invariant Spatial Pyramid Pooling Networks
(SPPNet) for detection. Although, it achieve significant results, but it ignore intermediate layers
for model fine tuning and only fine-tuned on fully-connected layer.
The YOLO V2 utilize Darknet19 as a CNN backbone architecture, that neglect multi-level
features. YOLO V2 are also scale variant and object scales disturbed the detection
performance.[3]

In this paper, the proposed architecture can be implemented in a dashboard system or in roadside
units (RSUs). Stationary cameras are installed at the roadside; when a large animal enters their
field of view, the cameras detect the animal and notify upcoming vehicles through flashing signs
installed on the roadside.

2
The detection of road-faring animals by stationary or mobile cameras is a challenge due to
several undesirable factors. These factors are mainly related to the surrounding environment,
camera resolution, vehicle mobility, and the large intraclass variability between different types of
large animals.
Compared to human faces and heads, which are almost unique and standard, animal faces and
heads have greater variation in appearance. Moreover, the body of a large animal exhibits high
variability within the same class (e.g., moose), and between animals of different classes. This is
due to the fact that animals possess specific properties including texture, height, shape, and
different views (posterior, anterior, and lateral), that distinguish them from others.[4]

4 Research Objectives
Following are the main aims and objectives of our project:
1) To reduce the risk of accidents and improve human safety.
2) To improve animal welfare, reduce risks to humans and property, and enhance resource
efficiency and management in agricultural settings.

5 Significance of the Research


The primary goal of our project is to facilitate users get a quick warning message when the
animal is detected on road farm are any of private area. This system will Improved safety,
Enhanced animal welfare, Increased efficiency and Reduced property damage. For this approach
we will be using the Google-teachable-machine and Tensor Flow. Teachable Machine is a web-
based tool that makes creating machine learning models fast, easy, and accessible to everyone.

 Improved safety: Animal detection systems can significantly reduce the risk of animal-
vehicle collisions, which can cause significant damage to vehicles and result in human and
animal injuries or fatalities.

 Enhanced animal welfare: Animal detection systems also improve animal welfare by alerting
farmers or ranchers to the presence of animals in areas where they should not be, such as on
roads or in restricted areas.

 Increased efficiency: Animal detection systems can improve the efficiency of farming
operations by enabling farmers to monitor animal movements and behavior remotely.

 Reduced property damage: Animal detection systems reduce property damage on farms and
private areas by alerting owners to the presence of animals in areas where they should not
be. This can help prevent damage to crops, fencing, and other property.

3
6 Research Methodology
6.1 Hardware Requirements:
Raspberry pi
Raspberry Camera
Power Supply

6.2 Software Requirements:


Python
OpenCV
TensorFlow or other machine learning libraries for training and running object detection models

Our proposed system is comprised of three main modules: Animal detection and identification
(to detect the animal's presence and identify them), and GSM module (to send alert messages to
the authorized person).As mentioned in figure 1.
The workflow of Proposed Methodology:

FIGURE 1

4
6.3 CONVOLUTIONAL NEURAL NETWORKS (CNN)
6.3.1 Conv2D:
It is a convolution layer. This defines input shape and activation function.
Max pooling: Extracts the max value in pooling defining size of the pool.
Dense: This layer consists of maximum neurons compared to other layers.
Compile: It is used to define loss function and optimizer.
Image Generator: It is used to pre-process the images.
Classes: The labels are deduced for each set of images.

6.3.2 Convolutional Layer


Convolution conserves the association between pixels by learning image features by means of
small squares of input image data. In this mathematical operation, two inputs search as image
matrix and a filter is used. Convolutional [5] of an image data with various filters can do
operations like an edge detection, blur and sharpening of images.

6.3.3 Pooling
Pooling layer would lessen the number of parameters when a large image is given as input. Max
pooling is done by taking the largest element from the revised feature map.Then objective of
max pooling to down sample an input image, reducing its dimensions etc.

6.3.4 Flattening
Flattening[6] is the procedure for converting the two dimensional array set into a single, long
continuous linear vector, It receives the output from the convolutional layers, flattens its
structure to create a single long feature vector to be use the next layer for the final classification.

6.3.5 Fully Connected


The hidden layers inside a Convolutional Neural Network that are called as Fully Connected
Layer [7]. These are a specific type of hidden layer which must be used within the CNN. This is
used to combine the feature into more attributes that predict the outputs more accurately.

6.4 Setup Raspberry pi:


To set up a Raspberry Pi, we need:
A Raspberry Pi board
A microSD card (minimum 8GB)
A computer with an SD card reader
A USB keyboard and mouse

5
A power supply (5V/2.5A)

6.5 Installation and Coding:


 We Collect and prepare a dataset of animal images. The dataset should include images of
the animals we want to detect in various poses, lighting conditions, and backgrounds.
 Preprocess the dataset to ensure that the images are standardized in size, orientation, and
color. You can use Python libraries like OpenCV and Pillow for image preprocessing.
 Split the dataset into training, validation, and test sets. The training set will be used to
train the CNN, the validation set will be used to tune the hyper parameters, and the test
set will be used to evaluate the performance of the model.
 Train a CNN on the prepared dataset using a deep learning framework like TensorFlow
or PyTorch. We can use transfer learning by using pre-trained models like VGG16,
ResNet, or RCNN or Fast RCNN, or Hybrid-Net and fine-tuning them on your dataset.
 Once the CNN is trained, save the model weights and architecture to a file.
 Implement the detection system on Raspberry Pi by installing the required software
libraries, including TensorFlow or PyTorch, OpenCV, and NumPy.
 Capture live video from the Raspberry Pi camera or a USB camera.
 Preprocess the video frames by resizing, normalizing, and converting them to the input
format required by the CNN
 Load the trained CNN model onto the Raspberry Pi and use it to classify each video
frame as containing an animal or not.
 If an animal is detected, display a message or send alert message to the user.
 Optimize the performance of the system by tweaking the hyper parameters and
experimenting with different CNN architectures and pre-processing techniques.

7 Reference
[1]. Butale, S., M., Dongare, K., D., & Sawant, S., T. (2023). Detection and classification of
animal using Machine learning and Deep learning. International Research Journal of
Engineering and Technology, 10(01).
[2]. S. Santhiya, Y. Dhamodharan, N E. Kavi Priya, C S. Santhosh, & M.Surekha. (2018). A
SMART FARMLAND USING RASPBERRY PI CROP PREVENTION AND ANIMAL
INTRUSION DETECTION SYSTEM. International Research Journal of Engineering and

6
Technology, 05(03).
[3]. Vision-Based Animal Detection Using CNN To Mitigate Vehicle-Animal Collision. (2023)
[4]. Mammeri, A., Zhou, D., & Boukerche, A. (2019). Animal-Vehicle Collision Mitigation
System for Automated Vehicles. IEEE Transactions on Systems, Man, and Cybernetics: Systems.

[5]. Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., & Salakhutdinov, R. (2014). A
Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning
Research, 15, 1929–1958.
[6]. Torge, W. (2001) Geodesy (3rd edition). De Gruyter . ISBN 3-11-017072-8.
[7]. Iniyaa, K. K., Divya, J. K., Devdharshini,S., & Sangeethapriya, R., (2021). Crop
Protection from Animals Using Deep Learning. INTERNATIONAL JOURNAL OF
PROGRESSIVE RESEARCH IN SCIENCE AND ENGINEERING, 2(3).

8 FYP Timeline
Spring 2023 Fall 2023
Domain Study and Documentation
Design and Development

You might also like