Image segmentation method based on multi-agent assisted multi-objective particle swarm optimization rough clustering
Patent Information
- Application Number
- CN202311763232.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-12-20
AI Technical Summary
该方法在实现图像分割时存在两个方面的问题:第一个问题是该算法对初始中心敏感、易陷入局部最优
[0029]其一,本发明由于构造了基于密度和距离加权的粗糙类内紧致性目标函数和基于粗糙体积的类间可分性函数,可以从不同角度评估聚类结果,提高图像分割的性能。
Smart Images

Figure CN117710674B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital image processing technology, specifically relating to an image segmentation method that can be used for natural image recognition and computer vision preprocessing. Background Technology
[0002] Image segmentation is an important research direction in computer vision, a crucial step in the transition from image processing to image analysis, and has long been a focus of scholarly attention. It involves subdividing an image into multiple sub-regions or objects to extract information of interest. This makes the information in the image clearer and more prominent, thus aiding subsequent image analysis and processing. In recent years, image segmentation technology has played a vital role in fields such as autonomous driving, medical image analysis, robot perception, and remote sensing-assisted agriculture. As the complexity of real-world applications continues to increase, the performance requirements for image segmentation technology are also rising. Therefore, many novel image segmentation algorithms have emerged in recent years, including threshold-based segmentation methods, region-based segmentation methods, and clustering-based segmentation methods. Among these, clustering-based image segmentation methods have been widely studied and applied due to their advantages such as strong adaptability, low computational complexity, and no need for prior knowledge. Based on this, coarse clustering, by introducing the concepts of upper and lower approximation sets from rough set theory, improves the clustering process, effectively addressing the impact of incomplete, imprecise, or uncertain information in images on the segmentation task and exhibiting good stability.
[0003] In 2012, Mohapatra et al. proposed a kernel-induced coarse C-means clustering algorithm for human lymphocyte image segmentation. This algorithm utilizes a nonlinear mapping function to transform the feature vectors before performing coarse clustering to segment lymphocyte images. However, this method suffers from two main problems in image segmentation: First, the algorithm is sensitive to initial centers and prone to getting trapped in local optima. This can lead to oscillations or stagnation during iterations, resulting in unsatisfactory clustering results. Second, the algorithm uses a single clustering criterion, failing to evaluate the image segmentation results from multiple perspectives.
[0004] To address the first problem, Wang and Luo proposed a coarse clustering algorithm based on particle swarm optimization in 2013. They designed an adaptive boundary weight strategy and used particle swarm optimization to obtain the final image segmentation result. This enhanced the global search capability and effectively reduced the possibility of getting trapped in local optima. However, because this algorithm uses the same weights for all samples in the upper and lower approximate sets when calculating the fitness function, it ignores the influence of different samples on the cluster centers, resulting in poor segmentation performance.
[0005] To address the second problem, Zhao et al. proposed a multi-objective coarse clustering image segmentation algorithm based on a particle competition mechanism in 2022. This algorithm constructs a coarse clustering fitness function that integrates non-local spatial information of the image and combines it with a separability function to jointly evaluate the clustering results. Furthermore, it improves the multi-objective particle swarm optimization algorithm based on a pairwise competitive particle weight update strategy, optimizing both fitness functions to obtain the final clustering result. However, because this algorithm requires a large number of expensive function calculations in each iteration, it results in excessively long runtime and low efficiency. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of the prior art by proposing a multi-agent-assisted multi-target particle swarm optimization coarse clustering image segmentation method to improve segmentation performance, reduce running time, and increase segmentation efficiency.
[0007] The technical approach to achieving the objective of this invention is as follows: By fully utilizing the density and distance information of samples to construct a coarse clustering fitness function, and combining it with a constructed inter-class separability function, the clustering results are evaluated from multiple perspectives, thereby improving segmentation performance. Furthermore, by using an improved surrogate-assisted optimization framework to predict the fitness function value, the running time is reduced, and segmentation efficiency is improved.
[0008] Based on the above ideas, the technical solution of the present invention includes the following steps:
[0009] (1) Input the image X to be segmented and set the initial parameter values, namely the number of clusters K, the spatial radius r, and the lower approximation weight ω. low Population size N, initial current iteration count t=1, maximum iteration count T, number of particles in the elite set ψ, number of particles added by the new agent mu, classification model parameters h;
[0010] (2) Metric T for obtaining density information of the image to be segmented m ;
[0011] (3) Integrate the density and distance information of image features into coarse clustering to form a coarse intra-class compactness objective function J1 based on density and distance weighting;
[0012] (4) Construct a class separability function J2 based on rough volume by utilizing the imbalance ratio between classes in rough clustering;
[0013] (5) An initial population P with N particles is generated using the Latin hypercube sampling method. The fitness value of each particle in the population is calculated based on the intra-class compactness objective function J1 and the inter-class separability function J2.
[0014] (6) Calculate the non-dominated ranking value Rank and crowding distance CrowDis of the particle based on its fitness value;
[0015] (7) Particles with a non-dominated ranking value of 1 are marked as positive samples, and the rest are negative samples; KNN classification surrogate model is selected based on particle characteristics and the positive and negative class samples they are marked, and the particles are classified through this model.
[0016] (8) Calculate the quality index value S(p) of particles using the results of non-dominated and crowded ranking. z ); Train the existing RBF regression surrogate model based on particle characteristics and their quality index values;
[0017] (9) Design a multi-agent collaborative multi-objective particle swarm optimization framework to update the current population:
[0018] (9a) Predict the positive and negative class samples of particles and their quality index values, and use the prediction results to select elite clusters;
[0019] (9b) When updating the velocity and position of a particle in the population, two elite particles are randomly selected from the elite cluster, and an elite competition strategy is used to determine the winner between the two particles. The velocity and position of the particle are then updated using the winning particle.
[0020] (9c) Perform step (9b) on all particles in the current population to obtain the updated population;
[0021] (9d) Input the updated population into the trained classification proxy model, output the positive and negative classes of each particle after the update, and determine whether the number of these classes is less than the set number of particles to be added, mu:
[0022] If so, then the true function is calculated for particles whose class samples are positive, that is, the rough intra-class compactness objective function J1 and inter-class separability function J2 of positive particles are calculated.
[0023] Otherwise, the particles with positive class samples are input into the trained regression surrogate model, the predicted results of the goodness and badness index values of the particles with positive class samples are output, and the true function is calculated for the mu particles with the highest predicted results.
[0024] (10) Update the current iteration count t = t + 1, and determine whether the current iteration count has reached the maximum iteration count T:
[0025] If so, proceed to step (11);
[0026] Otherwise, return to step (6);
[0027] (11) Calculate the clustering effectiveness index I by using the compactness measure E(K) and the separability measure D(K), select the particle with the highest clustering effectiveness index value as the optimal particle, cluster each pixel of the image according to the optimal particle, obtain the clustering label of the image pixel, and output the segmentation result of image X.
[0028] Compared with the prior art, the present invention has the following beneficial technical effects:
[0029] Firstly, this invention constructs a coarse intra-class compactness objective function based on density and distance weighting and an inter-class separability function based on coarse volume, which can evaluate clustering results from different perspectives and improve image segmentation performance.
[0030] Secondly, this invention designs a multi-agent collaborative multi-objective optimization framework, which uses classification and regression models to predict the category labels and quality index values of particles, and combines the prediction results of the two models to select elite clusters for population updates, thereby improving segmentation efficiency while ensuring algorithm convergence.
[0031] Third, this invention improves model performance by combining the prediction results of classification and regression surrogate models to jointly select particles for evaluating the true function, thereby updating the surrogate model. Attached Figure Description
[0032] Figure 1 This is a flowchart illustrating the implementation of the present invention;
[0033] Figure 2 The image shows the result of simulated segmentation of images in the Berkeley database using the present invention and existing methods.
[0034] Figure 3 The image shows the results of simulated segmentation of images in the Weizmann database using the present invention and existing methods. Detailed Implementation
[0035] The embodiments and effects of the present invention will be further described in detail below with reference to the accompanying drawings.
[0036] Reference Figure 1 The implementation steps for this example are as follows:
[0037] Step 1: Input the image to be segmented and set the initial parameter values.
[0038] Let the input image to be segmented be X, and its initialization parameters be as follows:
[0039] Cluster number K, spatial radius r, lower approximation weight ω lowPopulation size N, current iteration number t=1, maximum iteration number T, number of particles in the elite set ψ, number of particles added by the new agent mu, and classification model parameters h.
[0040] This example sets, but is not limited to, r = 2, ω low =0.9, N=100, T=50, ψ=10, mu=5, h=10.
[0041] Step 2: Obtain the density information metric T of the image to be segmented. m .
[0042] (2.1) Calculate the Euclidean distance O between each pixel. gm :
[0043] O gm =||u g -u m || 2
[0044] Among them, u g For the g-th pixel, u m For the m-th pixel, ||u g -u m || 2 Let g be the Euclidean distance between pixel g and pixel m;
[0045] (2.2) The set of pixels whose Euclidean distance to the m-th pixel is less than r is represented as a measure of the density information of the m-th pixel.
[0046] Step 3: Generate the initial population P.
[0047] Existing methods for generating the initial population include uniform sampling, Monte Carlo sampling, and Latin hypercube sampling. This example uses, but is not limited to, the Latin hypercube sampling method, the specific implementation of which is as follows:
[0048] Randomly generate an N×(3×K) matrix a within the range [0,1].
[0049] Randomly generate an N×(3×K) matrix b within the range [0,N-1].
[0050] Summing matrices a and b and then multiplying by the difference between the maximum and minimum values of each dimension yields the initial population P.
[0051] Step 4: Design a coarse intraclass compactness function J1 based on density and distance weighting.
[0052] (4.1) Calculate the density information D of the j-th sample with respect to the i-th cluster center. ij :
[0053]
[0054] In the formula, A i Let |A| represent the set of samples in the i-th class of coarse C-means clustering. i |T represents the number of samples of the i-th class. j |For set T j The number of samples;
[0055] (4.2) Calculate the distance L between the j-th sample and the i-th cluster center. ij :
[0056]
[0057]
[0058] In the formula, ||x j -c i || 2 Let σ be the Euclidean distance between the j-th sample and the i-th cluster center. i Let the i-th sample be the cluster center c. i The maximum value of the Euclidean distance between them;
[0059] (4.3) Construct the density and distance-based weights M of the j-th sample to the i-th cluster center. ij :
[0060] M ij =L ij +D ij
[0061] (4.4) By fusing density- and distance-based weights, the lower approximate compactness function J is obtained. L (i):
[0062]
[0063] Among them, L(A) i Let |L(A) represent the sample set of the approximate region under the i-th class, and |L(A) represent the sample set of the approximate region under the i-th class. i | represents the number of samples in the approximate region under the i-th class;
[0064] (4.5) By fusing density- and distance-based weights, the boundary approximate compactness function J is obtained. B (i):
[0065]
[0066] Among them, B(A) i Let |B(A) represent the set of samples from the i-th class of boundary regions. i | represents the number of samples in the i-th class boundary region;
[0067] (4.6) Combining the approximate compactness function J L (i) with the boundary approximately compact function J B (i) Construct a coarse intra-class compactness objective function J1 based on density and distance weighting:
[0068]
[0069] Where, ω low and (1-ω low ) represent the lower approximate weights and boundary weights, respectively. This represents the empty set.
[0070] Step 5: Design the inter-class separability function J2 based on rough volume.
[0071] (5.1) Construct the rough volume V of type l l and the rough volume V of type i i :
[0072]
[0073]
[0074] Among them, A l Let L(A) represent the set of samples in the l-th class of coarse C-means clustering. l ) and B(A l ) represent A respectively l The sample set in the lower approximation and boundary regions, ω low and (1-ω low ) represent the lower approximate weights and boundary weights, respectively, ||x j -c l || 2 Let |x| be the Euclidean distance between pixel j and cluster center l. j -c i || 2 Let j be the Euclidean distance between pixel j and cluster center i;
[0075] (5.2) Calculate the roughness volume ratio δ between class l and class j. li :
[0076]
[0077] (5.3) The inter-class separability function J2 based on rough volume, constructed by combining the rough volume ratio:
[0078]
[0079] Where min{·} and median{·} represent finding the minimum and median values, respectively, ||c l -c i || 2 Let be the Euclidean distance between the cluster centers of the l-th and i-th clusters.
[0080] Step 6: Calculate the intra-class compactness function and inter-class separability function values of particles in population P.
[0081] (6.1) Input the pixel values of each particle in the initial population and the image to be segmented into the coarse intra-class compactness function J1 constructed above based on density and distance weighting, and calculate the intra-class compactness function value;
[0082] (6.2) Input the pixel values of each row of samples in the initial population and the image to be segmented into the inter-class separability function J2 constructed above based on coarse volume, and calculate the inter-class separability function value.
[0083] Step 7: Calculate the non-dominated sorting value and crowding distance of the particles.
[0084] (7.1) Obtain the non-dominated ranking value Rank of the particles calculated by the real function:
[0085] Set the non-dominated sorting value Rank of the particles in the non-dominated solution set calculated by the real function to 1;
[0086] Remove particles with a non-dominated rank value of 1, and set the rank value of the remaining particles that are in the non-dominated solution set to 2.
[0087] By analogy, the non-dominated ranking values (Rank) of all particles calculated using the real function are obtained;
[0088] (7.2) Calculate the crowding distance CrowDis based on the particle function values calculated using the true function:
[0089] CrowDis(p z )=(J1(p z+1 )-J1(p z-1 ))+(J2(p z+1 )-J2(p z-1 ))
[0090] Among them, CrowDis(p z ) represents the crowding distance of the z-th particle, p z+1 and p z-1 For the characteristic space and particle p z For two adjacent particles, J1(·) and J2(·) are the compactness objective function value and the separability objective function value within the roughness class, respectively.
[0091] Step 8: Obtain the particle classification label and quality index value.
[0092] (8.1) Particles with a non-dominated ranking value of 1 are marked as positive samples, and the rest are negative samples;
[0093] (8.2) Calculate the quality index value S(p) of particles using the results of non-dominated sorting and crowding sorting. z The formula is as follows:
[0094]
[0095] Wherein, Rank(p) z CrowDis(p) represents the non-dominated ranking value of particle z. z R represents the crowding distance of particle z. w It is the set of particles whose non-dominated sorting value is w.
[0096] Step 9: Train the RBF regression surrogate model.
[0097] (9.1) Based on the particle characteristics and their quality index S, solve the following system of linear equations to obtain the parameter matrix λ.
[0098]
[0099] in, S(p) is the input matrix of performance index values. z Let be the quality index value of the z-th particle, and b be 1×N. t A matrix of all ones, where B and H are N. t ×N t The matrix, N t Given the number of input particles, matrices B and H are represented as follows:
[0100]
[0101] in, Let be the basis function transformation for the Euclidean distance between the z-th particle and the q-th particle. For the existing basis functions, δ zq =χ q (p z ), χ q (p z ) represents the transformation of the existing linear polynomial onto the z-th particle;
[0102] Existing basis functions include Gaussian functions, multiple quadratic functions, and inverse multiple quadratic functions. This example uses, but is not limited to, Gaussian functions.
[0103] Existing linear polynomials include linear radial basis functions, quadratic exponential radial basis functions, and polynomial radial basis functions, etc. This example uses, but is not limited to, linear radial basis functions;
[0104] (9.2) From the parameter matrix λ and the basis functions and χ j (p z The RBF regression surrogate model is obtained as follows:
[0105]
[0106] Among them, S'(p z ) is the predicted value of the quality index of the z-th particle.
[0107] Step 10: Select elite clusters based on the population prediction results of classification and regression models.
[0108] (10.1) Select a classification proxy model. Existing classification proxy models include decision trees, random forests and KNN, etc. This example adopts, but is not limited to, the KNN classification proxy model.
[0109] (10.2) Classify the particles in the population according to the known particle categories, that is, use the KNN classification surrogate model to classify the particles to be predicted as follows:
[0110] Find the known class of particles and the particle to be predicted p in the feature space. z The most recent h particles, denoted as Q h (p z );
[0111] Record Q h (p z Count the number of particles with positive and negative category labels in the dataset, and then make a judgment on them:
[0112] If the number of positive classes is greater than the number of negative classes, then the particle p to be predicted... z The category label is positive;
[0113] Otherwise, the particle to be predicted, p z The category label is negative.
[0114] (10.3) Determine whether the number of positive class particles is less than the number of elite class particles ψ:
[0115] If so, then particles with a positive category will be considered as the elite cluster;
[0116] Otherwise, the positive-class particles are input into the trained regression surrogate model, which outputs the prediction results of the positive-class particle quality index, and selects the ψ particles with the highest prediction results as the elite cluster.
[0117] Step 11: Update the particle's velocity and position.
[0118] (11.1) Two elite particles are randomly selected from the elite cluster, and an elite competition strategy is used to determine the winner between the two particles, as shown below:
[0119]
[0120] Where, p a and p b For two elite particles randomly selected from an elite cluster, S'(p a ) and S'(p b Let p be the value of two performance indicators predicted using a regression surrogate model. win For p a With p b The winner between them;
[0121] (11.2) Through the winner p win The velocity and position of particle z are updated using the following formulas:
[0122] v z (t+1)=ω1v z (t)+ω2(p win -p z (t))
[0123] p z (t+1)=p z (t)+v z (t+1)
[0124] In the formula, v z (t) and p z (t) represents the velocity and position of particle z in generation t, v z (t+1) and p z (t+1) represents the updated velocity and position of particle z, and ω1 and ω2 are random numbers in the range [0,1].
[0125] Step 12: Select particles for real function calculation.
[0126] The updated population is input into the classification proxy model, which outputs the positive and negative classes of each particle after the update, and determines whether the number of positive particles is less than the set number of particles to be added, mu.
[0127] If so, then the true function is calculated for particles whose class samples are positive, that is, the rough intra-class compactness objective function J1 and inter-class separability function J2 of positive particles are calculated.
[0128] Otherwise, the particles with positive class samples are used as input to the trained regression surrogate model, which outputs the prediction results of the quality index values of particles with positive class samples, and calculates the true function for the mu particles with the highest prediction results.
[0129] Step 13: Determine if the stopping condition has been met.
[0130] Increment the current iteration number t by 1, and check if t is less than T:
[0131] If so, proceed to step 14;
[0132] Otherwise, return to step 7.
[0133] Step 14: Select the optimal particle, perform image clustering, and output the result.
[0134] (14.1) Calculate the clustering effectiveness index I using the compactness measure E(K) and the separability measure D(K):
[0135]
[0136] in, K is the number of clusters, ||x j -c i || 2 Let A be the Euclidean distance between the j-th sample and the cluster center of the i-th cluster. i Let |c| be the set of samples of class i. e -c f || 2 Let be the Euclidean distance between the cluster centers of class e and class f;
[0137] (14.2) Select the particle with the highest clustering effectiveness index value as the optimal particle;
[0138] (14.3) Cluster the pixels of the image according to the optimal particles, and transform the 1×(3×K) optimal particles into a 3×K matrix by matrix transpose, with each column of the matrix being a cluster center.
[0139] (14.4) Calculate the distance between each pixel in the image and the K cluster centers, and assign each pixel to the cluster center with the smallest distance to it, thus obtaining the assignment of all pixels;
[0140] (14.5) Assign the pixel to the image as the final segmentation result and output it.
[0141] The technical effects of the present invention will be further explained below with reference to simulation experiments:
[0142] 1. Simulation conditions:
[0143] The simulation experiment was conducted on a computer with an Intel(R) Core(TM) i7-1165G7 CPU @ 2.80GHz, 16GB of memory, and MATLAB R2021b software environment.
[0144] 2. Simulation content:
[0145] Simulation 1: The present invention, along with existing methods FCM, RCM, RFCM, MOVGA, SFFCM, AFCF, and KRVEA, were used to segment image 135069 in the Berkeley image database. The results are as follows: Figure 2 As shown, where:
[0146] Figure 2 (a) is the original image of image 135069;
[0147] Figure 2 (b) is the standard segmentation map of image 135069;
[0148] Figure 2 (c) is the segmentation result of the 135069 image using the existing FCM method;
[0149] Figure 2 (d) is the segmentation result of the 135069 image using the existing RCM method;
[0150] Figure 2 (e) is the segmentation result of the 135069 image using the existing RFCM method;
[0151] Figure 2 (f) is the segmentation result of the 135069 image using the existing MOVGA method;
[0152] Figure 2 (g) is the segmentation result of the 135069 image using the existing SFFCM method;
[0153] Figure 2 (h) is the segmentation result of the 135069 image using the existing AFCF method;
[0154] Figure 2 (i) is the segmentation result of the 135069 image using the existing KRVEA method;
[0155] Figure 2 (j) is the segmentation result of the 135069 image using the method of the present invention.
[0156] from Figure 2As can be seen, the segmentation results of this invention can separate the sky and the eagle compared with the standard segmentation image, and the number of categories in the segmentation results is consistent with the number of categories in the standard segmentation image. Its segmentation effect is significantly better than the existing FCM method, RCM method, RFCM method, MOVGA method, SFFCM method, AFCF method, and KRVEA method.
[0157] Simulation 2: The present invention, along with existing methods FCM, RCM, RFCM, MOVGA, SFFCM, AFCF, and KRVEA, were used to segment the image numbered leafpav in the Weizmann image database. The results are as follows: Figure 3 As shown, where:
[0158] Figure 3 (a) is the original image from leafpav;
[0159] Figure 3 (b) is the standard segmentation map of the leafpav image;
[0160] Figure 3 (c) is the segmentation result of the leafpav image using the existing FCM method;
[0161] Figure 3 (d) is the segmentation result of the leafpav image using the existing RCM method;
[0162] Figure 3 (e) is the segmentation result of the leafpav image using the existing RFCM method;
[0163] Figure 3 (f) is the segmentation result of the leafpav image using the existing MOVGA method;
[0164] Figure 3 (g) is the segmentation result of the leafpav image using the existing SFFCM method;
[0165] Figure 3 (h) is the segmentation result of the leafpav image using the existing AFCF method;
[0166] Figure 3 (i) is the segmentation result of the leafpav image using the existing KRVEA method;
[0167] Figure 3 (j) is the segmentation result of the leafpav image using the method of the present invention.
[0168] from Figure 3As can be seen, the segmentation results of this invention can retain more complete detail information compared with the standard segmentation image. That is, it can cut out the root part of the maple leaf, and the edges of the maple leaf and the background are distinct. Its segmentation effect is significantly better than the existing FCM method, RCM method, RFCM method, MOVGA method, SFFCM method, AFCF method, and KRVEA method.
[0169] The above description is merely a specific example of the present invention and does not constitute any limitation on the present invention. The reference numerals for each step are only for clear description of the embodiments of the present invention and for ease of understanding, and their order is not limited. Obviously, those skilled in the art, after understanding the content and principles of the present invention, may make various modifications and changes in form and detail without departing from the principles and structure of the present invention. However, these modifications and changes based on the concept of the present invention are still within the scope of protection of the claims of the present invention.
Claims
1. A multi-agent assisted multi-objective particle swarm optimization coarse clustering image segmentation method, characterized in that, Includes the following steps: (1) Input the image X to be segmented and set the initial parameter values, namely the number of clusters K, the spatial radius r, and the lower approximation weight ω. low Population size N, initial current iteration count t=1, maximum iteration count T, number of particles in the elite set ψ, number of particles added by the new agent mu, classification model parameters h; (2) Metric T for obtaining density information of the image to be segmented m ; (3) Integrate the density and distance information of image features into coarse clustering to form a coarse intra-class compactness objective function J1 based on density and distance weighting; (4) Construct a class separability function J2 based on rough volume by utilizing the imbalance ratio between classes in rough clustering; (5) An initial population P with N particles is generated using the Latin hypercube sampling method. The fitness value of each particle in the population is calculated based on the intra-class compactness objective function J1 and the inter-class separability function J2. (6) Calculate the non-dominated ranking value Rank and crowding distance CrowDis of the particle based on its fitness value; (7) Particles with a non-dominated ranking value of 1 are marked as positive samples, and the rest are negative samples; KNN classification surrogate model is selected based on particle characteristics and the positive and negative class samples they are marked, and the particles are classified through this model. (8) Calculate the quality index value S(p) of particles using the results of non-dominated and crowded ranking. z ); Train the existing RBF regression surrogate model based on particle characteristics and their quality index values; (9) Design a multi-agent collaborative multi-objective particle swarm optimization framework to update the current population: (9a) Predict the positive and negative class samples of particles and their quality index values, and use the prediction results to select elite clusters; (9b) When updating the velocity and position of a particle in the population, two elite particles are randomly selected from the elite cluster, and an elite competition strategy is used to determine the winner between the two particles. The velocity and position of the particle are then updated using the winning particle. (9c) Perform step (9b) on all particles in the current population to obtain the updated population; (9d) Input the updated population into the trained classification proxy model, output the positive and negative classes of each particle after the update, and determine whether the number of these classes is less than the set number of particles to be added, mu: If so, then the true function is calculated for particles whose class samples are positive, that is, the rough intra-class compactness objective function J1 and inter-class separability function J2 of positive particles are calculated. Otherwise, the particles with positive class samples are input into the trained regression surrogate model, the predicted results of the goodness and badness index values of the particles with positive class samples are output, and the true function is calculated for the mu particles with the highest predicted results. (10) Update the current iteration count t = t + 1, and determine whether the current iteration count has reached the maximum iteration count T: If so, proceed to step (11); Otherwise, return to step (6); (11) Calculate the clustering effectiveness index I by using the compactness measure E(K) and the separability measure D(K), select the particle with the highest clustering effectiveness index value as the optimal particle, cluster each pixel of the image according to the optimal particle, obtain the clustering label of the image pixel, and output the segmentation result of image X.
2. The method according to claim 1, characterized in that, Step (2) Obtain the density information metric T of the image to be segmented m The formula is as follows: Among them, T m It is a measure of the density information of the m-th pixel, u g For the g-th pixel, u m For the m-th pixel, ||u g -u m || 2 For u g with u m The Euclidean distance between them.
3. The method according to claim 1, characterized in that, In step (3), the rough intra-class compactness objective function J1, based on density and distance weighting, is constructed as follows: Among them, A i Let L(A) represent the set of samples in the i-th class of coarse C-means clustering. i ) and B(A i ) represent A respectively i The sample set in the lower approximation and boundary regions, ω low and (1-ω low ) represent the lower approximate weights and boundary weights, respectively. J represents the empty set. L (i) and J B (i) is specifically represented as follows: In the formula, |L(A i )| and |B(A i |x| represents the number of samples in the approximate region and the boundary region under the i-th class, respectively. j -c i || 2 Let x represent the j-th sample. j With the i-th cluster center c i The Euclidean distance between them, M ij For sample x j For cluster center c i The density- and distance-weighted measure is specifically represented as follows: In the formula, σ i Let the i-th sample be the cluster center c. i The maximum distance between them, |T j |For set T j The number of samples, |A i | represents the number of samples of the i-th class.
4. The method according to claim 1, characterized in that, In step (4), the inter-class separability function J2 based on rough volume is constructed as follows: Where min{·} and median{·} represent finding the minimum and median values, respectively, ||c l -c i || 2 Let δ be the Euclidean distance between the cluster centers of the l-th and i-th clusters. li The roughness volume ratio between class l and class i is specifically expressed as follows: In the formula, V l It is a rough volume measure of type l, V i L(A) is the roughness volume measure of the i-th class. i ) and B(A i ) represent A respectively i The sample set in the lower approximation and boundary regions, ω low and (1-ω low ) represent the lower approximate weight and the boundary weight, respectively, x j It is the j-th sample of its class.
5. The method according to claim 1, characterized in that, Step (5) uses the Latin hypercube sampling method to generate an initial population P with N particles, as follows: Randomly generate an N×(3×K) matrix a within the range [0,1]. Randomly generate an N×(3×K) matrix b within the range [0,N-1]. Summing matrices a and b and then multiplying by the difference between the maximum and minimum values of each dimension yields the initial population P.
6. The method according to claim 1, characterized in that: In step (6), the non-dominated ranking value Rank of the particles is obtained based on the fitness value of the particles. The non-dominated ranking value Rank of the particles that are calculated by the real function and are in the non-dominated solution set is set to 1; the particles with a non-dominated ranking value Rank of 1 are removed, and the Rank value of the remaining particles that are in the non-dominated solution set is set to 2; and so on, to obtain the non-dominated ranking value Rank of all particles in the current population. In step (6), the crowding distance CrowDis is calculated based on the particle's fitness value, using the following formula: CrowDis(p z )=(J1(p z+1 )-J1(p z-1 ))+(J2(p z+1 )-J2(p z-1 )) Among them, CrowDis(p z ) represents the crowding distance of the z-th particle, p z+1 and p z-1 For the characteristic space and particle p z For two adjacent particles, J1(·) and J2(·) are the compactness objective function value and the separability objective function value within the roughness class, respectively.
7. The method according to claim 1, characterized in that, In step (7), the particles are classified using the KNN classification surrogate model, as follows: (7a) Find the known class of particles and the particle to be predicted p in the feature space. z The most recent h particles, denoted as Q h (p z ); (7b) Record Q h (p z The number of particles with positive and negative category labels in the sample: If the number of positive classes is greater than the number of negative classes, then the particle p to be predicted... z The category label is positive. Otherwise, the particle to be predicted, p z The category label is negative.
8. The method according to claim 1, characterized in that, Step (8) Calculate the particle quality index value S(p) using the results of non-dominated and crowded ranking. z The formula is as follows: Wherein, Rank(p) z CrowDis(p) represents the non-dominated ranking value of particle z. z R represents the crowding distance of particle z. w It is the set of particles whose non-dominated sorting value is w.
9. The method according to claim 1, characterized in that, Step (8) Train the existing RBF regression surrogate model based on the particle characteristics and their quality index values, as follows: (8a) Based on the particle characteristics and their quality index S, solve the following system of linear equations to obtain the parameter matrix λ. in, S(p) is the input matrix of performance index values. z Let be the quality index value of the z-th particle. Let B and H be constant matrices, and let N be a constant matrix. t ×N t The matrix, N t Given the number of input particles, matrices B and H are represented as follows: in, Let be the basis function transformation for the Euclidean distance between the z-th particle and the q-th particle. For the existing basis functions, δ zq =χ q (p z ), χ q (p z ) represents the transformation of the existing linear polynomial onto the z-th particle; (8b) From the parameter matrix λ, basis functions and χ j (p i The RBF regression surrogate model is obtained as follows: Among them, S'(p z ) is the predicted value of the quality index of the z-th particle.
10. The method according to claim 1, characterized in that, Step (9a) predicts the positive and negative class samples of particles and their quality index values, and uses the prediction results to select elite clusters, as follows: (9a1) The current population is input into the trained classification proxy model, which outputs the positive and negative categories of each particle; (9a2) Determine whether the number of positive class particles is less than the number of elite set particles ψ: If so, then particles with a positive category will be considered as the elite cluster; Otherwise, the positive-class particles are input into the trained regression surrogate model, which outputs the prediction results of the positive-class particle quality index, and selects the ψ particles with the highest prediction results as the elite cluster.
11. The method according to claim 1, characterized in that, In step (9b), an elite competition strategy is used to determine the winner between the two particles, and the velocity and position of that particle are updated, as follows: (9b1) Two elite particles are randomly selected from the elite cluster, and an elite competition strategy is used to determine the winner between the two particles, as shown below: Where, p a and p b For two elite particles randomly selected from an elite cluster, S'(p a ) and S'(p b Let p be the value of two performance indicators predicted using a regression surrogate model. win For p a With p b The winner between them; (9b2) Through the winner p win The velocity and position of particle z are updated using the following formulas: v z (t+1)=ω1v z (t)+ω2(p win -p z (t)) p z (t+1)=p z (t)+v z (t+1) In the formula, v z (t) and p z (t) represents the velocity and position of particle z in generation t, v z (t+1) and p z (t+1) represents the updated velocity and position of particle z, and ω1 and ω2 are random numbers in the range [0,1].
12. The method according to claim 1, characterized in that: In step (11), the clustering effectiveness index I is obtained through the compactness measure E(K) and the separability measure D(K), and the formula is as follows: Where K is the number of clusters, ||x j -c i || 2 Let A be the Euclidean distance between the j-th sample and the cluster center of the i-th cluster. i Let |c| be the set of samples of class i. e -c f || 2 Let be the Euclidean distance between the cluster centers of class e and class f.
13. The method according to claim 1, characterized in that: In step (11), the pixels of the image are clustered according to the optimal particle, as follows: The optimal particle of 1×(3×K) is transformed into a 3×K matrix by matrix transpose, and each column of the matrix is a cluster center; Calculate the distance between each pixel in the image and the K cluster centers, and assign the pixel to the class with the smallest distance.
Citation Information
Patent Citations
Image segmentation method based on improved multi-objective particle swarm optimization and clustering
CN103985112A
Agent-driven multi-objective evolutionary fuzzy clustering method based on preference information
CN113723449A