Available online at www.sciencedirect.com Available online at www.sciencedirect.com
Available online at www.sciencedirect.com
ScienceDirect
Procedia Computer Science 00 (2018) 000–000 Procedia Computer Science 00 (2018) 000–000 Procedia Computer Science 126 (2018) 1344–1350
www.elsevier.com/locate/procedia www.elsevier.com/locate/procedia
22nd International Conference on Knowledge-Based and 22ndIntelligent International Conference on Knowledge-Based Information & Engineering Systems and Intelligent Information & Engineering Systems
Vehicle Vehicle Classification Classification Based Based on on Multiple Multiple Fuzzy Fuzzy C-Means C-Means Clustering Clustering Using Dimensions and Speed Features Using Dimensions and Speed Features Saleh Javadi∗∗, Muhammad Rameez, Mattias Dahl, Mats I. Pettersson Saleh Javadi , Muhammad Rameez, Mattias Dahl, Mats I. Pettersson
Department of Mathematics and Natural Sciences, Blekinge Institute of Technology, Karlshamn 37435, Sweden Department of Mathematics and Natural Sciences, Blekinge Institute of Technology, Karlshamn 37435, Sweden
Abstract Abstract Vehicle classification has a significant use in traffic surveillance and management. There are many methods proposed to accomVehicle has a significant in traffic and management. There(FCM) are many methods proposed tothat accomplish thisclassification task using variety of sensors.use In this paper,surveillance a method based on fuzzy c-means clustering is introduced uses plish this task using variety of sensors. In this paper, a method based on fuzzy c-means (FCM) clustering is introduced that uses dimensions and speed features of each vehicle. This method exploits the distinction in dimensions features and traffic regulations dimensions and speed features of each vehicle. This method exploits the distinction in dimensions features and traffic regulations for each class of vehicles by using multiple FCM clusterings and initializing the partition matrices of the respective classifiers. The for each class results of vehicles by usingthat multiple FCM clusterings initializing partition matrices of the respective classifiers. The experimental demonstrate the proposed approach and is successful in the clustering vehicles from different classes with similar experimental results demonstrate that the proposed approach is successful in clustering vehicles from different classes with similar appearances. In addition, it is fast and efficient for big data analysis. appearances. In addition, it is fast and efficient for big data analysis. c 2018 The The Authors. Authors. Published Published by by Elsevier Elsevier Ltd. Ltd. © c 2018 2018 The Authors. Published by Elsevier Ltd. This is This is an an open open access access article article under under the the CC CC BY-NC-ND BY-NC-ND license license (https://creativecommons.org/licenses/by-nc-nd/4.0/) (https://creativecommons.org/licenses/by-nc-nd/4.0/) This is an open access article under the CC BY-NC-NDInternational. license (https://creativecommons.org/licenses/by-nc-nd/4.0/) Selection and peer-review under responsibility of KES International. Selection and peer-review under responsibility of KES International. Keywords: Vehicle classification; Fuzzy c-means clustering; Intelligent transportation systems; Pattern recognition. Keywords: Vehicle classification; Fuzzy c-means clustering; Intelligent transportation systems; Pattern recognition.
1. Introduction 1. Introduction Vehicle detection and classification provide important information for traffic measurement and management [1]. detection andapplication classification provide important information for traffic measurement and management [1]. AnVehicle exemplary potential would be road maintenance and planning by knowing the distribution of different An exemplary potential application would be road maintenance and planning by knowing the distribution of different classes of vehicles on the road over a long period of time. Many techniques have been introduced to solve this problem classes vehiclessensors on the road over aradar, long period of acoustic time. Many techniques have been introduced to solve this methods problem such asofroadside including passive sensors, vision-based sensors and in-pavement such as roadside sensors including radar, passive acoustic sensors, vision-based sensors and in-pavement methods including inductive loops and pneumatic tubes [2, 3]. including inductive loops andand pneumatic [2, 3].attributes of the vehicles in order to classify them into their corThese techniques extract analyze tubes distinctive These techniques extract and analyze distinctive attributestoofeliminate the vehicles in ordershadows to classify their corresponding categories. In [4], a method has been proposed unwanted andthem then into to extract the responding categories. In [4], a method has been proposed to eliminate unwanted shadows and then to extract the vehicle size and linearity of the edges. Using these two features, a classifier has been employed in order to classify vehicle size and linearity of the edges. Using these two features, a classifier has been employed in order to classify vehicles into “car”, “minivan”, “van truck”and “truck”. vehicles into “car”, “minivan”, “van truck”and “truck”. ∗ ∗
Corresponding author. Tel.: +46-734223620. Corresponding Tel.: +46-734223620. E-mail address:author.
[email protected] E-mail address:
[email protected]
c 2018 The Authors. Published by Elsevier Ltd. 1877-0509 c 2018 1877-0509 Thearticle Authors. Published by Elsevier Ltd. This is an open access under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) 1877-0509 © 2018 The Authors. Published by Elsevier Ltd. This is an and open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) Selection peer-review under responsibility of KES International. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) Selection and peer-review under responsibility of KES International. Selection and peer-review under responsibility of KES International. 10.1016/j.procs.2018.08.085
Saleh Javadi et al. / Procedia Computer Science 126 (2018) 1344–1350 Saleh Javadi et al. / Procedia Computer Science 00 (2018) 000–000
1345
Jiang et al. presented a vehicle classification into “large bus”, “car”, “motorcycle”, “minibus”, “truck”and “van”, using deep features of PCANet, histogram of oriented gradient (HOG) and HU moments that are fed to a SVM classifier [5]. Furthermore, various deep learning convolutional neural networks have been compared for vehicle classification and it has been concluded that “articulated truck”and “single unit truck”are a pair hard to distinguish [6]. In [7], a vision-based method has been proposed for night-time surveillance. It is based on headlight segmentation, detection and furthermore classification into two-wheeled or four-wheeled vehicles. Another method is proposed when using invariant Charlie moments to classify detected moving vehicles into light, medium and heavy vehicles [8]. However, accurate vehicle classification is a challenging task due to different visual appearances of vehicles and also various dimensions and structures. Moreover, clustering vehicles which are visually similar such as straight trucks and articulated trucks can increase the complexity of this problem. Particularly, for analyzing big data of the traffic using complex approaches can be time consuming and inefficient [2]. This paper presents a classifier based on multiple fuzzy c-means (FCM) clusterings for vehicle classification by means of dimensions and speed features. It demonstrates that the speed of each vehicle has a correlation with its class and can be taken into account for more accurate classification of vehicles especially for big data analysis. The experimental results show a promising performance and classification into categories of “private car”, “light trailer”, “lorry or bus”and “heavy trailer”. The rest of the paper is organized as follows. The problem statement and contribution of this paper is presented in Section 2. The solution of the proposed method is described in Section 3. In Section 4, experimental results and discussion is provided and finally, the paper is concluded in Section 5. 2. Problem Statement and Contribution From the presented review of related works, it can be seen that vehicle classification is challenging, particularly for those vehicles that have similar dimensions. Although vision-based techniques can be more rewarding, still they require more computational and analytical complexity. Therefore, the main objective of this paper is to propose an efficient classifier in order to cluster vehicles for big data. The hypothesis of this research is that the speed as an input feature beside the dimensions features can enhance the classification using fuzzy c-means clustering. Therefore, the main contribution of this paper is a versatile classifier to cluster vehicles and specifically those similar in appearance, in their proper classes by using simple features of length, width and speed. 3. Solution Traffic authorities provide vehicles definitions in different categories to impose related regulations upon them as presented in Swedish Act (2001:559) such as “private car”, “lorry (light, heavy)”, “bus (light, heavy)”, “motorcycle (light, heavy)”, “trailer (light, heavy)”, etc. [9]. Due to the similarity of their regulations, we have considered four classes of “private car (including light lorry and light bus)”, “light trailer”, “lorry or bus (both heavy)”, and “heavy trailer”. In this paper, fuzzy c-means clustering algorithm is used for partitioning the vehicles in fuzzy clusters. The algorithm minimizes the objective function J and updates cluster centers bi and partition matrix U recursively [10]. J=
C N
m
µS i (xk )
k=1 i=1
d(bi , xk ),
(1)
where N is the number of data points, C is the number of clusters, m is the weighting exponent which determines the fuzziness of the resulting clusters, xk , k = 1, 2, ..., N, is the data point, µS i (xk ) is the membership degree of xk in cluster S i , i = 1, 2, ..., C, and d(bi , xk ) is the distance between cluster center bi and xk . After the objective function J is minimized, we obtain cluster centers b = b1 , b2 , ..., bc and partition matrix U of size C × N which gives membership degrees in each cluster for all data elements. To initialize the partition matrix U, let us assume L = L1 , L2 , L3 , L4 , L5 as a list of linguistic terms containing L1 = “no”, L2 = “little”, L3 = “maybe”, L4 = “probably”and L5 = “yes”to demonstrate the initial degree of association of a
1346
al. / Procedia Computer 126000–000 (2018) 1344–1350 SalehSaleh JavadiJavadi et al. / et Procedia Computer ScienceScience 00 (2018)
0HPEHUVKLSGHJUHHVRISRVVLELOLWLHV
/ QR/ OLWWOH/ PD\EH/ SUREDEO\/ \HV
3RVVLELOLWLHV
Fig. 1. The collection of membership functions L1 -L5 and R.
vehicle to a defined cluster. Each linguistic term is associated with a fuzzy set over the theoretical interval [0,100] and the membership functions are defined as µL1 (z) to µL5 (z) as suggested in [11, 12] (see Fig. 1). In order to substitute the linguistic terms with proper numerical degrees, an s-function µR (z) is defined over the interval [0, 100], common for µL1 (z) to µL5 (z), by the formula: 0 ; z ≤ 0, z 2 ; 0 ≤ z ≤ 50, 2 100 z 2 µR (z) = (2) 1 − 2 ; 50 ≤ z ≤ 100, 100 1 ; z ≥ 100.
Then, the membership degrees of the intersection points between µR (z) and µL1 (z) to µL5 (z) are considered as the numerical representatives of the respective linguistic terms. The assigned membership degrees are 0.056 for “no”, 0.22 for “little”, 0.5 for “maybe”, 0.78 for “probably”and finally, 0.944 for “yes”. In the proposed system, the number of fuzzy clusters are assumed to be S = S 1 , S 2 , S 3 , S 4 in accordance with the traffic regulations as S 1 = “private car”, S 2 = “light trailer”, S 3 = “lorry or bus”and S 4 = “heavy trailer”. Total number of N vehicles are equally divided per cluster and labeled as the ground truth X = x1 , , xN . The features of width, length and speed are extracted for each passing vehicle as the inputs of the proposed model. Thus, each vehicle has a pattern vector in R3 as xk = (xk1 , xk2 , xk3 ), k = 1, ..., N. In order to exploit the vehicle features for classification, multiple FCM classifiers are designed and their respective partition matrices are initialized. To do so, a set of rules for initialization of each partition matrix are employed considering the regulations and permitted dimensions for each vehicle category as presented in Table 1 [13]. By using the obtained numerical degrees for the given linguistic terms, every vehicle takes corresponding membership degree to each defined cluster. Then, the membership degrees of each vehicle are normalized for every column of the partition matrix. The first FCM classifier is used to cluster the dataset into two clusters of S 1,2 = “private car / light trailer”and S 3,4 = “lorry or bus / heavy trailer”. The input feature for this classifier is the width information due to the strong distinction in the corresponding widths of these two groups [13]. Its initial partition matrix U10 of size 2 × N is also initialized based on the width information using the set of rules presented in Table 2. The outputs of the first FCM classifier are G vehicles detected as S 1,2 = “private car / light trailer”and H vehicles detected as S 3,4 = “lorry or bus / heavy trailer”. These detected vehicles are now the inputs for two separate FCM classifiers in order to cluster them to their subclasses. As for G detected vehicles of S 1,2 , even though the private cars travel usually at higher speeds in comparison with the ones with trailers but still many of them have similar speeds. Therefore, in this case for more accurate clustering, the speed feature is less useful and might be even misleading.
Saleh Javadi et al. / Procedia Computer Science 126 (2018) 1344–1350 Saleh Javadi et al. / Procedia Computer Science 00 (2018) 000–000
1347
Table 1. Dimension regulations for heavy vehicles [13]. Vehicle
Maximum permitted length
Maximum permitted width
Bus with two axles
13.5 m
2.55 m
Bus with more than two axles
15.0 m
2.55 m
Power-driven truck
12.0 m
2.55 m
Heavy trailer
25.25 m
2.60 m
Side-view
Front-view
Table 2. Set of rules for partition matrix U10 initialization based on the width feature w. Width w condition
w≤2
w>2
Private car / light trailer Lorry or bus / heavy trailer
probably little
little probably
Consequently, these vehicles are classified by a FCM classifier using the length and width features into S 1 = “private car”and S 2 = “light trailer”. The initial partition matrix U20 of size 2 × G of this classifier is initialized based on the length information as demonstrated in Table 3. Table 3. Set of rules for partition matrix U20 initialization based on the length feature l. Length l condition
l≤6
l>6
Private car Light trailer
probably little
little probably
Finally, H detected vehicles of “lorry or bus / heavy trailer”, are sent to the last FCM classifier in order to cluster them correctly. In this case, the speed feature is very important as well as dimensions features, since many of current heavy vehicles are equipped with automatic speed limiters (ASL) [14]. Therefore, at this stage again, another FCM classifier is employed using the speed, length and width features. The initial partition matrix U30 of size 2 × H of this classifier is initialized based on the length information as showed in Table 4. It should be noted that the initial membership degrees are normalized and consequently the sum of membership degrees in clusters for each xk would be equal to 1. Table 4. Set of rules for partition matrix U30 initialization based on the length feature l. Length l condition
l ≤ 10
10 < l ≤ 14
14 < l ≤ 16
l > 16
Lorry or bus Heavy trailer
yes no
probably maybe
maybe probably
no yes
Saleh Javadi et al. / Procedia Computer Science 126 (2018) 1344–1350 Saleh Javadi et al. / Procedia Computer Science 00 (2018) 000–000
1348
(a)
(b)
(c)
(d)
Fig. 2. Some samples of different classes of vehicles (a) private car, (b) light trailer, (c) lorry or bus, (d) heavy trailer.
4. Experimental Results and Discussion This experiment used several hours of collected traffic data over a major highway in order to evaluate the proposed model. As described earlier, the proposed system has employed multiple FCM clusterings for classification of vehicles into S 1 = “private car”, S 2 = “light trailer”, S 3 = “lorry or bus”and S 4 = “heavy trailer”(see Fig. 2). Equal number of 100 vehicles per class from the available data and consequently, the total number of N = 400 vehicles are labeled as the ground truth as X = x1 , ..., x400 . The three features of width, length and speed are extracted for each passing vehicle as the inputs of the proposed model. Thus, each vehicle xk = (xk1 , xk2 , xk3 ), k = 1, ..., 400, is a pattern vector in R3 . The known speed limits of the observed vicinity for each class is shown in Table 5. The method is implemented in MATLAB using a common notebook platform. Table 5. Number of vehicles, their classes and their respective speed limits at the observed vicinity. Class
Private car
Light trailer
Lorry or bus
Heavy trailer
Number of vehicles Speed limit
100 100 km/h
100 80 km/h
100 90 km/h
100 80 km/h
In the proposed system, after several iterations of the initialization matrices for each classifier, the final respective partition matrix and consequently, the membership degrees of each vehicle to the defined clusters are computed. Figure 3 shows the ground truth and the final results from the FCM clustering in three dimensional representation. In the final results demonstration (Fig. 3b) the correct predictions are marked by “o”and the incorrect ones with “x”. The classifications are achieved by considering the maximum membership degree corresponding to given clusters for each vehicle. The confusion matrix of the detected results is presented in Table 6. According to the evaluation, the performance of the FCM clustering is promising for vehicle classification especially for “light trailer”and “lorry or bus”. However, the classification between “private car”and “light trailer”seems to be challenging because of the vast variety of dimensions for “private car”. The reason is that in this project “light lorry”and “light bus”are also considered under “private car”category. Furthermore, several traditional machine learning algorithms are investigated in order to cluster the dataset [15]. The dataset is divided into 80% and 20% for training and testing sets, respectively. The three features of speed,
al. / Procedia Computer 126000–000 (2018) 1344–1350 SalehSaleh JavadiJavadi et al. / et Procedia Computer ScienceScience 00 (2018)
3ULYDWHFDU /LJKWWUDLOHU /RUU\RUEXV +HDY\WUDLOHU
6SHHGPV
6SHHGPV
3ULYDWHFDU /LJKWWUDLOHU /RUU\RUEXV +HDY\WUDLOHU
1349
/HQJWKP
:LGWKP
/HQJWKP
(a)
:LGWKP
(b)
Fig. 3. The 3D representation of clustering based on the three given features, (a) ground truth, (b) predictions.
Table 6. The confusion matrix of the proposed fuzzy c-means clustering.
Private car Light trailer Lorry or bus Heavy trailer
Private car
Light trailer
95 0 0 0
5 99 0 0
Classified Lorry or bus 0 1 99 7
Heavy trailer
Accuracy
0 0 1 93
95% 99% 99% 93%
Average accuracy
96.50%
length and width are employed in these classifiers. The classification results of corresponding methods are provided in Table 7. It shows that the proposed multiple FCM clusterings outperforms other algorithms. The proposed FCM classifier accuracy 96.5% and positive predictive value 96.66% are superior to other methods by at least 1%. The reason is that the proposed model exploits the prior knowledge of the vehicles dimensions and regulations particularly in the categories of bus, lorry and heavy trailer. In addition, initializations of the partition matrices using the linguistic terms have improved the accuracy of the system.
Table 7. The classification results using different machine learning algorithms (T PR: true positive rate, PPV: positive predictive value, T P: true positive, FP: false positive, FN: false negative). Algorithm
T PR =
Decision Tree Quadratic Discriminant Analysis Support Vector Machine K Nearest Neighbor The posposed method
95.31% 92.19% 94.37% 95.00% 96.50%
TP T P + FN
PPV =
TP T P + FP
95.45% 93.65% 94.37% 95.32% 96.66%
In general, introducing the speed feature has enhanced clustering of “lorry or bus”from “heavy trailer”that have almost similar length and width as it is the main concern of this work. The proposed method can be very effective for clustering big data of traffic flow with simple extracted features of width, length and speed.
1350
Saleh Javadi et al. / Procedia Computer Science 126 (2018) 1344–1350 Saleh Javadi et al. / Procedia Computer Science 00 (2018) 000–000
5. Conclusion and Future Work In this paper, a method based on fuzzy c-means clustering algorithm is proposed for vehicle classification using dimensions and speed features suitable for considerable amount of data. Vehicle classification systems are essential for road maintenance and planning using the obtained information over a long run. The proposed classifier is able to classify vehicles in four classes of “private car”, “light trailer”, “lorry or bus”and “heavy trailer”. The classifiers performance was promising for different classes with average accuracy rate of 96.5% and average positive predictive value of 96.66% that outperforms some other traditional machine learning algorithms for the same dataset. Furthermore, it has been shown that using prior knowledge of traffic regulations and speed feature can enhance the classification between vehicles from different classes with similar width and length (e.g. straight truck and articulated truck). For future work, using the proposed method in combination with others such as vision-based approaches can be used to improve the performance. Acknowledgements The authors would like to express their gratitude to Prof. Elisabeth Rakus-Andersson at Blekinge Institute of Technology, Karlskrona, Sweden, for her support in this work. References [1] Zhao, D., and L. Lv (2017) “Deep reinforcement learning with visual attention for vehicle classification.” IEEE Transactions on Cognitive and Developmental Systems 9 (4): 356–367. [2] Yousaf K., A. Iftikhar, and A. Javed (2012) “Comparative analysis of automatic vehicle classification techniques: A survey.” International Journal of Image, Graphics and Signal Processing 4 (9): 52–59. [3] Mimbela, L. E. Y., and L. A. Klein “A summary of vehicle detection and surveillance technologies used in intelligent transportation systems.” Vehicle Detector Clearinghouse; 2000. Available from: https://www.fhwa.dot.gov/ohim/tvtw/vdstits.pdf [4] Hsieh, Jun-Wei, Shih-Hao Yu, Yung-Sheng Chen, and Wen-Fong Hu (2017) “Automatic traffic surveillance system for vehicle tracking and classification.” IEEE Transactions on Intelligent Transportation Systems 7 (2): 175–187. [5] Jiang, L., J. Li, L. Zhuo, and Z. Zhu “Robust vehicle classification based on the combination of deep features and handcrafted features.” In: 2017 IEEE Trustcom/BigDataSE/ICESS: 2017, p 859–865. [6] Lee, J. T., and Y. Chung “Deep learning-based vehicle classification using an ensemble of local expert and global networks.” In: 2017 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW): 2017, p 920–925. [7] Vu, T. A., L. H. Pham, T. K. Huynh, and S. V. U. Ha “Nighttime vehicle detection and classification via headlights trajectories matching.” In: 2017 International Conference on System Science and Engineering (ICSSE): 2017, p 221–225. [8] Aqel, S., A. Hmimid, M. A. Sabri, and A. Aarab “Road traffic: vehicle detection and classification.” In: 2017 Intelligent Systems and Computer Vision (ISCV): 2017, p 1–5. [9] “Lag (2001:559) om vgtrafikdefinitioner.” Notisum. Available from: http://www.notisum.se/rnp/sls/lag/20010559.htm. [10] Bezdek, J. C. Pattern Recognition with Fuzzy Objective Function Algorithms. Kluwer Academic Publishers; 1981. [11] Zettervall, Hang, Elisabeth Rakus-Andersson, and Henrik Forssell “Fuzzy C-Means Cluster Analysis and Approximated Data Strings in Operation Prognosis for Gastric Cancer Patients.” In: K.T. Atanassow, W. Homenda, O. Hryniewicz, J. Kacprzyk, M. Krawczak, Z. Nahorski, E. Szmidt, S. Zadrozny (eds) New Trends in Fuzzy Sets, Intuitionistic Fuzzy Sets, Generalized Nets and Related Topics. Vol. II: Applications. Warsaw: System Research Institute, Polish Academy of Sciences; 2013, p 181–200. [12] Rakus-Andersson, E. “Selected Algorithms of Computational Intelligence in Gastric Cancer Decision Making.”, In: Thomas Brzozowski (ed) New Advances in the Basic and Clinical Gastroenterology. InTech; 2012. [13] “Legal loading weight and dimension regulations for heavy vehicles 2010.” Transportstyrelsen. Available from: http://https://www.transportstyrelsen.se. [14] Mahmud, N., C. Seceleanu, and O. Ljungkrantz “ReSA Tool: structured requirements specification and SAT-based consistency-checking.” In: 2016 Federated Conference on Computer Science and Information Systems (FedCSIS): 2016, p 1737–1746. [15] Xu, Rui, and D. Wunsch, (2005) “Survey of clustering algorithms.” IEEE Transactions on Neural Networks 16 (3): 645–678.