Implementation of an Hybrid Approach on FPGA [PDF]

In this study, a hardware solution for car plate detection problem is proposed based on softcomputing techniques, namely

9 downloads 5 Views 161KB Size

Recommend Stories


an fpga implementation of ieee
Don't fear change. The surprise is the only way to new discoveries. Be playful! Gordana Biernat

FPGA Implementation of Interleaver
Life is not meant to be easy, my child; but take courage: it can be delightful. George Bernard Shaw

Design and implementation on FPGA
Those who bring sunshine to the lives of others cannot keep it from themselves. J. M. Barrie

FPGA implementation
We can't help everyone, but everyone can help someone. Ronald Reagan

An FPGA Implementation of an Investment Strategy Processor
Stop acting so small. You are the universe in ecstatic motion. Rumi

FPGA Implementation of AES Algorithm
The greatest of richness is the richness of the soul. Prophet Muhammad (Peace be upon him)

Efficient FPGA Implementation Of Convolution
If you want to become full, let yourself be empty. Lao Tzu

Implementation of Serial and Parallel Bubble Sort on Fpga
If you feel beautiful, then you are. Even if you don't, you still are. Terri Guillemets

FPGA Implementation of Sliding Mode Control
If you want to go quickly, go alone. If you want to go far, go together. African proverb

Implementation of a GPU rasterization stage on a FPGA
Come let us be friends for once. Let us make life easy on us. Let us be loved ones and lovers. The earth

Idea Transcript


Implementation of an Hybrid Approach on FPGA for License Plate Detection Using Genetic Algorithm and Neural Networks Gökmen AVCI, Mehmet Muzaffer KÖSTEN, Halis ALTUN, Fuat KARAKAYA, Mehmet Ali ÇAVUŞLU Electrical and Electronics Engineering Department, Nigde University {muuzoo,gokmenavci,fkarakaya,halisaltun}@nigde.edu.tr, [email protected]

Abstract In this study, a hardware solution for car plate detection problem is proposed based on softcomputing techniques, namely the genetic algorithm and neural networks which are implemented on Programmable Field Gate Array (FPGA). The proposed plate detection requires a successful integration of image processing and pattern classifier algorithms, which impose a high computation load, such as edge detection, statistical bit-wise feature extraction, neural networks and genetic algorithm. In literature, software based approaches to this problem have already been proposed. In this study, however, a hardware based solution is provided by implementing feature extraction, genetic algorithm and neural networks on FPGA.

1. Introduction Due to growing number of vehicles, especially in the highly populated city area, an indispensible need has been arose for the systems which provide automatic vehicle detection and traffic flow control for traffic management and planning systems. These systems are expected to provide information related to vehicle such as the license plate etc. to monitor and further enable the control of traffic based on the data collected. In literature software based license plate detection applications have been proposed [5-8]. There are two fundamental stages in a license plate recognition system; firstly detection of the plate location and then extracting the characters within the plate area and passing these into an OCR. In literature, numerous algorithm based on edge detection, Hough transform, morphological processes, color based approaches etc. are proposed to locate a license plate entirely in software environment [1-2].

In this study we are proposing an embedded system based on Field Programmable Gate Array (FPGA) to solve license plate location problem. Genetic Algorithm (GA) is utilized to provide a candidate of license plate region within an image. A Multi Layered Perceptron (MLP) on the other hand, provides a measure of fitness value for the candidate. In the proposed approach, in the first step, a Sobel operator is applied on the image to extract vertical edges. A threshold is then applied to produce a binary image with vertical edges. A set of statistical features is extracted from the binary image in the second step which is utilized to train a MLP neural network. Before training session, a feature selection is performed to determine more informative features to achieve higher degree of accuracy in the recognition. Based on the results, it is decided to employ only four statistical features which allow the MLP neural network to achieve an acceptable degree of accuracy. Based on the results, a VHDL code is produced to verify and test the whole system including reading and writing image from RAM, extracting statistical features, the GA a MLP engines. The system is implemented using VHDL code on CYCLONE II FPGA after having verified by QUARTUS II 8.1 Web Edition. The rest of paper is organized as follows: In the second section, the general structure of the proposed system is introduced. The third section explains the basics of GA and MLP while the fourth section details the implementation of the whole system including feature selection, the engines developed for GA and MLP covering implementation of a Linear Feedback Shift Register (LFSR) to produce random number

2. The proposed system The proposed system is implemented on Cyclone II EP2C35F672C6N FPGA from ALTERA. The detection of plate location in an

image is performed through three stages. In the first stage, a sobel operator with a 3x3 kernel size is applied on the image and then after a thresholding operation a binary image is obtained which contains only the vertical lines. In the second stage, a window size of 180x24 pixels is selected from image. The location of the window is provided by the GA algorithm as a candidate of license plate. On the candidate window a feature extracting task is performed to obtain four statistical features. The resulting features are supplied to MLP neural network which is acting as a fitness function to provide the goodness of the candidate window. Figure 1 illustrates the whole stages and in Figure 2 block diagram of the proposed approach is pictured.

The algorithm follows the basic steps below: 1. 2.

3.

4.

5. Image

Sobel filter + Threshold

6.

Producing a candidate by GA population generator

7.

Feature Extraction Detection of licence plate by MLP NN Figure 1. Flowchart of the license plate detector based on GA + MLP NN

3. Genetic networks

algorithm

and

neural

Genetic algorithm is a search algorithm which utilizes random search technique to find an optimal solution via parameter coding. It is know that GA reaches to near optimal solution after the search step, provided that the appropriate parameters are utilized. The algorithm is based on the principle of “natural selection” proposed by Darwin. The aim is to mimic adaptation ability of natural system for the design of artificial systems. The algorithm is run using a set of candidates which is called “initial generation”. The previous generations is expected to produce a new generation with better fitness values. The new generation is obtained by performing some genetic algorithm operators on the previous generation such as crossover, mutation, elitism etc. Among the current population, the best ones which have the highest fitness values are selected while the rest are destroyed.

The initial step: a population is randomized with n candidates The testing step: Each of the candidates is evaluated using a fitness function (in our case, the MLP neural networks is acting an evaluation function) The sorting step : In this step the candidates are sorted and selected to be parent of new generation according their fitness value The crossover step: among the selected individual candidates a mating is performed according to a crossover probability rule. The mutation step: a mutation is performed on the individual to allow the algorithm to further explore the search space The constructing new generation: a new generation is constructed applying the operators and the new generation is swapped with the old generation. Go to second step until a solution is reached or the maximum number of iteration is exhausted.

Apart from the basic steps listed above some modification in the literature is proposed to improve the performance of the algorithm. In this study, a MLP neural network is used as a fitness function to measure the fitness of each individual. The structure of neural network consists of an input, hidden and output layer. Each layer contains neurons which are operating nonlinearly on the incoming values and produced an output which is passed to next layer. Training of a MLP neural network involves the minimization of the error defined between the desired value and the value produced by MLP neural network. During the training phase the interconnected weights between layers are optimized in order to reduce the total error. This procedure is accomplished by the back propagation algorithm based on the gradient descent [13]. A training set is prepared for training of MLP neural network by extracting 8 statistical features from each of the candidate region in the image. Among these features, the informative features which boost the performance of the classifiers are determined. For this purpose, a feature selection given in the literature is employed [10]. The results show that among the eight features, a set of four features are more informative. So a set of training data is extracted by analyzing 1480 candidate regions. The training data consists of equal number of negative (nonlicense) and positive (license) regions.

4. Implementation of the proposed system For a real-time application, processes such as edge detection, thresholding, feature extraction and classification are implemented on the FPGA for detecting of the license plate. The genetic algorithm engine and neural network application are also implemented on FPGA. The general structure of the implementation is illustrated in Figure 2. In literature a license plate locator on FPGA based neural network has been given in [11]. In this application a search is conducted by shifting a fixed-size window on the image sequentially. This approach will be called here as the “sequential search approach”. For comparison purposes, we have implemented the sequential search approach as explained in [11] so as to highlight advantage of the approach based on combination of GA and MLP neural network that we proposed in this study. In terms of resource consumption, the sequential search approach and the proposed approach seem to be competitive; the difference in the logic unit area occupied is only around 8%. The sequential approach occupies 8110 logic unit area while the combination occupies 8822 logic unit area.

stage, four features are extracted from a candidate window with a size of 180x24 pixels, which is later on evaluated by MLP neural network in order to determine whether the window is a plate region or not.

4.2. Implementation of mlp neural network A MLP neural network with a input layer of four neurons and with a output layer of one neuron is implemented on FPGA. The number of neurons in the hidden layer is set to 2. The most challenging part of neural network implementation on FPGA is to realization of the nonlinear activation function which is the fundamental building block of MLP neural networks. Realization of the non-linear activation function has been extensively studied in the literature. Adaptation of the non-linear activation functions are most critical part in implementation of neural network on FPGA. A neuron produces an output by the nonlinear activation function which takes the multiplication of the inputs and the corresponding weights as its arguments. As the implementation of exponential terms on FPGA prohibitively difficult, researchers are advised to use different approach to realize the sigmoidal activation function. One of the functions which behaves similarly as the logarithmic sigmoidal function is the one given in (1) . f(x)=(1+x/(1+|x|))/2

SOBEL + THRESHOLDING

IMAGE

(1)

The behavior of the function and the logarithmic sigmoidal is given in Figure 3.

FPGA

SRAM

GENETİC ALGORİTHM A

ON-CHİP MEMORY

FEATURE EXTRACTION

LFSR

MLP NN

Figure 2. The structure of the proposed approach

4.1. Implementation of sobel filter and feature extraction The first process on the image is to find the vertical edge. The process utilizes a Sobel operator with a kernel in the size of 3x3 pixels. The processed image is saved into RAM in binary image format after thresholding operation. In this

Figure 3. The behavior of logarithmic sigmoidal function and that of f(x) in the range of [5, -5]

4.3. Implementation of genetic algorithm In the heart of Genetic Algorithm, a random number generator plays an important role. It governs the generation of the candidates through evolutionary processes and search strategies.

Thus, a pseudo number generator is implemented using Linear Feedback Shift Register (LFSR) which is illustrated in Figure 4. In order to ensure that the generator gives a feasible result within the search area, the minimum and maximum values are restricted within an allowed range. The numbers produced by LFSR are used to determine the candidate region in the image and it is passed to the process in order to extract the features related the candidate region. Then, the extracted features are fed into the MLP neural network which provides a fitness value. The fitness value of the region is stored in the interior RAM for further processing. After completing the production phase of the initial population, the best set of candidates are selected to match, based on the rules which governs crossover and mutation operators. At the end of process, all new generation is exposed to the fitness function and all of them evaluate on the term of “goodness”. This process is kept on until either up to the maximum number of iteration or a threshold of fitness value. At the final stage, the best candidate is nominated as the license plate region. Figure 5 shows a winning candidate as a license plate region

Figure 4. Linear Feedback Shift Register (LFSR)

Figure 5. An image with a license plate and the winning candidate chosen by the proposed system

N =− ( ix wx ) ( iy − wy )

(2)

Where N is the number of candidates, ix and iy are the size of image and wx and wy are the size of window. So the process should evaluate each of the candidates until it exhausts the search space sequentially. On the other hand, the algorithm based GA is expected to focus on the regions in the search space that contains, with high possibility, the license plate. So it shrinks quickly the feasible search area and converges to the sub optimal solution. In our experiment, we have experienced that the algorithm has successfully converged after visiting 3000 possible regions as shown in Table 1. So this result is an indication that the proposed method is approximately 15 times quicker than the sequential search approach which finds the license plate location after 47520 search attempts in the given settings. This result is in line with the results given in literature that the software based GA+MLP NN approach for detection of license plate be approximately 200 times faster than the software sequential search approach if a high resolution image is analyzed [21]. It should be emphasis that, on the other hand, if the search space is not huge (i.e. if the image size is not big enough), the proposed algorithm will not be expected to be superior to the sequential search algorithm. Table 1. The behavior of the proposed algorithm with different setting of population size and iteration The number of iteration

The number of population

20 30 30 35 40

100 75 100 100 125

Total number of region searched 2000 2250 3000 3500 5000

Result unsuccessful unsuccessful successful successful successfull

6. Acknowledgements This work has been sponsored by Tubitak Project under contract of 108E055.

5. Conclusion and discussion 7. References Genetic algorithm seems to be a feasible solution if the search space is huge which prohibitively forbids a successful search within a limited time. For example if an image of size 450x200 (ix,iy) is analyzed using by the sequential search approach proposed by [11], the size of search space will be 47520, according to the equation (2) if a candidate window with the size of 180x24 (wx,wy) pixels is used.

[1] P. Dubey, “Heuristic Approach For License Plate Detection”, IEEE International Conference on Advanced Video and Signal based Surveillance, 2005 pp. 366-370. [2] S. Duman, R. Oktem, and A. E. Cetin. “Alternative feature extraction approaches for car plate recognition”, Signal Processing and Communications Applications Conference, Proceedings of the IEEE 13th, May 2005, pp. 324-327.

[3] F. Wang and H. Qin, “A FPGA based driver drowsiness detecting system”, Vehicular Electronics and Safety, IEEE International Conference, 14- 16 Oct. 2005, pp. 358-363. [4] K. Appiah and A. Hunter, “A single-chip FPGA implementation of real-time adaptive background model Field-Programmable Technology”, IEEE International Conference, 11-14 December 2005, pp. 95-102. [5] Z. Telatar ve E. Çamaşırcıoğlu, “Renk Bilgisi ve Ysa Kullanarak Plaka Algılama ve Tanıma”, SIU 2007 IEEE 15. Sinyal ve İletişim Uygulamaları Kurultayı, Eskişehir, Nisan-2007. [6] G. Wall, F. Iqbal, X. Liu and S. Foo, “A Fast FPGA Implementation of a Unique Multilevel Tree-based Image Classifier”, MAPLD International Conference, 2005 [7] P. Y. Hsiao, L. T. Li, C. H. Chen, S. W. Chen and S. J. Chen, “An FPGA architecture design of parameteradaptive real-time image processing system for edge detection”, Emerging Information Technology Conference, 15-16 Aug. 2005, pp. 3. [8] F. Kahraman ve M. Gökmen, “GABOR Süzgeçler Kullanılarak Taşıt Plakalarının Yerinin Saptanması”, 11. sinyal İşleme ve İletişim Uygulamaları Kurultayı, İstanbul, 2003. [9] M. Yu and Y. D. Kim, “An Approach to Korean License Plate Recognition Based on Vertical Edge Matching”, IEEE International Conference on Systems, Man, and Cybernetics, Nashville, TN, USA, 2000, Volume: 4, pp. 2975-2980 [10] M. Zaffalon and M. Hutter, “Robust feature selection by mutual information distributions In Darwiche”, Proceedings of the 18th Conference on Uncertainty in Artificial Intelligence, Morgan Kaufmann, San Francisco, 2002, pp. 577–584. [11] M. A. Çavuşlu, F. Karakaya ve H. Altun, “ÇKA Tipi Yapay Sinir Ağı Kullanılarak Plaka Yeri Tespitinin FPGA’da Donanumsal Gerçeklenmesi”, Akıllı Sistemlerde Yenilikler ve Uygulamaları Sempozyumu, 2008. [12] M. A. Çavuslu, C. Karakuzu and S. Şahin, “Neural Network Hardware Implementation Using FPGA”, 3. ISEECE, 2006, pp. 287 – 290 [13] H. Altun and T. Yalcinoz, “Soft Computing Algorithms in Power Economic Dispatch Problem: A Review and Comparative Studies”, Expert Systems with Applications, 2008 [14] P. Turgut ve A. Arslan, “Sürekli Bir Kirişte Maksimum Momentlerin Genetik Algoritmalar ile Belirlenmesi” DEÜ Mühendislik Fakültesi FEN ve Mühendislik Dergisi , Ekim 2001, Cilt: 3 Sayı: 3 sh. 1-9 [15] R. Daş, İ. Türkoğlu and M. Poyraz, “Genetik Algoritma Yöntemiyle Internet Erişim Kayıtlarından Bilgi Çıkarılması” SAÜ Fen Bilimleri Enstitüsü Dergisi , 2006, 10. Cilt, 2.Sayı, s. 67-72. [16] S. Narayanan and C. Purdy, “Hardware Implementation of Genetic Algorithm Modules for Intelligent Systems”, Department of Electrical and Computer Engineering and Computer Science, University of Cincinnati, Cincinnati, USA 2005. [17] S.D. Scott, “HGA: A Hardware-based Genetic Algorithm” Master’s Thesis, University of Nebraska, 1994. [18] B. Shackleford, E. Okushi, M. Yasuda, H. Koizumi, K. Seo, T. Iwamoto and H. Yasuura, “Highperformance hardware design and implementation of

genetic algorithms”, in Teodorescu et al, Hardware Iimplementation of Intelligent Systems, 2001, pp. 5387, [19] M. Kurt ve C. Semetay, “Genetik Algoritma Ve Uygulama Alanları”, Mühendis ve Makina, TMMOB Makine Mühendisleri Odası, Ekim 2001, Sayı:501 [20] G. G. Emel ve Ç. Taşkın,”Genetik Algoritmalar Ve Uygulama Alanları”, Uludağ Üniversitesi İ.İ.B.F. Dergisi, 2002, Cilt:21, Sayı:1, s. 129-152. [21] M. Peker, H. Altun ve F. Karakaya ,“Plaka Yeri Tespit Probleminin Çözümünde Genetik Algoritma Parametrelerinin Etkisi” , Sinyal İşleme ve İletişim Uygulamaları, Didim, 2008

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.