1. Introduction
Collisions between trains and wildlife are a major problem in India. Indian Railway (IR) operates one of the largest rail networks in the world with approximately 65,000 km of track and 7500 stations. The extensive network of railways crosses a number of forests around the world. This results in many collisions between trains and wildlife species on the rail line. Collisions between trains and elephants account for a large percentage of all collisions.
Wild animals travel great distances across the landscape daily, seasonally, and annually in search of food, drinking water, habitat, and mates [
1]. Past agricultural expansion has most likely resulted in the loss and fragmentation of their native habitat. Transportation systems (railroads, roads, and wetlands) or so-called “linear infrastructure” impede the movement of wildlife populations in a growing industrialized world by fragmenting habitat, increasing boundary effects, constricting ecological corridors, impeding wildlife movement, and increasing mortality rates from direct collisions with motorized transport [
2].
Figure 1 shows collisions between trains and elephants in Assam in 2018 and Tamil Nadu in 2021. Not only elephants but other wildlife have been killed by trains around the world. From 1988 to 1990, an estimated 200 moose–train collisions were recorded in British Columbia, Canada [
3]. In 1980–1988, there were 266 collisions on the only 92-km railway track in Norway [
4]. In addition, there were 725 collisions in Alaska in 9 years [
5]. Kusta et al. [
6] reported 69 accidents involving deer due to train collisions in the Czech Republic.
Collisions between trains and elephants are not uncommon along the railway track in the northern part of West Bengal between the Alipureduar–Siliguri route [
9]. The Guwahati–Lumding line in Assam and Meghalaya [
10], the Thrissur–Coimbatore line in Kerala and Tamil Nadu [
11], and the Dehradun-Haridwar rail line in Uttrakhand [
12] are also accident-prone zones. According to [
13], a total of 186 elephants died from 2009–2010 to 2020–2021 due to running over trains on railway tracks. As shown in
Table 1, West Bengal and Assam continue to be the hotspots of collisions today. Even in May 2020, an elephant was dead after being hit by a goods train in the Giridih district of Jharkhand [
14]. According to the Indian government report, 45 elephants will be killed by trains between 2019 and 2021. In 2020, 16 elephants were killed by collisions with trains in India [
15].
To reduce elephant deaths from the train–elephant collisions, we need to slow down trains near the elephant corridor [
16]. To do this, we must alert train drivers to the presence of elephants near the rail line. Elephant monitoring and tracking is the only prominent solution to this problem. Continuous monitoring and tracking of elephants near the corridor require enormous computing capacity. The cloud is the only prominent solution to this problem. However, the major drawback of the cloud is latency. This latency is a common condition that has a significant impact on action times. The main backbone of the cloud is the data center. These data centers are geographically distributed across the globe [
17]. Deriving the network usage of the cloud is another major challenge. Fog computing plays an important role in applications with latency. The main objective of this research work is as follows (1) How does latency behave in fog computing compared to cloud computing environments? (2) To improve the network utilization of fog compared to the cloud. (3) Understanding the execution time in both environments. (4) Behaviour of the cost of the execution matrices.
The remaining part of the article is structured as follows. A brief literature survey has been recorded in
Section 2. Later, in
Section 3 the proposed system framework has been demonstrated with a proper pictorial representation of the work. Experimental results and comparative analysis has been highlighted in
Section 4.2. Finally, the conclusion statements and future directions of this study have been discussed in
Section 5.
2. Literature Review
A considerable number of research articles have been published on the topic of fog computing. CISCO first introduced fog Computing in 2014. Fog computing is an advanced version of cloud computing with the concept of processing data near the end devices. Cloud computing is one of the most emerging technologies in terms of service-oriented models [
18]. Durability, scalability, and cost efficiency are prominent aspects of the cloud. However, in addition to these admirable features, there are also some drawbacks associated with it. These include higher communication costs, higher energy consumption and longer response time [
19]. In this paper, the researchers have made a comparison between the fog and cloud computing paradigms and concluded that fog reduces the delay in processing. Fog node system software was deployed by Chang et al. [
20] on ARM 64bit architecture System on a Chip(SoC). Several applications such as smart parking systems, smart home monitoring, smart retail and delivery systems have been demonstrated and found to require low latency. Alrawais et al. [
21] explained various privacy and security aspects of IoT environments with fog computing. The study focused on certificate revocation information between IoT endpoints. Few studies focused on energy consumption in cloud environments [
22,
23].
A novel fog computing architecture called ’TelcoFog’ has been proposed by Villalta et al. [
24]. It is suitable for assimilated and ecosystem operators providing virtualized network functions (NVF), multi-access edge computing (MEC), and IoT services. Low latency is the main advantage of this architecture. An accident detection and emergency response system has been deployed by Dar et al. [
25]. They achieved better results on fog compared to the cloud. Dastjerdi et al. [
26] have presented a comprehensive study on fog computing that includes motivations, principles, architecture, and applications. In the article [
27], the researchers discussed the working principles of fog, the transmission of data between IoT devices, the characteristics of fog computing, various components used in fog, and various applications based on fog computing. Several studies have shown that the latency of the cloud-based system is much higher than that of the fog-based implementations of the system [
25,
28]. Fog computing reduces network traffic and provides support for scalability, an important feature of IoT frameworks [
26]. Network utilization is one of the most important parameters in fog computing environments for time-critical real-time applications. Network utilization must be minimized in a fog environment. Several studies have been conducted on monitoring systems with fog computing. Several studies have been conducted on monitoring systems with fog computing. Numerous studies have attempted to explain emergency efficiency for fog computing in the IoT environment [
29,
30].
Chen et al. [
31] presented a system for monitoring traffic speed using fog computing in urban areas. The objective of the study was not only to track the speed of vehicles but also to track multiple agents using a single-agent tracking algorithm. Gaocheng et al. [
32] proposed a fog-based public surveillance system. In that article, the problem of object tracking latency was addressed. This article addressed problems such as slow speed and unfulfilled results in the presence of large illumination variations. The study proposed a correlation filter-based tracker to solve the problem and deployed it in the fog computing environment. In the article [
33], the researchers proposed a monitoring system based on fog computing to reduce the general conflict in the public. The researchers used the geo-distribution of fog computing to maintain citizens’ security ethics and privacy requirements.
Data fusion and artificial intelligent-based a fog-assisted framework: FogSurv proposed by Munir et al. [
34]. The main objective of this paper was to provide situational awareness (SA) and rapid response to emergencies using airborne urban surveillance. The research found an improvement in latency of about 37% over the cloud architecture. Shing et al. [
35] proposed a cyber-physical system (CPS) for intelligent monitoring in the education sector. To achieve the goal of minimizing delay and reducing energy consumption. An OpticalFog node is proposed to be deployed in the middleware of the cloud to meet the requirements. Another study discovered a comparative analysis between cloud and fog in article [
36].
Fathy et al. [
37] proposed a weapon detection architecture based on fog computing and SDN using the YOLOv5 model. This study demonstrated how the YOLO model detects objects very fast. Fog computing-enabled smart city planning with a vehicle detection model is described in the article [
38]. A greedy algorithm-based intrusion detection was proposed using fog computing in an IoT environment [
39]. In article [
40], a fog computing-based surveillance system is proposed for crime and vulnerability detection. The researcher studied traffic surveillance using fog computing in the article [
41]. Some security-related studies were covered in articles [
42,
43,
44]. Intelligent security surveillance systems using fog computing suggested by the study [
45]. The study used PTZ control cameras for proper camera movements. This research considered audio along with the video in the proposed surveillance system using fog computing [
46].
Collectively, these studies provide important insights into the latency and network usage parameters in the fog computing domain.
3. The Proposed System Framework
Monitoring elephants next to the railroad tracks is one of the biggest challenges. Enormous computational resources are required to autonomously monitor an elephant near a railroad track, as shown by the fog-supported elephant corridor in
Figure 2. For continuous monitoring of elephants, intelligent cameras are generally used. In bad weather and night monitoring specialised infrared cameras are suitable options. New Flateye Cameras by Hanwha Techwin is a solution to this bad weather problem. New Flateye Cameras consist of 2 Megapixel QNE-6080RV(W) and 4 Megapixel QNE-7080RV(W) along with the application of a (3.2∼10 mm) × 3.1 electric varifocal lens allows viewing angles to be freely adjusted. In addition, the infrared (IR) light function features make the camera effective even at night time [
47]. Intelligent cameras are installed along the railroad tracks, recording video at 5-millisecond intervals and sending it to the server for processing. The processing takes place in the cloud and sends the result to the actuator. This allows the train driver to see the light and stop the train. However, the cloud-centric system is not latency sensitive. The cloud takes a measurable amount of time to respond. The cost is also higher compared to fog-enabled systems. Therefore, a fog-enabled system is proposed for elephant monitoring.
The system consists of a cloud server, a fog node, a proxy server, an intelligent camera (sensor), an actuator light, and a camera controller (microcontroller). The architecture consists of three layers. The first layer consists of smart cameras, and actuator lights—all things that are used along railroad tracks. The first layer is responsible for taking photos of elephants near the railroad tracks. Layer 1 also controls the camera through the camera controller module. Layer 2 contains fog nodes. The fog node is responsible for processing data. The elephant detector and elephant tracker modules are deployed in the fog node at layer 2. The elephant detector detects the elephant, and the elephant tracker calculates the coordinates of the elephant. A fog node is nothing more than a host in cloud computing. The top layer is layer 3, and this layer consists of a proxy server and a cloud. In
Figure 3, we can see that the proposed elephant monitoring architecture has been implemented with a fog-based scenario.Due to limited resources and huge establishment costs, this study was not physically implemented. The study is simulated by a globally accepted simulator iFogSim.
3.1. Workflow of the Designed Framework
Figure 4 shows the application model of the elephant monitoring system using the iFogSim simulator. The application model consists of
,
,
,
, and
modules. The motion detector extracts the moving part from the raw video and sends it to the next module
elephant detector. The
motion detector module is also integrated with the camera. The
elephant detector is used in the fog node. After receiving the data from the previous module, the elephant detector processes the data and detects the elephant using various object detection algorithms. It takes the data from the
motion detector and sends it to the
elephant tracker. The
elephant tracker module is also used on the fog node.
Elephant tracker receives the information from the previous module and continuously tracks the elephant using camera actuators. At the same time, a message is sent to the base station or forest office. The base station manager forwards the message to the train driver. As a result, the train driver can stop the train immediately.
For real-time object detection neural network-based models are used. You Only Look Once (YOLO) is one of the most prominent object detection models used for real-time detection (see
Section 3.2). This model requires a massive computation capability. Cameras are not sufficient to do so. Therefore, it is required to deploy this model at the nearest fog node unit.
Algorithm 1 describes a few simple steps for an object (elephant) detection process. Popular object detection algorithms are discussed in
Table 2.
Algorithm 1: Steps for Elephant Detection |
Input: Camera Stream Video Output: Detection of elephants from image - 1.
Initialization of the system - 2.
Image Acquisition - a.
Capture the image of elephant
- 3
Image segmentation - a.
Input the image in RGB format - b.
Convert RGB image in grayscale (black and white) image - c.
Apply effective threshold technique - d.
Image is ready for final segmentation
- 4.
Applying image enhancement techniques - a.
Noise removal process from image
- 5.
Elephant detection - a.
Extract the elephants from the image
|
Although
Table 2 describes a few models, this study considers YOLO using python OpenCV.
3.2. You Only Look Once (YOLO)
You Only Look Once is an advanced objection model which is known for object detection in real-time [
48]. It is a deep learning-based model. Generally, the YOLO model works fast, it can process nearly 45 frames per second. Fast YOLO can process up to 155 frames per second. Due to this high frame rate, it can also process videos with less than 25 ms of latency. In YOLO, a single convolution network simultaneously predicts many boundary boxes and then a classifier is applied to the boxes. After the classifications post-processing is applied to the boxes. Other R-CNN and its variations model used numerous steps to accomplish object detection. These models are comparatively slow due to their separate training components requiring training independently. Whereas, YOLO works on end-to-end architecture which simultaneously acts as the region-based proposal and classifications, thus making a faster outcome. The YOLO model is depicted in
Figure 5. The image has been divided into an
grid, and each cell is interested in predicting
(k is the set of classes) quantities, including the likelihood (confidence) that this cell is actually contained in a truthful bounding box, the height and width of the bounding box, it’s centre
, and the likelihood that an object in the bounding box belongs to the kth class (k-values). As a result, the output layer has
elements. Here, the network consists of 24 convolutional layers followed by 2 connected layers. Additionally, the
convolutional layer is used to reduce the feature space. It makes the final prediction using a probability map and boundary boxes with a confidence score. This study implements YOLO object detection using python OpenCV [
49].
Figure 6 illustrates the internal architecture of the fog node used for object detection. The fog node is responsible for storing data, deploying the learning model, scaling, and resource provisioning. The fog node also contains a learning knowledge base and resource manager.
In this study, the deep learning model YOLOv5 is used for training the data set. The customised data set contained 500 images of elephants. 100 elephant images were used for validation. The google collab platform is used to train this model. The model is trained with 100 epochs, and the batch size is 16.
Figure 7 illustrates the sample of elephant detection using YOLOv5 model.
3.3. Modules Used in Application Model
Motion detection: This module is connected to the intelligent camera. The camera captures the stream of pictures. The motion detection module extracts the moving element from this image and sends the data to the next module for further processing.
Elephant detection: This elephant detection module receives the data sent by the motion detection module. This module extracts the image of the elephant from the received data. This detection is done based on different image segmentation techniques. One of the detection techniques is explained in simple steps in the previous Algorithm 1. This module also computes the location of each elephant.
Table 2 shows some popular algorithms used for real-time detection.
Elephant tracker: The elephant tracking module receives information from the elephant detection module. This module calculates the optimal camera position based on the elephant’s last coordinate. This information is sent to the next camera control module.
Camera Control: The camera control module receives various parameters from the elephant tracker module and moves the camera according to these values.
Light Interface: Based on the presence of elephants, the elephant detection module sends the information to the light interface. This module controls the lighting installed next to the railroad tracks.
Table 3 represents the amount of data generated by the camera sensor after a 5-millisecond interval. That CPU length (Mill. Ins.) represents the number of instructions present on that data and tupleNWlength (Bytes) represents the size of data in Bytes. That is similar to the
Video Stream tuple type in
Table 4.
Figure 8 shows the data sequence diagram of the entire system. This figure contains cameras, including a sensor and an actuator, a fog node, a LED light base station, and a rail driver. In our simulation process, the camera is nothing more than a fog device. Within the device, two primary operations take place: (1) recording the raw video. (2) Detecting the motion video and uploading the video to the fog node.
Figure 8 consists of four nodes connected by communication links. After the task is placed in this fog node for processing, the fog nodes coordinate with each other. The result is reflected on the LED light and the elephant detection base camp/station.