Semi-supervised semantic segmentation method, device and equipment for urban mesh data
Through the semi-supervised semantic segmentation method, we combine labeled and unlabeled data, introduce noise reduction and distribution alignment loss, optimize the semantic segmentation model of urban Mesh data, solve the problems of time-consuming labeling and pseudo-label noise, and improve the segmentation accuracy and Model robustness.
Patent Information
- Application Number
- CN202410892756.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Existing urban mesh semantic segmentation methods mainly rely on fully supervised learning, labeling is time-consuming and labor-intensive, and unlabeled data is not fully utilized, and pseudo-label noise has a great adverse impact on model segmentation performance.
A semi-supervised semantic segmentation method is adopted, supervised training is performed through labeled data, unsupervised training is performed using unlabeled data, noise reduction loss and distribution alignment loss are introduced, and the model is optimized to reduce pseudo-label noise and improve the accuracy of model prediction.
It improves the semantic segmentation accuracy of urban Mesh data and the robustness of the model, reduces pseudo label noise, and enhances the overall performance of the model.
Smart Images

Figure CN118411530B
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional image processing technology, and in particular to a semi-supervised semantic segmentation method, device and equipment for urban mesh data. Background Art
[0002] Urban mesh semantic segmentation involves segmenting 3D urban mesh data, providing category information for each triangle, thereby enhancing the detailed representation of geographic information within the urban mesh. It has a wide range of applications in smart cities, digital earth, engineering supervision, water conservancy projects, virtual reality, and other fields.
[0003] City mesh is one of the mainstream 3D data types used to describe large-scale outdoor environments. It can accurately reflect the 3D spatial information of large-scale outdoor scenes, such as the distribution of buildings, roads, water bodies, and other landforms. City mesh is essentially textured 3D mesh data. Compared to point clouds, it features a continuous surface, a strong sense of realism, and is lightweight. Compared to general meshes, which typically refer to small, individual 3D objects, city meshes are used to describe the real environment of outdoor scenes. Compared to orthophotos, city meshes contain spatial information and can describe the 3D spatial content of outdoor scenes.
[0004] With the remarkable success of deep learning in 3D data analysis, semantic segmentation of urban meshes has flourished. Two main approaches are used for this segmentation: hypersurface-based methods and point cloud sampling semantic segmentation methods. Hypersurface-based methods first use clustering algorithms to over-segment the urban mesh to generate hypersurfaces, and then perform semantic segmentation through hypersurface classification. Typical hypersurface methods include RF-MRF, SUM, and PSSNet. RF-MRF uses Markov random fields to smooth predictions in the final stage, while PSSNet uses Markov random fields to enhance the smoothness of the hypersurface during the over-segmentation stage. Furthermore, graph neural networks are used to learn associations between hypersurfaces during the hypersurface classification stage. Despite their effectiveness, these hypersurface methods share a common limitation: the clustering algorithm (in the over-segmentation stage) is non-differentiable, hindering end-to-end training. Point cloud sampling-based methods effectively circumvent this limitation. Urban-MeshCNN, based on MeshCNN, combines a breadth-first search (BFS) technique to perform semantic segmentation on urban meshes. However, the sheer volume of urban mesh data makes Urban-MeshCNN computationally inefficient, making it unsuitable for large-scale urban mesh applications. Furthermore, it relies solely on side information to describe each face, lacking original feature information. To address this issue, TransformerMesh leverages the Transformer network to learn and process long-range dependencies between entities to achieve semantic segmentation. Grzeczkowicz advocates using the Poisson disk sampling (PDS) algorithm to randomly and uniformly sample point clouds from the urban mesh, followed by the KPConv algorithm for point cloud semantic segmentation. The results of the point cloud semantic segmentation are then mapped back to the urban mesh.
[0005] Current methods for urban mesh semantic segmentation are mainly based on fully supervised learning. However, urban mesh labeling is time-consuming and labor-intensive; all unlabeled data are not fully utilized, and the noise in the pseudo-labels has a significant adverse impact on the model segmentation performance. Summary of the Invention
[0006] Based on this, it is necessary to provide a semi-supervised semantic segmentation method, device and equipment for urban Mesh data to address the above technical problems.
[0007] A semi-supervised semantic segmentation method for urban mesh data, the method comprising:
[0008] The pre-built mesh semantic segmentation model is supervised and trained using labeled city mesh data to obtain the first prediction result.
[0009] The supervised loss is determined based on the first prediction result and the labels of the annotated city mesh data.
[0010] Unlabeled input urban mesh data is used to perform unsupervised training on the mesh semantic segmentation model to obtain pseudo labels and two model prediction results. The unsupervised training process is as follows: the unlabeled input urban mesh data is weakly enhanced, then strongly enhanced twice, and the obtained weak enhancement results, first strong enhancement results, and second strong enhancement results are respectively input into the second, third, and fourth mesh semantic segmentation models to obtain pseudo labels and two model prediction results. The mesh semantic segmentation models in supervised training and unsupervised training are semantic segmentation networks with shared weights and the same structure.
[0011] Based on the pseudo labels and the prediction results of the two models, the noise reduction loss and distribution alignment loss are calculated.
[0012] According to the supervision loss, noise reduction loss and distribution alignment loss, the mesh semantic segmentation model is optimized and updated to obtain a trained mesh semantic segmentation model.
[0013] The trained mesh semantic segmentation model is used to perform semantic segmentation on the urban mesh data to be segmented, and the semantic segmentation results of the urban mesh data to be segmented are obtained.
[0014] In one embodiment, supervised training of a pre-built mesh semantic segmentation model is performed using labeled city mesh data to obtain a first prediction result, including:
[0015] Poisson disk sampling is performed on the labeled city mesh data, and the sampling results are weakly enhanced.
[0016] The obtained weak enhancement result is input into the pre-built mesh semantic segmentation model to obtain the first prediction result.
[0017] In one embodiment, the supervised loss is determined based on the first prediction result and the labeled city mesh data labels as follows:
[0018] ;
[0019] in, is the supervised loss, is the number of categories, is a symbolic function , For observation samples Belong to category The predicted probability of .
[0020] In one embodiment, the weak enhancement method is a rotation or translation operation.
[0021] In one embodiment, the strong enhancement method is to add noise or perform color change operations.
[0022] In one embodiment, unlabeled input city mesh data is used to perform unsupervised training on a mesh semantic segmentation model to obtain pseudo labels and two model prediction results, including:
[0023] Poisson disk sampling is performed on the unlabeled urban mesh data, and the sampling results are weakly enhanced to obtain the first weak enhancement result.
[0024] The first weak enhancement result is strongly enhanced twice to obtain a first strong enhancement result and a second strong enhancement result.
[0025] The first weak enhancement result is input into the second mesh semantic segmentation model, and the obtained prediction result is used as the pseudo label.
[0026] The first strong enhancement result is input into the third mesh semantic segmentation model to obtain the first model prediction result.
[0027] The second strongest enhancement result is input into the fourth mesh semantic segmentation model to obtain the second model prediction result.
[0028] In one embodiment, calculating the noise reduction loss and the distribution alignment loss based on the pseudo labels and the prediction results of the two models includes:
[0029] According to the pseudo labels, the noise reduction loss is calculated as:
[0030] ;
[0031] in, To reduce noise losses, Pseudo label the number of Pseudo label No. samples.
[0032] Based on the pseudo labels and the prediction results of the two models, the KL divergence is used to calculate the distribution alignment loss:
[0033] ;
[0034] in, is the distribution alignment loss, KL (||) is the KL divergence, and They are pseudo labels, prediction results of the first model, and prediction results of the second model respectively.
[0035] In one embodiment, the mesh semantic segmentation model is optimized and updated based on the supervision loss, the noise reduction loss, and the distribution alignment loss to obtain a trained mesh semantic segmentation model, including:
[0036] According to the supervision loss, noise reduction loss and distribution alignment loss, the total loss of the model is determined as:
[0037] ;
[0038] in, is the total loss of the model, is the supervised loss, is the distribution alignment loss, To reduce noise losses.
[0039] The mesh semantic segmentation model is optimized and updated according to the total loss of the model to obtain a trained mesh semantic segmentation model.
[0040] A semi-supervised semantic segmentation device for urban mesh data, the device comprising:
[0041] The supervised training module is used to perform supervised training on a pre-built mesh semantic segmentation model using labeled city mesh data to obtain a first prediction result; and determine a supervised loss based on the first prediction result and the label of the labeled city mesh data.
[0042] The unsupervised training module is used to perform unsupervised training on the mesh semantic segmentation model using unlabeled input urban mesh data to obtain pseudo-labels and two model prediction results. The unsupervised training process is as follows: the unlabeled input urban mesh data is weakly enhanced, then strongly enhanced twice, and the obtained weak enhancement results, first strong enhancement results, and second strong enhancement results are respectively input into the second, third, and fourth mesh semantic segmentation models to obtain pseudo-labels and two model prediction results. The mesh semantic segmentation models in supervised training and unsupervised training are semantic segmentation networks with shared weights and the same structure. The noise reduction loss and distribution alignment loss are calculated based on the pseudo-labels and the two model prediction results.
[0043] The mesh semantic segmentation model update module is used to optimize and update the mesh semantic segmentation model based on the supervision loss, noise reduction loss and distribution alignment loss to obtain a trained mesh semantic segmentation model.
[0044] The urban mesh data semantic segmentation module is used to perform semantic segmentation on the urban mesh data to be segmented using the trained mesh semantic segmentation model to obtain the semantic segmentation results of the urban mesh data to be segmented.
[0045] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the above-mentioned semi-supervised semantic segmentation method for urban mesh data.
[0046] The aforementioned semi-supervised semantic segmentation method, apparatus, and device for urban mesh data include a training process that includes supervised and unsupervised learning. The unsupervised learning phase incorporates noise reduction loss, distribution alignment loss, and an expanded perturbation space. The noise reduction loss improves the noise in pseudo-labels, thereby increasing their accuracy. The distribution alignment loss reduces the discrepancy between model predictions and pseudo-labels, thereby improving the model's segmentation accuracy. The expanded perturbation space enhances the model's robustness and overall performance. Using this semi-supervised semantic segmentation method for urban mesh data to perform semantic segmentation on pre-segmented urban mesh data can improve segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 1 is a flow chart of a semi-supervised semantic segmentation method for urban mesh data in one embodiment;
[0048] Figure 2 This is a process flow of a Semi-UMAPL semi-supervised semantic segmentation method for urban mesh data in one embodiment;
[0049] Figure 3 Figure 3 is the first experimental result of semantic segmentation of some city meshes in another embodiment, where (a) is the input city mesh, (b) is the segmentation result of the semi-supervised semantic segmentation method for city mesh data, (c) is the segmentation result of the SupOnly model, (d) is the segmentation result of the ERDA model, (e) is the segmentation result of the UniMatch model, (f) is the segmentation result of the U2PL model, (g) is the segmentation result of the SimMatch model, (h) is the segmentation result of the GuideCon model, and (i) is the segmentation result of the FixMatch model.
[0050] Figure 4 The second experimental results of semantic segmentation of part of the city mesh in another embodiment, where (a) is the input city mesh, (b) is the segmentation result of the semi-supervised semantic segmentation method of the city mesh data, (c) is the segmentation result of the SupOnly model, (d) is the segmentation result of the ERDA model, (e) is the segmentation result of the UniMatch model, (f) is the segmentation result of the U2PL model, (g) is the segmentation result of the SimMatch model, (h) is the segmentation result of the GuideCon model, and (i) is the segmentation result of the FixMatch model;
[0051] Figure 5 Figure 3 is the third experimental result of semantic segmentation of a portion of the city mesh in another embodiment, where (a) is the input city mesh, (b) is the segmentation result of the semi-supervised semantic segmentation method for city mesh data, (c) is the segmentation result of the SupOnly model, (d) is the segmentation result of the ERDA model, (e) is the segmentation result of the UniMatch model, (f) is the segmentation result of the U2PL model, (g) is the segmentation result of the SimMatch model, (h) is the segmentation result of the GuideCon model, and (i) is the segmentation result of the FixMatch model.
[0052] Figure 6 This is a structural block diagram of a semi-supervised semantic segmentation device for urban mesh data in one embodiment;
[0053] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0055] All existing methods for urban mesh semantic segmentation are based on fully supervised learning. However, urban mesh labeling is time-consuming and labor-intensive. Therefore, a semi-supervised semantic segmentation method for urban mesh data using full pseudo-labeling is proposed. Therefore, the semi-supervised semantic segmentation method for urban mesh data proposed in this application is a semi-supervised strategy for semantic segmentation of urban mesh data that can be incorporated into any urban mesh semantic segmentation model.
[0056] In one embodiment, Figure 1 As shown, a semi-supervised semantic segmentation method for urban mesh data is provided, which includes the following steps:
[0057] Step 100: Use the labeled city mesh data to perform supervised training on the pre-built mesh semantic segmentation model to obtain a first prediction result.
[0058] Specifically, the pre-built mesh semantic segmentation model can be any city mesh semantic segmentation model, for example, KPConv is a segmenter.
[0059] Step 102: Determine the supervised loss based on the first prediction result and the labels of the annotated city mesh data.
[0060] Specifically, the labeled city mesh data is input into the pre-built mesh semantic segmentation model to obtain the first prediction result , according to the first prediction result The loss is calculated with the label L to obtain the supervised loss.
[0061] Step 104: Use unlabeled input urban mesh data to perform unsupervised training on the mesh semantic segmentation model to obtain pseudo labels and two model prediction results; the unsupervised training process is: the unlabeled input urban mesh data is weakly enhanced, then strongly enhanced twice, and the obtained weak enhancement results, first strong enhancement results, and second strong enhancement results are respectively input into the second, third, and fourth mesh semantic segmentation models to obtain pseudo labels and two model prediction results; the mesh semantic segmentation models in the supervised training and unsupervised training are semantic segmentation networks with shared weights and the same structure.
[0062] Specifically, during the unsupervised training process, one weak enhancement is performed followed by two strong enhancements. The weak enhancement result and the two strong enhancement results are processed using a pre-built mesh semantic segmentation model to obtain pseudo labels and two model prediction results.
[0063] The double strong enhancement is called the double strong perturbation branch, which is used to explore the wide perturbation space in the urban mesh data.
[0064] Step 106: Calculate the noise reduction loss and distribution alignment loss based on the pseudo labels and the prediction results of the two models.
[0065] Specifically, to fully utilize all unlabeled data and mitigate the adverse effects of noise in pseudo-labels on model segmentation performance, we introduce two new techniques: noise reduction loss and distribution alignment loss. These methods aim to improve the quality of pseudo-labels while narrowing the gap between pseudo-labels and model predictions, thereby improving the overall segmentation performance of the model.
[0066] Step 108: Based on the supervision loss, noise reduction loss, and distribution alignment loss, the mesh semantic segmentation model is optimized and updated to obtain a trained mesh semantic segmentation model.
[0067] Specifically, according to the supervision loss generated by the supervised training process, the noise reduction loss and distribution alignment loss generated by the unsupervised training process, the mesh semantic segmentation model is optimized and updated to obtain a trained mesh semantic segmentation model.
[0068] Step 110: Use the trained mesh semantic segmentation model to perform semantic segmentation on the urban mesh data to be segmented, and obtain a semantic segmentation result of the urban mesh data to be segmented.
[0069] The training process of the semi-supervised semantic segmentation method for urban mesh data described above includes supervised learning and unsupervised learning. The unsupervised learning part introduces noise reduction loss, distribution alignment loss, and extended perturbation space. The noise reduction loss improves the noise in the pseudo-labels, thereby improving their accuracy; the distribution alignment loss reduces the difference between the model predictions and the pseudo-labels, thereby improving the model's segmentation accuracy; and the extended perturbation space enhances the model's robustness and overall performance. Using the semi-supervised semantic segmentation method for urban mesh data to perform semantic segmentation on the unsegmented urban mesh data can improve the segmentation accuracy of the urban mesh data.
[0070] In one embodiment, step 100 includes: performing Poisson disk sampling on the labeled city mesh data, and weakly enhancing the sampling results; and inputting the obtained weakly enhanced results into a pre-built mesh semantic segmentation model to obtain a first prediction result.
[0071] In one embodiment, step 102 includes: determining the supervised loss based on the first prediction result and the labeled city mesh data labels as follows:
[0072] (1)
[0073] in, is the supervised loss, is the number of categories, is a symbolic function , if the sample The true category is , then the value is 1, if the sample The true category is not , then take the value 0, For observation samples i Belong to category The predicted probability of .
[0074] In one embodiment, the weak enhancement method is a rotation or translation operation.
[0075] In one embodiment, the strong enhancement method is to add noise or perform color change operations.
[0076] In one embodiment, step 104 includes: performing Poisson disk sampling on unlabeled urban mesh data, weakly enhancing the sampling results to obtain a first weakly enhanced result; performing strong enhancement twice on the first weakly enhanced result to obtain a first strongly enhanced result and a second strongly enhanced result; inputting the first weakly enhanced result into a second mesh semantic segmentation model, and using the obtained prediction result as a pseudo label; inputting the first strongly enhanced result into a third mesh semantic segmentation model to obtain a first model prediction result; and inputting the second strongly enhanced result into a fourth mesh semantic segmentation model to obtain a second model prediction result.
[0077] Specifically, the second mesh semantic segmentation model, the third mesh semantic segmentation model, and the fourth mesh semantic segmentation model are semantic segmentation networks with the same weight sharing and structure as the mesh semantic segmentation model in supervised training.
[0078] In one embodiment, step 106 includes: calculating the noise reduction loss based on the pseudo labels as:
[0079] (2)
[0080] in, To reduce noise losses, Pseudo label the number of Pseudo label No. samples. Minimizing the noise reduction loss produces more accurate pseudo-labels that contain less noise.
[0081] Based on the pseudo labels and the prediction results of the two models, the KL divergence (Kullback-Leibler divergence) is used to calculate the distribution alignment loss:
[0082] (3)
[0083] in, is the distribution alignment loss, KL (||) is the KL divergence, and They are pseudo labels, prediction results of the first model, and prediction results of the second model respectively.
[0084] KL divergence is a metric used to measure the similarity between two probability distributions. KL divergence is used to quantify the distribution differences between pseudo labels and model predictions, and then minimize these differences to optimize the model. The expression of KL divergence is as follows:
[0085] (4)
[0086] in, and Respectively and No. distribution probability, the range of KL divergence is , allowing for wider or tighter adjustments to the distribution.
[0087] In one embodiment, step 108 includes determining the total model loss based on the supervision loss, the noise reduction loss, and the distribution alignment loss:
[0088] (5)
[0089] in, is the total loss of the model, is the supervised loss, is the distribution alignment loss, To reduce noise losses.
[0090] The mesh semantic segmentation model is optimized and updated according to the total loss of the model to obtain a trained mesh semantic segmentation model.
[0091] In a specific embodiment, the pre-built mesh semantic segmentation model uses KPConv as the segmenter. The process of the Semi-UMAPL semi-supervised semantic segmentation method for urban mesh data is as follows: Figure 2 As shown in Figure 1, Semi-UMAPL includes supervised learning and unsupervised learning. The specific process includes:
[0092] First, the urban mesh data is sampled into a uniform random point cloud using Poisson disk sampling, and the density parameter of Poisson disk sampling is 0.4 cm.
[0093] (1) Supervised learning part:
[0094] The first step is to perform weak enhancement on the input city mesh by rotation or translation.
[0095] The second step is to input it into the segmenter KPConv for training to obtain the first prediction result. , and the loss is calculated with the label L, and the supervised loss is the cross entropy loss , the calculation formula of supervised loss is as shown in formula (1).
[0096] (2) Unsupervised learning part:
[0097] The first step is to perform weak enhancement on the input city mesh. The weak enhancement methods include rotation or translation operations.
[0098] In the second step, the weakly enhanced result is subjected to two strong enhancements. The strong enhancement methods include adding noise or changing color.
[0099] In the third step, the results of weak enhancement and two strong enhancements are input into the segmenter at the same time to obtain the prediction results respectively. 、 and ;set up is a pseudo label, and These are the prediction results of the first model and the second model respectively.
[0100] The fourth step is to pseudo-label and model predictions and Calculate the noise reduction loss and distribution alignment loss. Use formula (2) to calculate the noise reduction loss. Use formula (3) to calculate the distribution alignment loss.
[0101] The total model loss of the supervised learning part and the unsupervised learning part is shown in formula (5). The total model loss is used to optimize and update the pre-built mesh semantic segmentation model (segmenter) to enhance the segmentation performance of the model.
[0102] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0103] In a verification example, the performance of the method of the present application is compared with the existing methods FixMatch, GuideCon, SimMatch, U2PL, UniMatch, ERDA, and SupOnly. Figure 3These are the first experimental results of semantic segmentation of some urban meshes, where (a) is the input urban mesh, (b) is the segmentation result of the semi-supervised semantic segmentation method of urban mesh data, (c) is the segmentation result of the SupOnly model, (d) is the segmentation result of the ERDA model, (e) is the segmentation result of the UniMatch model, (f) is the segmentation result of the U2PL model, (g) is the segmentation result of the SimMatch model, (h) is the segmentation result of the GuideCon model, and (i) is the segmentation result of the FixMatch model. Figure 4 These are the results of the second experiment on semantic segmentation of some urban meshes, where (a) is the input urban mesh, (b) is the segmentation result of the semi-supervised semantic segmentation method for urban mesh data, (c) is the segmentation result of the SupOnly model, (d) is the segmentation result of the ERDA model, (e) is the segmentation result of the UniMatch model, (f) is the segmentation result of the U2PL model, (g) is the segmentation result of the SimMatch model, (h) is the segmentation result of the GuideCon model, and (i) is the segmentation result of the FixMatch model. Figure 5 These are the results of the third experiment on semantic segmentation of some urban meshes, where (a) is the input urban mesh, (b) is the segmentation result of the semi-supervised semantic segmentation method of urban mesh data, (c) is the segmentation result of the SupOnly model, (d) is the segmentation result of the ERDA model, (e) is the segmentation result of the UniMatch model, (f) is the segmentation result of the U2PL model, (g) is the segmentation result of the SimMatch model, (h) is the segmentation result of the GuideCon model, and (i) is the segmentation result of the FixMatch model.
[0104] from Figures 3 to 5 As can be seen, the experimental results of the semi-supervised semantic segmentation method for urban mesh data show the least semantic segmentation error. Empirical research shows that the semi-supervised semantic segmentation method for urban mesh data outperforms other competing methods, highlighting its effectiveness.
[0105] In one embodiment, Figure 6 As shown, a semi-supervised semantic segmentation device for urban mesh data is provided, including: a supervised training module, an unsupervised training module, a mesh semantic segmentation model update module and an urban mesh data semantic segmentation module, wherein:
[0106] The supervised training module is used to perform supervised training on a pre-built mesh semantic segmentation model using labeled city mesh data to obtain a first prediction result; and determine a supervised loss based on the first prediction result and the label of the labeled city mesh data.
[0107] The unsupervised training module is used to perform unsupervised training on the mesh semantic segmentation model using unlabeled input urban mesh data to obtain pseudo-labels and two model prediction results. The unsupervised training process is as follows: the unlabeled input urban mesh data is weakly enhanced, then strongly enhanced twice, and the obtained weak enhancement results, first strong enhancement results, and second strong enhancement results are respectively input into the second, third, and fourth mesh semantic segmentation models to obtain pseudo-labels and two model prediction results. The mesh semantic segmentation models in supervised training and unsupervised training are semantic segmentation networks with shared weights and the same structure. The noise reduction loss and distribution alignment loss are calculated based on the pseudo-labels and the two model prediction results.
[0108] The mesh semantic segmentation model update module is used to optimize and update the mesh semantic segmentation model based on the supervision loss, noise reduction loss and distribution alignment loss to obtain a trained mesh semantic segmentation model.
[0109] The urban mesh data semantic segmentation module is used to perform semantic segmentation on the urban mesh data to be segmented using the trained mesh semantic segmentation model to obtain the semantic segmentation results of the urban mesh data to be segmented.
[0110] In one embodiment, the supervised training module is further used to perform Poisson disk sampling on the labeled city mesh data and weakly enhance the sampling results; the obtained weakly enhanced results are input into a pre-built mesh semantic segmentation model to obtain a first prediction result.
[0111] In one embodiment, the supervised training module is further used to determine a supervised loss based on the first prediction result and the labeled city mesh data label; the supervised loss is shown in formula (1).
[0112] In one embodiment, the weak enhancement method is a rotation or translation operation.
[0113] In one embodiment, the strong enhancement method is to add noise or perform color change operations.
[0114] In one embodiment, the unsupervised training module is further used to perform Poisson disk sampling on unlabeled urban mesh data, weakly enhance the sampling results to obtain a first weakly enhanced result; strongly enhance the first weakly enhanced result twice to obtain a first strongly enhanced result and a second strongly enhanced result; input the first weakly enhanced result into the second mesh semantic segmentation model, and use the obtained prediction result as a pseudo label; input the first strongly enhanced result into the third mesh semantic segmentation model to obtain a first model prediction result; and input the second strongly enhanced result into the fourth mesh semantic segmentation model to obtain a second model prediction result.
[0115] In one embodiment, the unsupervised training module is further configured to calculate the noise reduction loss according to the pseudo labels using formula (2).
[0116] The distribution alignment loss is calculated using formula (3) based on the pseudo labels and the prediction results of the two models using KL divergence.
[0117] In one embodiment, the unsupervised training module is further used to determine the total model loss based on the supervision loss, the noise reduction loss, and the distribution alignment loss; the total model loss is shown in formula (5); the mesh semantic segmentation model is optimized and updated based on the total model loss to obtain a trained mesh semantic segmentation model.
[0118] The specific definition of the semi-supervised semantic segmentation device for urban mesh data can be found in the definition of the semi-supervised semantic segmentation method for urban mesh data above, and will not be repeated here. The various modules in the semi-supervised semantic segmentation device for urban mesh data can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0119] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a semi-supervised semantic segmentation method for urban mesh data is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0120] Those skilled in the art will understand that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0121] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiment when executing the computer program.
[0122] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0123] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A semi-supervised semantic segmentation method for urban mesh data, characterized in that: The method comprises: The pre-built mesh semantic segmentation model is supervised and trained using labeled city mesh data to obtain the first prediction result. According to the first prediction result and the label of the annotated city mesh data, the supervised loss is determined as: ; in, is the supervised loss, M is the number of categories, is the sign function (0, 1), For the observed sample i Belongs to category c The predicted probability of The mesh semantic segmentation model is unsupervisedly trained using unlabeled input urban mesh data to obtain pseudo labels and two model prediction results; the unsupervised training process is: the unlabeled input urban mesh data is weakly enhanced and then strongly enhanced twice, and the obtained weak enhancement result, the first strong enhancement result and the second strong enhancement result are respectively input into the second, third and fourth mesh semantic segmentation models to obtain pseudo labels and two model prediction results; wherein the mesh semantic segmentation models in the supervised training and the unsupervised training are semantic segmentation networks with weight sharing and the same structure; Calculate the noise reduction loss and the distribution alignment loss based on the pseudo labels and the prediction results of the two models; According to the supervision loss, the noise reduction loss and the distribution alignment loss, the total model loss is determined; according to the total model loss, the mesh semantic segmentation model is optimized and updated to obtain a trained mesh semantic segmentation model; wherein the total model loss is ; in, is the total loss of the model, is the supervised loss, is the distribution alignment loss, To reduce the loss of noise; Use the trained mesh semantic segmentation model to perform semantic segmentation on the urban mesh data to be segmented, and obtain the semantic segmentation result of the urban mesh data to be segmented; According to the pseudo labels and the prediction results of the two models, the noise reduction loss and the distribution alignment loss are calculated, including: Based on the pseudo-labels, the noise reduction loss is calculated as: ; in, To reduce noise loss, N Pseudo label The number of Pseudo label No. i samples; Based on the pseudo labels and the prediction results of the two models, the KL divergence is used to calculate the distribution alignment loss: ; in, is the distribution alignment loss, is the KL divergence, , and They are pseudo labels, prediction results of the first model, and prediction results of the second model respectively.
2. The method according to claim 1, characterized in that The pre-built mesh semantic segmentation model is supervised and trained using labeled city mesh data to obtain the first prediction results, including: Perform Poisson disk sampling on the labeled city mesh data and perform weak enhancement on the sampling results; The obtained weak enhancement result is input into the pre-built mesh semantic segmentation model to obtain the first prediction result.
3. The method according to claim 2, characterized in that Weak enhancement methods include rotation or translation operations.
4. The method according to claim 2, characterized in that: Strong enhancement methods include adding noise or color change operations.
5. The method according to claim 1, characterized in that The mesh semantic segmentation model is trained unsupervised using unlabeled input city mesh data to obtain pseudo labels and two model prediction results, including: Perform Poisson disk sampling on the unlabeled city mesh data, perform weak enhancement on the sampling results, and obtain the first weak enhancement result; Performing strong enhancement twice on the first weak enhancement result to obtain a first strong enhancement result and a second strong enhancement result; Inputting the first weak enhancement result into the second mesh semantic segmentation model, and using the obtained prediction result as a pseudo label; Inputting the first strong enhancement result into the third mesh semantic segmentation model to obtain a first model prediction result; The second strong enhancement result is input into the fourth mesh semantic segmentation model to obtain a second model prediction result.
6. A semi-supervised semantic segmentation device for urban mesh data, characterized in that: The device comprises: A supervised training module is used to perform supervised training on a pre-built mesh semantic segmentation model using labeled city mesh data to obtain a first prediction result; and a supervised loss is determined according to the first prediction result and the label of the labeled city mesh data as: ; in, is the supervised loss, M is the number of categories, is the sign function (0, 1), For the observed sample i Belongs to category c The predicted probability of An unsupervised training module is used to perform unsupervised training on the mesh semantic segmentation model using unlabeled input urban mesh data to obtain pseudo labels and two model prediction results; the unsupervised training process is: after weakly enhancing the unlabeled input urban mesh data and then performing two strong enhancements, the obtained weak enhancement results, the first strong enhancement results and the second strong enhancement results are respectively input into the second, third and fourth mesh semantic segmentation models to obtain pseudo labels and two model prediction results; wherein the mesh semantic segmentation models in the supervised training and the unsupervised training are semantic segmentation networks with weight sharing and the same structure; according to the pseudo labels and the two model prediction results, the noise reduction loss and the distribution alignment loss are calculated; The mesh semantic segmentation model update module is used to determine the total model loss according to the supervision loss, the noise reduction loss and the distribution alignment loss; optimize and update the mesh semantic segmentation model according to the total model loss to obtain a trained mesh semantic segmentation model; wherein the total model loss is ; in, is the total loss of the model, is the supervised loss, is the distribution alignment loss, To reduce the loss of noise; The urban mesh data semantic segmentation module is used to perform semantic segmentation on the urban mesh data to be segmented using the trained mesh semantic segmentation model to obtain the semantic segmentation results of the urban mesh data to be segmented; The unsupervised training module is further used to calculate the noise reduction loss according to the pseudo label: ; in, To reduce noise loss, N Pseudo label The number of Pseudo label No. i samples; Based on the pseudo labels and the prediction results of the two models, the KL divergence is used to calculate the distribution alignment loss: ; in, is the distribution alignment loss, is the KL divergence, , and They are pseudo labels, prediction results of the first model, and prediction results of the second model respectively.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the semi-supervised semantic segmentation method for urban mesh data described in any one of claims 1 to 5 is implemented.
