A Pepper Classification System

3 downloads 0 Views 351KB Size Report
A prototype artificial neural network (ANN) system for assessing the quality of ..... and testing, we have used MATLAB 5.3 with the Neural Network Toolbox 3.0. ... FAQ. Field. Coarse. Table 6.1. The Standard Lab Grade columns shows the five ...
A PEPPER CLASSIFICATION PROTOTYPE USING ARTIFICIAL NEURAL NETWORKS

Dr. Abdelhamid Abdesselam Rahmat Choo Abdullah Faculty of Information Technology Universiti Malaysia Sarawak 94300 Kota Samarahan Sarawak, Malaysia [email protected] [email protected]

ABSTRACT

A prototype artificial neural network (ANN) system for assessing the quality of pepper berries through image processing has been implemented. We present performance results and compare the ANN approach with two classical statistical methods against the standard statutory grading by Pepper Marketing Board Malaysia. The ANN method performed significantly better than the other two methods and in a much faster time.

Page 1 of 11

1. INTRODUCTION Pepper, a very popular spice internationally, is one of the major exports of Malaysia, especially from Sarawak. A body known as the Pepper Marketing Board (PMB) Malaysia oversees all pepper related activities in the country. Pepper Marketing Board Malaysia was established in 1972 as a federal statutory body which is concerned with pepper and pepper products. Among its functions, PMB Malaysia grades and certify ALL pepper that is exported out of Malaysia. The task of grading is tedious and time consuming. Three categories of test are carried out before a sample of pepper is graded. They are physical, chemical and biological tests. All tests use standard equipment. Chemical and Biological tests are not stressful and less influenced by human subjectivity. Physical tests are more stressful and very influenced by human subjectivity. The physical tests involve the testing of four characteristics, namely: 1. Moisture content, per cent by weight. 2. Light berries, per cent by weight. 3. Extraneous matter, per cent by weight. 4. Amount of black/dark grey berries in white pepper, per cent by weight. Test 4 is most stressful and is related to human subjectivity. Thus, results of tests are questionable, as the perception of each individual human being is different; that is, producing different outputs for the same input. Lacking objectiveness will result in inaccurate results and jeopardize the quality control of the output. Due to elements of human subjectivity while executing physical tests in the grading of pepper, inaccurate results frequently occur. Alternative methods are being sought by PMB Malaysia to execute the physical tests more accurately and more reliably.

2. LITERATURE REVIEW In recent years, several automated machine inspection systems have been developed for the food industry. Examples of these systems include classification of dried fruits [1,13] and fresh fruits [6,17,18,19], classification of wooden components [5], inspection of baked biscuits quality [9,10,15,20,22], quality assessment of fish [3], tin canning of vegetables according to product quality and sizes[7] and prediction of cheese quality [8]. Various classification techniques are commonly in use such as classical statistical-based techniques [4,6,7,13,15,19], fuzzy logic-based [3,16] and ANN-based [1,2,5,8,9,10,11,12,14,17,18,20,21,22]. Very encouraging results have been obtained as, in many cases, these systems have advantages over their human counterpart in terms of economy and performance [7,8,9,17,18,19,20,22]. Artificial neural networks are now becoming increasingly popular tools to solve various problems in the industry. This flood of interest is due to significant breakthroughs that have been made in terms of research results, thus enhancing performance [12]. Furthermore, various comparative studies have been carried out which shows better performance using ANN methods over statistical methods [8,10,11,14]. The most commonly encountered ANN is the Back Propagation network [8,9,12,14,17].

Page 2 of 11

4

CLASSIFICATION

Classification of images may be done statistically, using ANN, using Fuzzy Logic or a combination of the three.

5

USING STATISTICAL ANALYSIS

Amongst the most common classical statistical analysis techniques for classification are: Minimum mean (Euclidean) distance classifier [5],  Bayesian maximum likelihood / minimum-risk classifier [5,7],  K-means algorithm classifier [31],  K-nearest neighbour classifier [5,7,16],  Decision tree classifier [5]. Abdelhamid et al. has shown the feasibility of using two well-known techniques i.e. the Minimum Distance Classifier and the Maximum Likelihood Classifier for the grading of pepper [3]. Gary Kay et al. found encouraging results using Minimum Distance classifier, Bayesian Parametric classifier, K-means algorithm classifier and ISODATA for the grading of uniformly coloured fruits specifically green apples [10]. Karen Henry et al. has successfully shown that Statistical Discriminant analysis were able to produce very good results in the classification of dried fruits [18]. Leonard G.C. Hamey et al. showed that the quality of baked biscuits could be done using histograming techniques on their monochrome images with system performance comparable to that of a trained human inspector [22]. R. Torres Sanchez et al. also successfully used Statistical Discriminant analysis to automatically detect breakages and defects in preserved Satsuma (mandarin variety) slices [30].

4.2 USING ARTIFICIAL NEURAL NETWORKS An artificial neural network (ANN) is a system comprising of many simple processing elements called neurons, units, cells, or nodes [21]. These elements are operating in parallel and their functions are determined by the network structure, connection strengths, and the processing performed at the nodes [32]. In other words, an ANN is an information processing system that has certain performance characteristics in common with biological neural networks [21]. Knowledge learned is stored in a distributed form all over the network [4,16,24]. With some degree of confidence, we can now describe the brain at its base level in terms of a collection of cells, fibers, chemicals and electrical pulses. But the sheer number of neurons involved in the physical makeup of the human brain is the greatest stumbling block as far as building a reasonable representation or model [4]. Furthermore, although we already know how neurons communicate and the structures involved, but we do not know what they communicate. In terms of chemicals and electrical pulses – yes. In terms of how those represent memories, emotions, language, senses, thoughts and conscience – no [4].

Key features that characterize ANNs are:  its pattern of connections between neurons (called its architecture),

Page 3 of 11

 

its method of determining the weights on the connections (called its training/learning algorithm), and its activation or transfer function.

Each neuron is connected to other neurons by means of directed communication links, each with an associated weight. The weights represent information being used by the net to solve a problem [21]. ANNs are capable of learning and are able to generalize much more effectively than the human brain, of course limited to its specific role or purpose only. Through its training, the ANN learns how to relate data in their inputs and in the process form particular patterns in the network. This is done by modifying their connection weights to memorize functions or distinguishable features of the pattern so that they may be recalled for future use [16]. The easier a problem can be stated explicitly and the more readily the steps towards its solution can be formulated explicitly, the less likely it would or should be approached with a neural network solution [24]. Tacit approaches such as neural networks and fuzzy theories are much more suited to tacit problems while sequential digital computing is more adaptable to explicit problems. In an ANN, the aim is to train the network to achieve a “balance” between the ability to recall perfectly a pattern that has been learned (memorization) and the ability to give reasonable (good, not best) responses to input that is similar, but not identical, to that used in learning (generalization) [21]. An ANN should not be over trained as this would lead to memorization and lacks the ability to generalize [11]. Most of the tasks that ANNs can be trained to perform fall into the areas of mapping, clustering, and constrained optimization. Pattern classification and pattern association may be considered special forms of the more general problem of mapping input vectors or patterns to the specified output vectors or patterns. Historically, pattern recognition and classification happens to be the earliest application of ANN [21]. Classification problems may be solved by a variety of simple single-layer nets trained by a supervised algorithm. For more difficult classification problems, a multilayer net, such as that trained by Back Propagation may be better [21,33]. In the simplest case, we consider the question of membership in a single class. The output unit represents membership in the class with a response of 1; a response of –1 (or 0 if binary representation is used) indicates that the pattern is not a member of the class [21]. Common training algorithms used for pattern classification are: the Hebb rule,  the Perceptron learning rule,  the Delta rule (a.k.a. Widrow-Hoff rule or Least-Mean-Squares rule),  the Back Propagation of errors learning rule (a.k.a. the Generalized Delta rule). A. Verikas et al. made a hierarchical architecture by combining variety of ANNs and using different unsupervised learning techniques. Color classification accuracy obtained from such architecture was high enough to use it in the print quality control [2]. Ferat Sahin successfully used Radial Basis Function networks in a colour image classification problem in a real time industrial application. He developed a new technique to classify the species and colour of painted or stained wooden components in a real time setting [8].

Hongxu Ni et al. was able to predict more accurately than regression equations the rheological properties of Swiss-type cheese on the basis of their composition by using a three layer BP ANN [12].

Page 4 of 11

Jeffrey C. H. Yeh et al. reported significantly better results than the human inspector in the inspection of bake level of biscuits on an industrial scale [14]. In an earlier work, he also reported better results using ANN when compared to statistical methods [15]. Justin D. Paola et al. compared the performance of the Maximum Likelihood classifier to that of a Back Propagation ANN classifier in sample Landsat TM images and found comparable results. The ANN was better able to differentiate classes with widely different variances which can cause problems for the Maximum Likelihood classifier [17]. Kyoung-Ok Kim et al. also compared the performance of the Maximum Likelihood classifier to that of a Back Propagation ANN classifier in the classification of multispectral images. He found that the conventional Maximum Likelihood statistical classifier was less capable of discriminating land cover classes than the ANN classifier especially when the land use pattern of test site is mixed and complex [20]. Michael Reece et al. showed the possibility of using a hybrid ANN classifiers to grade quality of oranges in high speed industrial application [25]. P. Arena et al. also worked on the automatic classification of fruits (in particular, oranges) by using Cellular Neural Networks in real time industrial application [26]. Various other works have been done which shows the suitability of using ANNs in the use of quality grading or classification especially in the food processing industry. It would be most interesting and beneficial to employ ANN techniques in solving the pepper grading problem, as success rates are very encouraging.

5. DESIGN OF THE PROTOTYPE The literature reviewed earlier suggests the suitability of a Back Propagation ANN approach. Thus, we proposed to repeat an earlier work done based on statistical analysis [3]. The ANN will have the topology 2-N-5. The two input nodes represents the mean and standard deviation of the intensity of the pepper images. The five output nodes represents the five possible grades of the pepper.

6. EXPERIMENTS

6.1 DATA PREPARATION STATUTORY GRADING OF SARAWAK WHITE PEPPER There are five different grades of Sarawak White Pepper. Figure 3.1 below shows a sample image of each grade.

A

B

C

Page 5 of 11

D

E

Sarawak Pepper used to be traded on the basis of samples. Now buyers only need to specify the grade of Sarawak Pepper they require, and the grade certificates and colour labels issued by PMB serve as an assurance that Malaysian exporters will deliver pepper that meets the specifications of that grade. Every consignment is inspected and certified at all major ports by PMB prior to shipment. Samples randomly drawn to be representative of a whole consignment are tested for characteristics such as moisture, extraneous matter and light berries, and grades are ascertained according to the prescribed specifications. PMB then issues a certificate attesting the grade of the consignment [27]. The five sample images in Figure 1 which represents the five prescribed grades for Sarawak White Pepper [28] are as described in Table 3.1 below. Grade A B C D E

Name Standard Malaysian White Pepper No. 1 Sarawak Special White Sarawak FAQ White Sarawak Field White Sarawak Coarse Field White

Label Creamy Label Green Label Blue Label Orange Label Grey Label

Table 3.1 The statutory grading scheme for Sarawak Pepper enjoys the confidence of the international pepper trade. The inspection, grading and certification services provided by PMB is recognized by end users and traders all over the world as being of high consistent quality, and reliable in terms of delivery. Furthermore, these services by PMB is regarded as the most advanced and effective system in the spice trade internationally [29].

For the purpose of performance comparison, our experiments were based on the dataset used from the previous statistical approach [3] as described below:1. Eighty samples of each grade were taken from pepper berries that had previously been graded by PMB operators using standard laboratory tests. 2. Digital images of these 400 samples are captured and stored in the hard disk. 3. For each grade, 40 images were randomly picked as the Training set and the other remaining 40 images were used as the Testing set.

Page 6 of 11

6.2 NETWORK TRAINING For our experiments and testing, we have used MATLAB 5.3 with the Neural Network Toolbox 3.0. Although we decided to use one hidden layer [21], we still had to choose the suitable number of nodes for the hidden layer. Therefore, we experimented with “2–5–5”, “2–10–5” and “2–15–5” topologies. For training purposes, we chose the Levenberg-Marquardt algorithm as it is the fastest algorithm among the 13 Back Propagation training functions available in the Neural Network Toolbox 3.0 [13]. Sum-Squared Error performance function was employed with the goal set to 0.1, a learning rate of 0.01 and a constant momentum of 0.95. Maximum number of epochs to train was set to 5000.

6.3 PERFORMANCE Table 6.1 presents the results obtained from the three tested topologies. Standard Lab Grade Grade Nos.

Creamy

40

Special

40

FAQ

40

Field

40

Coarse

40

Topology “2–5–5” Grade Nos. % Creamy Special FAQ Field Coarse Creamy Special FAQ Field Coarse Creamy Special FAQ Field Coarse Creamy Special FAQ Field Coarse Creamy Special FAQ Field Coarse

CLASSIFIERS Topology “2–10–5” Grade Nos. %

Topology “2–15–5” Grade Nos. %

Table 6.1 The Standard Lab Grade columns shows the five grades of pepper as classified by the Pepper Marketing Board Laboratory as well as the number of samples for each grade. The “2–N–5” columns show the number of samples found to be a specified grade as well as the percentage it represents. For example, for the “2–5–5” topology, among the 40 Creamy samples presented, …..

Page 7 of 11

It can be seen that the “2–X–5” topology produced the most accurate classification. Table 6.2 summarizes the result obtained by both the statistical and ANN approaches against the standard grading performed by the Pepper Marketing Board Laboratory.

Standard Lab Grade Grade

Nos.

Creamy

40

Special

40

FAQ

40

Field

40

Coarse

CLASSIFIERS Minimum Distance

Maximum Likelihood

Grade Creamy Special

Nos. 38 2

% 95 5

Grade Creamy Special

Nos. 13 27

% 32.5 67.5

Special FAQ

38 2

95 5

Creamy Special FAQ

20 17 3

50 42.5 7.5

Creamy

2

5

Special FAQ Field

2 37 1

5 92.5 2.5

FAQ Field

37 1

FAQ Field

3 37

7.5 92.5

Field

Field Coarse

1 39

2.5 97.5

Coarse

“2–10–5” ANN Grade Creamy

Nos. 40

% 100

Special FAQ

37 3

92.5 7.5

92.5 2.5

FAQ Field

39 1

97.5 2.5

40

100

Field

40

100

100

Field Coarse

1 39

2.5

40

40 97.5

Table 6.2 It can be seen that the ANN classifier produced much better classification.

7. CONCLUSION We have investigated the application of ANN to the grading of pepper samples. We have demonstrated that a FFBP ANN with suitable topology performs better than the other two statistical approaches. Future work will investigate the relationship between the number of layer and nodes to the performance of the ANN. We will also study the suitability of other features besides the mean and standard deviation of the intensity of the pepper images.

8. ACKNOWLEDGEMENT The authors would like to thank Pepper Marketing Board Malaysia, in particular Ng Siaw Chiung, Head of Technical Services for the support and kind assistance given in this research project, especially with regards to providing data, technical facilities and information.

Page 8 of 11

REFERENCES [1]

A. Ghazanfari, A. Kusalik, and J. Irudayaraj, “Application of Multi-Structure Neural Network to Sorting Pistachio Nuts”, Special issue on Neural Networks for Computer Vision Applications, pp. 55-61, World Scientific Publishing Company, 1996.

[2]

A. Verikas, K. Malmqvist, M. Bachauskene, L. Bergman and K. Nilsson, “HIERARCHICAL Neural Network for COLOR Classification”, pp. 2938-2941, IEEE 1994.

[3]

Abdelhamid Abdesselam, Dayang NurFatimah Awang Iskandar and Shamsiah Awi, “Application of Computer Vision Techniques in Pepper Quality Control”, Conference on Information Technology in Asia 1999:CITA’99.

[4]

Alison Carling, “Introducing Neural Networks”, Wilmslow, Cheshire, England, Sigma Press, 1992.

[5]

Anil K. Jain, “Fundamentals of Digital Image Processing”, Englewood Cliffs, New Jersey, Prentice-Hall, Inc., 1989.

[6]

B. G. Hu, R. G. Gosine and C. W. de Silva, “Classifier Design For Computer Grading Systems For Food Processing”, pp. 730-735, IEEE 1995.

[7]

David Vernon, “Machine Vision: Automated Visual Inspection and Robot Vision”, Hemel Hempstead, Hertfordshire, Prentice Hall International (UK) Ltd, 1991.

[8]

Ferat Sahin, “A Radial Basis Function Approach to a Color Image Classification problem in a Real Time Industrial Application”, M.Sc. Thesis, Virginia Polytechnic Institute and State University, Virginia, 1997.

[9]

G. Domenech Asensi, R. Torres Sanchez, L. M. Tomas Balibrea and J. L. Munoz Lozano, “Automatic Color Identification System Through Computer Vision Techniques For Its Application In Classification Of Canned Vegetable Tins According To Product Sizes And Qualities”, pp. 868-872, IEEE 1994.

[10]

Gary Kay and Gerhard de Jager, “A Versatile Colour System Capable of Fruit Sorting and Accurate Object Classification”, pp. 145-148, IEEE 1992.

[11]

Hoekstra, A. And Duin, R.P.W., “Generalization in neural networks”, URL : http://www.ph.tn.tudelft.nu/Research/neural/generalization/

[12]

Hongxu Ni and Sundaram Gunasekaran, “Food Quality Prediction with Neural Networks”, pp. 60-65, Vol. 52, No. 10, Food Technology, October 1998.

[13]

Howard Demuth, and Mark Beale, “Neural Network Toolbox User’s Guide 3.0”, The Math Works Inc., 1998.

[14]

Jeffrey C. H. Yeh, Leonard G. C. Hamey, Tas Wescott, and Samuel K. Y. Sung, “Color Bake Inspection System Using Hybrid ANN”, pp. 37-42, IEEE 1995

[15]

Jeffrey C. H. Yeh and Leonard G. C. Hamey, “Biscuit Bake Assessment by an Artificial Neural Network”, pp. 266-269, Proceedings of the Fifth Australian Conference on Artificial Neural Networks, 1994.

[16]

Jian-Kang Wu, “Neural Networks and Simulation Methods”, New York, Marcel Dekker, Inc. 1994.

[17]

Justin D. Paola and Robert A. Schowengerdt, “Comparisons of Neural Networks to Standard Techniques for Image Classification and Correlation”, pp. 1404-1406, IEEE 1994.

Page 9 of 11

[18]

Karen Henry and Gerhard de Jager, “Colour Image Analysis for classification of Dried Fruit”, South Africa, 1996.

[19]

Kevin Warwick, “Neural Network Based Control In Food Processing”.

[20]

Kyoung-Ok Kim, Young-Kyu Yang, Jong-Hoon Lee, Kyung-Ho Choi, Tae-Kyun Kim, “Classification of Multispectral Image Using Neural Network”, pp. 446-448, IEEE 1995.

[21]

Laurene Fausett, “Fundamentals of Neural Networks; Architectures, Algorithms, and Applications”, Englewood Cliffs, New Jersey, Prentice-Hall, Inc., 1994.

[22]

Leonard G. C. Hamey, Annesley J. Watson and C. Tasman Westcott, “Machine Inspection of Biscuit Bake”, pp. 124-129, Proceedings of Digital Image Computing: Techniques and Applications, Sydney, 1993.

[23]

Lijian Zhang and Takashi Hoshi, “A Fuzzy Neural Network Model (FFN Model) for Classification Using Landsat-TM Image Data”, pp. 1416-1418, IEEE 1994.

[24]

Michael Chester, “Neural Networks: A Tutorial”, Englewood Cliffs, New Jersey, PTR PrenticeHall, Inc., 1993.

[25]

Michael Recce, John Taylor, Alessio Plebe and Giuseppe Tropiano, “High Speed VisionBased Quality Grading of Oranges”, pp. 136-144, IEEE 1996.

[26]

P. Arena, L. Fortuna, G. Manganaro and S. Spina, “CNN Image Processing for the Automatic Classification of Oranges”, pp. 463-467, IEEE 1994.

[27]

Pepper Marketing Board Malaysia, “Grade Specifications, Labels And Certificates For Sarawak Pepper”, Pepper Marketing Board Malaysia.

[28]

Pepper Marketing Board Malaysia, “Statutory Grading Of Sarawak Pepper”, Pepper Marketing Board Malaysia.

[29]

Pepper Marketing Board Malaysia, “Quality Control”, Pepper Marketing Board Malaysia.

[30]

R. Torres Sanchez, L. M. Tomas Balibrea, J. A. Lopez Alcantud and G. Domenech Asensi, “Automatic Vision Inspection System For The Analysis And Detection Of Breakages And Defects Of Satsuma Slices”, pp. 853-858, IEEE 1994.

[31]

Rhys Lewis, “Practical Image Processing”, Chichester, West Sussex, England, Ellis Horwood Limited, 1990.

[32]

Sarle W. S., “Neural Network FAQ”, periodic posting to the Usenet newsgroup comp.ai.neural-nets, URL: ftp://ftp.sas.com/pub/neural/FAQ.html, 1997

[33]

Timothy Masters, “Practical Neural Network Recipes in C++”, London, Academic Press Limited, 1993.

[34]

Tirthankar RayChaudhuri, Jeffery C. H. Yeh, Leonard G. C. Hamey, Samuel K. Y. Sung and Tas Westcott, “A Connectionist Approach to Quality Assessment of Food Products”, pp. 435441, Proceedings of 8th Australian Joint Conference in Artificial Intelligence, 1995.

[35]

Tirthankar RayChaudhuri, Jeffery C. H. Yeh, Leonard G. C. Hamey and C.T. Westcott, “Baked Product Classification with the Use of a Self-Organising Map”, pp. 152-155, Proceedings of the Sixth Australian Conference on Neural Networks, Sydney, 1995.

[36]

Tristan Lalanne and Christine Lempereur, “Color Recognition With A Camera: A Supervised Algorithm For Classification”, pp. 198-204, IEEE 1995.

Page 10 of 11

Page 11 of 11