0% found this document useful (0 votes)
201 views12 pages

A Practical Animal Detection and Collision Avoidance System Using Computer Vision Technique

This document summarizes a research paper that proposes a practical animal detection and collision avoidance system using computer vision techniques. The system is designed to detect animals on highways and alert drivers in time to prevent collisions. It was trained on over 2200 images and tested on highway video clips at varying vehicle speeds. The proposed method can alert drivers up to 35 km/h to allow enough time to react based on the two-second rule. It achieved an overall accuracy of 82.5% for animal detection. The system aims to address the growing problem of animal-vehicle collisions which is a major factor in many road accidents.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
201 views12 pages

A Practical Animal Detection and Collision Avoidance System Using Computer Vision Technique

This document summarizes a research paper that proposes a practical animal detection and collision avoidance system using computer vision techniques. The system is designed to detect animals on highways and alert drivers in time to prevent collisions. It was trained on over 2200 images and tested on highway video clips at varying vehicle speeds. The proposed method can alert drivers up to 35 km/h to allow enough time to react based on the two-second rule. It achieved an overall accuracy of 82.5% for animal detection. The system aims to address the growing problem of animal-vehicle collisions which is a major factor in many road accidents.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

SPECIAL SECTION ON INNOVATIONS IN ELECTRICAL AND COMPUTER ENGINEERING EDUCATION

Received September 27, 2016, accepted November 8, 2016, date of publication December 21, 2016,
date of current version February 25, 2017.
Digital Object Identifier 10.1109/ACCESS.2016.2642981

A Practical Animal Detection and Collision


Avoidance System Using Computer Vision
Technique
SACHIN UMESH SHARMA1 AND DHARMESH J. SHAH2
1 Department of Electronics and Communication, Gujarat Technological University, Ahmedabad 382424, India
2 Department of Electronics and Communication, Sankalchand Patel University, Visnagar 384315, India
Corresponding author: S. Sharma ([email protected])

ABSTRACT One serious problem that all the developed nations are facing today is death and injuries due to
road accidents. The collision of an animal with the vehicle on the highway is one such big issue, which leads
to such road accidents. In this paper, a simple and a low-cost approach for automatic animal detection on
highways for preventing animal-vehicle collision using computer vision techniques are proposed. A method
for finding the distance of the animal in real-world units from the camera mounted vehicle is also proposed.
The proposed system is trained on more than 2200 images consisting of positive and negatives images and
tested on various video clips of animals on highways with varying vehicle speed. As per the two-second rule,
our proposed method can alert the driver when the vehicle speed is up to 35 km/h. Beyond this speed, though
the animal gets detected correctly, the driver does not get enough time to prevent a collision. An overall
accuracy of almost 82.5% is achieved regarding detection using our proposed method.

INDEX TERMS Cascade classifier, computer vision, histogram of oriented gradient, haar, image processing,
intelligent vehicle system, OpenCV, road injuries.

I. INTRODUCTION Road accidents are increasing due to the increase in a num-


Today’s automobile design primarily depends on safety mea- ber of vehicles day by day and also the due to the absence of
sures, security tools and comfort mechanism. The approach any intelligent highway safety and alert system. According to
has facilitated the development of several intelligent vehicles data given in a study [7], the number of people who lost their
that rely on modern tools and technology for their perfor- lives in India due to road accidents was almost 0.11 million
mance. The safety of an automobile is the highest priority deaths in 2006, which was approximately 10% of the total
according to a recent report [1]. The report commissioned road accident deaths in the world.
by World Health Organization in its Global Status Study on According to the accident research study conducted by JP
Road Safety 2013, revealed that the leading cause of death Research India Pvt. Ltd. for the Ahmedabad-Gandhinagar
for young people (15-29 age) globally is due to road traffic region (cities of India), for the duration February 2014 to
collisions. Even though various countries have initiated and January 2015, total 206 road traffic accidents were recorded
taken steps to reduce road traffic collisions and accidents, the and these were influenced by three main factors i.e. human,
total number of crashes and traffic accidents remain as high as vehicle, infrastructure or a combination of them [8].
1.24 million per year [2]. Road traffic accidents and injuries The number in figure 1 is a percentage of the total number
are expected to rise by almost 65% by the end of 2020 [3]. of accidents surveyed. According to the record, human factor
Due to road accidents, every year 1 out of 20,000 persons lose influence on road traffic accidents was 92%, vehicle 9% and
their life and 12 out of 70,000 individuals face serious injuries infrastructure 45%. Out of total 45% (91 accidents) infras-
in India [4]. India is also known for the maximum number of tructure influenced traffic accidents, 6% (12 accidents) were
road accidents in the world [5]. According to the data given due to animals on the road whereas out of total 92% (171)
by National Crime Records Bureau (NCRB), India, there human factor influenced traffic accidents, 14% (24) were due
was almost 118,239 people who lost their life due to road to driver inattention and absence of any timely alert system
accidents in the year 2008 [6]. A major percentage of these for preventing the collision . Similar types of surveys were
road crashes and accidents involved car and other vehicles. conducted for the Mumbai-Pune expressway, and Coimbatore

2169-3536
2016 IEEE. Translations and content mining are permitted for academic research only.
VOLUME 5, 2017 Personal use is also permitted, but republication/redistribution requires IEEE permission. 347
See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

FIGURE 1. Influences on road traffic accidents [8].

by JP Research India Pvt. Ltd. and the conclusions hinted at All blobs, which stay after the operation are measured as
a significant percentage of road accidents resulting due to an the region of interest. Although this technique performs
object (animal) on the road, driver inattention, and absence of well in controlled areas, e.g. underwater videos, it does not
an intelligent highway safety alert system. work universally, especially road or highway side videos.
Researchers [13] used threshold segmentation approach for
II. EVIDENCES OF AN ANIMAL-VEHICLE COLLISION
getting the targeted animal’s details from the background.
According to the report given by the Society for Prevention Recent researches [14] also revealed that it ’s hard to
of Cruelty to Animals (SPCA), around 270 cattle had been decide the threshold value as the background changes often.
brought to their hospital-cum-animal-shelter in the year 2013, A method applicable to moving backgrounds (e.g., due to
most of whom were accident victims [27]. Below are some of camera motion) is presented in subsequent studies [15], [16].
the snapshot of the images with the sources which suggest The authors also state that other moving objects apart
that there are many challenges that the drivers are facing from the object of interest may be falsely detected as an
because of animals on the road. animal.
Researchers in [17] tried to discover an animal’s presence
in the scene (image) affecting the power spectrum of the
III. LITERATURE SURVEY picture. This method of animal detection was also consid-
Applications built on detection of animals play a very vital ered not appropriate since quicker results with this approach
role in providing solutions to various real-life problems [9]. would involve massive amount of image processing in a short
The base for most of the applications is the detection of period [18]. Researchers in [19] also used the face detector
animals in the video or image. technique initiated by Viola and Jones for a particular ani-
A recent study [10] shown that human beings have to take mal type. After the animal face is identified, the researchers
the final call while driving whether they can control their car track it over time. The problem with this technique is that
to prevent collision with a response time of 150ms or no. face detection requires animals to see into the camera not
The issue with the above approach is that human eyes get necessarily captured by the road travel video. Animals can
exhausted quickly and need rest, which is why this method arrive from a scene from various directions and in different
is not that effective. Some scientific researchers [11] have sizes, poses, and colors. Another method for animal detection
proposed a method that requires the animals to take a pose and tracking that uses texture descriptor based on SIFT and
towards the camera for the trigger, including face detection. matching it against a predefined library of animal textures
The problem with this technique is that face detection requires is proposed in [20]. The problem with this method is that
animals to see into the camera which is, not necessarily it is restricted to videos having single animal only and very
captured by the road travel video. Animals can arrive from minimal background clutter.
a scene from various directions and in different sizes, poses, In Saudi Arabia, the number of collisions between the
and color. camel and a vehicle was estimated to reach more than a hun-
Animals can be detected using the knowledge of their dred each year [21]. Authors in [21] implemented a deploy-
motion. The fundamental assumption here [12] is that the able Camel-Vehicle Accident Avoidance System (CVAAS)
default location is static and can simply be subtracted. and exploited two technologies GPS and GPRS to detect the
348 VOLUME 5, 2017
S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

camel position and then transmit that position to the CVAAS


server consequently. The CVAAS server checks the camel
position and decides to warn the drivers through activating the
warning system if the camel is in the danger zone. Authors
in [21] do mention that cost of deploying such CVAAS on
a great scale is too much. Also, the system suffers from
many false negatives due to dependency on many parame-
ters like a width of the dangerous zone, variation in camel
speed and delay in receiving SMS message. Authors in [22]
designed a system, which uses web cameras which are placed
in the detecting areas from where the animal can cross their
boundary. The videos are sent to the processing unit and then
uses image mining algorithm, which identifies the change in
FIGURE 2. Case 1 scenario [26].
set reference background. If there is a change in the newly
acquired image, then authors are applying content-based
retrieval algorithm (CBIR) to identify the animal. The pro-
posed method in [22] based on CBIR algorithm suffers from
many issues like unsatisfactory querying performance-CBIR
systems use distance functions to calculate the dissimilarity
between a search image and database images, low-quality
recovery results. This approach is very slow and response
times in the range of minutes may take place if the database
is enormous.
To find the accurate location of fishes in the marine,
researchers [23] aimed a technique using LIDAR (light detec-
tion and ranging). Some of the above-specified methods have
been discussed in [24] and [25] also.
FIGURE 3. Case 2 scenario [26].

IV. RESEARCH GAP AND CHALLENGES


V. DIFFERENT SCENARIOS AND CONSEQUENCES OF
• Though various practical solutions for automatic lane
ANIMAL-VEHICLE COLLISION ON HIGHWAY
detection and pedestrian detection on highways are
Animal-vehicle collision can be classified using two
available still research related to automatic animal detec-
ways [26]:
tion on highways is going on.
• Animal detection in wildlife (forest) videos or underwa- 1) Direct collision
ter videos (controlled areas) have been tried in past but 2) Indirect collision
the challenges are much more when detecting animals Direct collision: It happens when the vehicle directly hits
on highways (uncontrolled areas) as both animal as well the animal. Following cases and outcome may occur depend-
as a camera mounted vehicle is moving apart from other ing on the speed of the vehicle and the speed of the incoming
obstacles on the road which are also moving or station- or outgoing animal.
ary. There is no issue of speed (vehicle speed as well as Case 1: Vehicle hits the animal and animal gets thrown to
animal speed) and detecting distance of animal from the the side. This scenario may be less critical, but damages will
vehicle in wildlife videos which is crucial and critical in be there. Figure 2 shows the case 1 scenario.
animal detection on highways. Case 2: Vehicle hits the animal, and the animal jumps/
• The biggest challenge in detecting animals compared gets raised in the air and again gets back or falls back on the
to pedestrians or other objects is that animals come in windshield. This is quite critical and dangerous scenario and
various size, shape, pose, color and their behavior is also can cause the death of the animal or even the driver of the
not entirely predictable. Though the basic shape and size vehicle. Figure 3 shows the case 2 scenarios.
of a human being are pretty average and standard, the Case 3: Vehicle hits the animal and runs over the animal.
same is not true for animals. In this case, a particular injury will occur to the animal.
• Although various methods and approaches have been It may also happen that because of the impact of a collision,
used and are still in progress to detect, solve and reduce the vehicle may get overturn which can cause injury to the
the number of animal-vehicle collisions, the absence driver. Figure 4 shows the case 3 scenarios.
of any practical systems related to an animal-vehicle Indirect collision: In this case, an accident occurs because
collision on highways has delayed any substantial devel- of animal only but not directly. The driver of one vehicle finds
opment in the scenario [24]. an animal on the highway and tries to change the direction or

VOLUME 5, 2017 349


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

VII. SPECIFIC REASONS FOR ANIMAL (COW) DETECTION


According to the surveys and report given by the Society for
Prevention of Cruelty to Animals (SPCA) and [27]–[31], the
number of accidents on Indian roads has increased due to
increase in a number of vehicles day by day and also due to
the presence of animals on the road (mainly two animal’s dog
and cow). The collision of an animal with the vehicle on the
highway is one such big issue apart from other problems such
as over speed, abrupt lane change, and drunk-drive and others
which lead to such road accidents and injuries. The associated
number of fatalities and injuries are substantial too.
Specific reasons behind developing automatic cow
FIGURE 4. Case 3 scenario [26].
detection system in place of any other animal are:
• India is mainly an agriculture based country where 70%
of people depend on agriculture, and 98% of them
depend on cow based agriculture.
• The cow is a sacred animal in India and nobody wants
to hit a cow.
• Cow milk is the most useful and compatible with human
mother’s milk than any other animal or so.
• According to some surveys, cow’s milk and cow dung
have many medicinal benefits.
• Cows, as well as dogs, are found quite often than other
animals on the Indian roads.
• As cow is a large (heavy) sized animal, the collision
between a cow and vehicle will be very much severe.
FIGURE 5. Indirect collision scenario [26]. The collision between a small (less weight) sized animal
like dog and car won’t be that much severe.
The speed with which the vehicle is coming and hitting the
the lane and collides with the vehicle which is running animal also plays a critical role in deciding the impact of the
on the other lane. Figure 5 shows the indirect collision collision.
scenario.
In all the cases as discussed above, if the driver has some VIII. BRIEF OVERVIEW AND ADVANTAGES
automatic animal detection system in the vehicle, then it is OF HOG AND CASCADE CLASSIFIER
possible to some extent to prevent injuries and collisions A histogram of oriented gradients (HOG) is used in com-
between vehicle and animal. puter vision applications for detecting objects in a video
or image, which by definition is a feature descriptor [32].
VI. OBJECTIVES AND SCOPE OF WORK Figure 6(a) and 6(b) shows the block diagram and block
Intelligent highway safety and driver assistance systems are normalization scheme of HOG.
very helpful to reduce the number of accidents that are hap- As shown in figure 6(a), first the input image is given to
pening due to vehicle-animal collisions. On Indian roads, two color normalization block. Color normalization is used for
types of animals – the cow and the dog are found more often object recognition on color images when it is important to
than other animals on the road. The primary focus of the remove all intensity values from the picture while preserving
proposed work is for detection of animals on roads which can color values. After color normalization, the second step of
have the potential application of preventing an animal-vehicle calculation is the computation of the gradient values. The
collision on highways. Specific objectives of the research most common method is to apply the 1D centered point
work are: discrete derivative mask in both the horizontal and vertical
directions. Specifically, this method requires filtering the grey
• To develop a low-cost automatic animal detection
scale image with the following filter kernels:
system in context to Indian roads.
• Finding the approximate distance of animal from the
 
1
vehicle in which camera is mounted. DX = [−1 0 1] and DY =  0 
• To develop an alert system once the animal gets detected −1
on the road which may help the driver in applying brakes
or taking other necessary action for avoiding collision So, given an image I, we obtain the x and y derivatives using
between vehicle and animal. a convolution operation: IX = I∗ DX and IY = I∗ DY .

350 VOLUME 5, 2017


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

FIGURE 7. Boosted cascade classifier [33].

grids, represented by three parameters: the number of cells


per block, the number of pixels per cell, and the number
of channels per cell histogram. There are different methods
for block normalization. Let v be the non-normalized vector
containing all histograms in a given block, ||vk || be its k-norm
for k = 1, 2 and e be some small constant (whose value will
not influence the results). Then the normalization factor can
be one of the following:
v
L2-norm: f = q
kvk22 + e2
v
L1-norm: f =
kvk + e
r 1
v
L1-sqrt: f =
kvk1 + e
Finally, the image goes to cascade classifier for classification
FIGURE 6. (a) HOG algorithm [32]. (b) Block normalization scheme of of the object. HOG descriptor is mainly suitable for animal
HOG [32]. detection in video or images due to some key advantages
compared to other descriptors. First, it operates on local cells,
q so it is invariant to geometric and photometric transforma-
The magnitude of the gradient is given by |G| = IX2 + IY2 , tions. Secondly, coarse (spatial) sampling, fine orientation
and orientation of the gradient is given by θ = arctan (IY /IX ). sampling, and strong local photometric normalization allow
The next step of calculation involves creating the cell his- different body movement of animals to be overlooked if they
tograms. Each pixel within the cell casts a weighted vote for maintain a roughly upright position.
an orientation-based histogram channel based on the values Cascading is a concatenation of various classifiers (group
found in the gradient computation. The cells themselves are based learning). The technique involves taking all the data
rectangular, and the histogram channels are evenly spread collected from the output of the first classifier as a supple-
over 0 to 180 degrees or 0 to 360 degrees, depending on mentary data for the next classifier in the group [33]. The
whether the gradient is ‘‘unsigned’’ or ‘‘signed’’. As for the key advantages of boosted cascade classifiers over mono-
vote weight, pixel contribution can be the gradient magnitude lithic classifiers are that it is a fast learner and requires
itself, or the square root or square of the gradient magnitude. low computation time. Cascading also eliminates candidates
To account for changes in illumination and contrast, the (false positives) early on, so later stages don’t bother about
gradient strengths must be locally normalized, which requires them.
grouping the cells together into larger, spatially-connected As shown in figure 7, each filter rejects non-object win-
blocks which are the next step. The HOG descriptor is then dows and let object windows pass to the next layer of the
the vector of the components of the normalized cell his- cascade. A window is considered as an object if and only of
tograms from all of the block regions. These blocks typically all layers of the cascade classifies it as object [33]. The filter
overlap, meaning that each cell contributes more than once to i of the cascade is designed to
the final descriptor. • Reject the possibly large number of non-object windows
Two main block geometries exist: rectangular R-HOG • To allow possible large number of object windows for
blocks and circular C-HOG blocks. R-HOG blocks are square quick evaluation

VOLUME 5, 2017 351


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

FIGURE 8. Architecture of animal detection and collision avoidance


system.

IX. RESEARCH METHODOLOGY


As shown in figure 8, the video is taken from a forward-facing
optical sensor (camera) in which a moving animal is present
apart from other stationary and non-stationary objects. This
video is stored in the computer and converted into different
frames. Then we are doing pre-processing steps to enhance
the image. For feature extraction and learning of the system,
we are using a combination of HOG and boosted cascade
classifier for animal detection. All the image processing
techniques are implemented in OpenCV software. Once the
animal gets detected in the video, the next step is to find the
distance of the animal from the testing vehicle and then alert
the driver so that he can apply the brakes or perform any other
necessary action which is displayed on command prompt as
a message. Depending on the distance of the animal from the
camera mounted vehicle, three kinds of messages (indication)
are given to the driver i.e. animal very near, if animal is very
near to the vehicle, animal little far, if the animal is little far
from the vehicle and very far, if the animal is very far and at
a safe distance from the vehicle.

X. PROCEDURE FOR TRAINING AND TESTING


India has more than 20 varieties of cow found in different
states of India such as Gir, Sahiwal, Red Sindhi, Sahiwal,
FIGURE 9. (a) Positive samples. (b) Negative samples.
Kankrej, Dandi, and others. We have collected and added all
the varieties of a cow in the database for training the system.
Following is the proposed procedure for training and testing Train data and generating XML file. Table 1 shows the

of the data for animal detection: parameters used /set during training of the system
• Collect all positive and negative images in the data folder • Testing
(figure 9(a) and 9(b)) The average time it took to generate a cascade on Intel(R)
• Generate Annotation Core(TM) i5-2430M CPU 2.40GHz, 4GB RAM was almost
• Create sample i.e. generate .vec file 14 hours.

352 VOLUME 5, 2017


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

TABLE 1. Parameters set up during training of the system.

FIGURE 10. Distance calculation.

FIGURE 11. The same object kept at different positions (depth) from the
camera centre.

Note: The above method of distance calculation works well


with the flat ground surface. Suffers a bit if the ground surface
is not perfectly flat.

XII. CONVERSION FROM PIXELS TO METERS


There is some relationship between the depth of the object in
pixel and depth in real world units (meters) from the camera
mounted vehicle once the object (animal) gets detected in the
frame. As the depth of the object in meters from the camera
mounted vehicle increases (size of the object decreases), the
depth in pixels also increases and vice versa [34]. This hinted
us to find a relationship between the depth of the object in
pixels and meters. Once the camera position in the car and
height of the camera from the ground was fixed (camera
XI. DISTANCE CALCULATION OF THE DETECTED ANIMAL calibration done), we took different images of the same object
As shown in figure 10, the video is taken and converted into kept at various depths from the camera centre (figure 11).
frames (image of size 640 ∗ 480). Following is the procedure The depth of the object from the camera centre in meters was
for calculating the distance of the detected animal from the known to us.
camera-mounted vehicle: We then noted the corresponding depth of the object in
pixels. Table 2 represents the relation between pixels and
• Image resolution is 640 × 480 meters. Graph of depth in meters versus depth in pixels was
• X range is 0 to 640 plotted in Excel (figure 12) and the best fitting second order
• Y range is 0 to 480 polynomial equation is
Let the right bottom coordinate of the detected cow be (x, y).
y = 0.0323x 2 + 22.208x + 1.3132 (1)
Then the distance of cow from the lower edge (car/camera) is
480 – y. where y is the depth in pixels and x is depth in meters.

VOLUME 5, 2017 353


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

TABLE 2. Relationship between pixels and meters. TABLE 3. Actual depth versus calculated depth.

a robust database of almost 2200 images consisting of pos-


itive images in which the target animal is present and neg-
ative images in which there is no target animal for feature
FIGURE 12. Graph of depth (meters) versus depth (pixels).
extraction and for training the classifier. After the classifier is
trained and the detection system is built, we tested the same
on various videos.
Videos have been taken using a camera having a frame rate
of 30fps mounted on the testing vehicle. Hardware used in
our experiment is ASUS x53s, Intel(R) Core(TM) i5-2430M
CPU 2.40GHz, 4GB RAM. Software used is Microsoft Visual
Studio 10 Professional, OpenCV 2.4.3, 64 bit operating run-
ning under Windows 7.
Parameters which are necessary for checking the perfor-
mance of the test/classifier are Sensitivity (True Positive
Rate), Specificity (True Negative Rate) and Accuracy [37]
which are given as
Sensitivity = TP/(TP + FN) (2)
Specificity = TN/(TN + FP) (3)
FIGURE 13. Testing images (depth in meters was already known).
Accuracy = (TN + TP)/(TN + TP + FN + FP) (4)
Here in above equations, TN stands for true negative;
XIII. TESTING OF ACTUAL DISTANCE VERSUS TP stands for true positive; FN stands for false negative,
CALCULATED DISTANCE and FP stands for false positive. True positive (TP) and true
As shown in figure 13, we took two images of a cow in negative (TN) are the most relevant and correct parameters
which we knew the depth of the cow in meters from the of classification. False Positive indicates that the animal is
camera-mounted vehicle. We then calculated the depth using detected in the frame (video) even though the animal is
the technique as mentioned earlier. Table 3 shows the results absent in that particular frame at that given location. False
of actual depth and calculated depth. The error is very less Negative (FN) indicates that there is no animal present in
(less than 2 percent). the frame (video) even though the animal is present in that
particular frame.
XIV. EXPERIMENTS AND RESULT ANALYSIS In our implemented animal detection system, we took
We are using HOG descriptors which are feature descriptors 640 frames in which 105 frames are showing animal detected
and are used in computer vision and image processing for the i.e. rectangular box even though there is no animal present in
purpose of object detection [32]. For object classification, we those frame at those places. So, false positive in this case turns
are using boosted cascade classifiers. A good source for the out to be 105 and true negative turns out to be 535. Similarly
animal images is the KTH dataset [35] and NEC dataset [36] out of 640 frames, 125 frames are showing no animal detected
that included pictures of cows and other animals. Some more i.e. no rectangular box even though animals are present in that
animal images have been clicked (during different weather frame. So false negative turns out to be 125 and true positive
conditions i.e. morning, afternoon and evening) for creating turns out to be 515. Substituting the above parameter values

354 VOLUME 5, 2017


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

FIGURE 14. Camera mounted vehicle.

FIGURE 17. False negative case.

FIGURE 15. True positive case.

FIGURE 18. Animal detection at 0 kmph speed (morning condition).

the road. Figure 15 shows the true positive scenario wherein


in the video, animal (cow) is present and our proposed system
correctly detects it and gives an indication (box). Similarly,
figure 16 shows a false positive case wherein animal (cow)
is detected in the video by the system even though it is
absent in that particular frame at that given location. Figure 17
shows a false negative case wherein though the animal (cow)
FIGURE 16. False positive case. is present in the video; the system indicates absence (no
box) of the animal. Figure 18 shows animal detected in the
morning condition with the experimental camera mounted
in equation (2), (3) and (4), we get sensitivity close to 80.4%, vehicle stationary i.e. at 0 kmph speed. Figure 19 shows
specificity close to 83.5% and accuracy of the classifier close animal detected in the afternoon condition with the vehicle
to 82.5%. speed at 40 kmph. Figure 20 shows animal detected in the
Figure 14 shows the on-board camera with the processing evening state at a distance of 11 meters from the camera
and display system inside the car on the dashboard side. mounted testing vehicle with the vehicle moving at a speed
We performed extensive experiments and spent so many of 60 kmph. Figure 21 shows multiple animals detected in
hours testing the system in different weather conditions on one of the testing videos at a distance of 17 meters from

VOLUME 5, 2017 355


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

TABLE 4. Speed-distance relation.

FIGURE 19. Animal detection at 40 kmph (afternoon state).

TABLE 5. Set of tests by cascade classifier.

FIGURE 20. Animal detected at a distance of approximately 11 meters


from the camera mounted vehicle with the speed of 60 kmph in evening
time.

time and mechanical response time. As per the ‘‘two-second


rule’’ which is usually a rule of thumb suggests that a driver
should ideally stay at least two seconds behind any object that
is in front of the driver’s vehicle [40]. The two-second rule is
useful as it can be applied to any speed and provides a simple
and common-sense way of improving road safety. So if we go
with ‘‘two-second rule’’, clearly from Table 4 (speed-distance
relation as well as actual time (onboard) available for the
driver to responds), it indicates that when the speed of the
vehicle is between 30 to 35 kmph, the driver gets some time
to apply brakes and can avoid a collision. Anything above this
speed, though the alert signal is available the driver won’t be
able to avoid a collision.
FIGURE 21. Multiple animals detected in one of the testing video
(detecting distance of 17 meters). XV. COMPARISON OF HOG AND HAAR
Comparison of HOG with another popular feature descrip-
tor (HAAR) is shown in Table 5. ROC (receiver operating
the camera mounted vehicle. Training and testing on large characteristic) curve, which is a graphical plot that illus-
datasets will improve the detection rate and accuracy of the trates the performance of a classifier system as its dis-
classifier. crimination threshold is varied, is shown in figure 22
The average processing (computation) time with our pro- for the hog-cascade classifier, haar-cascade classifier. The
posed image processing method is 100ms (10 frames per curve is created by plotting the true positive rate (TPR)
second) which can be still be shortened using Nvidia’s CUDA against the false positive rate (FPR) at various thresh-
processor. According to the article [39], the term response old settings. Apparently, our method based on hog-cascade
time or brain reaction time of the drivers in traffic engineering classifier gives good results compared to haar-cascade
literature is composed of mental processing time, movement classifier.

356 VOLUME 5, 2017


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

Some means or method of increasing the detecting distance


of the animal from the camera mounted vehicle needs to be
done so that driver gets sufficient time for applying brakes
or take any other action for preventing the collision which
may be solved using high-end resolution cameras or radar.
No effort has been made to detect animals during the night,
which is expected to be done in our future scope of study and
research

ACKNOWLEDGMENT
The authors would like to thank all who were involved
directly or indirectly in the data collection, experiment con-
duction, and analysis stage of the project.
FIGURE 22. ROC curve.

REFERENCES
XVI. ACHIEVEMENTS WITH RESPECT TO OBJECTIVES
[1] NHTSA 2020 Report, accessed on Sep. 8, 2015. [Online].
• Algorithm developed is working properly and able to Available: http://www.nhtsa.gov/nhtsa/whatis/planning/2020Report/
detect an animal in different conditions on roads and 2020report.html
highways. [2] Global Status Report on Road Safety 2013. Executive Summary, World
• Estimation of animal distance from the testing vehicle is Health Org., Geneva, Switzerland, Oct. 2013.
[3] C. J. L. Murray and A. D. Lopez, ‘‘Alternative projections of mortality and
done. Maximum detecting distance of the animal from disability by cause 1990–2020: Global burden of disease study,’’ Lancet,
the camera mounted vehicle was found to be 20 meters. vol. 349, pp. 1498–1504, May 1997.
• Speed analysis (different speeds like 20, 30, 35, 40, 50, [4] Ministry of Home Affairs. Accidental Deaths & Suicides in India 2012,
Nat. Crime Records Bureau, New Delhi, India, Jun. 2013.
60 kmph) is implemented and tested.
[5] National Highways Authority of India. Information About Indian
• Alert signal to the driver is available. Road Network, accessed on Jun. 3, 2010. [Online]. Available:
http://www.nhai.org/roadnetwork.htm
XVII. CONCLUSION [6] J. Padmanaban, R. Rajaraman, G. Stadter, S. Narayan, and B. Ramesh,
‘‘Analysis of in-depth crash data on indian national highways and impact
An efficient automatic animal detection and a warning system of road design on crashes and injury severity,’’ in Proc. 4th Int. Conf.
can help drivers in reducing the number of collisions occur- ESAR ‘Expert Symp. Accident Res.’, Hanover, Germany, Sep. 2010,
ring between the animal and the vehicle on roads and high- pp. 170–183.
[7] Ministry of Home Affairs. Accidental Deaths & Suicides in India 2006,
ways. In this paper, we discussed the necessity of automatic Nat. Crime Records Bureau, New Delhi, India, Jun. 2007.
animal detection system and our algorithm for animal detec- [8] Accident Research Study on the Ahmedabad–Gandhinagar Highway for
tion based on HOG and cascade classifier. The algorithm the Duration February 2014 to January 2015, JP Res. India Pvt Ltd.,
Mar. 2015.
can detect an animal in different conditions on highways.
[9] S. Sharma and D. J. Shah, ‘‘A brief overview on different animal detec-
The proposed system achieves an accuracy of almost 82.5 % tion method,’’ Signal Image Process., Int. J., vol. 4, no. 3, pp. 77–81,
regarding animal (cow) detection. Estimation of approximate Jun. 2013.
animal distance from the testing vehicle is also done. Though [10] M. Fabre-Thorpe, A. Delorme, C. Marlot, and S. Thorpe, ‘‘A limit to the
speed of processing in ultra-rapid visual categorization of novel natural
the proposed work has been focused on automatic animal scenes,’’ J. Cognit. Neurosci., vol. 13, no. 2, pp. 171–180, Mar. 2001.
detection in context to Indian highways, it will work in other [11] T. Burghardt and J. Calic, ‘‘Analysing animal behaviour in wildlife videos
countries also. The proposed method can easily be extended using face detection and tracking,’’ IEE Proc.-Vis., Image Signal Process.,
vol. 153, no. 8, pp. 305–312, Jun. 2006.
for detection of other animals too after proper training and
[12] D. Walther, D. Edgington, and C. Koch, ‘‘Detection and tracking of
testing. The proposed system can be used with other avail- objects in underwater video,’’ in Proc. IEEE Comput. Soc. Conf. Comput.
able, efficient pedestrian and vehicle detection systems and Vis. Pattern Recognit. (CVPR), Washington, DC, USA, Jun./Jul. 2004,
pp. 544–549.
can be offered as a complete solution (package) for preventing
[13] J. C. Nascimento and J. S. Marques, ‘‘Performance evaluation of object
collisions and loss of human life on highways. detection algorithms for video surveillance,’’ IEEE Trans. Multimedia,
vol. 8, no. 4, pp. 761–774, Aug. 2006.
XVIII. LIMITATIONS AND FUTURE SCOPE [14] N. Kawasaki, ‘‘Parametric study of thermal and chemical non equilibrium
nozzle flow,’’ M.S. thesis, Dept. Electron. Eng., Osaka Univ., Osaka,
Though our proposed system can detect the animals (cow) Japan, 1993.
on roads and highways as well as gives alert to the driver, [15] S. L. Hannuna, N. W. Campbell, and D. P. Gibson, ‘‘Identifying
it has some limitations too. The proposed system can detect quadruped gait in wildlife video,’’ in Proc. IEEE Int. Conf. Image Pro-
cess. (ICIP), Genoa, Italy, Sep. 2005, pp. 713–716.
animal up to a distance of 20 meters only when a vehicle
[16] D. P. Gibson, N. W. Campbell, and B. T. Thomas, ‘‘Quadruped gait
is stationary. The system can prevent collision of the vehi- analysis using sparse motion information,’’ in Proc. Int. Conf. Image
cle with the animal when driving at a speed in between Process. (ICIP), New York, NY, USA, Sep. 2003, pp. 333–336.
30 to 35 kmph. Beyond this speed, though animal gets [17] H. Ragheb, S. Velastin, P. Remagnino, and T. Ellis, ‘‘Human action
recognition using robust power spectrum features,’’ in Proc. 15th Int.
detected time is not sufficient to prevent animal-vehicle Conf. Image Process. (ICIPO), San Diego, CA, USA, Oct. 2008,
collision. pp. 753–756.

VOLUME 5, 2017 357


S. U. Sharma, D. J. Shah: Practical Animal Detection and Collision Avoidance System

[18] F. A. Wichmann, J. Drewes, P. Rosas, and K. R. Gegenfurtner, ‘‘Animal [34] A. Rahman, A. Salam, M. Islam, and P. Sarker, ‘‘An image based approach
detection in natural scenes: Critical features revisited,’’ J. Vis., vol. 10, to compute object distance,’’ Int. J. Comput. Intell. Syst., vol. 1, no. 4,
no. 6, pp. 1–27, 2010. pp. 304–312, 2008.
[19] P. Viola and M. J. Jones, ‘‘Robust real-time face detection,’’ Int. J. [35] KTH Animal Datasets, accessed on Jun. 18, 2013. [Online]. Available:
Comput. Vis., vol. 57, no. 2, pp. 137–154, 2004. http://www.csc.kth.se/~heydarma/Datasets.html
[20] D. Ramanan, D. A. Forsyth, and K. Barnard, ‘‘Building models of animals [36] NEC Animal Datasets, accessed on Jun. 18, 2013. [Online]. Available:
from video,’’ IEEE Trans. Pattern Anal. Mach. Intell., vol. 28, no. 8, http://ml.nec-labs.com/download/data/videoembed
pp. 1319–1334, Aug. 2006. [37] N. Gupta, A. Rawal, V. L. Narasimhan, and S. Shivani, ‘‘Accuracy, sen-
[21] M. S. Zahrani, K. Ragab, and A. U. Haque, ‘‘Design of GPS-based system sitivity and specificity measurement of various classification techniques
to avoid camel-vehicle collisions: A review,’’ Asian J. Appl. Sci., vol. 4, on healthcare data,’’ IOSR J. Comput. Eng., vol. 11, no. 5, pp. 70–73,
no. 4, pp. 362–377, 2011. May/Jun. 2013.
[22] S. Shaikh, M. Jadhav, N. Nehe, and U. Verma, ‘‘Automatic animal [38] G. Singh, ‘‘Draught animal energy research in India,’’ in Proc. Animal
detection and warning system,’’ Int. J. Adv. Found. Res. Comput., vol. 2, Traction Netw. Eastern Southern Africa (ATNESA), 1999, pp. 315–322.
pp. 405–410, Jan. 2015. [39] Car Accidents and Brain Reaction Time Accidents, accessed on
[23] V. Mitra, C.-J. Wang, and G. Edwards, ‘‘Neural network for LIDAR May 5, 2016. [Online]. Available: http://www.chaikinandsherman.com/
detection of fish,’’ in Proc. Neural Netw. Int. Joint Conf., Jul. 2003, Car-Accidents/Brain-Reaction-Time-Accidents.aspx
pp. 1001–1006. [40] Information on Safe Following Distances Between Vehicles, accessed
[24] S. Sharma and D. Shah, ‘‘Real-Time automatic obstacle detection and on May 5, 2016. [Online]. Available: https://www.qld.gov.au/
alert system for driver assistance on Indian roads,’’ Indonesian J. Elect. transport/safety/rules/road/distances
Eng. Comput. Sci., vol. 1, no. 3, pp. 635–646, Mar. 2016.
[25] M. Zeppelzauer, ‘‘Automated detection of elephants in wildlife video,’’
EURASIP J. Image Video Process., vol. 46, p. 46, Aug. 2013,
doi: 10.1186/1687-5281-2013-46.
[26] Cattle—The Real Menace on Indian Highways, accessed on Feb. 3, 2016.
[Online]. Available: http://www.team-bhp.com/forum/street-
SACHIN UMESH SHARMA (M’12) was an Assistant Professor with the
experiences/144117-cattle-real-menace-indian-highways.html Electronics and Communication Department at various engineering col-
[27] Stray Cattle Continues to Cause Accidents on Roads, accessed on leges affiliated with GTU, Ahmedabad, India. He has over nine years of
Feb. 2, 2016. [Online]. Available: http://timesofindia.indiatimes. experience in academics, research, and industry. He has written books on
com/city/chennai/Stray-cattle-continues-to-cause-accidents-on-roads/ ABS implementation using fuzzy logic based controller and fundamentals of
articleshow/46090369.cms image processing. He has also authored numerous articles related to image
[28] Stray Animal Menace Turns Deadly on City Roads, accessed on processing, digital signal processing, and intelligent transportation systems.
Feb. 3, 2016. [Online]. Available: http://www.newindianexpress.com/ He received the Rashtriya Vidya Gaurav Puraskar from the Indian Solidarity
states/odisha/article596072.ece Council for doing excellent work in research and education. He is an active
[29] Safe and Responsible Driving, accessed on Feb. 3, 2016. [Online]. member of several professional societies, including ISTE and SAE.
Available: http://www.chandigarhtrafficpolice.org/situation.php
[30] Road Accidents Involving Stray Dogs, Cattle on the Rise, accessed
on Feb. 3, 2016. [Online]. Available: http://www.thehindu.com/
news/cities/Hyderabad/road-accidents-involving-stray-dogs-cattle-on-
the-rise/article5398380.ece
[31] Road Accidents, Many Caused by Stray Animals, Take a Toll on the
Economy, accessed on Feb. 3, 2016. [Online]. Available: http://www. DHARMESH J. SHAH (M’02) is currently a Provost with Sankalchand
arrivesafe.org/road-accidents-many-caused-by-stray-animals-take-a-toll- Patel University, Visnagar, India. He has over 17 years of experience in
on-the-economy academics, research, and industry. He has written a book on fundamentals
[32] N. Dalal and B. Triggs, ‘‘Histograms of oriented gradients for human of image processing for the final year engineering students. He has also
detection,’’ in Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern authored numerous articles related to VLSI, digital signal processing, and
Recognit. (CVPR), New York, NY, USA, Jun. 2005, pp. 63–69. image processing. He is an active member of several professional societies,
[33] P. Viola and M. Jones, ‘‘Rapid object detection using a boosted cascade
including IETE and ISTE.
of simple features,’’ in Proc. Comput. Vis. Pattern Recognit., Dec. 2001,
pp. I-511–I-518.

358 VOLUME 5, 2017

You might also like