Drone Movement Detection Network Using Raspberry Pi
Drone Movement Detection Network Using Raspberry Pi
ISSN No:-2456-2165
Abstract:- This research paper proposes a system for employing star network topology with Raspberry Pi as
detecting drones that use Raspberry Pi as its primary the central hub. A dedicated machine, with the machine
computing platform and implements the SSD learning model running on it, accesses the video feeds
MobileNetv2 architecture. The proposed approach from raspberry pi and infers them in real-time. The
involves training a machine learning model using deep detection results are sent to the raspberry pi. Computer
learning and convolutional neural network algorithms. vision techniques are applied to the region of interest in
The SSD Mobilenetv2 architecture is proposed due to the video feeds to determine the drone's trajectory. The
its accuracy and optimal performance in real-time system includes physical and digital alerts comprising
object detection. The dataset includes images of alarm systems and SMS alerts so that authorities can be
numerous drones in various positions. The dataset has informed immediately whenever a drone is detected.
undergone image augmentations such as flipping,
blurring, granulation and grayscale conversion, at Keywords:- Drones, Raspberry Pi, SSD MobileNetv2, real-
random, before training. Multiple cameras, connected time detection, star network topology, trajectory,SMS alerts
over a network, are connected to a Raspberry Pi
I. INTRODUCTION
Drones have become increasingly popular in recent Depthwise convolution layer performs a 3x3 depthwise
years, due to their usability and numerous applications channel filtering operations. The Projection layer performs
suitable for variety of fields. Drones have been integrated reduction of the number of tensor channels and dimensions.
into various fields such as, agriculture [1], search and
rescue [2] operations, aerial photography, forest fire The MobileNetv2 is used as a base for the SSD
detection [3], smoke detection [4], delivery services and architecture.The Single Shot Detector (SSD) is used for
many more. Drones are capable of performing inspection detection and classification. The SSD architecture is built
and mapping of topology of various terrains [5], geological upon a MobileNetv2 base, but the fully connected layers of
surveys [6] more efficient than humans. They are used in MobileNetv2 are discarded. This enables the model to run
situations where human intervention is hazardous such as, on devices with low resources and perform at optimum
inspection of volcanoes, inspection of oil rigs and power speed[8]. The SSD performs object localization and
plants etc. However, drones also pose a significant threat. classification in a single task. The Non-Maximum
As they are small and compact, they can perform damaging Suppression (NMS) is performed by using the bounding
activities while being hidden. Drones can be used to fly box regression technique Multibox[9]. Multibox uses
over restricted areas such as airports and government Inceptive convolutional network[10]. The loss function of
buildings and may acquire sensitive information. They can Multibox is comprised of location loss and confidence loss.
capture videos and images without the consent and The Multibox Intersection over Union (IOU) uses priors as
acknowledgement. Drones can also be an application for prediction results and regresses them attempting for a
illegal surveillance and smuggling, which can cause closer ground truth bounding boxes, resulting in non-
irreparable damage to individuals, organizations and maximum suppression.
countries. Terrorists have been using drones for spying and
obtaining sensitive information, leaking confidential II. CREATING THE MODEL
information and attacking public places and military A. Dataset
bases.Machine learning algorithms have become robust and The dataset contains 4032 images of drones. Region of
can perform efficiently under critical conditions. interest in each image is annotated. The annotations are
TensorFlow is a framework used to train advanced machine saved in “.xml” format. The images and their respective
learning models. TensorFlow has an Object Detection API annotations are divided into three parts before applying
for training object detection and classification models. It dataaugmentation techniques. The train dataset contains
has various models pre-trained on different algorithms such 3024 images, the test dataset contains 806 images and the
as CenterNet,EfficientDet, SSD MobileNet, SSD Resnet, valid dataset contains 202 images. The training dataset is
Faster-RCNN and Mask-RCNN. TensorFlow models pre-processed by applying gaussian blur, grayscale
require less computational resources and can perform with conversion, flip and granulation at random. The image
speed and accuracy. Due to its requirement for fewer augmentations are also applied to test dataset. The accuracy
resources, devices like embedded hardware and single- and false positive rate greatly depend on the quality of the
board computers can make use of TensorFlow models. SSD data set. The data augmentation process ensures the
MobileNetv2 is such an architecture.The MobileNetv2 training data to be reliable and results in a model with
contains three convolutional layers[7]. The Expansion higher degree of accuracy and lower false positive rate
layer’s function is to expand the number of channels in the [11].
input tensors, before Depthwise convolution is applied. The
The video server uses RTSP protocol [12] for the subsequent frames differ. The shift in the centroid of
accessing the camera video feeds and FFMPEG protocol the contour in respective frames determines the drone
[13] for relaying the video feeds to the machine learning trajectory. The physical alarm systems are triggered by the
model. The dedicated machine runs an inference script, detection results. The SMS API sends an alert message
which uses multithreading and thread-pooling for the periodically to the users. The video feeds can be accessed
incoming video feeds. Each thread accesses the model remotely on the network through a flask application.
individually and sends the detection results, which
comprises of confidence scores, class names and bounding IV. RESULTS
boxes, to the raspberry pi. The detection results are given to
the trajectory determining system in the raspberry pi. The The output of the detection system is accessible
trajectory determining system creates its own region of through the application. The system was tested using three
interest based on the bounding boxes. These regions of cameras, a WIFI camera, a web camera and an USB
interest will undergo a motion detection algorithm [14], camera. The app displays the detection results of these
which involves applying the absolute difference between cameras in three cells. A fourth cell is used to display the
two subsequent video frames as a threshold mask to the trajectory and location information of the detected drone.
regions of interest. A binary version of the absolute The location information is based on the location of the
difference mask is used for detecting contours whenever camera.