Paper Title (use style: paper title)

0 downloads 0 Views 1MB Size Report
TABLE 1 TRIANGLE FEATURES. The triangle geometry that used by [7][8] are based on. Scalene Triangle method. There are 21 features in scalene triangle [8] ...
2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT)

Data Normalization for Triangle Features by Adapting Triangle Nature for Better Classification Mohd Sanusi Azmi1, Nur Atikah Arbain1, Azah Kamilah Muda1, Zuraida Abal Abas1 and Zulkiflee Muslim1 1

Faculty of Information Communication and Technology Universiti Teknikal Malaysia Melaka, Malaysia [email protected] [email protected] [email protected] [email protected] [email protected]

Abstract— Geometry features especially triangle has been widely used in face, fingerprint, vehicle detection and digit recognition. Features from the triangle are used to generate useful features for classification processed. Recently, triangle features used in digit recognition has adopted angle as part of features. This has influenced accuracy due to big gap between angle values and other feature values such as ratio and gradient of sides. To overcome this issue, data normalization can be used to address the issue. Experiments have been made using existing normalization techniques such as Z-score, Minimax and libSVM scale function. Experiments have been conducted using Z-Score and libSVM scale function, but results of classification are worst compared to triangle features without normalization. Thus, the results of classification can be improved by proposed a new technique of normalization based on nature of triangle geometry. In this paper, we have proposed a new normalization technique by adopting the nature of triangle geometry. Datasets HODA, MNIST, IFHCDB and BANGLA digit have been chosen to extract triangle features. Then, we will apply normalization on the extracted features before classify them by using Support Vector Machine. The results shows normalization by adapting the nature of triangle geometry gives better result compared to other techniques. The proposed normalization technique only applies to Cartesian Plane Zone that contributes 45 features. The benchmarking for other researchers should refer to our 25 zones that give 225 features of triangle geometry.

[1]–[5]. Besides that, other researchers adopt the same geometry for intrusion, vehicle detection and digit recognition [6]. The triangle geometry features are used to extract the features from the digit dataset in this paper. This triangle features has been proposed by [7][8]. There are nine features of triangle as shown in Table 1. These nine features will be implemented to the several zones to increase the accuracy of classification by using Support Vector Machine (SVM). In this case, the Cartesian Plane zone has been chosen based on a few conditions. This paper is focus on how the triangle features is normalized or scaled. TABLE 1 TRIANGLE FEATURES

Keywords—Triangle features, Triangle Geometry, Feature Extraction, Feature Normalization, Feature Scaling

I. INTRODUCTION Feature extraction is an important task in image processing because of meaningful features extracted is vital in representing an object. Object is modeled and represented by geometrical properties. Geometry has properties that can be used in object recognition. The triangle properties have been adopted by researchers to produce the proposed features for image classification. The triangle geometry is widely used in biometric research such as face and fingerprint recognition

978-1-4799-7431-3/15/$31.00 ©2015 IEEE

The triangle geometry that used by [7][8] are based on Scalene Triangle method. There are 21 features in scalene triangle [8], but only three features are directly used. The features are angle of corner which has label as A, B and C, ratio of side (𝑎 × 𝑏, 𝑏 × 𝑐, 𝑐 × 𝑎), and gradients of side for each angle which added by authors in [7]. These features have been illustrated in Table 1. The feature values of angle A, B

2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT)

and C are big compared to the features no 1, 2, 3, 7, 8 and 9 which stated in Table 1. This can be proved based on the result in Fig. 1. The huge gap between angle of corner, ratio of side and gradients that proposed by [7] has given a big impact on the accuracy of classification. Thus, the features need to be scaled in order to improve the accuracy. By using HODA train dataset, the samples of extracted features which use Triangle Features [7] is shown in Fig. 1. There are four images used which are tr_10009_0.bmp, tr_10013_0.bmp, tr_10014_0.bmp and tr_10022_0.bmp.

c:a

a:b

b:c

∆BA

∆BC

∆CA

0.63

0.62

2.55

-0.67

-0.5

-1

1.05

0.49

1.92

-0.17

0

-0.33

2.06

0.89

0.54

0.25

0

0.5

0.97 0.51 2.02 i. Feature ratios

𝑧=

∠A

∠B 161.56

8.973

161.57

9.46

12.53

14.04

153.44

𝑥−𝜇 𝜎

(1)

II. DATA COLLECTION AND PRE-PROCESSING

-0.13 -0.25 0 ii. Feature gradients

11.31

libSVM scale function and etc. However, this paper has report that the normalization is using original extracted values from triangle geometry features, Z-score, scale function which is provided in libSVM [9], and also our proposed method. The original features extracted by using the triangle features which is shown in Fig. 1 will be classified by using SVM without implementing normalization algorithm on the features. The triangle features are normalized by using Z-score algorithm based on the eq.(1). All features triangle will be normalized by using Z-score. The normalized triangle features are worked based on linearly scale and all features will be scaled between ranges -1 to 1.

∠C 7.13

7.13 165.96 6.91 iii. Feature angles Fig. 1. Triangle Features

In Fig. 1, the values of ∠A, ∠B and ∠C have shown both angles’ gap between ratios and gradients are too obvious. Thus, the angles need to be scaled to reduce the gap. Recently, there are numerous normalization algorithms that can be implemented to extract features such as Z-score,

There are four standard datasets are used to classify our proposed method. These dataset are Arabic, Roman and BANGLA digit. The type of Arabic dataset is HODA [10] and IFHCDB [11]. For IFHCDB dataset, it consist alphabets and digits form. In our experiment, we choose digit. The MINST [12] is a Roman dataset while BANGLA [13] is the type of Bangla dataset. Further details about these datasets can be found in [14]. Next, in pre-processing process, all datasets will be converted into binary image by using Otsu’ method. Then, it will be followed by labelling process. The foreground image will be labelled as ‘1’ and background image as ‘0’. For HODA dataset, the images are in binary but the foreground is white while background is black. Thus, the images will be inverted and labelling process will be done after that. All the dataset involved in pre-processing process are shown in Fig. 2.

Fig. 2. Pre-processing Process [8]

2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT)

Where it will be represented as

III. PROPOSED METHOD There are a problem with features due to the big gap between values of gradient and ratio of sides with angle of corner [7]. Thus, the problem can be focused on the angle of corners. The fact of triangle is the summation of angle A, B and C will be 180 degree. This can be illustrated as below (2).

(2)

∠𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒 = ∑ ∠𝐴 + ∠𝐵 + ∠𝐶 = 180

F𝑓′ = 𝐴𝑓 ′, 𝐵𝑓 ′, 𝐶𝑓 ′, 𝑅𝑐𝑎𝑓 , 𝑅𝑎𝑏𝑓 , 𝑅𝑏𝑐𝑓 , ΔBA𝑓 , ΔBC𝑓 , ΔCA𝑓

All nine features will be implemented to Cartesian plane zone. The Cartesian plane zone has four zones and one main zone all zones are shown in Fig. 3. Based on the Fig. 3, the feature vector needs to be created in order to gather all features. The total of zone is five zones as shown in Fig. 3. Thus, the feature vector can be presented as (8). [𝑉′] ← [𝐹𝑓′𝑀𝑎𝑖𝑛 𝑇𝑟𝑖𝑎𝑛𝑔𝑙𝑒 , 𝐹𝑓′𝐴 , … 𝐹𝑓′𝐷 ]

Based on the total of angles, we have proposed to divide each angle corner by 180 degree. This can be represented by equations (3), (4) and (5).

∠ A′ = ∠ A/180

(3)

∠ B′ = ∠ B/180

(4)

∠ C′ = ∠ C/180

(5)

(8)

From original image, only triangle is designed which made the total of feature are nine. Afterwards, extra four triangles have been proposed which acquire from divided image. This extra triangle has been known as four zones. This distributed process is called as Cartesian Plane zone. The distributed feature for the Cartesian Plane zone is divided based on angle C as shown in Fig. 3. The detail of extra zone is shown in Table 2.

So, the triangle features by [7] is shown as follows F𝑓 = 𝐴𝑓 , 𝐵𝑓 , 𝐶𝑓 , 𝑅𝑐𝑎𝑓 , 𝑅𝑎𝑏𝑓 , 𝑅𝑏𝑐𝑓 , ΔBA𝑓 , ΔBC𝑓 , ΔCA𝑓

(7)

(6)

Fig. 3. Cartesian Plane Zone [14]

2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT)

TABLE 2 THE DETAIL OF FIRST ZONE AND FOUR ZONES

Binary Image

Zone

Height

Weight

Main Triangle Fig. 4. Zone A [14]

A

h = Cy

B

h = Cy

h = NyC

D

Cy+1

w=NxCx+1

w=Cx

w=Cx

h = Ny-

w=Nx-

Cy+1

Cx+1

In Table 2, Cx and Cy are coordinate for angle x and y of main triangle. Cx is used as border for horizontal plane while Cy is for vertical plane. The four zones that are formed have given 36 features which made the total of features for Cartesian Plane zone are 45 features. All four zones are formed by using coordinate of angle C. These zones can also produce triangle shape based on the centroid of zone. We can distinguish between them by a shaded image.

Fig. 4 shows zone A which is one of the zones from main triangle. As shown in Fig. 4, mark of ‘x’ between of black line is an angle of C for zone A. The mark of ‘x’ at the right side is angle of A whilst at the left side is an angle of B. The coordinate of angle of C need to attain first before getting the coordinate of angle A and B. The centroid for zone A is mark as ‘x’ which represent as angle of C. Next, the coordinate of x for angle of C is used as divider between right section and left section. The centroid at the right section represent as angle of A, whilst centroid at the left section represent as angle of B. Afterwards, all the features will be extracted by using triangle which formed from three coordinates. The result from the features extraction has produced 45 features which five triangles multiply by nine features. All these features have been applied to HODA, IFHCDB, MNIST and BANGLA dataset. IV. EXPERIMENTAL SETUP AND RESULT All experiments were conducted by using Support Vector Machine (SVM). The example of train and test images were provided by the datasets has been used in this stage. The number of train and test images can be referred in [14]. The grid search has been done before classification process by using libSVM library named grid.py. There were a few results for cost(C) and gamma (g) has been produced by grid search. The value of C=32, C=8, C=2, and g=0.00782 were selected from grid search results. The results of classification are reported in part Experimental Result. For the first experiment is conducted by using feature without scaled. Table 3 shows the result of experiment without normalization. Dataset of HODA and IFHCDB have performed with accuracy more than 60%. For BANGLA dataset, the highest result can be achieved is 56.1% while MNIST dataset is about 52.06%. The result of classification shows some improvement that can be made either by feature extraction or by data normalization algorithm.

2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT)

TABLE 3 THE RESULT WITHOUT NORMALIZATION Dataset\Cost(c)

C=32

C=8

C=2

BANGLA

55.75

56.1

55.65

HODA

69.33

69.41

69.67

MNIST

52.06

52.14

52.34

IFHCDB

65.47

65.62

66.09

Next, the second experiment for features from triangle is conducted by using Z-score algorithm. The result of normalization by using Z-score is shown in Table 4. TABLE 4 RESULT OF NORMALIZATION BY USING Z-SCORE Dataset\Cost(c)

C=32

C=8

C=2

55.7

56.03

55.85

HODA

69.34

69.41

69.65

MNIST

52.05

52.11

52.33

65.4138

65.62

66.10

BANGLA

IFHCDB

Based on the result in Table 3 and Table 4, the triangle features without data normalization is slightly better compare to result of data normalization by using Z-score algorithm. Thus, Z-score algorithm cannot be used as data normalization for features triangle.

90.35% and 91.72% accuracy respectively compared to other datasets. All datasets used our proposed normalization method outperform other methods. The comparison results are shown in Table 7 where Cost(c) =32 and Gamma (g) =0.0078125. V. CONCLUSION In this paper, we report that our normalization method is suitable with our feature extraction method which known as triangle feature. There are several papers and journals have been published regarding to the paper extraction. However, we do not mention any normalization technique to enhance the accuracy of classification for digit dataset. Thus, in this paper we have state the normalization technique in our features before classification process. In this paper, we had applied our proposed normalization technique to one zone named as Cartesian Zone plane. Thus, the number of feature is nine will be multiply with five zones. Therefore, this will make the total of features 45 features. In [8], we have introduced 25-zones in order to improve accuracy of classification. We used our proposed normalization algorithm in [8] without reporting it. Thus, any benchmarking should be referred to paper [8]. Our proposed normalization technique based on nature of summation of angle A, B and C that equal to 180 degree which gives more better result compared to without scaled, Z-score and libSVM scale function. The comparison results are shown in Table 7. TABLE 7 COMPARISON RESULT

TABLE 5 RESULT OF NORMALIZATION BY USING LIBSVM Dataset\Cost(c)

Dataset

Without Scaled

Z-score

LibSVM scale function

Proposed

C=32

C=8

C=2

71.2

66.775

58

BANGLA

55.75

55.7

71.2

77.3

HODA

87.93

87.93

87.93

HODA

69.33

69.34

87.925

90.35

MNIST

74.02

71.86

69.23

MNIST

52.06

52.05

74.02

77.91

IFHCDB

89.81

87.66

84.15

IFHCDB

65.47

65.41

89.81

91.72

BANGLA

The next experiment is using scale function from libSVM scale function. All result of experiments is shown Table 5. In Table 5 shows that the results of using scale function outperform result without normalization and using Z-score algorithm.

Based on the result in Table 7, we have concluded that the nature of some geometry can be used to scale geometry features. In this research, we have used triangle geometry. Thus, values angle of corner can be normalized or scaled to smaller by dividing them by 180 degree.

TABLE 6 THE RESULT FOR PROPOSED METHOD Dataset\Cost(c) BANGLA

C=32

C=8

C=2

77.3

75.1

71.65

HODA

90.35

89.1

87.55

MNIST

77.91

76.42

73.86

IFHCDB

91.72

91.25

90.57

The last experiment is conducted by using our proposed method. The results are shown in Table 6. Table 6 shows the HODA and IFHCDB for Arabic digit datasets have achieved

ACKNOWLEDGMENT The authors would like to thank to Ministry of Education for funded grant FRGS/2/2014/ICT/02/FTMK/02/F00246. Next, thanks to Universiti Teknikal Malaysia Melaka and Faculty of Information Communication and Technology for providing excellent research faculties and facilities. REFERENCES [1]

L. Gao and Y. Xu, “Face orientation recognition based on multiple facial feature triangles,” Proc. - 2012 Int. Conf. Control Eng. Commun. Technol. ICCECT 2012, pp. 928–932, 2012.

2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT)

[2] [3] [4] [5]

[6] [7]

[8] [9] [10] [11] [12] [13]

[14]

Z. Liu and J. An, “A New Algorithm of Global Feature Matching Based on Triangle Regions for Image Registration,” pp. 1248–1251, 2010. X. Chen, J. Tian, X. Yang, and Y. Zhang, “An algorithm for distorted fingerprint matching based on local triangle feature set,” IEEE Trans. Inf. Forensics Secur., vol. 1, no. 2, pp. 169–177, 2006. Z. Zhang, S. Wang, and A. I. Morphing, “Multi-Feature Facial Synthesis Based on Triangle Coordinate System,” no. 2, pp. 141– 145, 2012. M. M. M. Tin and M. M. Sein, “MULTI TRIANGLE BASED AUTOMATIC FACE RECOGNITION SYSTEM BY,” in I2MTC 2009 - International Instrumentation and Measurement Technology Conference, 2009, no. May, pp. 5–7. A. Haselhoff and A. Kummert, “A Vehicle Detection System Based on Haar and Triangle Features,” in Intelligent Vehicles Sysmposium, 2009, pp. 261–266. M. S. Azmi, K. Omar, M. F. Nasrudin, B. Idrus, and K. Wan Mohd Ghazali, “Digit recognition for Arabic/Jawi and Roman using features from triangle geometry,” AIP Conf. Proc., vol. 1522, pp. 526–537, 2013. M. S. Azmi, K. Omar, C. Wan, and S. Bahri, “Exploiting Features from Triangle Geometry for Digit Recognition,” pp. 876–880, 2013. C.-C. Chang and C.-J. Lin, “LIBSVM: A Library for Support Vector Machines,” ACM Trans. Intell. Syst. Technol., vol. 2, pp. 27:1–27:27, 2011. H. Khosravi and E. Kabir, “Introducing a very large dataset of handwritten Farsi digits and a study on their varieties,” Pattern Recognit. Lett., vol. 28, no. 10, pp. 1133–1141, 2007. S. Mozaffari and H. Soltanizadeh, “ICDAR 2009 handwritten Farsi/Arabic character recognition competition,” Proc. Int. Conf. Doc. Anal. Recognition, ICDAR, pp. 1413–1417, 2009. Y. LeCun and C. Cortes, “MNIST handwritten digit database,” 1992. . U. Bhattacharya and B. B. Chaudhuri, “Handwritten numeral databases of Indian scripts and multistage recognition of mixed numerals,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 31, no. 3, pp. 444–457, 2009. M. S. Azmi, K. Omar, M. F. Nasrudin, and A. K. Muda, “Features Extraction of Arabic Calligraphy using extended Triangle Model for Digital Jawi Paleography Analysis,” vol. 5, pp. 696–703, 2013.