-
摘要:
针对麻雀搜索算法后期种群多样性减少、易陷入局部最优解等问题,提出一种新的改进麻雀搜索算法。所提算法先引入小孔成像反向学习策略对发现者的位置进行更新,提升寻优位置的多样性;其次受Logistic模型的启发,提出一种新的自适应因子对安全阈值进行动态控制,平衡所提算法的全局搜索与局部开发的能力。通过与其他算法在6个基准函数上进行仿真对比,结果表明:所提算法的收敛精度与速度均优于其他算法。在工程应用上,用所提算法优化K-means聚类算法进行图像分割,峰值信噪比(PSNR)、结构相似性(SSIM)及特征相似性(FSIM)3种度量指标验证了其良好的分割性能。
-
关键词:
- 麻雀搜索算法 /
- 图像分割 /
- 小孔成像反向学习 /
- Logistic模型 /
- K-means聚类算法
Abstract:The sparrow search algorithm is improved to address its decrease of population diversity in the later stage and its easy fall into the local optimal solution. The improved algorithm introduces the oppositional learning strategy based small hole imaging to update the discoverer’s position, enhancing the diversity of the optimal position. Then, inspired by the Logistic model, a new adaptive factor is proposed to dynamically control the safety threshold, thus balancing the global search and local development capabilities of the algorithm. Simulations of comparison with other algorithms in six benchmark functions are conducted, and experimental results show higher convergence accuracy and speed of the improved algorithm than those of the other algorithms. In engineering applications, the proposed algorithm optimizes the K-means clustering algorithm for image segmentation with satisfactory segmentation performance in terms of peak signal to noise ratio (PSNR), structural similarity (SSIM) and feature similarity (FSIM).
-
表 1 测试函数
Table 1. Test functions
编号 函数名 函数表达式 取值区间 最小值 F1 Zakharov $f(x) = \displaystyle\sum\limits_{i = 1}^d {x_i^2 + { {\left(\displaystyle\sum\limits_{i = 1}^d {0.5i{x_i} } \right)}^2} + { {\left(\displaystyle\sum\limits_{i = 1}^d {0.5i{x_i} } \right)}^4} }$ [−5,10] 0 F2 Schwefel
2.22$f(x) = \displaystyle\sum\limits_{i = 1}^d {\left| { {x_i} } \right|} + \prod\limits_{i = 1}^d {\left| { {x_i} } \right|}$ [−10,10] 0 F3 Rotated Hyper-
Ellipsoid$f(x) = \displaystyle\sum\limits_{i = 1}^d { { {\left(\displaystyle\sum\limits_{j = 1}^i { {x_j} } \right)}^2} }$ [−100,100] 0 F4 Rastrigin $f(x) = \displaystyle\sum\limits_{i = 1}^d {\left[x_i^2 - 10\cos \;(2\text{π} {x_i}) + 10\right]}$ [−5.12,5.12] 0 F5 Schaffer N.2 $f({x_1},{x_2}) = 0.5 + \dfrac{ { { {\sin }^2}(x_1^2 - x_2^2) - 0.5} }{ { { {[1 + 0.001(x_1^2 + x_2^2)]}^2} } }$ [−100,100] 0 F6 Drop-
Wave$f({x_1},{x_2}) = - \dfrac{ {1 + \cos \;(12\sqrt {x_1^2 + x_2^2} )} }{ {0.5(x_1^2 + x_2^2) + 2} }$ [−5.12,5.12] −1 表 2 算法参数设置
Table 2. Parameter settings for algorithms
算法 参数设置 PSO $ {w_{\max }} = 0.9,{w_{\min }} = 0.2,{c_1} = 2,{c_2} = 2 $ SCA $a = 2,{r_2} \in [0,2\text{π} ],{r_3} \in [ - 2,2],{r_4} \in [0,1]$ ABC L = round (0.6dP), a=1 SSA $ {\rm{PD}} = 35,{\rm{ST}} = 0.6,{\rm{SD}} = 70 $ ISSA ${\rm{PD} } = 35,{\rm{ST}} = 0.6,{\rm{SD} } = 70$ MSSA ${\rm{PD} } = 35,{\rm{ST} } = 0.6\left(\dfrac{1}{ {1 + { {\rm{e} }^{t/10 - 20} } } }\right),{\rm{SD} } = 70$ 表 3 算法性能对比
Table 3. Performance comparison of algorithms
函数 维度 PSO SCA ABC SSA ISSA MSSA 均值 标准差 均值 标准差 均值 标准
差均值 标准差 均值 标准差 均值 标准差 F1 30 2.52×102 9.35×10 4.19×10 1.40×10 1.34×103 4.47×102 4.23×10−40 2.32×10−39 5.36×104 1.80×103 5.07×10−46 2.73×10−45 F2 30 1.29×10 2.23×10 6.22×10−1 5.48×10−1 8.58×10 1.58×10 1.83×10−35 9.69×10−35 1.32×10−5 1.21×10−5 2.71×10−38 1.47×10−37 F3 30 6.11×102 2.14×102 1.18×104 5.52×103 6.32×104 1.03×104 6.68×10−46 3.66×10−45 2.97×10−4 7.07×10−4 9.46×10−65 4.81×10−64 F4 30 2.17×102 2.42×10 8.13×10 3.61×10 2.60×102 1.27×10 0 0 1.02×10−7 2.15×10−7 0 0 F5 2 3.36×10−1 1.72×10−1 0 0 3.61×10−8 7.15×10−8 0 0 0 0 0 0 F6 2 −0.88 1.76×10−1 −1 0 −0.99 1.57×10−5 −1 0 −1 0 −1 0 表 4 时间复杂度对比
Table 4. Comparison of time complexity
算法 初始化种
群阶段发现者位置
更新阶段跟随者位置
更新阶段侦察预警
机制阶段全局最优位置
更新阶段SSA O(d+f(d)) O(d) O(d) O(d) O(d) ISSA O(d+f(d)) O(d) O(d) O(d) O(d) MSSA O(d+f(d)) O(d) O(d) O(d) O(d) 表 5 实验1的分割结果评估
Table 5. Evaluation of segmentation results for experiment 1
算法 PSNR SSIM FSIM K-means 4.59670 0.02719 0.64977 PSO 37.51920 0.56816 0.94510 SSA 38.36290 0.61893 0.92049 ISSA 39.62570 0.71613 0.93937 MSSA 39.62570 0.71613 0.93937 表 6 实验 2的分割结果评估
Table 6. Evaluation of segmentation results for experiment 2
算法 PSNR SSIM FSIM K-means 4.01260 0.02574 0.61662 PSO 36.23870 0.46239 0.93554 SSA 41.53260 0.75025 0.94916 ISSA 39.73070 0.65758 0.94255 MSSA 41.55340 0.75100 0.94976 表 7 实验3的分割结果评估
Table 7. Evaluation of segmentation results for experiment 3
算法 PSNR SSIM FSIM K-means 5.25340 0.00813 0.33502 PSO 39.31630 0.62781 0.97912 SSA 39.00710 0.64316 0.90803 ISSA 39.10880 0.64845 0.90652 MSSA 40.30030 0.68229 0.92895 表 8 实验4的分割结果评估
Table 8. Evaluation of segmentation results for experiment 4
算法 PSNR SSIM FSIM K-means 6.09730 0.10149 0.52270 PSO 37.96320 0.59825 0.93910 SSA 39.38630 0.68916 0.96929 ISSA 38.57120 0.62714 0.96676 MSSA 39.55090 0.69945 0.97200 表 9 实验5的分割结果评估
Table 9. Evaluation of segmentation results for experiment 5
算法 PSNR SSIM FSIM K-means 8.21190 0.04197 0.41687 PSO 38.80000 0.54837 0.96189 SSA 38.85060 0.58358 0.89783 ISSA 37.28800 0.45027 0.90825 MSSA 39.18070 0.60085 0.89722 表 10 实验6的分割结果评估
Table 10. Evaluation of segmentation results for experiment 6
算法 PSNR SSIM FSIM K-means 6.70790 0.02750 0.50615 PSO 39.11720 0.66199 0.94426 SSA 39.82990 0.62755 0.93491 ISSA 37.79500 0.54857 0.93213 MSSA 40.38320 0.67180 0.90882 表 11 实验7的分割结果评估
Table 11. Evaluation of segmentation results for experiment 7
算法 PSNR SSIM FSIM K-means 9.08630 0.05000 0.50498 PSO 39.30020 0.59669 0.93519 SSA 37.14440 0.43953 0.91722 ISSA 40.73710 0.68029 0.91686 MSSA 40.73710 0.68029 0.91686 表 12 实验8的分割结果评估
Table 12. Evaluation of segmentation results for experiment 8
算法 PSNR SSIM FSIM K-means 6.52240 0.01455 0.34518 PSO 36.68360 0.49072 0.96519 SSA 36.68360 0.49072 0.96519 ISSA 37.74220 0.55124 0.97844 MSSA 39.94510 0.64652 0.98883 -
[1] CAPOR HROSIK R, TUBA E, DOLICANIN E, et al. Brain image segmentation based on firefly algorithm combined with K-means clustering[J]. Studies in Informatics and Control, 2019, 28(2): 167-176. [2] LI H Y, HE H Z, WEN Y G. Dynamic particle swarm optimization and K-means clustering algorithm for image segmentation[J]. Optik, 2015, 126(24): 4817-4822. doi: 10.1016/j.ijleo.2015.09.127 [3] KAPOOR S, ZEYA I, SINGHAL C, et al. A grey wolf optimizer based automatic clustering algorithm for satellite image segmentation[J]. Procedia Computer Science, 2017, 115: 415-422. doi: 10.1016/j.procs.2017.09.100 [4] KHRISSI L, EL AKKAD N, SATORI H, et al. Clustering method and sine cosine algorithm for image segmentation[J]. Evolutionary Intelligence, 2022, 15(1): 669-682. doi: 10.1007/s12065-020-00544-z [5] XUE J K, SHEN B. A novel swarm intelligence optimization approach: sparrow search algorithm[J]. Systems Science & Control Engineering, 2020, 8(1): 22-34. [6] 吕鑫, 慕晓冬, 张钧. 基于改进麻雀搜索算法的多阈值图像分割[J]. 系统工程与电子技术, 2021, 43(2): 318-327. doi: 10.12305/j.issn.1001-506X.2021.02.05LYU X, MU X D, ZHANG J. Multi-threshold image segmentation based on improved sparrow search algorithm[J]. Systems Engineering and Electronics, 2021, 43(2): 318-327(in Chinese). doi: 10.12305/j.issn.1001-506X.2021.02.05 [7] 吕鑫, 慕晓冬, 张钧, 等. 混沌麻雀搜索优化算法[J]. 北京航空航天大学学报, 2021, 47(8): 1712-1720. doi: 10.13700/j.bh.1001-5965.2020.0298LYU X, MU X D, ZAHNG J, et al. Chaos sparrow search optimization algorithm[J]. Journal of Beijing University of Aeronautics and Astronautics, 2021, 47(8): 1712-1720(in Chinese). doi: 10.13700/j.bh.1001-5965.2020.0298 [8] LIU G Y, SHU C, LIANG Z W, et al. A modified sparrow search algorithm with application in 3d route planning for UAV[J]. Sensors, 2021, 21(4): 1224. doi: 10.3390/s21041224 [9] YUAN J H, ZHAO Z W, LIU Y P, et al. DMPPT control of photovoltaic microgrid based on improved sparrow search algorithm[J]. IEEE Access, 2021, 9: 16623-16629. doi: 10.1109/ACCESS.2021.3052960 [10] ZHANG C L, DING S F. A stochastic configuration network based on chaotic sparrow search algorithm[J]. Knowledge-Based Systems, 2021, 220: 106924. doi: 10.1016/j.knosys.2021.106924 [11] ZHU Y L, YOUSEFI N. Optimal parameter identification of PEMFC stacks using adaptive sparrow search algorithm[J]. International Journal of Hydrogen Energy, 2021, 46(14): 9541-9552. doi: 10.1016/j.ijhydene.2020.12.107 [12] LIU T T, YUAN Z, WU L, et al. Optimal brain tumor diagnosis based on deep learning and balanced sparrow search algorithm[J]. International Journal of Imaging Systems and Technology, 2021, 31(4): 1921-1935. doi: 10.1002/ima.22559 [13] WANG P, ZHANG Y, YANG H W. Research on economic optimization of microgrid cluster based on chaos sparrow search algorithm[J]. Computational Intelligence and Neuroscience, 2021, 2021: 1-18. [14] OUYANG C T, ZHU D L, WANG F Q. A learning sparrow search algorithm[J]. Computational Intelligence and Neuroscience, 2021, 2021: 3946958. [15] TIAN H, WANG K Q, YU B, et al. Hybrid improved sparrow search algorithm and sequential quadratic programming for solving the cost minimization of a hybrid photovoltaic, diesel generator, and battery energy storage system[J]. Energy Sources, Part A:Recovery, Utilization, and Environmental Effects, 2021, 2021: 1-17. [16] XING Z, YI C, LIN J H, et al. Multi-component fault diagnosis of wheelset-bearing using shift-invariant impulsive dictionary matching pursuit and sparrow search algorithm[J]. Measurement, 2021, 178: 109375. doi: 10.1016/j.measurement.2021.109375 [17] LI J. Robot path planning based on improved sparrow algorithm[J]. Journal of Physics:Conference Series, 2021, 1861(1): 012017. doi: 10.1088/1742-6596/1861/1/012017 [18] 徐航, 张达敏, 王依柔, 等. 基于高斯映射和小孔成像学习策略的鲸鱼优化算法[J]. 计算机应用研究, 2020, 37(11): 3271-3275. doi: 10.19734/j.issn.1001-3695.2019.08.0282XU H, ZHANG D M, WANG Y R, et al. Whale optimization algorithm based on gauss map and small hole imaging learning strategy[J]. Application Research of Computers, 2020, 37(11): 3271-3275(in Chinese). doi: 10.19734/j.issn.1001-3695.2019.08.0282 [19] ERISOGLU M, CALIS N, SAKALLIOGLU S. A new algorithm for initial cluster centers in k-means algorithm[J]. Pattern Recognition Letters, 2011, 32(14): 1701-1705. doi: 10.1016/j.patrec.2011.07.011 [20] XIONG C Q, HUA Z, LV K, et al. An improved K-means text clustering algorithm by optimizing initial cluster centers[C]//International Conference on Cloud Computing and Big Data (CCBD). Piscataway: IEEE Press, 2016 : 265-268. [21] RANA S, JASOLA S, KUMAR R. A hybrid sequential approach for data clustering using K-means and particle swarm optimization algorithm[J]. International Journal of Engineering, Science and Technology, 2010, 2(6): 167-176. [22] SHI H B, XU M. A data classification method using genetic algorithm and K-means algorithm with optimizing initial cluster center[C]//IEEE International Conference on Computer and Communication Engineering Technology. Piscataway: IEEE Press, 2018 : 224-228. [23] HUSSAIN S F, PERVEZ A, HUSSAIN M. Co-clustering optimization using artificial bee colony(ABC) algorithm[J]. Applied Soft Computing, 2020, 97: 106725. doi: 10.1016/j.asoc.2020.106725 [24] ABD EL AZIZ M, EWEES A A, HASSANIEN A E. Whale optimization algorithm and moth-flame optimization for multilevel thresholding image segmentation[J]. Expert Systems with Applications, 2017, 83: 242-256. doi: 10.1016/j.eswa.2017.04.023 [25] ZHAO D, LIU L, YU F H, et al. Ant colony optimization with horizontal and vertical crossover search: Fundamental visions for multi-threshold image segmentation[J]. Expert Systems with Applications, 2021, 167: 114122. doi: 10.1016/j.eswa.2020.114122 -