An automatic wire cable segmentation method based on hybrid expert model

CN121366288BActive Publication Date: 2026-10-30INSPUR QILU SOFTWARE IND
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511464397.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-10-30
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

[0002]基于自然光下2D相机的线缆分割技术在实际应用中面临多重技术挑战:首先,工业现场环境复杂,线缆常与背景杂色共存,导致目标区域与背景对比度不足,现有分割算法难以准确区分边界;其次,光照条件多变如环境光干扰、反光现象会导致图像过曝或细节丢失,进一步加剧分割难度;此外,线缆规格差异显著如直径、材质、颜色,单一特征模型难以适应多样化样本,易产生特征混淆现象

Benefits of technology

1.本发明公开了一种基于混合专家模型的自动排线线缆分割方法,解决了传统分割算法对背景环境复杂、光照条件多变以及规格差异显著等情况下线缆分割精度不足的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121366288B_ABST
    Figure CN121366288B_ABST
Patent Text Reader

Abstract

The application discloses an automatic wire cable segmentation method based on a mixed expert model, and relates to the fields of computer vision and deep learning; a mixed expert model MoE is integrated into an encoder and a decoder of a PP-LiteSeg coding and decoding architecture, a TOP-1 gating strategy is adopted, and a gating network is used to activate one expert with the highest correlation according to an input sample, so as to extract or process features; the mixed expert model MoE in the encoder is used to extract multi-scale feature maps of wire cable images, and then the mixed expert model MoE of the decoder in the PP-LiteSeg coding and decoding architecture is used to fuse the feature maps of various scales and restore resolutions, so that a final segmentation map of the wire cable is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses an automatic cable segmentation method based on a hybrid expert model, which relates to the fields of computer vision and deep learning. Background Technology

[0002] Cable segmentation technology based on 2D cameras under natural light faces multiple technical challenges in practical applications: First, the complex industrial environment often results in cables coexisting with background noise, leading to insufficient contrast between the target area and the background, making it difficult for existing segmentation algorithms to accurately distinguish boundaries; Second, variable lighting conditions such as ambient light interference and reflection can cause image overexposure or loss of detail, further exacerbating the segmentation difficulty; In addition, cable specifications vary significantly, such as diameter, material, and color, making it difficult for a single feature model to adapt to diverse samples and easily leading to feature confusion. Summary of the Invention

[0003] This invention addresses the problems of existing technologies by providing an automatic cable segmentation method based on a hybrid expert model, which ensures segmentation accuracy while improving reasoning efficiency.

[0004] The specific solution proposed in this invention is as follows: This invention provides an automatic cable segmentation method based on a hybrid expert model. Based on the PP-LiteSeg encoding / decoding architecture, a hybrid expert model (MoE) is constructed, integrating the MoE into the encoder and decoder of the PP-LiteSeg architecture. Within the PP-LiteSeg encoding / decoding architecture, the MoE is deployed at pooling / upsampling layers as demarcation points, replacing convolutional layers. The MoE includes shared experts and multiple routing experts. The shared experts serve as general feature extractors for all input samples, capturing basic features and performing basic processing on various input samples. The routing experts are specialized, allowing each expert to focus on specific feature processing or sub-task processing. A TOP-1 gating strategy is employed, using a gating network to activate the most relevant expert based on the input sample for feature extraction or processing. Images of the ribbon cable are acquired and used to train the hybrid expert model MoE. Multi-scale feature map extraction is performed on the ribbon cable image using the hybrid expert model MoE of the encoder in the PP-LiteSeg codec architecture. Then, the hybrid expert model MoE of the decoder in the PP-LiteSeg codec architecture is used to fuse the feature maps at each scale and restore the resolution, outputting the final segmentation map of the ribbon cable.

[0005] Furthermore, the method for collecting ribbon cable images includes: collecting 4,000 ribbon cable images to form a dataset. The resolution of the original ribbon cable images is 1920×1080, the network input is 1024×512, and the dataset is divided into training set, validation set and test set in an 8:1:1 ratio.

[0006] Furthermore, the method employs a route noise-adding and load balancing loss function strategy for the hybrid expert model MoE. The route noise-adding strategy introduces controllable random noise into the output of the gated network, breaking the rigidity of routing decisions and considering experts who might otherwise be ignored, thus increasing the chances of less popular experts being selected. The load balancing loss function strategy is a regularization method that ensures that all experts can be utilized in a relatively balanced manner.

[0007] Furthermore, the load balancing loss function described in the method is as follows:

[0008] in This is the global scaling factor, typically ranging from 0.01 to 0.1; N is the total number of routing experts. , This is the weighting parameter, usually 1; The loss of importance is the sum of the gating weights of each expert; The load loss is the sum of the load probabilities for each expert.

[0009] This invention also provides an automatic cable splitting device based on a hybrid expert model, including a model management module, a data acquisition module, a training module, and a splitting module. The model management module is based on the PP-LiteSeg encoding and decoding architecture and constructs a hybrid expert model (MoE). The hybrid expert model MoE is integrated into the encoder and decoder of the PP-LiteSeg encoding and decoding architecture. In the PP-LiteSeg encoding and decoding architecture, the hybrid expert model MoE is deployed to replace the convolutional layer at the pooling layer / upsampling layer as the dividing point. The hybrid expert model MoE includes a shared expert and multiple routing experts. The shared expert is used as a general feature extractor for all input samples to capture basic features and perform basic processing on various types of input samples. The routing experts are specialized, so that each routing expert focuses on specific feature processing or sub-task processing. The TOP-1 gating strategy is adopted, and the gating network is used to activate the most relevant expert according to the input sample for feature extraction or processing. Compared with ordinary networks, the computation is reduced by 60% while maintaining the feature extraction capability, realizing the efficient computation mode of "sparse activation". The acquisition module acquires images of the ribbon cable, and the training module trains the hybrid expert model MoE. The segmentation module uses the hybrid expert model MoE of the encoder in the PP-LiteSeg codec architecture to extract multi-scale feature maps from the ribbon cable image. Then, it uses the hybrid expert model MoE of the decoder in the PP-LiteSeg codec architecture to fuse the feature maps at each scale and restore the resolution, outputting the final segmented image of the ribbon cable.

[0010] Furthermore, the acquisition module in the device acquires images of ribbon cables, including: acquiring 4,000 images of ribbon cables to form a dataset. The resolution of the original ribbon cable images is 1920×1080, and the network input is 1024×512. The dataset is divided into training set, validation set and test set in an 8:1:1 ratio.

[0011] Furthermore, in the device, for the hybrid expert model MoE, the training module adopts a route noise-adding and load balancing loss function strategy. The route noise-adding strategy introduces controllable random noise into the output of the gated network, breaking the rigidity of routing decisions and considering experts that might otherwise be ignored, increasing the chances of less popular experts being selected. The load balancing loss function strategy is a regularization method that ensures that all experts can be utilized in a relatively balanced manner.

[0012] Furthermore, the load balancing loss function used by the training module in the device is formulated as follows:

[0013] in This is the global scaling factor, typically ranging from 0.01 to 0.1; N is the total number of routing experts. , This is the weighting parameter, usually 1; The loss of importance is the sum of the gating weights of each expert; The load loss is the sum of the load probabilities for each expert.

[0014] The advantages of this invention are: 1. This invention discloses an automatic cable segmentation method based on a hybrid expert model, which solves the problem of insufficient cable segmentation accuracy of traditional segmentation algorithms in situations with complex background environments, variable lighting conditions, and significant differences in specifications.

[0015] 2. This invention innovatively divides the network into functional blocks using the pooling layer / upsampling layer as the dividing point, and each block can be replaced by MoE.

[0016] 3. The MoE module used in this invention includes shared experts and multiple routing experts. While ensuring the stable extraction of general features, the routing experts enable the model to capture richer feature representations through specialized division of labor, thereby enhancing the model's adaptability to complex tasks.

[0017] 4. This invention uses a gated network to dynamically select the most relevant expert to activate based on the input features, which reduces the computational load by 60% compared to densely connected layers.

[0018] 5. This invention employs a strategy combining routing noise and load balancing loss function to ensure that all experts can be utilized in a relatively balanced manner, thus solving the problem of unbalanced expert utilization. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0020] Figure 2 This is a schematic diagram of the overall architecture of the hybrid expert model. The area within the yellow box represents the MoE block used in this invention, replacing the blocks in the PP-LiteSeg encoder and decoder. Detailed Implementation

[0021] Mixture of Experts (MoE) models have demonstrated strong technical scalability in the field of artificial intelligence, with their modular architecture providing an innovative paradigm for handling complex tasks. Cutting-edge practices such as DeepSeek show that this model achieves breakthroughs in both computational efficiency and multi-scenario adaptability through dynamic routing mechanisms and expert collaborative networks. Its core value lies in decoupling high-dimensional complex tasks into specialized sub-problems, allowing for targeted processing by domain-specific experts, while simultaneously achieving intelligent routing of input features through gating networks.

[0022] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0023] Example 1

[0024] This invention provides an automatic cable segmentation method based on a hybrid expert model. Based on the PP-LiteSeg encoding / decoding architecture, a hybrid expert model (MoE) is constructed, integrating the MoE into the encoder and decoder of the PP-LiteSeg architecture. In the six functional blocks of the PP-LiteSeg architecture, the pooling / upsampling layer serves as the dividing point, and the MoE replaces the convolutional layers. The MoE includes one shared expert and four routing experts. The shared expert serves as a general feature extractor for all input samples, capturing basic features and performing basic processing on various input samples. The routing experts are specialized, allowing each expert to focus on specific feature processing or sub-tasks. A TOP-1 gating strategy is adopted, using a gating network to activate the most relevant expert based on the input sample for feature extraction or processing. Compared to ordinary networks, this reduces computation by 60% while maintaining feature extraction capabilities, achieving an efficient computational mode of "sparse activation."

[0025] Images of ribbon cable are collected to train the hybrid expert model MoE. Collecting ribbon cable images may include: collecting 4000 images to form a dataset; the original ribbon cable images have a resolution of 1920×1080, the network input is 1024×512, and the dataset is divided into training, validation, and test sets in an 8:1:1 ratio.

[0026] For the hybrid expert model MoE, a route noise-adding and load balancing loss function strategy is adopted. The route noise-adding strategy introduces controllable random noise into the output of the gated network, breaking the rigidity of routing decisions and considering experts that might otherwise be ignored, increasing the chances of less popular experts being selected. The load balancing loss function strategy is a regularization method that ensures that all experts can be utilized in a relatively balanced way.

[0027] The load balancing loss function is given by the following formula:

[0028] in This is the global scaling factor, typically ranging from 0.01 to 0.1; N is the total number of routing experts. , This is the weighting parameter, usually 1; The loss of importance is the sum of the gating weights of each expert; The load loss is the sum of the load probabilities for each expert.

[0029] Multi-scale feature map extraction is performed on the ribbon cable image using the hybrid expert model MoE in the PP-LiteSeg codec architecture. Then, the hybrid expert model MoE in the decoder of the PP-LiteSeg codec architecture is used to fuse features of each scale and restore resolution, outputting the final segmentation map of the ribbon cable.

[0030] The loss between the overall network output and the ground truth ground truth (GT) calculation is OhemCrossEntropy Loss, and is compared with... In conjunction with this, the model weights and biases are continuously updated during backpropagation to make the network output as close as possible to the ground truth. The OhemCrossEntropy Loss formula is:

[0031] N represents the total number of samples; i represents the i-th sample; This represents the true label of the i-th sample; This represents the probability that the model predicts the i-th sample as positive, i.e., the probability when y=1, with a value between [0, 1]; log(p(xi)): when yi=1, calculate the logarithm of the predicted probability; log(1−p(xi)): When yi=0, calculate the logarithm of the complement of the predicted probability; when yi is neither 1 nor 0, the loss is 0.

[0032] Example 2 This invention also provides an automatic cable splitting device based on a hybrid expert model, including a model management module, a data acquisition module, a training module, and a splitting module. The model management module is based on the PP-LiteSeg encoding and decoding architecture and constructs a hybrid expert model (MoE). The hybrid expert model MoE is integrated into the encoder and decoder of the PP-LiteSeg encoding and decoding architecture. In the PP-LiteSeg encoding and decoding architecture, the hybrid expert model MoE is deployed to replace the convolutional layer at the pooling layer / upsampling layer as the dividing point. The hybrid expert model MoE includes a shared expert and multiple routing experts. The shared expert is used as a general feature extractor for all input samples to capture basic features and perform basic processing on various types of input samples. The routing experts are specialized, so that each routing expert focuses on specific feature processing or sub-task processing. The TOP-1 gating strategy is adopted, and the gating network is used to activate the most relevant expert according to the input sample for feature extraction or processing. Compared with ordinary networks, the computation is reduced by 60% while maintaining the feature extraction capability, realizing the efficient computation mode of "sparse activation". The acquisition module acquires images of the ribbon cable, and the training module trains the hybrid expert model MoE. The segmentation module uses the hybrid expert model MoE of the encoder in the PP-LiteSeg codec architecture to extract multi-scale feature maps from the ribbon cable image. Then, it uses the hybrid expert model MoE of the decoder in the PP-LiteSeg codec architecture to fuse the feature maps at each scale and restore the resolution, outputting the final segmented image of the ribbon cable.

[0033] The information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description in the method embodiment of the present invention, and will not be repeated here.

[0034] Similarly, the advantages of the device of the present invention are: 1. This invention discloses an automatic cable segmentation device based on a hybrid expert model, which solves the problem of insufficient cable segmentation accuracy of traditional segmentation algorithms in situations with complex background environments, variable lighting conditions, and significant differences in specifications.

[0035] 2. This invention innovatively divides the network into functional blocks using the pooling layer / upsampling layer as the dividing point, and each block can be replaced by MoE.

[0036] 3. The MoE module used in this invention includes shared experts and multiple routing experts. While ensuring the stable extraction of general features, the routing experts enable the model to capture richer feature representations through specialized division of labor, thereby enhancing the model's adaptability to complex tasks.

[0037] 4. This invention uses a gated network to dynamically select the most relevant expert to activate based on the input features, which reduces the computational load by 60% compared to densely connected layers.

[0038] 5. This invention employs a strategy combining routing noise and load balancing loss function to ensure that all experts can be utilized in a relatively balanced manner, thus solving the problem of unbalanced expert utilization.

[0039] It should be noted that not all steps and modules in the above processes and device structures are mandatory; some steps or modules can be omitted as needed. The execution order of each step is not fixed and can be adjusted as required. The system structure described in the above embodiments can be a physical structure or a logical structure. That is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or they may be jointly implemented by certain components in multiple independent devices.

[0040] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. An automatic cable splitting method based on a hybrid expert model, characterized in that: Based on the PP-LiteSeg encoding and decoding architecture, a hybrid expert model MoE is constructed, which integrates the hybrid expert model MoE into the encoder and decoder of the PP-LiteSeg encoding and decoding architecture: In the PP-LiteSeg encoding and decoding architecture block, the hybrid expert model MoE is deployed to replace the convolutional layer at the pooling layer or upsampling layer as the dividing point. The hybrid expert model MoE includes a shared expert and multiple routing experts. The shared expert is used as a general feature extractor for all input samples to capture basic features and perform basic processing on various types of input samples. The routing experts are given specialized tasks so that each routing expert can focus on specific feature processing or sub-task processing. The TOP-1 gating strategy is adopted, and the gating network is used to activate the most relevant expert according to the input sample for feature extraction or processing. Images of the ribbon cable are acquired and used to train the hybrid expert model MoE. Multi-scale feature map extraction is performed on the ribbon cable image using the hybrid expert model MoE of the encoder in the PP-LiteSeg codec architecture. Then, the hybrid expert model MoE of the decoder in the PP-LiteSeg codec architecture is used to fuse the feature maps at each scale and restore the resolution, outputting the final segmentation map of the ribbon cable.

2. The method according to claim 1, characterized in that: The acquisition of ribbon cable images includes: acquiring 4,000 ribbon cable images to form a dataset. The resolution of the original ribbon cable images is 1920×1080, and the network input is 1024×512. The dataset is divided into training set, validation set and test set in an 8:1:1 ratio.

3. The method according to claim 1, characterized in that: For the hybrid expert model MoE, a route noise-adding and load balancing loss function strategy is adopted. The route noise-adding strategy introduces controllable random noise into the output of the gated network, breaking the rigidity of routing decisions and considering experts that might otherwise be ignored, increasing the chances of less popular experts being selected. The load balancing loss function strategy is a regularization method that ensures that all experts can be utilized in a relatively balanced way.

4. The method according to claim 3, characterized in that: The load balancing loss function is defined by the following formula: , in is the global scaling factor, ranging from 0.01 to 0.1; N is the total number of routing experts; , The weight parameter is 1; The loss of importance is the sum of the gating weights of each expert; The load loss is the sum of the load probabilities for each expert.

5. An automatic cable splitting device based on a hybrid expert model, characterized in that: It includes a model management module, an acquisition module, a training module, and a segmentation module. The model management module is based on the PP-LiteSeg encoding and decoding architecture and constructs a hybrid expert model (MoE). The hybrid expert model MoE is integrated into the encoder and decoder of the PP-LiteSeg encoding and decoding architecture. In the PP-LiteSeg encoding and decoding architecture, the hybrid expert model MoE is deployed to replace the convolutional layer at the pooling layer or upsampling layer as the dividing point. The hybrid expert model MoE includes a shared expert and multiple routing experts. The shared expert is used as a general feature extractor for all input samples to capture basic features and perform basic processing on various types of input samples. The routing experts are given specialized tasks so that each routing expert can focus on specific feature processing or sub-task processing. The TOP-1 gating strategy is adopted, and the gating network is used to activate the most relevant expert according to the input sample for feature extraction or processing. The acquisition module acquires images of the ribbon cable, and the training module trains the hybrid expert model MoE. The segmentation module uses the hybrid expert model MoE of the encoder in the PP-LiteSeg codec architecture to extract multi-scale feature maps from the ribbon cable image. Then, it uses the hybrid expert model MoE of the decoder in the PP-LiteSeg codec architecture to fuse the feature maps at each scale and restore the resolution, outputting the final segmented image of the ribbon cable.

6. The apparatus according to claim 5, characterized in that: The acquisition module collects images of ribbon cables, including: acquiring 4000 images of ribbon cables to form a dataset. The resolution of the original ribbon cable images is 1920×1080, and the network input is 1024×512. The dataset is divided into training set, validation set and test set in an 8:1:1 ratio.

7. The apparatus according to claim 5, characterized in that: For the hybrid expert model MoE, the training module adopts a route noise and load balancing loss function strategy. The route noise strategy introduces controllable random noise into the output of the gating network, breaking the rigidity of routing decisions and considering experts that might otherwise be ignored, increasing the chances of less popular experts being selected. The load balancing loss function strategy is a regularization method that ensures that all experts can be utilized in a relatively balanced way.

8. The apparatus according to claim 7, characterized in that: The load balancing loss function used in the training module is as follows: , in is the global scaling factor, ranging from 0.01 to 0.1; N is the total number of routing experts; , The weight parameter is 1; The loss of importance is the sum of the gating weights of each expert; The load loss is the sum of the load probabilities for each expert.

Citation Information

Patent Citations

  • Image segmentation paraphrasing method based on multi-expert mixing, electronic equipment and storage medium

    CN115690129A

  • Outdoor complex environment local path planning method based on inverse reinforcement learning

    CN117369458A