Image segmentation method and system based on complex network label propagation
By constructing an image segmentation method based on complex networks, using color, texture features and centroid coordinates to calculate regional similarity, obtain core nodes and perform label propagation, the problem of existing label propagation algorithms being sensitive to initial label selection and blurred segmentation boundaries in image segmentation is solved, and high-precision image segmentation effect is achieved.
Patent Information
- Application Number
- CN202510558063.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-12
AI Technical Summary
The existing tag propagation algorithm is highly sensitive to initial tag selection when applied in the field of image segmentation, which can easily lead to oscillation of the result, blurred segmentation boundaries, and lack the ability to adapt to image spatial continuity and multi-scale features.
The image segmentation method based on complex network label propagation is adopted, by building an image network, using the color and texture characteristics of the pre-segmented area, combining the center of mass coordinates to calculate the area similarity, obtain core nodes and perform label propagation, and update the node labels in combination with local density and attraction, and finally merge the same community area.
It improves the accuracy and segmentation effect of image segmentation, clearly presents the target outline and retains detailed information, significantly improving the performance of image segmentation.
Smart Images

Figure CN120472163A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image segmentation detection, and in particular to an image segmentation method and system based on complex network label propagation. Background Art
[0002] Image segmentation, as the foundation of image analysis and understanding, aims to divide an image into multiple regions with specific semantic meanings. Traditional image segmentation algorithms include threshold-based segmentation, edge detection-based segmentation, and region-growing-based segmentation. In recent years, deep learning-based segmentation algorithms have demonstrated promising performance in key areas such as semantic segmentation, injecting new vitality into the development of image segmentation technology. With continuous technological advancements, the application of image segmentation technology has become increasingly widespread. For example, in medical image analysis, these techniques are used to accurately segment lesions, assisting doctors in diagnosis. In autonomous driving, they help vehicles identify key information such as roads and pedestrians, enhancing environmental perception. In remote sensing image processing, they are used for tasks such as land use classification and forest detection. Image segmentation is also used in video surveillance, virtual reality, and other fields. However, with the increasing complexity of application scenarios and the surge in data volume, efficient and accurate segmentation of objects in complex backgrounds has become a major challenge in the field of image segmentation.
[0003] Community detection has demonstrated powerful analytical capabilities in complex network analysis. Label propagation algorithms, a key tool for community detection in complex networks, boast near-linear time complexity and the ability to efficiently process large-scale networks. However, traditional label propagation algorithms have significant limitations when applied to image segmentation: they are highly sensitive to the initial label selection, which can lead to oscillating results; their random update strategies can blur segmentation boundaries; and they lack the ability to adapt to spatial continuity and multi-scale features of images. Summary of the Invention
[0004] In response to the problems existing in the prior art, the present invention provides an image segmentation method and system based on complex network label propagation, which improves the accuracy of image segmentation.
[0005] The present invention is achieved through the following technical solutions: An image segmentation method based on complex network label propagation includes the following steps: Step 1: Pre-segment the color image into image area, image regions as the image network nodes, uses the similarity between pre-segmented regions to measure the similarity between image network nodes, and establishes edges between nodes based on the similarity to construct an image network; Step 2: Obtain the core nodes of the network image, calculate the similarity between the core nodes and common neighbor nodes, and propagate the labels of the core nodes to the common neighbor nodes according to the similarity to obtain the initial community; Update the labels of the remaining nodes according to the local density of the nodes and the neighborhood information of the core nodes, and update the initial community according to the labels to form a new community; Calculate the attraction between all remaining nodes in the network graph and each new community, assign labels to the remaining nodes according to the attraction, and update the new community according to the label to obtain the final community; Step 3: Merge the regions corresponding to the same community nodes to achieve image segmentation.
[0006] Preferably, in step 1, the similarity between the pre-segmented regions is used to measure the similarity between the image network nodes, and edges are established between the nodes based on the similarity, thereby constructing the image network as follows: S1, obtain the color features of each image area; S2. Calculate the color feature vector of each area based on the color features of each image area; S3, using the gray level co-occurrence matrix to calculate the texture features of each image region, and determining the texture feature vector of each region based on the texture features; S4, merging the color feature and texture feature vectors into a comprehensive feature vector and normalizing it; S5. Determine the similarity between image regions based on the comprehensive feature vector and centroid coordinates of each image region, and add edges between nodes based on the similarity to construct an image network.
[0007] Preferably, the texture features in S3 include contrast, dissimilarity, homogeneity, energy and correlation texture features.
[0008] Preferably, S5 determines the similarity between image regions based on the comprehensive feature vector and centroid coordinates of each image region, including: First, the feature similarity between image regions is determined based on the comprehensive feature vector; Secondly, determine the centroid coordinates of the image region, determine the distance between the centroid coordinates according to the Euclidean distance, and determine the position similarity between the image regions according to the distance; Finally, the similarity between image regions is determined based on feature similarity and position similarity.
[0009] Preferably, the method for propagating the labels of the core nodes to the common neighbor nodes according to the similarity to obtain the initial community in step 2 is as follows: Nodes with higher importance or connectivity in the image network are regarded as core nodes and assigned unique labels; Calculate the similarity between the core node and the common neighbor nodes, and update the label of each common neighbor node to the label of the core node with the greatest similarity; When the maximum similarity value is not unique, a core node label is randomly selected, and the common neighbor nodes are assigned to the community where the selected core node is located to obtain the initial community.
[0010] Preferably, in step 2, updating the labels of the remaining nodes according to the local density of the nodes and the neighborhood information of the core nodes, and updating the initial community according to the labels to form a new community, includes: The local density of each neighbor node in the image network and the average density of the image network are calculated. If the local density of the neighbor node is greater than the average density of the image network, the label of the core node is propagated to the neighbor node. Finally, the node with the updated label is added to the community where the corresponding core node is located, and the initial community is updated to obtain a new community.
[0011] Preferably, the step 2 of calculating the attraction between all remaining nodes in the network image and each new community, assigning labels to the remaining nodes according to the attraction, and updating the new community according to the label to obtain the final community includes: Calculate the attraction between each unlabeled node and each community, update the label of the unlabeled node to the label of the new community with the greatest attraction, and update the new community to obtain the final community; If the maximum attraction value is not unique, a community label is randomly selected.
[0012] Preferably, step 2 further includes the following process: Calibrate the incorrect label updates that occur during label propagation. The label calibration method is as follows:
[0013] Where, Representation node With the community The degree of membership between Representation node Neighbor nodes in the community The number of nodes in ; Representative Association The number of nodes in the.
[0014] An image segmentation system based on complex network label propagation, comprising: Image network building module for pre-segmenting color images into image area, image regions as the image network nodes, uses the similarity between pre-segmented regions to measure the similarity between image network nodes, and establishes edges between nodes based on the similarity to construct an image network; The label propagation module is used to obtain the core nodes of the network image, calculate the similarity between the core nodes and the common neighbor nodes, and propagate the labels of the core nodes to the common neighbor nodes according to the similarity to obtain the initial community; Update the labels of the remaining nodes according to the local density of the nodes and the neighborhood information of the core nodes, and update the initial community according to the labels to form a new community; Calculate the attraction between all remaining nodes in the network graph and each new community, assign labels to the remaining nodes according to the attraction, and update the new community according to the label to obtain the final community; The image segmentation module is used to merge the areas corresponding to the same community nodes to achieve image segmentation.
[0015] 10. An electronic device comprising: memory for storing computer programs; A processor is used to implement the steps of the image segmentation method based on complex network label propagation when executing the computer program.
[0016] Compared with the prior art, the present invention has the following beneficial technical effects: This application proposes an image segmentation method based on complex network label propagation. First, the image is pre-segmented using the Quickshift algorithm, treating each pre-segmented region as a node in the network. Second, the color and texture features of the pre-segmented regions are extracted and merged, normalized, and the centroid of each region is calculated. Feature similarity and position similarity are combined to determine the similarity between two regions, and an image network is constructed based on a similarity threshold. Finally, the constructed image network is partitioned into communities using CDLPA, and image regions corresponding to nodes in the same community are merged to obtain homogeneous regions, achieving image segmentation. Experiments were conducted on the Berkeley dataset BSDS500 and compared with four image segmentation algorithms. The experimental results show that the proposed method outperforms the comparative algorithms in image segmentation performance, effectively separating the target from the background, achieving clear outlines, and preserving detailed target information. This is primarily due to the fact that the proposed method not only considers the color and texture features of the pre-segmented regions but also incorporates their position information when constructing the image network. In particular, the proposed method utilizes an improved label propagation algorithm for image segmentation, effectively improving segmentation accuracy and achieving significant segmentation results.
[0017] This application also proposes an image segmentation system based on complex network label propagation, an electronic device and a computer storage medium, which have all the advantages of the above-mentioned image segmentation method based on complex network label propagation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 The segmentation results of the IS_CDLPA method designed by the present invention and four image segmentation methods based on complex network theory on the first group of images randomly selected from 8 images in the BSDS500 dataset; Figure 2 The segmentation results of the IS_CDLPA method designed by the present invention and four image segmentation methods based on complex network theory on the second group of images among 8 randomly selected images from the BSDS500 dataset; Figure 3 It is a flow chart of the image segmentation method based on complex network label propagation of the present invention. DETAILED DESCRIPTION
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0021] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.
[0022] The LPA algorithm, with its linear time complexity and the absence of prior knowledge, demonstrates extremely high efficiency when processing large-scale networks, making it an indispensable part of the community detection field. However, the LPA algorithm also has certain limitations, such as high randomness and weak robustness. Therefore, in response to the above shortcomings, the present invention comprehensively considers the local density of nodes and node neighborhood information, introduces node degree and clustering coefficient, and proposes a label propagation algorithm (CDLPA) that integrates core nodes and local density, further improving the accuracy of community division.
[0023] This application provides an image segmentation method based on complex network label propagation. First, a method for constructing an image network is designed. Then, the clustering coefficient and local density are introduced to improve the label propagation algorithm (LPA), resulting in a label propagation algorithm that integrates core nodes and local density (CDLPA). Finally, the CDLPA is applied to the constructed image network to achieve community partitioning and complete image segmentation. The detailed process is as follows: See Figure 3 , an image segmentation method based on complex network label propagation, is implemented in the following steps: Step 1: For pixel color image , using the Quickshift algorithm to convert color images Pre-segmented image area, and image regions are considered as nodes, uses the similarity between pre-segmented regions to measure the similarity between image network nodes, and establishes edges between nodes based on the similarity to construct an image network; Step 1.1: Use the Quickshift algorithm to adjust the color image Pre-segmentation image regions, and use the pre-segmented image regions as the network node; Step 1.2: Extract the color features of each image region Lab, that is, the L value, a value, and b value of the pixels in each region; Step 1.3: Calculate the color feature vector of each area based on the color features of each image area , the calculation method is as follows:
[0024] Where, Indicates area The number of pixels in the Represents pixel points The Lab color component.
[0025] Step 1.4: Use the Gray-Level Co-occrence Matrix (GLCM) to calculate the texture features of each image region, and determine the texture feature vector of each region based on the texture features of each image. .
[0026] GLCM can capture the spatial relationship between gray levels in an image, effectively describing the texture characteristics of the image. In this embodiment, five key texture characteristics are selected: contrast, dissimilarity, homogeneity, energy, and correlation.
[0027] (1) Contrast: It is used to measure the speed of brightness change in an image. The calculation formula is shown in formula (2).
[0028]
[0029] Where, Indicates the number of gray levels; is an element in the gray-level co-occurrence matrix, representing and The joint probability of occurrence.
[0030] (2) Dissimilarity: It is used to quantify the degree of deviation between different gray levels in an image. The calculation formula is shown in formula (3).
[0031]
[0032] (3) Homogeneity: reflects the consistency of grayscale distribution in the image. The calculation formula is shown in formula (4).
[0033]
[0034] (4) Energy: used to describe the texture complexity of an image. The calculation formula is shown in formula (5).
[0035]
[0036] (5) Correlation: It is used to measure the linear relationship between different gray levels. The calculation formula is shown in formula (6).
[0037]
[0038] Where, and denote the mean of the rows and columns of the gray-level co-occurrence matrix, and represent the standard deviation of the rows and columns respectively.
[0039] According to the texture features of each image, the texture feature vector of each region is determined as .
[0040] for regions, calculate each region The corresponding texture features are obtained, and the texture feature vector is shown in formula (7).
[0041]
[0042] Step 1.5: Combine color feature and texture feature vectors Merge into a comprehensive feature vector , using formula (8) to normalize the feature vector ; for pre-divided regions, each region The color feature vector and texture feature vector are combined into a feature vector ,use For the eigenvector Normalization. The normalization formula is as follows:
[0043] In formula (8), Represents the feature vector The mean of express The standard deviation of .
[0044] Step 1.6: Calculate the centroid coordinates of each region according to equations (9) and (10); for pre-split regions, each region The center of mass The calculation method is as follows:
[0045]
[0046] in Indicates area The horizontal coordinate of the center of mass, Indicates area The vertical coordinate of the center of mass, and Represents the area Middle The horizontal and vertical coordinates of the pixel, Indicates area The number of pixels in .
[0047] Step 1.7: Calculate the feature similarity and position similarity between regions according to equations (11) and (13) respectively; After the above processing flow, the feature vector of each region is obtained , and determine the centroid coordinates of each region , According to the similarity of feature vectors and positions between regions, a formula for calculating the similarity between regions is derived.
[0048] First, the feature similarity between the two pre-segmented regions is calculated using formula (11):
[0049] Secondly, the centroid coordinates of the two regions are determined, and the distance between the two regions is calculated using the Euclidean distance formula. Based on the idea that "the closer the distance between regions, the more similar the two pre-segmented regions are", the position similarity formula between the two regions is defined as shown in formula (13).
[0050]
[0051]
[0052] Then, we define the similarity between regions. Combining feature similarity and location similarity, we quantify the similarity calculation formula based on a certain ratio, as shown in Equation (14).
[0053]
[0054] Step 1.8: Use formula (14) to calculate the similarity between the two regions. If the similarity value is greater than the threshold , then add an edge between the two nodes, otherwise no edge is added, thus building an image network; According to the two image regions and The greater the similarity between them, the greater the possibility of the connection between the two regions. The adjacency matrix of the image network is defined as:
[0055]
[0056] In formula (16), is the edge threshold. In the experiment, The value range of is (0,1). In the constructed image network, Indicates that there is an edge between two nodes. Indicates that there is no edge between the two nodes.
[0057] Step 2: Obtain the core nodes of the network image, calculate the similarity between the core nodes and common neighbor nodes, and propagate the core node labels to the common neighbor nodes according to the similarity to obtain the initial community; update the labels of the remaining nodes according to the local density of the nodes and the neighborhood information of the core nodes, and update the initial community according to the labels to form a new community; calculate the attraction between all the remaining nodes in the network image and each new community, assign labels to the remaining nodes according to the attraction, and update the new community according to the labels to obtain the final community; Step 2.1: The core nodes of the image network should meet the following two conditions:
[0058]
[0059] in, Representation node The degree, represents the average degree of network nodes, Representation node The set of neighbor nodes of Indicates the number of nodes in the network.
[0060] Step 2.2, label propagation process; (1) Label initialization: each core node is treated as an independent community and assigned a unique label; Core nodes refer to nodes with high importance or connectivity in the image network, and their number directly determines the number of final communities; (2) Calculate the similarity between the core node and the common neighbor nodes, and propagate the labels of the common neighbor nodes according to the similarity; In the neighborhood of a core node, nodes that are simultaneously connected to multiple core nodes are called “common neighbor” nodes. The core nodes are calculated by formula (17) and common neighbor nodes The Jaccard similarity between them is calculated and label propagation is performed based on the similarity.
[0061]
[0062] In formula (17), and Represents nodes respectively and nodes The set of neighbor nodes of Representation node and nodes Jaccard similarity between them.
[0063] Update the label of each "common neighbor" node to the label of the core node with the greatest similarity. If the maximum similarity value is not unique, randomly select a core node label and assign the "common neighbor" node to the community of the selected core node to form the initial community.
[0064] (3) For the remaining nodes in the image network, the local density of each neighboring node in the image network and the average density of the image network are calculated. The label of the core node is propagated to the neighboring nodes according to the local density and the average density. The initial community is updated according to the label to form a new community.
[0065] The calculation formula of node local density is shown in formula (18):
[0066] Where, Representation node The local density of Representation node The degree, Represents the sum of the node degrees in the network.
[0067] In order to reduce the complexity of the algorithm, this paper is inspired by the Dropout technology in neural networks and based on experimental verification, it is found that when the number of network nodes is parameter When , the community division can achieve higher accuracy. Based on this finding, the average density formula is defined as shown in formula (19):
[0068] Label propagation is performed by utilizing the neighborhood structure of core nodes. In this embodiment, if the local density of neighboring nodes of each core node is greater than the average density of the network, the core node's label is propagated to these neighboring nodes. Finally, nodes with updated labels are added to the initial community of the corresponding core node, forming a new community.
[0069] (4) After two label propagations, for the remaining unlabeled nodes, the attraction between each unlabeled node and each new community is calculated according to formula (20), and the label is updated. The label of the unlabeled node is updated to the label of the new community with the largest attraction. If the maximum attraction value is not unique, a community label is randomly selected.
[0070] For the remaining unlabeled nodes in the network, the attraction between the node and the new community is defined and propagated according to the magnitude of the attraction value. The attraction formula is shown in formula (20):
[0071] Where, Representation node and societies The attraction between Indicates the simultaneous connection of communities in the network and nodes The node set of Representation node Neighbor nodes in the community The number of Indicates community The number of nodes in and Represents nodes respectively The clustering coefficient of and the sum of the clustering coefficients of network nodes.
[0072] Step 2.3: Calibrate the incorrect label updates that occur during label propagation, which can effectively reduce the errors in the propagation process and improve the stability of the algorithm. The label calibration formula is shown in formula (21):
[0073] Where, Representation node With the community The degree of membership between Representation node Neighbor nodes in the community The number of nodes in ; Representative Association The number of nodes in the.
[0074] The present invention starts label calibration from the node with the largest degree. The degree of membership between each node and each community is calculated. If the node is in the community corresponding to the largest degree of membership, the node's label remains unchanged. Otherwise, the node's label is updated to the label of the community corresponding to the largest degree of membership, and the node is deleted from the original community and added to the community corresponding to the largest degree of membership.
[0075] Step 3: Merge the regions corresponding to the same community nodes to achieve image segmentation.
[0076] The four evaluation indicators of image segmentation integrity, ARI, NMI and FMI of this method on the BSDS500 dataset are calculated.
[0077] (1) Visual comparison of segmentation performance In order to intuitively verify the performance of the proposed method IS_CDLPA, we compared it with the framework algorithm GFCNIS based on complex network image segmentation, the image segmentation algorithm LDCS combined with local degree centrality, the attribute network image segmentation algorithm SAINS, and the attribute network random block model image segmentation algorithm IS_ANSBM. Eight images were randomly selected from the BSDS500 dataset and segmented using the above algorithms. The segmentation results are shown in Figure 2. Figure 1 and Figure 2 As shown, (a) is the original image, (b) is Ground-Truth, (c) is the result of GFCNIS segmentation, (d) is the result of LDCS segmentation, (e) is the result of SAINS segmentation, (f) is the result of IS_ANSBM segmentation, and (g) is the result of IS_CDLPA segmentation of the present invention.
[0078] according to Figure 1 As shown in the image 8068.jpg, the GFCNIS and LDCS algorithms over-segment the swan's background. In contrast, while the SAINS and IS_ANSBM algorithms are able to separate the swan's main body from the background, they fail to fully capture the swan's neck area reflected in the lake, resulting in incomplete segmentation results. The IS_CDLPA algorithm not only successfully separates the swan's main body from the background, but also fully preserves the swan's outline, including its reflection on the lake surface, resulting in clear and accurate segmentation. In the processing of images 3096.jpg, 24063.jpg, and 100007.jpg, the GFCNIS and LDCS algorithms effectively segment the target but over-segment the background into multiple regions. The SAINS and IS_ANSBM algorithms clearly segment the target, but lose some detail. For example, the window in image 24036.jpg is not clearly segmented, and the edge of the airplane in image 3096.jpg is poorly processed. IS_CDLPA can not only clearly segment the target object, but also grasp the segmentation details better, and its segmentation results are closer to the groundtruth.
[0079] according to Figure 2As shown in the image 108004.jpg, the GFCNIS and LDCS algorithms fail to clearly segment the tiger's head. While the SAINS and IS_ANSBM algorithms segment the tiger's outline, the background is filled with weeds. The IS_CDLPA algorithm, on the other hand, not only clearly segments the tiger's outline, but also eliminates the background weeds. For image 124084.jpg, the GFCNIS, LDCS, SAINS, and IS_ANSBM algorithms are able to segment the flowers from the image, but their processed results still show green leaves interspersed with the flower background. In contrast, the IS_CDLPA algorithm segments the flowers more accurately, with clearer edges and no green background impurities, significantly improving the segmentation effect.
[0080] comprehensive Figure 1 and Figure 2 The information presented shows that the GFCNIS algorithm and the LDCS algorithm are over-segmented, resulting in the image background being segmented into multiple regions. This is because the GFCNIS algorithm and the LDCS algorithm rely on the network constructed by the superpixel segmentation method. In contrast, the SAINS and IS_ANSBM algorithms can clearly separate the target from the background. It is worth noting that these two algorithms will cause the target's detail information to be lost and other elements to be mixed into the segmented image background. The IS_CDLPA algorithm designed by the present invention can not only effectively separate the target from the background, but also clearly present the target's outline and details. It is further explained that the present invention uses Quickshift to perform image pre-segmentation, and uses texture, color features and pre-segmentation area position information to calculate the similarity between regions to construct an image network, which has a positive impact on image segmentation. It is worth noting that the present invention uses the label propagation algorithm to perform community division on the constructed image network, and the image segmentation effect achieved is significant, which fully demonstrates that the application of the label propagation algorithm to image segmentation has an important impact and effectively improves the performance of image segmentation.
[0081] (2) Experimental quantitative analysis To evaluate the applicability of the IS_CDLPA algorithm of the present invention, experiments were conducted on the BSDS500 dataset, which contains 200 test images, 200 training images, and 100 validation images. In the experiment, IS_CDLPA was compared with the GFCNIS, LDCS, SAINS, and IS_ANSBM algorithms. To ensure the fairness of the experiment, the parameters of all compared algorithms followed the optimal configurations in the original literature. Because IS_CDLPA has a certain degree of randomness during the propagation process, in this experiment, each image was run three times, and the image with the best visual effect was used to calculate its evaluation index. The average integrity, ARI, NMI, and FMI values of each algorithm on the test, train, and val of the BSDS500 dataset were calculated. The experimental results are shown in Table 1, where bold black indicates the optimal value.
[0082] Table 1 Evaluation metrics of five algorithms on the BSDS500 dataset
[0083] As can be seen from Table 1, the IS_CDLPA algorithm achieves optimal values in different indicators. Compared with the suboptimal values, the four indicator values of the algorithm proposed in the present invention on the test set are improved by 36.9%, 91%, 0.1%, and 7.7% respectively; the four indicator values on the train set are improved by 19.6%, 91.5%, 9.8%, and 6.6% respectively; and the four indicator values on the val set are improved by 48.4%, 72.2%, 1.4%, and 7% respectively. According to the above data analysis, it can be seen that the improvement of the IS_CDLPA algorithm in integrity and ARI indicators is particularly prominent. This shows that the present invention combines image texture, color features and position information to construct an image network, and uses CDLPA to perform community division on the constructed network, which has positive significance for image segmentation.
[0084] To more intuitively demonstrate the segmentation performance of the five algorithms on the BSDS500 dataset, each evaluation metric was ranked separately, and the average ranking of each algorithm was calculated, as shown in Table 2. As can be seen from Table 2, the IS_CDLPA algorithm designed in this invention ranks first in all four metric values and also ranks first in average ranking, further demonstrating that the IS_CDLPA image segmentation algorithm based on complex network label propagation designed in this invention has high segmentation accuracy and performance.
[0085] Table 2 Evaluation index ranking and average ranking of five algorithms on the BSDS500 dataset
[0086] Correspondingly, the present application also provides an image segmentation system based on complex network label propagation, including: Image network building module for pre-segmenting color images into image area, image regions as the image network nodes, uses the similarity between pre-segmented regions to measure the similarity between image network nodes, and establishes edges between nodes based on the similarity to construct an image network; The label propagation module is used to obtain the core nodes of the network image, calculate the similarity between the core nodes and the common neighbor nodes, and propagate the labels of the core nodes to the common neighbor nodes according to the similarity to obtain the initial community; Update the labels of the remaining nodes according to the local density of the nodes and the neighborhood information of the core nodes, and update the initial community according to the labels to form a new community; Calculate the attraction between all remaining nodes in the network graph and each new community, assign labels to the remaining nodes according to the attraction, and update the new community according to the label to obtain the final community; The image segmentation module is used to merge the areas corresponding to the same community nodes to achieve image segmentation.
[0087] It should be noted that in the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of each module is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another device, or some features can be ignored or not executed. The modules described as separate components may or may not be physically separated. The components displayed as modules may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0088] In addition, the modules in the various embodiments of the present invention may be integrated into a single processing unit, each module may exist physically separately, or two or more modules may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0089] An electronic device provided in an embodiment of the present application includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the image segmentation method based on complex network label propagation as described in any of the above embodiments.
[0090] Another electronic device provided in an embodiment of the present application may further include: an input port connected to the processor for transmitting multimodal data collected by an external acquisition device to the processor; a display unit connected to the processor for displaying the processing results of the processor to the outside world; and a communication module connected to the processor for enabling communication between the electronic device and the outside world. The display unit may be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module includes but is not limited to mobile high-definition link technology (HML), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless connection (including wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s).
[0091] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the image segmentation method based on complex network label propagation as described in any of the above embodiments are implemented.
[0092] For the description of the relevant parts of the image segmentation system based on complex network label propagation, electronic device, and computer-readable storage medium provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts of the image segmentation method based on complex network label propagation provided in the embodiments of the present application, and no further description is given here. In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0093] The above content is only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.
Claims
1. An image segmentation method based on complex network label propagation, characterized in that: The following steps are involved: Step 1: Pre-segment the color image into image area, image regions as the image network nodes, uses the similarity between pre-segmented regions to measure the similarity between image network nodes, and establishes edges between nodes based on the similarity to construct an image network; Step 2: Obtain the core nodes of the network image, calculate the similarity between the core nodes and common neighbor nodes, and propagate the labels of the core nodes to the common neighbor nodes according to the similarity to obtain the initial community; Update the labels of the remaining nodes according to the local density of the nodes and the neighborhood information of the core nodes, and update the initial community according to the labels to form a new community; Calculate the attraction between all remaining nodes in the network graph and each new community, assign labels to the remaining nodes according to the attraction, and update the new community according to the label to obtain the final community; Step 3: Merge the regions corresponding to the same community nodes to achieve image segmentation.
2. The image segmentation method based on complex network label propagation according to claim 1, characterized in that: Step 1 uses the similarity between pre-segmented regions to measure the similarity between image network nodes, and establishes edges between nodes based on the similarity, thereby constructing the image network as follows: S1, obtain the color features of each image area; S2. Calculate the color feature vector of each area based on the color features of each image area; S3, using the gray level co-occurrence matrix to calculate the texture features of each image region, and determining the texture feature vector of each region based on the texture features; S4, merging the color feature and texture feature vectors into a comprehensive feature vector and normalizing it; S5. Determine the similarity between image regions based on the comprehensive feature vector and centroid coordinates of each image region, and add edges between nodes based on the similarity to construct an image network.
3. The image segmentation method based on complex network label propagation according to claim 2, characterized in that: The texture features described in S3 include contrast, dissimilarity, homogeneity, energy and correlation texture features.
4. The image segmentation method based on complex network label propagation according to claim 2, characterized in that: S5 determines the similarity between image regions based on the comprehensive feature vector and centroid coordinates of each image region, including: First, the feature similarity between image regions is determined based on the comprehensive feature vector; Secondly, determine the centroid coordinates of the image region, determine the distance between the centroid coordinates according to the Euclidean distance, and determine the position similarity between the image regions according to the distance; Finally, the similarity between image regions is determined based on feature similarity and position similarity.
5. The image segmentation method based on complex network label propagation according to claim 1, characterized in that: The method described in step 2 to propagate the core node's label to the common neighbor nodes according to the similarity to obtain the initial community is as follows: Nodes with higher importance or connectivity in the image network are regarded as core nodes and assigned unique labels; Calculate the similarity between the core node and the common neighbor nodes, and update the label of each common neighbor node to the label of the core node with the greatest similarity; When the maximum similarity value is not unique, a core node label is randomly selected, and the common neighbor nodes are assigned to the community where the selected core node is located to obtain the initial community.
6. The image segmentation method based on complex network label propagation according to claim 1, characterized in that: In step 2, the labels of the remaining nodes are updated according to the local density of the nodes and the neighborhood information of the core nodes. The initial community is updated according to the labels to form a new community, including: The local density of each neighbor node in the image network and the average density of the image network are calculated. If the local density of the neighbor node is greater than the average density of the image network, the label of the core node is propagated to the neighbor node. Finally, the node with the updated label is added to the community where the corresponding core node is located, and the initial community is updated to obtain a new community.
7. The image segmentation method based on complex network label propagation according to claim 1, characterized in that: As described in step 2, the attraction between all remaining nodes in the network image and each new community is calculated, labels are assigned to the remaining nodes according to the attraction, and the new community is updated according to the label to obtain the final community, including: Calculate the attraction between each unlabeled node and each community, update the label of the unlabeled node to the label of the new community with the greatest attraction, and update the new community to obtain the final community; If the maximum attraction value is not unique, a community label is randomly selected.
8. The image segmentation method based on complex network label propagation according to claim 7, characterized in that: Step 2 also includes the following process: Calibrate the incorrect label updates that occur during label propagation. The label calibration method is as follows: Where, Representation node With the community The degree of membership between Representation node Neighbor nodes in the community The number of nodes in ; Representative Association The number of nodes in the.
9. An image segmentation system based on complex network label propagation, characterized in that: include: Image network building module for pre-segmenting color images into image area, image regions as the image network nodes, uses the similarity between pre-segmented regions to measure the similarity between image network nodes, and establishes edges between nodes based on the similarity to construct an image network; The label propagation module is used to obtain the core nodes of the network image, calculate the similarity between the core nodes and the common neighbor nodes, and propagate the labels of the core nodes to the common neighbor nodes according to the similarity to obtain the initial community; Update the labels of the remaining nodes according to the local density of the nodes and the neighborhood information of the core nodes, and update the initial community according to the labels to form a new community; Calculate the attraction between all remaining nodes in the network graph and each new community, assign labels to the remaining nodes according to the attraction, and update the new community according to the label to obtain the final community; The image segmentation module is used to merge the areas corresponding to the same community nodes to achieve image segmentation.
10. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the image segmentation method based on complex network label propagation as described in any one of claims 1 to 8 when executing the computer program.