Artificial Neural Networks Based Red Palm Weevil ( Rynchophorus Ferrugineous, Olivier ) Recognition System

: Problem statement: The most dangerous insect for the existence of palm trees in entire world is Red Palm Weevil (scientifically named as Rynchophorus Ferrugineous, Oliveir ). The proposed research is conducted to develop an identification system for Automated Wireless Red Palm Weevil Detection and exterminated. The core idea of the proposed research is to develop software that can utilize image processing and Artificial neural network techniques to identify Red Palm Weevil and distinguishes it from other insects found in palm trees habitat. Approach: Images are taken and processed with image processing techniques. Afterwards, Artificial neural network is used to recognize the presence of Red Palm Weevil in an image. Two different feed-forward supervised learning algorithms of Artificial neural network are used i.e., scaled conjugate gradient and Conjugate Gradient with Powell/Beale Restarts Algorithms. Different Artificial neural network sizes are tested using both algorithms and are compared to find an optimal algorithm and network. The training, verification and testing of the Artificial neural network is accomplished by using a database of 319 images of Red Palm Weevil and 93 images of other insects which are usually found around palm trees. Images are randomly selected from database for training, verification and testing with a fixed percentage of 80, 10 and 10 respectively. Training for every selected set of configuration is repeated 10 times. Results: The best results for scaled conjugate gradient Algorithm is obtained by three layers ANN consuming 221 sec and 167 Epochs while its average success in identification of Red Palm Weevil and other insect is 99 and 93% respectively. On the other hand, best performance of Conjugate Gradient with Powell/Beale Restarts Algorithm is observed by using three layers ANN which consumed 183 sec and 109 Epochs for training while its average success in identification of Red Palm Weevil and other insect is 99.5 and 93.5% respectively. Conclusion: It is gleaned out that 3-layers Artificial neural network using Conjugate Gradient with Powell/Beale Restarts Algorithm for feed-forward supervised learning is optimal for identification of Red Palm Weevil.

inside the trunk of palm tree for several generations till the infested tree is hollow from inside and dead. Thus, it is difficult to be traced from the outside of the tree. Afterwards, RPW emerges from dead tree and targets the neighboring palm trees.
Mostly, the existence of the RPW is traced at later stages when tree is significantly damaged and cannot be saved. Thus, infested palm trees are needed to be exterminated to prevent spread out of RPW and save neighboring palm trees. Integrated Pest Management (IPM) is reported to be the most successful method to control and manage RPW (Abraham et al., 1989). The essential component of IPM are: early stage detection of RPW and its treatment, RPW trapping, eradication of infested palm trees, proper cutting of fronds, cuts and infections treatment in palm trees, training and educating farmers and agriculture related personnel (Faleiro, 2006).
The early detection of RPW attack plays a pivotal role in success of IPM and is accomplished by observing symptoms explained in . These symptoms are checked by the regular survey of the field staff. The field staff may use visual techniques , Digital Signal Processing techniques (Al-Manie and Alkanhal, 2005), Endoscope technique (Hamad and El-Faith, 2004), odor technique (Nakash et al., 2000), to detect the presence of RPW. It is pragmatic after analyzing the above techniques that they are time consuming, laborious and field staff's skills dependant. However, an important component of IPM is RPW trapping which is reported to have higher success rate and lower dependency on field staff's skills. These traps need to be distributed in the entire farm and surveyed regularly. The other useful aspect of using traps is to know the scale of RPW spread in the area and take appropriate decisions accordingly.
Traps are used in different designs in different parts of the world such as upright bucket trap (Faleiro, 2006), inverted bucket trap (Faleiro, 2006;Faleiro et al., 1998), fabricated plastic trap (Faleiro, 2006). The core concept of the design of the trap is to have a closed rough exterior container, having holes on the sides as shown in Fig. 2, to keep the bait which consists of insecticide, pheromone and food for RPW. The holes on the container serve the purpose of entrance for RPW while the rough exterior makes it similar in appearance to the natural environment. Their inspection and maintenance is a laborious task but requires low skilled field staff. The recommended trap density is 1 trap/ha to 2 traps/ha (Faleiro, 2006;Soroker et al., 2005).
With the advancement in the technology, this laborious task of inspection and maintenance can be replaced by an automated system where field staff does not visit each trap for inspection. One possible way to achieve the automation of this process is by incorporating wireless image sensor network into the traps. The automated system may perform the task of taking the images and analyzing the presence of RPW in traps. Different traps communicate with each other using wireless sensor network and provide the collected information to the decision maker. Use of wireless sensor network is already established in the field of Agriculture (Burrell et al., 2004), poultry (Murad et al., 2009), industry (Jan et al., 2010. Some automated systems for identification and recognition of different insects were found in literature, such as Automated Bee Identification System (ABIS) by Arbuckle et al. (2001) for identification of Bees; Digital Automated Identification System (DAISY) by Watson et al (2004) for identification of Ophioninae; Automated Insect Identification through Concatenated Histograms of Local Appearance System (AIICHLA) by Larios et al. (2007) for identification of Stonefly larvae; Species Identification Automated and Web Accessible System (SPIWA) by Do et al. (1999) for identification of Spiders); a software system developed by Al-Saqer et al. (2010) for identification of Pecan Weevil. First step for the development of Wireless Automated System for Red Palm Weevil Detection and Control is to develop a recognition system for RPW. In (Al-Saqer and Hassan, 2011), an algorithm was proposed to identify RPW based on digital image processing techniques. The aim of this research is to introduce an alternative approach that would outperform the previous system in terms of efficiency and time consumption.
Artificial Neural Network (ANN) is a well known technique for object recognition applications. This technique is used in many applications such as Species Identification Automated and Web Accessible System (SPIWA) proposed by Do et al. (1999) for identification of Spiders, Automatic Algae Identification System (AAIS) proposed by Balfoort et al. (1991) for identification of algae (1991), Pollen Identification and Classification System (PICS) proposed by France et al. (2000) for identification of Pollen, Face Recognition System proposed by Lin et al. (1997) for identification of Face (1997), Human Classification System proposed by Gutta et al. (2000) for identification of gender, ethnicity and Human face pose.
The aim of this research is to develop software based on ANN and image processing techniques that can be used to recognize RPW. This system should also be able to distinguish RPW from other insects which are normally found in habitat of palm tree. This system needs to be efficient in results and fast in processing response.

MATERIALS AND METHODS
For object recognition, Artificial Neural Network (ANN) is considered to be performing efficiently as compared to other techniques in most of the scenarios.
Artificial neural network: Neural Network (ANN), also known as Neural Network (NN), is developed by getting inspiration from the working of human brain. ANN is nonlinear statistically data modeling technique to model the complex relation between input and output or to find pattern in the data. A single neuron can be represented mathematically as: Where: The output depends on the value of input, their weights, bias and the transfer function.
In ANN, many neurons are connected with each other to make different combinations. Usually the neurons are connected in the form of separate layers. These layers are classified as Input layer, Output layer and Hidden layers. Input layer is the one where inputs are applied while output layer is the one from where the output can be derived. Hidden layers are the layers which are in between the input and output layers. ANN is commonly used in Feedforward architecture where flow of information in layers of neurons is from input to output. The other ANN architecture is Recurrent where information may flow in loops or in both directions.
An interesting feature of ANN is training, where network is introduced to the inputs and/or outputs and run the algorithm to change the weights of the inputs of the neurons till the optimal solution is achieved. An efficient solution depends upon many factors such as learning type, learning algorithm, training data, number of hidden layers and number of neurons in each layer. An efficient solution needs optimal combination of all these parameters. The usage of ANN remained limited till mid of 1980s. In 1986, Backpropogation Algorithm was introduced for learning which revolutionized the usage of ANN in solving the problems (Rumelhart et al., 1986;Gonzalez and Woods, 2002). Several training algorithms were introduced based on Backpropogation Algorithm which were aimed to improve its performance such as Conjugate Gradient Algorithm (Charalambous, 1992), SuperSAB (Tollenaere, 1990), Decoupled Extended Kalman Filter Training (Puskorious and Feldkamp, 1991), Marquardt Algorithm (Hagan and Menhaj, 1994), LevenBerg-Marquardt Algorithm (Lera and Pinzolas, 2002).
Learning process of ANN is categorized in three modes which are: Supervised, Unsupervised and Reinforcement. Object recognition uses supervised learning where set of data comprising of inputs and outputs is provided to network for learning. The larger and variant the training data is, the efficient the solution will be. Once the network has been trained then any input can be provided to the network either used in training or not and network is expected to recognize the pattern and gives the output.
Object recognition problems cannot be usually resolved by single layer network and needs multiple layers in hidden layer. This complexity was described by using the XOR gate which cannot be resolved by single layer of network (Minsky and Studyt, 1988). Feedforward supervised network architecture is mostly used with variant of Backpropogation Algorithm to solve the object recognition problems (Gonzalez and Woods, 2002). The literature review suggested that scaled conjugate gradient Algorithm and Conjugate Gradient with Powell/Beale Restart Method Algorithm performs well in object recognition applications (Johansson et al., 1991;Moller, 1993;Powell, 1977;Beale et al., 2010).
In ANN, Conjugate Gradient Algorithms provide solution for the slow convergence of Backpropogation Algorithm (Moller, 1993). The weights in the ANN are adjusted by steepest decent direction in Backpropogation Algorithm while in Conjugate Gradient Algorithm; search for optimal weights is performed along conjugate direction. This helps the network to converge faster and trained in shorter time. Conjugate Gradient Algorithms has different types and two of them used in this research are discussed below.

Conjugate Gradient Back propagation algorithm with powell/beale restart (CGB):
It starts with finding the steepest decent direction at its first iteration like all other Conjugate Gradient Algorithms. Similarly, all Conjugate Gradient Algorithms need to periodically reset its steepest decent direction. The standard point of restart is the point where number of iterations is equal to the number of unknown parameters. To improve the efficiency of the Algorithm, Powell extended the work of Beale and proposed that restart should occur when the orthogonality between current and previous gradient is left to a very little amount (Powell, 1977). This is checked by the following condition to reset the steepest decent direction: Where: α = Factor of reset/restart while g = Gradient and subscript n = The gradient index This method use line search routine for each iteration.

Scaled Conjugate Gradient algorithm (SCG):
This algorithm is proposed by Moller (1993) to avoid time consuming and computationally expensive line search routine for each iteration and uses model-trust region approach. It is also reported to be working faster than the other Conjugate Gradient Algorithms but takes more number of iterations (Epoch) (Moller, 1993).

Insect's database:
For the better performance of the ANN, it is recommended to have large and varied training data. For this purpose, RPW were collected from infested farms. The collected RPW varied in size, age and gender. The other insects were obtained from museum of insects of King Saud University. The selection criterion for other insects is their resemblance to RPW and their existence in the habitat of palm trees. The details of other insects are provided in Table 1. The collection of the insects comprised of 326 RPW and 93 other insects belonging to 20 different families.
Imaging system: Imaging System used for image acquisition consists of camera, illumination box and processing unit. The camera used is 9.1 MP 20× optical zoom Sony Cybershot DSC-HX1, which has the ability to shoot at the rate of 10 frames/sec. The size of the images taken was of high quality of 3456 × 2592 pixels. Later, the size of the images was reduced to 154 × 160 in order for ANN to perform efficiently with lower number of neurons.
The dimensions of illumination box were 67 cm (Length) × 46 cm (Breadth) × 25 cm (Height). It consisted of 3 Philips TL RS 20W/54-765 lamps. On top of the illumination box, an opaque white-glass cover of thickness 0.31 cm was fixed. For processing simulations, a DELL computer having model Optiplex 780 with Intel Core 2 Duo E8400 3.0 GHz processor and 4 GB RAM was used. The software used was MATLAB® Version 7.9.0.529 (R2006a).
Insects were prepared before taking images. The positions of the legs of collected insects were changed to resemble living insects for imaging. Sample images of the insects taken by the imaging system are shown in Fig. 4. All the collected images were converted into column matrix and were combined in a single input matrix of size 24640 × 419. A row matrix was also created to record the result of each column of input matrix having the size of 1×419. Value of '1' and '0' were used to represent RPW and other insects respectively for each column of the input matrix. The training simulations were performed in two steps. In first step, different networks were tested to explore the possibility of solution provision by them. Each network was trained thrice. In second step, the selected networks from first step were trained 10 times for detailed analysis. The collected images were divided into three parts with the following ratios: Training data: 80% = 335 images Validation data: 10% = 42 images Testing data: 10% = 42 images The distribution of images for each of these parts was done randomly before the start of each training while the distribution ratio of images remained constant for the all the trainings. Different networks were trained with different layers with different number of neurons in each layer using both selected algorithms. The training completion criterion was dependant on validation check only. If the validation check does not improve for 50 epoch then training was terminated. All functions used in the network were hyperbolic tangent sigmoid. The acceptance rate of pattern match was kept at above 50%.
Error: In the proposed research, the Error is defined as false recognition. This can be a scenario when RPW is not recognized as RPW and is recognized as other insect or vice versa. This error in recognition can be classified in two classes: Type-I Error: When other insect is recognized as RPW Type-II Error: When RPW is recognized as other insect In the proposed research, the research focus is the recognition of RPW thus Type-II error plays more critical role than Type-I error. Type-II error is described as inefficiency of the system while Type-I error is described as false alarm or in other words, it can be described as over sensitivity of the system to RPW.

RESULTS
The training simulations of ANN were conducted in two stages. In first stage, different networks were tested with both the selected algorithms. ANN with each configuration was trained thrice and observations were recorded to find the possibility of existence of solution. After analyzing the results of first stage, as presented in Table 2, six networks were selected from the solution providing networks as mentioned in bold in Table 2. It is observed that single hidden layer is not providing the solution and ANN needs multiple hidden layers to provide the solution.
In the second stage of training simulation, the selected networks were trained with both selected algorithms and their results were recorded. Training simulation was repeated 10 times for each network keeping the training configurations constant. Few training simulations were discarded and had to be repeated because of failure. The failure was due to any of the reasons such as reaching local minima, computer out of memory, software failure.
The average result of each network's training for both algorithms is presented in Table 3 while the best results for each network for both algorithms is shown in Table 4. For analytic and comparative study, the results obtained are plotted in Fig. 5 and 6. The errors results for both algorithms are plotted in Fig. 7 and 8. Table 5 presents the standard deviation for the simulations for both algorithms.    Fig. 5 and 6 respectively. It can be observed for the case of Scaled Conjugate Algorithm from Fig. 5 that as the size of ANN increases, it takes more time to train the network. It can also be analyzed that time and Epoch taken for training ANN increases sharply when the layer is added in the network.
The similar behavior of network is also observed in case of Conjugate Gradient with Powell/Beale Restarts Algorithm as mentioned in Fig. 6. Comparing graphs in Fig. 5 and 6, it is observed that scaled conjugate gradient Algorithm consumes longer time for training the network as compared to Conjugate Gradient with Powell/Beale Restart Algorithm.
The similar behavior is also observed for number of Epoch. Besides that, it is also observed for both algorithms, that number of Epoch is independent of the time consumed for training.
After plotting Errors against the network for both algorithms, it is observed that both types of errors tends to decrease as the size of the network increases for both selected Algorithms as presented in Fig. 7 and 8. Type-II Error plays a critical role and is found to be always below 1% for all the networks for both algorithms while the less critical Type-I Error remains below 9%. Comparing both the algorithms, it is observed that scaled conjugate gradient Algorithm provides better performance (considering both types of errors) as compared to Conjugate Gradient with Powell/BealeRestartsAlgorithm. From Table 4, it is observed that Conjugate Gradient with Powell/Beale Restarts Algorithm performs better than scaled conjugate gradient for best trained networks.
It can also be observed that the best trained network is usually providing 100% success or close to 100% success in recognition of RPW besides providing above 95% success in recognizing other insects. These results exemplifies that ANN are most suiTable for recognizing RPW. Table 5 presents the standard deviation for the simulations for both algorithms. It is observed that in comparison to Conjugate Gradient with Powell/Beale Restarts Algorithm, scaled conjugate gradient Algorithm shows less standard deviation in errors but have higher standard deviation in time and Epoch consuming to train the network.

CONCLUSION
The objective of this research was to develop software that can recognize Red Palm Weevil, which is considered as most destructive insect of palm trees, by using image processing techniques and Artificial Neural Network. scaled conjugate gradient and Conjugate Gradient with Powell/Beale Restarts algorithms were analyzed in this study. The image database of 326 RPW and 93 other insects was used for training, validation and testing of ANN. It was observed that time consumption for training of ANN increases with increase in network size for both algorithms and errors decreases (or performance improves) slightly with the increase of network size.The increase in layer size adds considerable time in training of ANN. In