Sensitive word replacement method, device, electronic device and storage medium for three-dimensional model

By performing plane extraction, texture rendering and text matching on the three-dimensional model, the sensitive word areas are automatically identified and replaced, which solves the problem of low efficiency of sensitive word detection in three-dimensional models in the existing technology and realizes efficient sensitive word detection and desensitization processing.

CN116363675BActive Publication Date: 2025-09-26BEIJING AEROSPACE HONGTU INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310166272.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2025-09-26
Estimated Expiration
2043-02-27

AI Technical Summary

Technical Problem

Existing sensitive word detection technology mainly targets text information and two-dimensional images, and it is difficult to efficiently process sensitive words in three-dimensional models. Especially in large-scale three-dimensional application scenarios, it requires a lot of manpower and time, and is inefficient.

Method used

By obtaining the initial three-dimensional model, extracting the plane of the effective single model, performing plane texture rendering and text extraction, identifying sensitive word areas, and replacing the texture image, sensitive word detection and desensitization of the three-dimensional model can be achieved.

Benefits of technology

The efficiency and effectiveness of sensitive word detection and desensitization in 3D models have been improved, and sensitive words in large 3D application scenarios can be automatically processed, reducing labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116363675B_ABST
    Figure CN116363675B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device, and storage medium for detecting and replacing sensitive words in a three-dimensional model, and relates to the technical field of sensitive word detection. The method comprises: obtaining an initial three-dimensional model, determining an effective monomer model based on the initial three-dimensional model, and performing plane extraction on the effective monomer model to obtain a target plane; performing plane texture rendering on the target plane to obtain a re-rendered plane map; performing text extraction and keyword matching on the plane map to determine the sensitive word area; and performing texture replacement on the texture image containing the sensitive word area in the initial three-dimensional model to obtain a desensitized three-dimensional model after the sensitive word is replaced. The present application improves the processing efficiency and processing effect of sensitive word detection and desensitization of three-dimensional models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of sensitive word detection, and in particular to a sensitive word detection method, device, electronic device and storage medium for a three-dimensional model. Background Art

[0002] Currently, existing sensitive word detection usually targets text information and two-dimensional images. It extracts text directly or indirectly from images for language recognition and understanding, thereby determining whether sensitive words exist in sentences.

[0003] Obtaining complete textures in the initial three-dimensional model and then re-synchronizing the modifications is still in the stage of manual selection and replacement. However, for large-scale three-dimensional application scenarios, it is difficult to complete manually, requiring a lot of manpower and time costs, and the efficiency of manual inspection and replacement is extremely low. Summary of the Invention

[0004] The purpose of this application is to provide a method, device, electronic device and storage medium for sensitive word detection and replacement in a three-dimensional model, thereby improving the processing efficiency and processing effect of sensitive word detection and desensitization in a three-dimensional model.

[0005] In a first aspect, the present invention provides a method for detecting sensitive words in a three-dimensional model, the method comprising:

[0006] Obtain an initial three-dimensional model, determine a valid monomer model based on the initial three-dimensional model, and perform plane extraction on the valid monomer model to obtain a target plane;

[0007] Perform plane texture rendering on the target plane to obtain a re-rendered plane map;

[0008] Perform text extraction and keyword matching on the flat map to determine the sensitive word area;

[0009] Texture replacement is performed on the texture image containing the sensitive word area in the initial three-dimensional model to obtain a desensitized three-dimensional model after sensitive word replacement.

[0010] In an optional embodiment, the initial three-dimensional model includes a three-dimensional city model; determining a valid monomer model based on the initial three-dimensional model, and performing plane extraction on the valid monomer model to obtain a target plane includes:

[0011] Performing point cloud segmentation on the three-dimensional city model through a point cloud neural network to obtain valid monomer models corresponding to the three-dimensional city model; wherein the valid monomer models include at least one or more of the following monomer models: a building monomer model and a road monomer model;

[0012] The monomer model plane is fitted based on a preset distance threshold and a preset normal vector angle threshold to extract the target plane contained in the effective monomer model.

[0013] In an optional embodiment, plane fitting processing is performed on each plane included in the monomer model based on a preset distance threshold and a preset normal vector angle threshold to extract the target plane included in the valid monomer model, including:

[0014] Performing plane fitting processing on the monomer model based on a preset distance threshold and a preset normal vector angle threshold, and marking the plane if a plane is extracted;

[0015] If there is an unfitted plane, the preset distance threshold and the preset normal vector angle threshold are adjusted, and plane fitting processing is performed based on the adjusted distance threshold and the adjusted normal vector angle threshold to obtain a preliminary fitting plane;

[0016] Based on the normal vector and plane distance of the preliminary fitting plane, a re-merging process is performed to obtain each plane contained in the effective monomer model.

[0017] In an optional embodiment, performing planar texture rendering on a target plane to obtain a re-rendered planar map includes:

[0018] Calculate the center point and normal vector of each plane contained in the valid monomer model;

[0019] Through the parallel projection camera, the corresponding target plane is rendered with a planar texture based on the center point and normal vector corresponding to each plane to obtain a re-rendered planar map.

[0020] In an optional embodiment, text extraction and keyword matching are performed on the planar map to determine the sensitive word area, including:

[0021] Based on the pre-trained text detection model, text is extracted from the plane map, and the text information and the image bounding box corresponding to the text information are extracted through the text recognition model;

[0022] The sensitive word information is determined by matching the text information with the pre-configured sensitive word library, and the corresponding image bounding box is determined as the sensitive word area.

[0023] In an optional embodiment, the method further comprises:

[0024] Perform image blurring on the sensitive word area to obtain a blurred image.

[0025] In an optional embodiment, texture replacement is performed on the texture image containing the sensitive word area in the initial three-dimensional model to obtain a desensitized three-dimensional model after the sensitive word is replaced, including:

[0026] Through parallel projection, the text bounding box is mapped to the corresponding target plane to obtain the target bounding box;

[0027] Match the initial bounding box corresponding to the initial 3D model based on the target bounding box;

[0028] The texture map corresponding to the initial bounding box is replaced with the texture map corresponding to the blurred image to obtain a desensitized 3D model after sensitive words are replaced.

[0029] In a second aspect, the present invention provides a sensitive word replacement device for a three-dimensional model, the device comprising:

[0030] A model plane extraction module is used to obtain an initial three-dimensional model, determine a valid monomer model based on the initial three-dimensional model, and perform plane extraction on the valid monomer model to obtain a target plane;

[0031] The texture rendering module is used to perform plane texture rendering on the target plane to obtain a re-rendered plane map;

[0032] The text extraction and matching module is used to extract text and match keywords on the plane map to determine the sensitive word area;

[0033] The sensitive word detection and replacement module is used to replace the texture image containing the sensitive word area in the initial three-dimensional model to obtain a desensitized three-dimensional model after the sensitive word is replaced.

[0034] In a third aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the sensitive word replacement method for a three-dimensional model of any of the aforementioned embodiments.

[0035] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the sensitive word replacement method for a three-dimensional model of any one of the aforementioned embodiments.

[0036] The present application provides a method, device, electronic device and storage medium for detecting and replacing sensitive words in a three-dimensional model. The method first obtains an initial three-dimensional model, determines a valid monomer model for the initial three-dimensional model, and performs plane extraction on the valid monomer model to obtain a target plane. The target plane is further subjected to plane texture rendering to obtain a re-rendered plane map. The plane map is then subjected to text extraction and keyword matching to determine the sensitive word area. Finally, texture replacement is performed on the texture image containing the sensitive word area in the initial three-dimensional model to obtain a desensitized three-dimensional model after the sensitive word replacement. The method extracts the plane of the three-dimensional model, determines the sensitive words in the three-dimensional model by extracting the sensitive word area in the plane, and performs texture replacement on the sensitive word area to obtain a desensitized three-dimensional model that does not contain sensitive words. This method realizes the sensitive word detection and desensitization method of the three-dimensional model, and improves the processing efficiency and processing effect of the sensitive word detection and desensitization of the three-dimensional model. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0038] Figure 1 A flowchart of a sensitive word replacement method for a three-dimensional model provided in an embodiment of the present application;

[0039] Figure 2 A flowchart of another sensitive word replacement method for a three-dimensional model provided in an embodiment of the present application;

[0040] Figure 3 A framework for a specific sensitive word detection and replacement method provided in an embodiment of the present application;

[0041] Figure 4 A processing effect diagram corresponding to determining "clinic" as a sensitive word provided in an embodiment of the present application;

[0042] Figure 5 A processing effect diagram corresponding to determining "roujiamo" as a sensitive word provided in an embodiment of the present application;

[0043] Figure 6 A structural diagram of a sensitive word replacement device for a three-dimensional model provided in an embodiment of the present application;

[0044] Figure 7 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] 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.

[0046] 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.

[0047] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0048] The current sensitive word detection is still based on text information and two-dimensional images. It extracts text directly or indirectly from images to perform language recognition and understanding, thereby determining whether sensitive words exist in words or sentences.

[0049] However, with the emergence of new concepts and products such as the metaverse and digital twins, the need for sensitive data detection, replacement, and confidentiality, such as 3D models, has become increasingly prominent and critical. The geographic and image information contained in 3D models can easily contain confidential information, which holds immense practical value. However, the combination of images with geographic information can also lead to the leakage of sensitive information. Therefore, technologies such as declassification and reprocessing of sensitive data are both valuable and necessary. However, existing technologies are primarily limited to inputting 2D images, and the fragmented textures of 3D models cannot be directly applied to existing technologies. Due to rendering requirements, 3D model textures often lack the full semantics of typical photographs. The process of obtaining usable, complete textures from 3D models and then modifying them simultaneously remains a manual process of selection and replacement. Even for large-scale applications such as urban digital twins, manual work is difficult with city-level data.

[0050] Based on this, the embodiments of the present application provide a method, device, electronic device and storage medium for sensitive word detection and replacement of a three-dimensional model, which realizes the sensitive word detection and desensitization method of the three-dimensional model, and improves the processing efficiency of sensitive word detection and desensitization of the three-dimensional model.

[0051] See also Figure 1 As shown, the embodiment of the present application provides a sensitive word replacement method for a three-dimensional model, which mainly includes the following steps:

[0052] Step S102 : obtaining an initial three-dimensional model, determining a valid monomer model based on the initial three-dimensional model, and performing plane extraction on the valid monomer model to obtain a target plane.

[0053] The initial 3D model can be generated by acquiring remote sensing images, a 3D point cloud model, or a 3D scene model within a virtual scene (such as a metaverse model). In one embodiment, the initial 3D model can be a 3D model of a real city or a 3D model of a virtual city.

[0054] In one embodiment, the initial 3D model is first segmented to isolate valid individual models that can be used for sensitive word replacement. For example, if the 3D model is a city model, tree models contained within the city model generally do not require sensitive word processing. Therefore, the tree models can be segmented and deleted, while models such as buildings and roads that may contain sensitive information are retained.

[0055] The sensitive information referred to in this embodiment may include negative information that does not comply with relevant laws and regulations, ethical standards, etc., and may also include information that needs to be kept confidential, such as some key geographical information.

[0056] When plane extraction is performed on the initial three-dimensional model, the extracted target plane may include the outer surface of the building, the plane of the road, the billboard of the store, etc.; in another embodiment, the initial three-dimensional model may also be a three-dimensional model for a virtual city, and accordingly, the extracted target plane may include the outer surface of the building, the plane of the road, the billboard of the store, etc. in the virtual city.

[0057] Step S104: performing plane texture rendering on the target plane to obtain a re-rendered plane map.

[0058] In one embodiment, the planar texture rendering of the target plane can be performed by calculating and rendering a texture image based on a camera perspective, where the camera perspective is the perspective of the camera obtained for the 3D model. By setting a parallel projection camera, a corresponding photo can be obtained, i.e., a re-rendered planar texture.

[0059] Step S106: perform text extraction and keyword matching on the plane map to determine the sensitive word area.

[0060] In one embodiment, when performing text extraction on a flat image, a neural network model can be pre-trained. This model can be trained with labeled sensitive words (such as words that do not comply with legal or ethical requirements, confidential words, or other custom words) to perform text extraction. In one embodiment, sensitive words can be detected based on OCR recognition of the image.

[0061] Step S108 , performing texture replacement on the texture image containing the sensitive word region in the initial three-dimensional model to obtain a desensitized three-dimensional model after sensitive word replacement.

[0062] In one embodiment, a pre-configured texture can be used to replace the texture image containing light and dark information in the sensitive word area, so that the resulting desensitized three-dimensional model does not contain sensitive words, preventing the spread of bad information and the leakage of key geographic information.

[0063] For ease of understanding, the sensitive word replacement method for a three-dimensional model provided in an embodiment of the present application is described in detail below.

[0064] In an optional embodiment, the initial three-dimensional model includes a three-dimensional city model. Determining a valid monomer model based on the initial three-dimensional model and performing plane extraction on the valid monomer model to obtain a target plane may include the following steps 1.1) and 1.2):

[0065] Step 1.1) segmenting the three-dimensional city model using a point cloud neural network to obtain valid monomer models corresponding to the three-dimensional city model; wherein the valid monomer models include at least one or more of the following monomer models: a building monomer model and a road monomer model;

[0066] Step 1.2) Fitting the monomer model plane based on a preset distance threshold and a preset normal vector angle threshold to extract the target plane contained in the effective monomer model.

[0067] Regarding step 1.1 above), in one embodiment, the semantic segmentation model of the point cloud can be trained by RandlNet , segmenting the 3D model. Since tree models rarely require sensitive word replacement, the individual models extracted in this embodiment can be buildings, road signs, and other potentially sensitive information. Therefore, useless information from trees and other debris can be removed during point cloud segmentation. After removing these useless interfering grids, each individual building and road sign can also be filtered and extracted as a single entity.

[0068] Regarding the above step 1.2), plane fitting processing is performed on each plane contained in the monomer model based on a preset distance threshold and a preset normal vector angle threshold to extract the target plane contained in the valid monomer model. In the specific implementation, the following steps 1.2.1) and 1.2.2) may be further included:

[0069] In step 1.2.1), a plane fitting process is performed on the monomer model based on a preset distance threshold and a preset normal vector angle threshold. If a plane is extracted, the plane is marked;

[0070] In step 1.2.2), if there is an unfitted plane, the preset distance threshold and the preset normal vector angle threshold are adjusted, and plane fitting is performed based on the adjusted distance threshold and the adjusted normal vector angle threshold to obtain a preliminary fitted plane;

[0071] In step 1.2.3, the normal vectors and plane distances of the initially fitted planes are re-merged to obtain each plane included in the valid monomer model. For the remaining unfitted planes, the preset distance threshold and normal vector angle threshold are increased and the plane fitting is performed again. This iterative process completes the plane fitting of the entire monomer model S and extracts each plane P.

[0072] Furthermore, the above-mentioned planar texture rendering of the target plane to obtain the re-rendered planar map may include the following steps 2.1) and 2.2):

[0073] Step 2.1), calculate the center point and normal vector of each plane contained in the valid monomer model;

[0074] In step 2.2, the parallel projection camera is used to perform planar texture rendering on the corresponding target plane based on the center point and normal vector corresponding to each plane to obtain a re-rendered planar map.

[0075] Furthermore, the above text extraction and keyword matching of the plane map to determine the sensitive word area can include the following steps 3.1) and 3.2):

[0076] In step 3.1, based on the pre-trained text detection model, perform text extraction on the flat map, and use the text recognition model to extract the mentioned text information and the image bounding box corresponding to the text information;

[0077] In step 3.2, the sensitive word information is determined by matching the text information with the pre-configured sensitive word library, and the corresponding image bounding box is determined as the sensitive word area.

[0078] In addition, in order to prevent the spread of bad information and the leakage of key geographic information, the image of the sensitive word area can be blurred to obtain a blurred image.

[0079] Furthermore, the above-mentioned texture replacement of the texture image containing the sensitive word area in the initial three-dimensional model to obtain the desensitized three-dimensional model after the sensitive word replacement may include the following steps 4.1) to 4.3):

[0080] Step 4.1) Use parallel projection to project the text bounding box onto the corresponding target plane to obtain the target bounding box.

[0081] Step 4.2), matching the initial bounding box corresponding to the initial 3D model based on the target bounding box;

[0082] In step 4.3, the texture map corresponding to the initial bounding box is replaced with the texture map corresponding to the blurred image to obtain a desensitized 3D model after sensitive words are replaced.

[0083] Figure 2 A flowchart of another sensitive word replacement method for a three-dimensional model is shown, which mainly includes the following processing steps:

[0084] Step 1: Segment the 3D model to identify buildings, trees, and road signs.

[0085] Step 2: Perform plane extraction on the monomer mesh models of buildings and road signs.

[0086] Step 3: Calculation of camera perspective and texture image rendering.

[0087] Step 4: Based on the OCR recognition of the image and the detection of sensitive words, the sensitive parts of the rendered image are blurred.

[0088] Step 5: Perform the same blur on all corresponding textures in the original 3D model.

[0089] The first step is the pre-processing of the 3D model. This embodiment of the application focuses on the desensitization and confidentiality of text to prevent the spread of bad information and the leakage of key geographic information. However, this information will not be reconstructed in the tree model. The semantic segmentation model of the point cloud is trained by RandlNet. By segmenting the 3D model, this method extracts buildings and road signs that may contain the information, while removing useless information such as trees. After removing these useless interfering grids, each individual building and road sign can also be filtered and extracted as a single entity.

[0090] The second and third steps are based on the monomer segmentation results of the first step. For each monomer model to be processed, this device uses RANSAC fitting, takes the point cloud position and normal as thresholds, iteratively performs plane segmentation, calculates the center point and normal of each fitting plane separately, sets a parallel projection camera, and obtains the corresponding photo.

[0091] The fourth step is to perform text recognition through the neural network model based on the photos obtained in the previous step (RCNN), detection (DBNET), extracts sensitive words through keyword matching technology, and then blurs the texture of the corresponding position of the rendered image.

[0092] In the fifth step, the texture UV information recorded in the original 3D model and the parallel projection camera pose information from the third step are used to replace the texture used for each plane containing sensitive words. This completes the entire 3D model sensitive word detection and replacement process.

[0093] The framework of the sensitive word detection and replacement method for the entire 3D model texture is as follows Figure 3 The specific implementation steps are as follows:

[0094] a) Using the point cloud neural network model for the input 3D city model M , segmentation is performed to obtain the monomer models of each building and road sign ;

[0095] b) Based on the monomer model , calculate the normal vector for each plane , set the distance threshold d = 0.2, the normal vector angle threshold a = 10, and perform a RANSAC plane fitting. For the remaining unfitted planes, increase the thresholds d and a, and perform RANSAC plane fitting again. This iteration completes the plane fitting of the entire monomer model S and extracts each plane P.

[0096] The specific algorithm is as follows:

[0097] Step 1: Set the distance threshold d = 0.2, the angle threshold a = 10, and record the total number of planes as , the remaining unclassified plane is , plane label i=0;

[0098] Step 2: Combine angle a and distance d threshold to perform RACSAC plane fitting. If the plane is extracted , record the label as i and go to step 3, otherwise go to step 4;

[0099] Step 3 i=i+1;

[0100] Step 4: a=a+5, d=d+0.03. If a is less than 35, go to step 2; otherwise, go to step 5.

[0101] Step5 j=0, l=0;

[0102] Step 6 If < ,and ( )<0.5,j, l plane merge, (where () represents the distance between two planes);

[0103] Step 7: l = l + 1. If l < i, go to Step 6;

[0104] Step 8: l = j, j = j + 1. If j < I, go to Step 6;

[0105] Step 9: End.

[0106] c) For each plane , calculate its center point , normal vector , and then, using a parallel projection camera, render the texture of this plane to obtain an image .

[0107] d) For the image of each plane , use the OCR neural network model to perform text detection and extraction, and use the text recognition model to obtain the text , and the bounding box of the image corresponding to this text . That is perform keyword retrieval on the text in the custom sensitive word library W. For the image with sensitive words and the corresponding text bounding box , record them, and blur this part of the image according to this bounding box to obtain the blurred image .

[0108]

[0109] e) According to the blurred image obtained in Step 4, the bounding box , the plane obtained in Step 2, through parallel projection , map onto the plane and record it as the bounding box . Then, through the texture coordinates corresponding to the record in model M , synchronously replace the texture of the original model.

[0110]

[0111]

[0112] Figure 4 and Figure 5 respectively show the sensitive word detection and replacement effects of 3D models corresponding to different sensitive words. Among them, Figure 4 is the processing effect corresponding to determining "clinic" as a sensitive word, Figure 5 This is the processing effect corresponding to determining "roujiamo" as a sensitive word. This is just an example. In actual applications, the type of sensitive words can be determined according to actual needs.

[0113] In summary, the sensitive word detection and replacement method for three-dimensional models provided in the embodiments of the present application can desensitize the texture map of the three-dimensional model, break away from the two-dimensional vector, and directly process the three-dimensional texture. Compared with the current related means for images, it can be effectively combined with the three-dimensional texture, thereby improving the processing efficiency and processing effect of sensitive word detection and desensitization of the three-dimensional model.

[0114] Based on the above method embodiment, the present application embodiment also provides a sensitive word replacement device for a three-dimensional model, see Figure 6 As shown, the device mainly includes the following parts:

[0115] The model plane extraction module 62 is used to obtain an initial three-dimensional model, determine a valid monomer model based on the initial three-dimensional model, and perform plane extraction on the valid monomer model to obtain a target plane;

[0116] The texture rendering module 64 is used to perform plane texture rendering on the target plane to obtain a re-rendered plane map;

[0117] The text extraction and matching module 66 is used to perform text extraction and keyword matching on the plane map to determine the sensitive word area;

[0118] The sensitive word replacement module 68 is used to perform texture replacement on the texture image containing the sensitive word area in the initial three-dimensional model to obtain a desensitized three-dimensional model after the sensitive word is replaced.

[0119] An embodiment of the present application provides a sensitive word detection and replacement device for a three-dimensional model. The device extracts a plane of the three-dimensional model, determines the sensitive words in the three-dimensional model by extracting the sensitive word area in the plane, and performs texture replacement on the sensitive word area to obtain a desensitized three-dimensional model that does not contain sensitive words. This implements sensitive word detection and desensitization methods for the three-dimensional model, and improves the processing efficiency of sensitive word detection and desensitization for the three-dimensional model.

[0120] In some embodiments, the initial three-dimensional model includes a three-dimensional city model;

[0121] The above-mentioned model plane extraction module 62 is further used for:

[0122] Performing point cloud segmentation on the three-dimensional city model through a point cloud neural network to obtain valid monomer models corresponding to the three-dimensional city model; wherein the valid monomer models include at least one or more of the following monomer models: a building monomer model and a road monomer model;

[0123] The monomer model plane is fitted based on a preset distance threshold and a preset normal vector angle threshold to extract the target plane contained in the effective monomer model.

[0124] In some embodiments, the model plane extraction module 62 is further configured to:

[0125] Performing plane fitting processing on the monomer model based on a preset distance threshold and a preset normal vector angle threshold, and marking the plane if a plane is extracted;

[0126] If there is an unfitted plane, the preset distance threshold and the preset normal vector angle threshold are adjusted, and plane fitting processing is performed based on the adjusted distance threshold and the adjusted normal vector angle threshold to obtain a preliminary fitting plane;

[0127] Based on the normal vector and plane distance of the preliminary fitting plane, a re-merging process is performed to obtain each plane contained in the effective monomer model.

[0128] In some embodiments, the texture rendering module 64 is further configured to:

[0129] Calculate the center point and normal vector of each plane contained in the valid monomer model;

[0130] Through the parallel projection camera, the corresponding target plane is rendered with a planar texture based on the center point and normal vector corresponding to each plane to obtain a re-rendered planar map.

[0131] In some embodiments, the text extraction and matching module 66 is further configured to:

[0132] Based on the pre-trained text detection model, text is extracted from the plane map, and the text information and the image bounding box corresponding to the text information are extracted through the text recognition model;

[0133] The sensitive word information is determined by matching the text information with the pre-configured sensitive word library, and the corresponding image bounding box is determined as the sensitive word area.

[0134] In some embodiments, the apparatus further includes a fuzzy processing module configured to:

[0135] Perform image blurring on the sensitive word area to obtain a blurred image.

[0136] In some embodiments, the sensitive word detection module 68 is further configured to:

[0137] Through parallel projection, the text bounding box is mapped to the corresponding target plane to obtain the target bounding box;

[0138] Match the initial bounding box corresponding to the initial 3D model based on the target bounding box;

[0139] The texture map corresponding to the initial bounding box is replaced with the texture map corresponding to the blurred image to obtain a desensitized 3D model after sensitive words are replaced.

[0140] The sensitive word replacement device for a three-dimensional model provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the sensitive word replacement device for a three-dimensional model, reference may be made to the corresponding contents in the aforementioned sensitive word replacement method embodiment for a three-dimensional model.

[0141] The present application also provides an electronic device, such as Figure 7 As shown, it is a structural diagram of the electronic device, wherein the electronic device 100 includes a processor 71 and a memory 70, the memory 70 stores computer executable instructions that can be executed by the processor 71, and the processor 71 executes the computer executable instructions to implement any of the above-mentioned sensitive word replacement methods for three-dimensional models.

[0142] exist Figure 7 In the illustrated embodiment, the electronic device further includes a bus 72 and a communication interface 73 , wherein the processor 71 , the communication interface 73 and the memory 70 are connected via the bus 72 .

[0143] Among them, the memory 70 may include high-speed random access memory (RAM), and may also include non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 73 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 72 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 72 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0144] The processor 71 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 71 or by software instructions. The above processor 71 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor 71 reads the information in the memory and combines its hardware to complete the steps of the sensitive word replacement method for the three-dimensional model of the aforementioned embodiment.

[0145] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned sensitive word replacement method for the three-dimensional model. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.

[0146] The computer program product of the sensitive word replacement method, device, electronic device and storage medium for a three-dimensional model provided in the embodiments of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. For specific implementation, please refer to the method embodiments and will not be repeated here.

[0147] Unless otherwise specifically stated, the relative steps, numerical expressions and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0148] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0149] In the description of this application, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the invented product is usually placed when in use. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they should not be understood as a limitation on this application.

[0150] It should also be noted that, in the description of this application, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A sensitive word replacement method for a three-dimensional model, characterized in that: The method comprises: Acquire an initial three-dimensional model, determine a valid monomer model based on the initial three-dimensional model, and perform plane extraction on the valid monomer model to obtain a target plane; Performing plane texture rendering on the target plane to obtain a re-rendered plane map; Performing text extraction and keyword matching on the plane map to determine sensitive word areas; Texture replacement is performed on the texture image containing the sensitive word area in the initial three-dimensional model to obtain a desensitized three-dimensional model after sensitive word replacement.

2. The sensitive word replacement method for a three-dimensional model according to claim 1, characterized in that: The initial three-dimensional model includes a three-dimensional city model; Determining a valid monomer model based on the initial three-dimensional model and performing plane extraction on the valid monomer model to obtain a target plane includes: Performing point cloud segmentation on the three-dimensional city model using a point cloud neural network to obtain valid monomer models corresponding to the three-dimensional city model; wherein the valid monomer models include at least one or more of the following monomer models: a building monomer model and a road monomer model; The monomer model plane is fitted based on a preset distance threshold and a preset normal vector angle threshold to extract a target plane included in the effective monomer model.

3. The sensitive word replacement method for a three-dimensional model according to claim 2, characterized in that: Performing plane fitting processing on each plane included in the monomer model based on a preset distance threshold and a preset normal vector angle threshold to extract a target plane included in the valid monomer model includes: Performing plane fitting processing on the effective monomer model based on a preset distance threshold and a preset normal vector angle threshold, and marking the plane if a plane is extracted; If there is an unfitted plane, the preset distance threshold and the preset normal vector angle threshold are adjusted, and a plane fitting process is performed based on the adjusted distance threshold and the adjusted normal vector angle threshold to obtain a preliminary fitting plane; Re-merging is performed based on the normal vector and plane distance of the preliminary fitting plane to obtain each plane included in the effective monomer model.

4. The sensitive word replacement method for a three-dimensional model according to claim 3, characterized in that: Performing plane texture rendering on the target plane to obtain a re-rendered plane map includes: Calculating the center point and normal vector of each plane included in the effective monomer model; Through the parallel projection camera, the corresponding target plane is rendered with a planar texture based on the center point and normal vector corresponding to each plane to obtain a re-rendered planar map.

5. The sensitive word replacement method for a three-dimensional model according to claim 4, characterized in that: Perform text extraction and keyword matching on the plane map to determine sensitive word areas, including: Based on a pre-trained text detection model, the plane map is subjected to text extraction, and the text information and the image bounding box corresponding to the text information are extracted through a text recognition model; The sensitive word information is determined by matching the text information with a pre-configured sensitive word library, and the corresponding image bounding box is determined as the sensitive word area.

6. The sensitive word replacement method for a three-dimensional model according to claim 5, characterized in that: The method further comprises: Perform image blurring processing on the sensitive word area to obtain a blurred image.

7. The sensitive word replacement method for a three-dimensional model according to claim 6, characterized in that: Performing texture replacement on the texture image containing the sensitive word region in the initial three-dimensional model to obtain a desensitized three-dimensional model after sensitive word replacement, including: Through parallel projection, the text bounding box is mapped to the corresponding target plane to obtain the target bounding box; Matching an initial bounding box corresponding to the initial three-dimensional model based on the target bounding box; The texture map corresponding to the initial bounding box is replaced with the texture map corresponding to the blurred image to obtain a desensitized three-dimensional model after sensitive words are replaced.

8. A sensitive word replacement detection device for a three-dimensional model, characterized in that: The device comprises: A model plane extraction module is used to obtain an initial three-dimensional model, determine a valid monomer model based on the initial three-dimensional model, and perform plane extraction on the valid monomer model to obtain a target plane; A texture rendering module, configured to perform plane texture rendering on the target plane to obtain a re-rendered plane map; A text extraction and matching module is used to perform text extraction and keyword matching on the plane map to determine sensitive word areas; The sensitive word replacement module is used to perform texture replacement on the texture image containing the sensitive word area in the initial three-dimensional model to obtain a desensitized three-dimensional model after the sensitive word is replaced.

9. An electronic device, characterized in that: It includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the sensitive word replacement method for a three-dimensional model as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the sensitive word replacement method for a three-dimensional model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • 3D model detection method and device and storage medium

    CN111460853A

  • Real scene three-dimensional monomer method and device and storage medium

    CN115346011A