Pattern Recognition based Anti Collision Device Optimized for Elephant-Train Confrontation
PATTERN RECOGNITION BASED ANTI COLLISION DEVICE OPTIMIZED FOR ELEPHANT-TRAIN CONFRONTATION RAJENDRA NATH DEKA1 & KANDARPA KUMAR SARMA2 1,2
Department of Electronics and Communication Engineering. Gauhati University, Guwahati-781014, Assam, India. E-mail:
[email protected], e-mail:
[email protected]
Abstract: Animal-human conflict is now one of the most burning issues. All over the world animals are losing their lives due to deforestation and other factors. One of the most significant factors is railway line. A huge number of animals are being faced accident on railways track. Among them elephants are the most common victims. Nowadays pattern recognition techniques have been used to design anti collision device. The primary objectives of the application of pattern recognition techniques are to provide a machine the ability to recognize an input, provide a decision and perform a process control in subsequence stages. A generic pattern recognition system requires an input, pre-processing, feature extraction, classifier and decision device. The system first needs to be trained and subsequently tested. The formulation of the decision device classification stage is critical. Among a range of classifiers the soft computational classifiers like Artificial Neural Network (ANN) s have the ability to perform non linear processing and map inputs to multi-class situations. This work focuses on the design of a traffic control system based on pattern recognition techniques with appropriate modifications for applications to minimize train- elephant conflicts.
multi-classes situations. This work focuses on the design of a traffic control system based on pattern recognition techniques with appropriate modifications for applications to minimize train-elephant conflicts. A few relevant literatures are [1]-[2].
I. INTRODUCTION Railway lines and highways have recorded to be major causes of wildlife mortality [21], threatening wildlife populations throughout the world. Railway lines cause direct loss of habitat, degradation of habitat quality, habitat fragmentation, and population isolation and reduced access to vital habitats. In India, too, a large number of wild species are killed annually due to railway lines and highways passing through wildlife habitat. The state of Assam along with Arunachal Pradesh, Manipur, Meghalaya, Mizoram, Nagaland and Tripura comprises the North-east India (between 21° 58' -28° N to 29° 27' N and 89° 42' to 97° 24' E) constitute a habitat where about a fifth of the known world population of the Asian elephant (Elephasmaximus) dwell. Forest department records show that Railway tracks are responsible for killing a number of wild animals in Assam. Available data shows that at least thirty-five elephants have lost their lives due to train hits in Assam between 1990 and 2006. Between 1990 and 2006, except for four years, at least one elephant was killed every year by speeding trains in Assam. There were also a few incidents, when elephants were hit by train, injured but survived. The objective of the work is to develop a system to mitigate the mortality rate of elephant in the identified region on railway tracks using pattern recognition technique. A generic pattern recognition system requires an input, pre-processing, a feature extraction, a classifier, and a decision device. The system first needs to be trained and subsequently tested. The formulation of the decision device classification stage is critical. Among a range of classifiers the soft computational classifiers like Artificial Neural Network (ANN) s have the ability to perform non linear processing and map inputs to
Figure 1: Generic pattern based process control system
II. PATTERN RECOGNITION TECHNIQUE The term pattern recognition encompasses a wide range of information processing problems of great practical significance, from speech recognition and the classification of handwritten characters, to fault detection in machinery medical diagnosis. Pattern recognition is a field within the area of machine learning [3]. Alternatively, it can be defined as the act of taking in raw data and performing an action based on the category of the data. As such it is a collection of methods for supervised or unsupervised learning. Pattern recognition aims to classify data (patterns) based on either a priori knowledge or on statistical information extracted from the patterns. The patterns to be classified are usually groups of measurements or observations, defining points in an appropriate multidimensional space. A generic pattern recognition system requires an input, pre-processing, a feature extraction, a classifier, and a decision device. The system first needs to be trained and subsequently tested. The
IRNet Transactions on Electrical and Electronics Engineering (ITEEE) ISSN 2319 – 2577, Vol-1, Iss-2, 2012 92
Pattern Recognition based Anti Collision Device Optimized for Elephant-Train Confrontation
formulation of the decision device classification stage is critical. Among a range of classifiers the soft computational classifiers like ANNs have the ability to perform non linear processing and map inputs to multi-classes situations. Pattern recognition system consists of two-stage process. A generic pattern recognition based on process control is shown in Figure-1. The first stage is feature extraction and the second stage is classification. Feature extraction is the measurement of population of entities that will be classified. This assists the classification stage by looking for features that allows fairly easy to distinguish between the different classes. Several different features have to be used for classification. The set of features that are used makes up a feature vector, which represents each member of the population. Then, pattern recognition system classifies each member of the population on the basis of information contained in the information vector [4]. Pattern recognition is the scientific discipline whose goal is the classification of objects into a number of classes or categories. Depending on the application, these objects can be images or signal waveforms or any other type of measurements that need to be classified [6].
The process logic is shown in Figure 2. The related technique is described below: Frame Differencing The system first analyses the images, being grabbed by the camera, for detection of any object of our interest. The image subtraction operator takes two images as input and produces as output a third image whose pixel values are simply those of the first image minus the corresponding pixel values from the second image. The subtraction of two images is performed straightforwardly in a single pass. The output pixel values are given by: Q(i , j) = P1(i , j) – P2(i , j) There are many challenges in developing a good frame differencing algorithm for object detection. First, it must be robust against changes in illumination. Second, it should able to detect the same object of interest (same animal), independent of sizes appear in the vision of the camera. Third, it should avoid detecting non-stationary background objects such as moving leaves, rain, snow, and shadows cast by moving objects [4]. The images obtained from the camera are pre-processed to eliminate unwanted disturbances. This included application of a thresholding operation followed by the use of iterative-morphological erosion operation. Direct subtraction method is found more accurate than prepossessing of images. In case of pre-processing some important data are found to be lost.
III. PROPOSED SYSTEM
IV. APPLICATION RANGE OF THE SYSTEM
In our work pattern recognition unit recognizes the pattern of elephant and other objects and provides decisions as ‘elephant’, ‘buffalo’ and ‘I cannot recognize’ respectively. Block diagram of pattern recognition unit is as shown in Figure 2.
The work is performed in two parts: 1. Experiment on different objects with different sizes and different backgrounds. 2. Experiment on same objects with different sizes. Some of images used in the experiments mentioned above of different backgrounds, objects, and subtraction are shown in Figure 3 to Figure 10. Figure 3 is a reference image and shows a simple background. We are resizing this frame to a 40×40 form to have a standard representation. We are considering that our object of interest appears on this frame. This image is subtracted repeatedly from the processed images with elephant, and other objects.
Figure 2: Process logic of pattern recognition unit
The design and implementation of the image recognition technique includes the following process: 1. Data gathering in form of images, 2. Pre-processing of images, 3. Design of an Artificial Neural Network (ANN), 4. Training the ANN and simulating it for different input images and 5. Testing and validation of the program and technique.
Figure 3: Normal background
IRNet Transactions on Electrical and Electronics Engineering (ITEEE) ISSN 2319 – 2577, Vol-1, Iss-2, 2012 93
Pattern Recognition based Anti Collision Device Optimized for Elephant-Train Confrontation
Figure 4 shows the histogram of first background given in Figure 3.
Figure 7: Object (elephant)
Figure 4: Histogram of Figure 3
Figure 8 gives the subtraction result of Figure 7 with Figure 3. In this subtraction process we get the remaining elements of the matrix formed by Figure 7. As a result, here we get only the object of interest. This image is converted to gray image from RGB. Then it is resized to a 1600×1 unit matrix. This unit matrix is taken for learning in ANN.
Background of reference images may be changed due to natural phenomena like darkness, rain and dust particles. So we are taking changed background (Figure 5) of reference image. Like Figure 3, we are resizing this frame to a 40×40 form and the entire events repeated. This image is also subtracted repeatedly from the processed images with elephant, and other objects.
Figure 8: Result of image subtraction on Figure 3 and Figure 7 Figure 5: Changed background
The Figure 9 is the image of elephant with the same background. It means that, all elements of the background are same with the image of Figure 3. But, it is now taken in broad daylight. This is because, as stated earlier, environment of the fixed frame may change frequently. One remarkable factor behind the change is intensity of day light. Within a day, we may have rain, storm, broad light etc. As a result, we will get change in elements of the frame and object. The processing part of this images same like earlier images.
Figure 6 is the histogram of changed background given in Figure 5.
Figure 6: Histogram of Figure 5
In the Figure 7, we see the object of interest. Here, it is an elephant. This is appearing on the first background shown in Figure 3. This frame is again resized to a 40×40 form for reasons as explained earlier. hh
Figure 9: Object, changed in illumination
Figure 10 shows the subtraction result of Figure 9 with Figure 3. This image is processed like other subtracted images and learned to ANN.
IRNet Transactions on Electrical and Electronics Engineering (ITEEE) ISSN 2319 – 2577, Vol-1, Iss-2, 2012 94
Pattern Recognition based Anti Collision Device Optimized for Elephant-Train Confrontation Learned images of other objects Conditions
16 a)
b)
c)
d) e)
Figure 10: Result of image subtraction on Figure 3 and 9
V. CONFIGURATION AND TRAINING OF THE ANN
f)
Some parameters used for experiments on same objects with different backgrounds are summarized in Table III.
All these processed images are applied to ANN for learning. These are images of elephant, tiger, buffalo, rhino etc. These images are then applied for learning through two layers of neurons. The first layer consists of 400 neurons and second layer consists of 5000 neurons. These two layers analysis the input images and divides them to two groups. These two groups are ‘elephant’ and ‘not an elephant’. We are using here, 1,000 epochs. But the system completes the learning within 82 epochs. Learning time is approximately 1 minute. We see that at 1000 epochs, training provides best MSE convergence, which makes it computationally efficient and reliable. The configuration parameters of the ANN are as shown in Table I.
Table III: Sample variation considerations Total no’s of 156 images Learned images 30 Learned images of 14 elephant Learned images of 16 other objects Conditions a) Elephant like animal as rhino, tiger, and buffalo are included. b) Three different backgrounds are taken. c) Very small, small, large and very large images are taken. d) Tilted images are taken. e) All inputs are divided into three classes as elephant, buffalo and I can’t recognize respectively.
Table I: ANN Parameters 1-input, 2-hidden, 1-output
No. of layers Size of input layer
400
Size of hidden layer
5000
Size of output layer Training method
2 (Class decision)
The observations are tabulated below (Table IV) for experiments with different objects with different sizes and different backgrounds.
Traingdx of Matlab NN tool box.
Maximum no. of epochs
1000
Goal reached
82
Table IV: Summary of results derived Backgr Same Changed Significan ound backgroun backgroun tly d d Changed backgroun d Size Sm No Sm No Sm No all rm all rm all rm al al al No. of 12 18 3 18 5 19 tested images Correct 1 17 1 17 1 18 detecti on % of 8 95 33 95 20 95 correct detecti on
MSE goal Data size
Elephant like animal as rhino and buffalo are included. Three different backgrounds are taken. Both small and large images are taken. Tilted images are taken. All inputs are divided into two classes. The classes are ‘elephant’ and ‘not an elephant’.
Training set 31
Av. No. of trials
10 per set
Av. Time taken for each goal Learning rate
60 seconds 0.023585 at epoch 82
VI. EXPERIMENTAL DETAILS AND RESULTS Some parameters used for experiments with different objects with different sizes and backgrounds are as shown in Table II. Table: II: Experimental sample details Total no’s of images Learned images Learned images of elephant
81 30 14
Bri ght
Da rk
No rm al 18
No rm al 6
17
4
95
66
Table IV gives the summary of the results derived from the experiment. For each background we are taking small and normal sizes of the object of interest.
IRNet Transactions on Electrical and Electronics Engineering (ITEEE) ISSN 2319 – 2577, Vol-1, Iss-2, 2012 95
Pattern Recognition based Anti Collision Device Optimized for Elephant-Train Confrontation
provide the related decision. This decision can be used subsequently for process control like slowing down of railway locomotive speed in a practical situation. It shall partially contribute towards the development of a pattern recognition based anti collision device to minimize elephant train collision. VII. CONCLUSION Here we proposed a pattern recognition based system to mitigate effects of elephant-train collision. The work in the present form may serve as a frame work for expanding it into a complete system as which can minimize the risk of elephant mortality rates on railway tracks.
Figure 11: Graphical representation of results of Table IV
In Figure 11, we see that performance of the system in case normal sizes object is excellent. It is working satisfactorily despite applying patterns with different backgrounds. But in case of darkness, the system fails to recognize properly the object of interest. To get proper result at night, we may require night vision camera and make appropriate changes in the system. The observation is tabulated in Table V, for experiment on same objects with different backgrounds.
REFERENCES [1]
[2] S. Raghuvanshi, M. Dharaskar and R. Raut. “Image Segmentation A State-Of-Art Survey for Prediction." International Conference on Advanced Computer Control, ICACC 2009. PP: 420 - 424, 2009.
Figure 12: Success rate derived from trials with varied backgrounds Table V: Success rate with size variations Very Item Small Large small No. of tested 5 50 51 images
[3]
Y. Bbar-Shalom and T. Foreman. “Research on NetworkLevel Tra±c Pattern Recognition." The IEEE 5th International Conference on Intelligent Transportation Systems. PP: 957 - 959, 2002.
[4]
Waquet and Philippe Ville d'Avray. “Anti-Collision Warning System for Marine Vehicle and Anti-Collision Analysis Method." Workshop on Visual Information Processing, Sydney. PP: 95 - 98, June 01, 2004.
[5]
P. Fieguth and D. Terzopoulos. “Video Based Effective Density Measurement for Wireless Traffic Control Application." International Conference on Emerging Technologies. ICET 2007. Indore; PP: 312 - 313, 2007.
[6]
A. Broumandnia and M .Fathy. “Realtime Surveillance of People and Their Activities." IEEE Trans. Patt. Analy. Mach. Intell; PP: 809 - 830, 2000.
[7]
Benjamin Coifman. “Background Modeling and Subtraction of Dynamic Scenes." In IEEE International Conference on Computer Vision (ICCV); PP: 1305 - 1312, 2003.
[8]
J. Zhong and S. Sclaroff. “Segmenting Foreground Objects from a Dynamic Textured Background via a Robust Kalman Filter." In IEEE International Conference on Computer Vision (ICCV). PP: 44 - 50, 2003. 58
[9]
Yas Abbas Alsultanny and Musbah M. Aqel. “Color Image Segmentation Based on 2D Symlet Wavelet Transform." Pattern Recognition Letters; PP: 3197 3203, 2003.
Very large 50
Correct detection
3
49
50
49
% of correct detection
60
98
98
98
S. K. Kadarla. “Object Tracking in Video Images Based on Image Segmentation and PatternMatching", National Institution of Technology, Rourkela; Dec. 2009.
[10] E. Caitlin and O'Connell-Rodwell. “Wavelet use for Image Classification." 15th International Conference on Process Control, Strbske Pleso; 2005.
From experimental results we see that the ANN based system takes certain time to train. For training we take 14 images of elephant. Another set of images of other animals are taken. A different set of 285 related animals are taken. At the end of the training the system recognizes the elephant and buffalo properly despite illumination and background variation. All images are normalized to 40×40 forms. The success of the system depends upon the level of training. The preprocessing and subsequent operations help the system to perform the requisite recognition and
[11] C. E. O. Connel-Rodwell, J. D. Wood and T. C. Rodwell. “Wild Elephant (Loxodonta Africana) Breeding Herds Respond to Artificially Transmitted Seismic Stimuli." Volume 59, Number 6 (2006), PP: 842 - 850. Prentice Hall; 2006. [12] K. Gupta and V. Anjali. “Image Coding Course." Lecture Notes; PP: 50 - 67, 2010. [13] N. Friedman and S. Russell. “Image Processing Toolbox Users Guide." The Mathworks, Inc., 3 Aplle Hill Drive, Natick; PP: 1760 - 2098, 5th ed. 2006.
IRNet Transactions on Electrical and Electronics Engineering (ITEEE) ISSN 2319 – 2577, Vol-1, Iss-2, 2012 96
Pattern Recognition based Anti Collision Device Optimized for Elephant-Train Confrontation [14] Y. Sheikh, O. Javed and Takeo Kanade. “Very Fast Template Matching." In European Conference on Computer Vision (ECCV); PP: 358 - 372, 2002.
Segmentation: Automated Learning From Examples." IEEE Transactions on Medical Image, vol. 19, No. 10; 2000. [19] S. Wang, and J. M. Siskind. “Image Segmentation with Ratio Cut." IEEE Transaction on Pattern Analysis and Machine Intelligence, vol. 25, No. 6; 2003.
[15] A. Voronin and Y. Mikeev. “Color Image Segmentation." in Proc. Int. Conf. Image Processing, Maastricht, The Netherlands; 1992.
[20] M. Tabb and N. Ahuja. “Multiscale Image Segmentation by Integrated Edge and Region Detection." IEEE Transactions on Image Processing, vol. 6, no. 5; 1997.
[16] Y. Shireen, M. Khaledand H. Sumaya. “Morphological Segmentation of Sport Scenes using Color Information." IEEE Transactions on Broadcasting; vol. 46, no. 3, 2000.
[21] M. p. Huiser and A. Kociolek. “Wildlife-Vehicle Collision and Crossing Mitigation Measures: a Toolbox for the Montana Department of Transportation”, Western Transportation Institute College of Engineering Montana State University, Helena, Montana; May 2007.
[17] B. Bhanu, S. Lee, and J. Ming. “Adaptive Image Segmentation using a Genetic Algorithm." IEEE Transactions on systems, Man, and Cybernetics; vol. 25, No. 12, 1995. [18] M. Brejl and M. Sonka. “Object Localization and Border Detection Criteria Design in Edge-based Image
IRNet Transactions on Electrical and Electronics Engineering (ITEEE) ISSN 2319 – 2577, Vol-1, Iss-2, 2012 97