Journal of Robotics, Networking and Artificial Life, Vol. 5, No. 2 (September 2018) 139-143___________________________________________________________________________________________________________Reinforced Quantum-behaved Particle Swarm Optimization Based Neural Networksfor Image Inspection
Li-Chun Lai

Computer and Intelligent Robot Program for Bachelor Degree, National Pingtung University
lclai@mail.nptu.edu.tw
Chia-Nan Ko

Department of Automation Engineering, Nan Kai University of Technology
t105@nkut.edu.tw

Abstract
This paper combines the niche particle concept and quantum-behaved particle swarm optimization (QPSO)
method with chaotic mutation to train neural networks for image inspection. When exploring themethodology of reinforced quantum-behaved particle swarm (RQPSO) to train neural networks(RQPSONNs) for image inspection, first, image clustering is adopted to capture feasible information. In
this research, the use of support vector regression (SVR) method determines the initial architecture of theneural networks. After initialization, the neural network architecture can be optimized by RQPSO. Thenthe optimal neural networks can perform image inspection. In this paper, the program of RQPSONNs forimage inspection will be built. The values of root mean square error (RMSE) and peak signal to noise ratio(PSNR) are calculated to evaluate the efficiency of the RQPSONNs. Moreover, the experiment results willverify the usability of the proposed RQPSONNs for inspecting image. This research can be used inindustrial automation to improve product quality and production efficiency.
Keywords: Quantum-behaved particle swarm optimization, Niche particle, Support vector regression,
Image inspection

1.

better state.11-13 To overcome the premature phenomenon
in QPSO, a modified quantum-behaved particle swarm
optimization (MQPSO) is proposed to identify nonlinearsystems.14 Authors proposed niche particle swarm
optimization (NPSO) for image segmentation.15 In NPSO
algorithms, particles changing the place of the course tocenter the appropriate position (niche) of the particle will
be absorbed. Then, particles amalgamate the small
appropriate position (small niche) to become a large
appropriate position (big niche).16
This paper combines the niche particle concept, quantumbehaved particle swarm optimization (QPSO) methodwith chaotic mutation to train neural networks for image
inspection. Some experiment results verified the usabilityof the proposed RQPSONNs for inspecting image.

Introduction

The application of image inspection is quite extensive
including medical science, machine vision, and predicting
analysis of patterns in smart automation production
fields.1–5 The input images are first filtered by a high-passfilter, which is used to remove direct current and enhancehigh-frequency components. And then the filtered input
images, which are overlapped rather than displaced fromeach other in the plane, serve as the input images.6 Neuralnetworks have the capacities of learning, adaption, andnonlinear mapping of images.7
The PSO algorithm possesses the ability of highconvergent speed, easily falling in some local optima is its
fatal defect. Many researchers have presented revised PSO
algorithms and obtained good results.8,9 Anotherimprovement on traditional PSO algorithm is quantumbehaved particle swarm optimization (QPSO).10 However,in QPSO, particles fall into local optimal state inmultimode optimization problems and cannot find any

Copyright © 2018, the Authors. Published by Atlantis Press.
This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
139

Journal of Robotics, Networking and Artificial Life, Vol. 5, No. 2 (September 2018) 139-143___________________________________________________________________________________________________________2.

Modified Quantum Particle Swarm

3.1. Radial basis function neural networks

Optimization

One can use a neural network to estimate the input–output
relation of a dynamic system. In this paper, radial basis
function neural networks (RBFNNs) are adopted because
they have a simple structure, as shown in Figure 1. When
the Gaussian function is chosen as the radial basis function,RBFNNs can be expressed in the form
 xˆ − m 2 LLi(7)yˆ j (t + 1) = ∑ Gi wij = ∑ wij exp −2σ2i =1i =1i
Tˆwhere x(t ) = [xˆ1 (t ), xˆ 2 (t ), , xˆ m (t )] is the input vector;
Tyˆ (t ) = [ yˆ1 (t ), yˆ 2 (t ), , yˆ m (t )] is the output vector; wij isthe synaptic weight; Gi is the Gaussian function; miand σ i are the center and width of Gi respectively; andL is the number of the Gaussian functions, which is also
equal to the number of hidden layer nodes.
Given a set of training input–output pairs x( k ) , y( k ) ,k = 1,2,, N , the optimization problem of RBFNNs is todetermine the values of wij , mi , and σ i to minimize
the index

From the view of classical dynamics, to avoid explosion
and guarantee convergence, particles must be bounded andfly in an attractive potential field. Clerc and Kennedy8
have proved that if these coefficients are properly defined,
the particle’s position pi will converge to the center ofpotential field, pf c = [ pf1c , pf 2c ,, pf nc ] , and is definedas:pf i c =( c1 ⋅ r1 ⋅ pil + c2 ⋅ r2 ⋅ p g )( c1 ⋅ r1 + c2 ⋅ r2 ), i = 1,2,, n .

(1)where pil and p g are the best position of the ith
particle and the global best position; c1 and c2 are
cognitive and social constriction coefficients, respectively;
r1 and r2 are random numbers between 0 and 1.
Inspired by the behavior that particles move in a boundedstate and preserve the global search ability, Sun et al.13
proposed the QPSO algorithm. In the QPSO model, thesolution of time-independent Schrödinger equation for thissystem in one dimensional space can be expressed as:11L 1
(2)
pi = pf i c ± ⋅ ln ,2 λ 
where λ is a random number uniformly distributed on[0, 1] and L is the characteristic length of delta potential
well (called "Creativity" of particles) which specifies thesearch scope of a particle. The mainstream thought pointand can be expressed as the following forms:13(,G11x1

w11w12x2

G2

(4)xmGLwL 2Σŷ1Σŷ2Σyˆ p

wLp

Fig. 1. The structure of RBFNNs.

3.2. Niche evolution(6)

The appropriate position evolves (niche evolution) cansolve the multimodal function optimization problems
effectively.17 Adopt the structure of appropriate positionand search some local extreme values synchronously andavoid early convergence. It is difficult to determine theappropriate radius (niche radius) σ share . Define the nicheradius as follows:18

where ∆β is step length of β , ∆fit is the change rateof optimal estimation so far. The mechanism of adaptive
annealing learning can overcome the stagnation problem
to accelerate the convergent speed.
3.

(8)− yˆ ( k ) ,where yˆ ( k ) is the corresponding output of RBFNNs
when the input x̂ to the network is equal to x(k )The creative coefficient β with adaptive annealinglearning mechanism according to the change rate ofoptimal estimation has the form:γ(5)β = β max − ∆β ⋅ (∆fit ) ,∆fit = p g − pil ,(k )k =1n p
n p n p
mbest = ∑ i ,1 , ∑ i , 2 ,, ∑ i ,n , i = 1,2,, n, (3)i =1 n  i =1 n i =1 n

L = 2 ⋅ β mbest − pi2N∑y=J)

Reinforced Quantum-Behaved Particle SwarmOptimization Neural Networks140

Journal of Robotics, Networking and Artificial Life, Vol. 5, No. 2 (September 2018) 139-143___________________________________________________________________________________________________________σ share = σ 0 red  − λ avg R 

r = max{ui − ν i }(10)

1≤ i ≤ Nd avg =N −1 N2∑ ∑ d (ϕ i ,ϕ j )N ( N − 1) i =1 j =i +1

R=NIn this paper, a work piece for image inspection is
performed by the proposed RQPSONNs shown as Figure
2.

(9)

(11)

∑ (ui − ν i )

2(12)

i =1

where λ is an adjusting parameter, R is norm of [u,ν ] ,σ 0 is the relative parameter of σ share . d avg is the average
distance of particles.

Fig. 2. work piece on the conveyer belt for inspection.

3.3. Chaotic mutation
The Chaos phenomenon in nonlinear science means a kindof definite but unpredictable motion state. It has alreadybeen applied to optimizing stochastic optimization
problems efficiently. This study adopts chaotic mutation
operation to avoid falling into some local extreme value.
The logistic equation of Chaos iterating is expressed asfollows:17

η kj +1 = µη kj (1 − η kj ) k = 1,2,
4.

The frame of image recognition is illustrated as Figure 3.
Then, the experiment results of cracked work piece andperfect work piece are shown as Figures 4 and 5.
Meanwhile, the values of PSNR and RMSE are shown in
Table 1. The experiment results verified the usability ofthe proposed RQPSONNs for inspecting image.

(13)

Simulation ResultsFig. 3. Frame of image inspection.

Image Out2

Shape Report (Shape Matching)

Image Out

Global Rectangle

Booleanx1Left

406

y1Top

306

x2Right

603

y2Bottom

700

CentroidElement32648

Element 2600.64

x600.57

y504.12

Object Size
32648
Score
972.77

Fig. 4. Cracked work piece.

141

Journal of Robotics, Networking and Artificial Life, Vol. 5, No. 2 (September 2018) 139-143___________________________________________________________________________________________________________

Image Out2

Shape Report (Shape Matching)

Image Out

Global Rectangle

Booleanx1Left0y1Top0x2Right0

y2Bottom0Centroid

Element16090

Element 2622.972

x0.00

y0.00

Object Size0Score
0.00

Fig. 5. Perfect work piece.

Table 1. The values of PSNR and RMSE for cracked work pieceand perfect work piece.

5.

work piece

PSNR

RMSE

cracked work piece

18.21613.127

perfect work piece

20.13615.0372. G. B. Massoud, R. R. Denis, and D. Carl, Multivariate image
analysis for inspection of multilayer films, Polymer Testing40, 2014, pp. 196-206.
3. J. H. Chen, M. C. Su, R. Cao, S. C. Hsu, and J. C. Lu, A selforganizing map optimization based image recognition andprocessing model for bridge crack inspection, Automation inConstruction 73, 2017, pp. 58-66.
4. J. Liu, Z. Tang, W. Gui, W Liu, P. Xu, and J. Zhu,Application of statistical modeling of image spatialstructures to automated visual inspection of product quality,Journal of Process Control 44, 2016, pp. 23-40.
5. Y .G. Cen, R. Z. Zhao, L. H. Cen, L. H. Cui, Z. J. Miao, andZ. Wei, Defect inspection for TFT-LCD images based on thelow-rank matrix reconstruction, Neurocomputing 149 (PartC), 2015, pp. 1206-1215.
X. P. Deng and D. M. Zhao, High-pass filtering and6.
frequency spectrum correlation for larger size image
recoginition, Optik 123, 2012, pp. 924-927.
7. P. Banumathi, Artificial neural network techniques used foridentifying defects in woven fabric images, International
Journal of Latest Trends in Engineering and Technology
3(3), 2014, pp. 248-252.
8. A. Ratnaweera, S. K. Halgamuge, and H. C. Watson, Selforganizing hierarchical particle swarm optimizer with timevarying acceleration coefficients, IEEE Transactions on
Evolutionary Computation 8, 2004, pp. 240-255.
9. D. S. Wang, D. P. Tan, and L. Liu, Particle swarm
optimization algorithm: an overview, Soft Computing 22(2),2018, pp. 387-408.
10. M. Clerc and J. Kennedy, The particle swarm: explosion,
stability, and convergence in a multidimensional complex

Conclusions

In the study, RQPSONNs combining the niche particle
concept, quantum-behaved particle swarm optimization(QPSO) method with chaotic mutation to train neuralnetworks is proposed to solve image inspection. Moreover,the experiment results have verified the usability of theproposed RQPSONNs for inspecting image.
AcknowledgementsThis work was supported in part by the Ministry ofScience and Technology, R.O.C., under grants MOST
106-2221-E-252-001.
References
1. L. M. Chen, Z. Chen, and A. S. Feng, Image analysis
algorithm and verification for on-line molecular sieve sizeand shape inspection, Advanced Powder Technology 25(2) ,2014, pp. 508-513.

142

Journal of Robotics, Networking and Artificial Life, Vol. 5, No. 2 (September 2018) 139-143___________________________________________________________________________________________________________space, IEEE Transactions on Evolutionary Computation 1,
2002, pp. 68-73.
11. Y. Fang, Y. D. Zhao, M. Ke, X. Zhao, H. H. Iu, and K. P.
Wong, Quantum-inspired particle swarm optimization forpower system operations considering wind power
uncertainty and carbon tax in australia, IEEE Transactions
on Industrial Informatics. 8(4), 2012, pp. 880-888.
12. S. L. Ho, S. Y. Yang, G. Z. Ni, and J. Huang, A quantumbased particle swarm optimization algorithm applied toinverse problems, IEEE Transactions on Magnetics 49(5),2013, pp. 2069-2072.
13. J. Sun, W. Fang, X. Wu, V. Palade, and W. Xu, Quantumbehaved particle swarm optimization: analysis of individual
particle behavior and parameter selection, Evolutionary
Computation 20(3), 2012, pp. 349-393.
14. C. N. Ko, Y. M. Jau and J. T. Jeng, Parameter estimation of
chaotic dynamical systems using quantum-behaved particle
swarm optimization bsed on hybrid evolution, Journal of
Information Science and Engineering 31(2), 2015, pp. 675689.

15. M. M. Bai, H. Sun, and L. Y. Wu, Method for image
segmentation based on niche particle swarm optimization,
Computer Engineering and Applications 46(3), 2010, pp.
183-185.
16. G. J. Cheng, Y. An, Z. Wang, and K. Zhu, Oil well placement
optimization using niche particle swarm optimization, inProceedings of 2012 Eighth International Conference on
Computational Intelligence and Security (CIS), 2012, pp. 6164.
17. H. Li, Y. Zhang, A. Wang, Medical image registration basedon JS measure and niche chaotic mutation quantum-behaved
particle swarm optimization, in Proceedings of 2010 6thInternational Conference on Wireless Communications
Networking and Mobile Computing, 2010, pp. 23-25.
18. O. L. Zhao, The research of the niche particle swarm
optimization based on self-adaptive radius technology, inProceeding of 2009 Asia Pacific Conference on Information
Processing, 2009, pp. 97-100.

143