Tuesday, September 15, 2009

Activity 16 - Neural Networks

As mentioned in Activity 14, object classification is one human capability that is commonly investigated and modeled for implementation in computer vision. It is actually a process of the human brain analyzing the information detected by the senses to classify objects. Inside the human brain are networks of neurons working together to process the information.
Neural networks are standard algorithms that have been used to model this process inside the brain. Similar to how the mind works, the basic concept of the algorithm is it first 'learns' what a class is from the features of objects that is known to belong in that class. Once the feature pattern for a class is known, classifying objects is straightforward by recognizing the class pattern in the object features observed.
The critical part in neural networks is the learning process, which is also crucial for human beings. Learning in neural networks is by basically determining the weights given to observed features. The network can be modeled by a connection of layers of nodes - input, hidden and output. Features from visual information are fed to input nodes which then pass a new weighted information to the hidden layer or layers. The hidden layer directs the information to the output node to combine the information into an outcome which determines the classification of the object. If object features from known classes are set as input, the network can calculate the error of its output. An iterative process then proceeds to readjust the weights applied to the input information in the connections of the nodes to minimize the error of the output. Certain parameters can be used in the iteration such as the learning rate of the network and the time set for the network to learn (which can be described as how much iteration is needed). Once the target output (or close to the target) is obtained, the final weights can be used in the network to classify unknown objects.
The ANN (Artificial Neural Network) toolbox for Scilab was applied in this activity for classifying normal or crenated RBCs. Training set and test set features from the previous two activities were used. A neural network was initialized with 2 input nodes (for the 2 basic features of an object) , 2 hidden layer nodes, and an output node with output values specifying whether crenated (1) or normal (0). The training set features were used for the learning process, and the weights obtained was then applied to classify the test set.
First, the effect of learning rate and training cycles to the output of the learning process was examined. The mean output value for the 5 input crenated RBC training set was plotted with respect to both the learning rate and training cycles. The 3D plot shown below signifies that increasing the learning rate would result to a faster approach of the training result to the target output even though there is a limited number of training cycles. On the other hand, for a low learning rate, increasing the training cycles will produce results approaching the target output. On both cases, further increase on learning rate and training cycle result to minimal improvement. The results seem logical because a higher learning rate would result to faster convergence to the desired weights, while more cycles would mean training the network at a longer time, making it more accurate. This also means that the high learning rates and low training cycles would results to faster training for the network, which was observed in the simulations. However, for a high learning rate, the weights would change more inaccurately producing a final output of weights that are less reliable compared to lower learning rates. This was verified because trained networks with high learning rates result to a lower percentage of correctly classified RBCs as compared to low learning rates. As a consequence, the training parameters used was 0.1 learning rate and 10000 training cycles. The resulting network was used to classify the test set of RBCs.

3D Plot of neural network training output for crenated RBC vs
learning rate and training cycle

Trial 1


Trial 2

Table of classification results using a network trained
at learning rate = 0.1 and training cycles = 10000

The artificial neural network classification provided the same accuracy as the linear discriminant analysis presented in the previous activity. This shows a successful implementation of neural networks for pattern recognition and classification. By improving the data to be processed as mentioned in the Activity 14, a more accurate or maybe even perfect classification can be attained. This shows that neural networks can be a good descriptive model of how the human brain works, which would can be a powerful tool in computer vision and robotics. This would also have significant impact for the usage of technology in institutions such as hospitals and schools for academic and research purposes.
I would like to give myself a grade of 10 (and possible bonus for additional analysis) for successfully implementing neural networks for the classification of normal and crenated RBCs.
I would like to thank Dr. Gay Jane Perez for the discussions regarding this activity and to Mr. Cole Fabros for his blog regarding the use of ANN toolbox in Scilab.

No comments:

Post a Comment