Building design negative image detection method and device and storage medium
By vectorizing the three-dimensional model and targeted words of architectural image design and similarity calculation, the negative image of the building in each angle is solved, and the subjectivity and inaccuracy of the evaluation results in the prior art are improved, and the objectivity and accuracy of the evaluation are improved.
Patent Information
- Application Number
- CN202510232095.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-13
AI Technical Summary
The existing technology lacks quantitative standards when evaluating the effectiveness of architectural image design, resulting in strong subjectivity and inaccuracy of the evaluation results.
By obtaining the three-dimensional model and targeting words of the building to be evaluated, a spatial coordinate system is established, the building location coordinates are determined, multiple angle maps are generated, and the negative image of the building at each angle is evaluated through vectorization processing and similarity calculation.
It improves the objectivity and accuracy of the results of building image evaluation, and avoids the subjectivity problem when relying on pure manual evaluation.
Smart Images

Figure CN120146681A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a method, device, and storage medium for detecting negative images of building designs. Background Art
[0002] When designing building images, positive building images can enhance public recognition and create a positive social influence. Currently, the methods for evaluating the effects of building image design mainly rely on the review and evaluation of layers of technical personnel. This process is usually based on the professional knowledge, experience judgment, and personal aesthetic preferences of the evaluators, lacking quantitative criteria, making it difficult to accurately measure the actual impact of building images on the environment, society, and the psychology of users. Moreover, to a certain extent, it depends on the experience and associative ability of the evaluators, resulting in strong subjectivity in the evaluation results. There is a high probability of different judgments due to individual differences. Therefore, the evaluation results lack objectivity and accuracy. Summary of the Invention
[0003] To solve the above technical problems, this application provides a method, device, and storage medium for detecting negative images of building designs, which can improve the objectivity and accuracy of building image evaluation results.
[0004] In a first aspect, this application provides a method for detecting negative images of building designs, including: obtaining a three-dimensional model of a building to be evaluated and at least one target word; the target word is a noun corresponding to a negative image; establishing a spatial coordinate system with the center point of the grounding surface of the three-dimensional model as the coordinate origin, and determining the building position coordinates of the three-dimensional model in the spatial coordinate system; determining multiple camera position coordinates according to the building position coordinates, and generating an angular view of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates; generating multiple generated views according to the multiple angular views and at least one target word, and obtaining an image description of each generated view; performing vectorization processing on the image description to obtain a description vector, and performing vectorization processing on the target word to obtain a target word vector; calculating the similarity between the description vector and the target word vector, and when the similarity is greater than a preset threshold, determining the angle where the camera position coordinate corresponding to the description vector is located as the negative image warning angle, and determining the negative image corresponding to the target word of the target word vector as the negative image of the building to be evaluated at the negative image warning angle.
[0005] In some embodiments, determining a plurality of camera position coordinates based on building position coordinates includes: determining a target distance based on the building position coordinates, and determining a preset multiple of the target distance as the target radius; creating a hemisphere in a spatial coordinate system with a radius of the target radius, a cross-section located on the grounding plane of the three-dimensional model, and enclosing the three-dimensional model; dividing the hemisphere into a plurality of grids according to a preset rule, and determining the center point coordinates of each grid as the camera position coordinates; the preset rule includes at least one of dividing by area, dividing by shape, and dividing by angle.
[0006] In some embodiments, determining the target distance based on the building position coordinates includes: determining an enclosing sphere of the building to be evaluated based on the building position coordinates, and determining the radius of the enclosing sphere as the target distance; or, calculating an average distance between the building position coordinates and the coordinate origin based on the building position coordinates, and determining the average distance as the target distance.
[0007] In some embodiments, the step of dividing the hemisphere into a plurality of grids according to a preset rule and determining the center point coordinates of each grid as the camera position coordinates includes: dividing the hemisphere into a plurality of grids according to a preset rule; determining some consecutive grids among the plurality of grids as target grids according to the symmetry characteristics of the building to be evaluated; and determining the center point coordinates of the target grids as the camera position coordinates.
[0008] In some embodiments, when the spatial coordinate system is a spherical coordinate system and the preset rule is dividing by angle, dividing the hemisphere into a plurality of grids according to the preset rule includes: dividing the hemisphere along the zenith angle direction by a first preset angle and along the azimuth angle direction by a second preset angle to obtain a plurality of grids.
[0009] In some embodiments, generating a plurality of generated maps based on a plurality of angular maps and at least one target word includes: performing extraction processing on the angular maps to obtain an abstract map corresponding to each angular map; a set of abstract maps includes a hard-edge map, a soft-edge map, and a depth map; the depth of each element in the depth map is calculated from the camera position coordinates and the building position coordinates; using a first preset model to generate a plurality of generated maps based on at least one target word and multiple sets of abstract maps; one target word and one set of abstract maps generate one generated map.
[0010] Second aspect, the present application provides a detection device for negative images of building designs, including: an acquisition module for acquiring a three-dimensional model of a building to be evaluated and at least one target word; the target word being a noun corresponding to a negative image; a creation module for establishing a spatial coordinate system with the center point of the grounding plane of the three-dimensional model as the coordinate origin and determining the building position coordinates of the three-dimensional model in the spatial coordinate system; a generation module for determining multiple camera position coordinates according to the building position coordinates and generating an angular map of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates; the generation module is further configured to generate multiple generated maps according to the multiple angular maps and at least one target word, and obtain an image description of each generated map; a processing module for performing vectorization processing on the image description to obtain a description vector, and performing vectorization processing on the target word to obtain a target word vector; a determination module for calculating the similarity between the description vector and the target word vector, and when the similarity is greater than a preset threshold, determining the angle corresponding to the camera position coordinate of the description vector as the negative image warning angle, and determining the negative image of the target word corresponding to the target word vector as the negative image of the building to be evaluated at the negative image warning angle.
[0011] In some embodiments, the generation module includes a determination sub-module, a creation sub-module, and a division sub-module: the determination sub-module is configured to determine a target distance according to the building position coordinates and determine a preset multiple of the target distance as the target radius; the creation sub-module is configured to create a hemisphere in the spatial coordinate system with a radius of the target radius, a cross-section located on the grounding plane of the three-dimensional model, and enclosing the three-dimensional model; the division sub-module is configured to divide the hemisphere into multiple grids according to a preset rule and determine the center point coordinates of each grid as the camera position coordinates; the preset rule includes at least one of dividing by area, dividing by shape, and dividing by angle.
[0012] In some embodiments, the determination sub-module is specifically configured to: determine an envelope sphere of the building to be evaluated according to the building position coordinates and determine the radius of the envelope sphere as the target distance; or, calculate the average distance between the building position coordinates and the coordinate origin according to the building position coordinates and determine the average distance as the target distance.
[0013] In some embodiments, the division sub-module is specifically configured to: divide the hemisphere into multiple grids according to a preset rule; determine some consecutive grids among the multiple grids as target grids according to the symmetry characteristics of the building to be evaluated; and determine the center point coordinates of the target grids as the camera position coordinates.
[0014] In some embodiments, the division sub-module is specifically configured to: when the spatial coordinate system is a spherical coordinate system and the preset rule is division by angle, divide the hemisphere along the zenith angle direction by a first preset angle and along the azimuth angle direction by a second preset angle to obtain multiple grids.
[0015] In some embodiments, the generation module is specifically configured to: perform extraction processing on the angular graphs to obtain abstract graphs corresponding to each angular graph; a set of abstract graphs includes a hard-edge graph, a soft-edge graph, and a depth graph; the depth of each element in the depth graph is calculated from the camera position coordinates and the building position coordinates; use a first preset model to generate multiple generated graphs based on at least one target word and multiple sets of abstract graphs; one target word and one set of abstract graphs generate one generated graph.
[0016] In a third aspect, the present application provides an electronic device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, where when the computer program is executed by the processor, it implements the method for detecting negative images of building designs according to any one of the embodiments in the first aspect.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium, including: a computer program stored on the computer-readable storage medium, where when the computer program is executed by the processor, it implements the method for detecting negative images of building designs according to any one of the embodiments in the first aspect.
[0018] In a fifth aspect, the present application provides a computer program product, including: when the computer program product runs on a computer, it causes the computer to implement the method for detecting negative images of building designs according to any one of the embodiments in the first aspect.
[0019] The technical solution provided by this application has the following advantages compared with the prior art: First, obtain the three-dimensional model of the building to be evaluated and at least one target word, establish a spatial coordinate system with the center point of the grounding surface of the three-dimensional model as the coordinate origin, and determine the building position coordinates of the three-dimensional model in the spatial coordinate system. Among them, the target word is the noun corresponding to the negative image. After that, determine multiple camera position coordinates according to the building position coordinates, generate angle maps of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates, generate multiple generated maps according to the multiple angle maps and at least one target word, and obtain the image description of each generated map. Finally, perform vectorization processing on the image description to obtain a description vector, perform vectorization processing on the target word to obtain a target word vector, calculate the similarity between the description vector and the target word vector, and when the similarity is greater than the preset threshold, determine the angle corresponding to the camera position coordinate of the description vector as the negative image warning angle, and determine the negative image corresponding to the target word of the target word vector as the negative image of the building to be evaluated at the negative image warning angle. In this way, on the one hand, it is possible to comprehensively evaluate the image of the building to be evaluated from multiple angles, improving the accuracy of the evaluation results; on the other hand, it is possible to evaluate the image of each angle of the building to be evaluated according to the similarity between the description vector of the generated map generated from the three-dimensional model of the building to be evaluated and the target word vector representing the negative image, avoiding the problem of strong subjectivity of the evaluation results due to the lack of a quantitative standard when relying on pure manual evaluation of the image design effect of the building to be evaluated, and improving the objectivity and accuracy of the building image evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application and, together with the specification, are used to explain the principles of the present application.
[0021] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0022] Figure 1 It is one of the application scenario schematic diagrams of the method for detecting the negative image of building design provided by the embodiment of the present application;
[0023] Figure 2 It is one of the flow schematic diagrams of the method for detecting the negative image of building design provided by the embodiment of the present application;
[0024] Figure 3 It is one of the application scenario schematic diagrams of the method for detecting the negative image of building design provided by the embodiment of the present application;
[0025] Figure 4 This is the second flowchart diagram of the method for detecting negative images in architectural design provided by the embodiments of the present application;
[0026] Figure 5 This is the third application scenario diagram of the method for detecting negative images in architectural design provided by the embodiments of the present application;
[0027] Figure 6 This is the fourth application scenario diagram of the method for detecting negative images in architectural design provided by the embodiments of the present application;
[0028] Figure 7 This is the third flowchart diagram of the method for detecting negative images in architectural design provided by the embodiments of the present application;
[0029] Figure 8 This is the structural diagram of a device for detecting negative images in architectural design provided by the embodiments of the present application;
[0030] Figure 9 This is the structural diagram of an electronic device provided by the embodiments of the present application. Detailed implementation manners
[0031] In order to more clearly understand the above objects, features and advantages of the present application, the solutions of the present application will be further described below. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments may be combined with each other.
[0032] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application, but the present application may be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the present application, rather than all embodiments.
[0033] In recent years, many public buildings have triggered various associations among the public due to their strange shapes, among which there are many negative image associations, such as "coffin", "tombstone", "toilet", etc., leading to events where the public questions the rationality of the decisions of the construction department. How to predict such negative associations at the design stage has become an important issue in the early decision-making. At present, the methods for evaluating the design effect of building images mainly rely on the review and evaluation of layers of technical personnel. However, on the one hand, since the review of building plans usually only provides renderings from limited angles and cannot conduct a comprehensive screening of all angles, a large number of angles are not covered by the review; on the other hand, the manual evaluation is also limited by the personal experience and associative ability of the reviewers, making it difficult to systematically reflect various negative associations of the public, and the review results are difficult to quantify. Therefore, the evaluation results lack objectivity and accuracy.
[0034] In view of the above problems, the embodiments of the present application provide a detection solution for negative images in architectural design. First, a three-dimensional model of the building to be evaluated and at least one target word are obtained, and a spatial coordinate system is established with the center point of the grounding surface of the three-dimensional model as the coordinate origin to determine the building position coordinates of the three-dimensional model in the spatial coordinate system. Herein, the target word is a noun corresponding to a negative image. Then, multiple camera position coordinates are determined according to the building position coordinates, angle maps of the building to be evaluated at each camera position coordinate are generated based on the building position coordinates and the camera position coordinates, and multiple generated maps are generated according to the multiple angle maps and at least one target word, and the image description of each generated map is obtained. Finally, the image description is vectorized to obtain a description vector, the target word is vectorized to obtain a target word vector, the similarity between the description vector and the target word vector is calculated, and when the similarity is greater than a preset threshold, the angle corresponding to the camera position coordinate of the description vector is determined as the negative image warning angle, and the negative image corresponding to the target word of the target word vector is determined as the negative image of the building to be evaluated at the negative image warning angle. In this way, on the one hand, the image of the building to be evaluated can be comprehensively evaluated from multiple angles, improving the accuracy of the evaluation result; on the other hand, the similarity between the description vector of the generated map generated according to the three-dimensional model of the building to be evaluated and the target word vector representing the negative image can be used to evaluate the image of each angle of the building to be evaluated, avoiding the problem that the evaluation result is highly subjective due to the lack of a quantitative standard when relying solely on manual evaluation of the image design effect of the building to be evaluated, and improving the objectivity and accuracy of the building image evaluation result.
[0035] Figure 1 It is a schematic diagram of the scenario architecture of the detection method for negative images in architectural design provided by the embodiments of the present application. As Figure 1 shown, the scenario architecture provided by the embodiments of the present application includes: a server 100 and an electronic device 200.
[0036] The electronic device 200 provided by the embodiments of the present application can have various implementation forms. For example, it can be a smart phone, a laptop computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet personal computer (Tablet PC), a vehicle-mounted terminal (such as a vehicle-mounted navigation terminal), a desktop computer, a smart home device, etc.
[0037] In some embodiments, when the electronic device 200 receives a detection instruction for a negative image of architectural design, it can communicate with the server 100. The electronic device 200 is allowed to communicate with the server 100 through a Local Area Network (LAN) or a Wireless Local Area Network (WLAN).
[0038] The server 100 can be a server that provides various services. For example, it can be a server that supports the three-dimensional model of the building to be evaluated and at least one target word obtained by the electronic device 200. The server can perform processes such as partitioning, image extraction, image description, and vectorization on the received three-dimensional model, perform vectorization processing on the received target word, and feedback the processing results to the electronic device 200. The server 100 can be a server cluster or multiple server clusters, and can include one or more types of servers.
[0039] It should be noted that the method for detecting the negative image of architectural design provided in the embodiments of the present application can be executed by the server 100, or by the electronic device 200, or jointly by the server 100 and the electronic device 200. The present application does not make any limitations in this regard.
[0040] The method for detecting the negative image of architectural design provided in the embodiments of the present application can be executed by a detection device for the negative image of architectural design. The detection device for the negative image of architectural design can be hardware or software. When the detection device for the negative image of architectural design is hardware, it can be various electronic devices with the function of detecting the negative image of architectural design, including but not limited to mobile phones, computers, laptops, tablets, TVs, smart TVs, laser projection devices, monitors, etc. When the detection device for the negative image of architectural design is software, it can be installed in the above-listed electronic devices. It can be implemented as multiple software or software modules, or as a single software or software module. No specific limitations are made here.
[0041] Figure 2 It is a schematic flowchart of a method for detecting the negative image of architectural design provided in the embodiments of the present application. As Figure 2 shown, the method for detecting the negative image of architectural design can include the following steps:
[0042] S11. Obtain a three-dimensional model of the building to be evaluated and at least one target word.
[0043] Among them, the three-dimensional model of the building to be evaluated is the three-dimensional model of the corresponding image design result of the building to be evaluated; the target word is a noun corresponding to a negative image, for example, coffin, tombstone, toilet, etc.
[0044] Specifically, the method for obtaining the 3D model of the building to be evaluated can be a 3D model manually created by relevant personnel according to the corresponding image design result of the building to be evaluated, or a 3D model automatically generated by inputting the corresponding image design parameters of the building to be evaluated into the corresponding 3D model; the target words can be target words obtained from a pre-stored negative image library, or target words extracted from relevant object noun literature; the present application does not limit this.
[0045] S12. Establish a space coordinate system with the center point of the grounding surface of the 3D model as the coordinate origin, and determine the building position coordinates of the 3D model in the space coordinate system.
[0046] Among them, the space coordinate system can be a spherical coordinate system or a space rectangular coordinate system. For the sake of easy understanding, in the embodiments of the present application, the space coordinate system will be explained below with a spherical coordinate system.
[0047] First, establish a space coordinate system with the center point of the grounding surface of the 3D model as the coordinate origin. Exemplarily, when the space coordinate system is a spherical coordinate system and the 3D model of the building to be evaluated is the 3D model 201 as described Figure 3 herein, establish the spherical coordinate system XYZ as shown Figure 3 with the center point of the grounding surface of the 3D model 201 as the coordinate origin. Among them, r is used to represent the spherical radius, θ is used to represent the zenith angle, is used to represent the azimuth angle.
[0048] Secondly, determine the building position coordinates of the 3D model in the space coordinate system. Exemplarily, when the space coordinate system is the spherical coordinate system as shown Figure 3 herein, the method for determining the building position coordinates of the 3D model 201 in the space coordinate system can be to determine the coordinates of each point on the 3D model 201 in the spherical coordinate system XYZ
[0049] S13. Determine multiple camera position coordinates according to the building position coordinates, and generate an angular map of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates.
[0050] First, determine multiple camera position coordinates according to the building position coordinates.
[0051] Specifically, the method for determining multiple camera position coordinates according to the building position coordinates can be that when the space coordinate system is a spherical coordinate system, for each building position coordinate take as the camera position coordinate corresponding to the building position coordinate, where the value of n is preset. For example, it can be the default value, or a value set by relevant personnel according to the actual situation. For another example, the value of n is a value between 3 and 5.
[0052] The method for determining multiple camera position coordinates based on the building position coordinates may also be to first calculate the distance between the building position coordinates and the coordinate origin, then determine n times of this distance as the target radius, and create a hemisphere in the space coordinate system with the target radius, a cross-section located on the grounding plane of the three-dimensional model and enclosing the three-dimensional model. Finally, divide the hemisphere into multiple grids according to a preset rule, and determine the center point coordinates of each grid as the camera position coordinates. Among them, the preset rule includes at least one of dividing by area, dividing by shape, and dividing by angle.
[0053] Secondly, generate an angular map of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates.
[0054] Specifically, the method for generating an angular map of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates may be to use the frustum projection algorithm to generate an angular map of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates. Among them, frustum projection refers to projecting an object in a three-dimensional (3D) scene onto a two-dimensional (2D) image plane using the frustum projection matrix of the camera. It may also be to use relevant 3D software tools to generate an angular map of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates. For example, CAD, 3Dmax, Rhino, etc.
[0055] S14. Generate multiple generated maps according to the multiple angular maps and at least one target word, and obtain an image description of each generated map.
[0056] First, generate multiple generated maps according to the multiple angular maps and at least one target word.
[0057] Specifically, the method for generating multiple generated maps according to the multiple angular maps and at least one target word may be to, for each angular map and each target word, use the angular map as a base image and the target word as the main content of the prompt word, and use a second preset model to generate a generated map corresponding to the angular map and the target word according to the base image and the prompt word. Among them, the second preset model is a pre-trained generated map model. For example, the second preset model may be a large language model fine-tuned using ControlNet technology.
[0058] The method of generating multiple generated images based on multiple perspective images and at least one target word can also be to first perform extraction processing on the perspective images to obtain abstract images corresponding to each perspective image; a set of abstract images includes a hard-edge image, a soft-edge image, and a depth image; the depth of each element in the depth image is calculated from the camera position coordinates and the building position coordinates; then, use the first preset model to generate multiple generated images based on at least one target word and multiple sets of abstract images; one target word and one set of abstract images generate one generated image. Among them, the first preset model is also a generated image model pre-trained in advance.
[0059] Secondly, obtain the image description of each generated image. Specifically, the generated image can be input into a preset large model to obtain the image description (ImageCaption) of each generated image through the preset large model.
[0060] S15. Perform vectorization processing on the image description to obtain a description vector, and perform vectorization processing on the target word to obtain a target word vector.
[0061] Specifically, the image description and the target word can be vectorized through a vectorization processing algorithm to obtain a description vector and a target word vector. For example, an embedding layer, Word to Vector (Word2Vec), Bidirectional Encoder Representations from Transformers (BERT), Contrastive Language-Image Pretraining (CLIP), etc.
[0062] S16. Calculate the similarity between the description vector and the target word vector, and when the similarity is greater than a preset threshold, determine the angle where the camera position coordinates corresponding to the description vector are located as the negative image warning angle, and determine the negative image of the target word corresponding to the target word vector as the negative image of the building to be evaluated at the negative image warning angle.
[0063] First, calculate the similarity between the description vector and the target word vector.
[0064] Specifically, the method of calculating the similarity between the description vector and the target word vector can be to calculate the cosine similarity between the description vector and the target word vector. For example, the description vector is expressed as (According to different vectorization models, m may take values such as 768, 1024, 1536, etc.), and the representation of the target word vector in the same vector space is Then the cosine similarity between the description vector and the target word vector is calculated as Among them, v iis the i-th description vector, t i is the i-th target word vector, is a real number, and m is the vector dimension. The way to calculate the similarity between the description vector and the target word vector can also be to calculate the Jaccard similarity, Euclidean distance, Pearson correlation coefficient, etc. between the description vector and the target word vector.
[0065] Secondly, when the similarity is greater than the preset threshold, the angle corresponding to the camera position coordinate of the description vector is determined as the negative image warning angle, and the negative image of the target word corresponding to the target word vector is determined as the negative image of the building to be evaluated at the negative image warning angle. Among them, the preset threshold is preset. For example, it is the default value or the value set by relevant personnel according to the actual situation. Another example is that the preset threshold is 0.75. Exemplarily, the direction of the azimuth angle of 20° and the zenith angle of 20° has a similarity of 0.86 (greater than the preset threshold of 0.75) with the coffin.
[0066] In some embodiments, if the camera position coordinate corresponding to the description vector is the center point coordinate of the pre-determined target grid, then the angle corresponding to any coordinate point in the target grid is determined as the negative image warning angle, and the negative image of the target word corresponding to the target word vector is determined as the negative image of the building to be evaluated at the negative image warning angle.
[0067] In the above solution, first, obtain the three-dimensional model of the building to be evaluated and at least one target word, and establish a spatial coordinate system with the center point of the grounding surface of the three-dimensional model as the coordinate origin to determine the building position coordinates of the three-dimensional model in the spatial coordinate system. Among them, the target word is a noun corresponding to a negative image. After that, determine multiple camera position coordinates according to the building position coordinates, generate angle maps of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates, generate multiple generated maps according to the multiple angle maps and at least one target word, and obtain the image description of each generated map. Finally, perform vectorization processing on the image description to obtain a description vector, perform vectorization processing on the target word to obtain a target word vector, calculate the similarity between the description vector and the target word vector, and when the similarity is greater than a preset threshold, determine the angle corresponding to the camera position coordinate of the description vector as the negative image warning angle, and determine the negative image of the target word corresponding to the target word vector as the negative image of the building to be evaluated at the negative image warning angle. In this way, on the one hand, it is possible to comprehensively evaluate the image of the building to be evaluated from multiple angles, improving the accuracy of the evaluation results; on the other hand, it is possible to evaluate the image of each angle of the building to be evaluated according to the similarity between the description vector of the generated map generated from the three-dimensional model of the building to be evaluated and the target word vector representing the negative image, avoiding the problem that when relying on pure manual evaluation of the image design effect of the building to be evaluated, there is a lack of a quantitative standard, resulting in a strong subjectivity of the evaluation results, and enhancing the objectivity and accuracy of the building image evaluation results.
[0068] In some embodiments, as Figure 4 shown, the method for determining multiple camera position coordinates according to the building position coordinates may include the following steps:
[0069] S121. Determine a target distance according to the building position coordinates, and determine a preset multiple of the target distance as the target radius.
[0070] First, determine the target distance according to the building position coordinates.
[0071] Specifically, the method for determining the target distance according to the building position coordinates may be to determine the circumscribed sphere of the building to be evaluated according to the building position coordinates, and determine the radius of the circumscribed sphere as the target distance.
[0072] The method for determining the target distance based on the building position coordinates may also be to calculate the average distance between the building position coordinates and the coordinate origin according to the building position coordinates, and determine the average distance as the target distance. Among them, the method for calculating the average distance between the building position coordinates and the coordinate origin may be to calculate the average distance between all the building position coordinates and the coordinate origin; it may also be to determine the average of the longest distance and the shortest distance between the building position coordinates and the coordinate origin as the average distance; it may also be to calculate the average distance between the remaining building position coordinates and the coordinate origin after removing the longest distance and the shortest distance between the building position coordinates and the coordinate origin.
[0073] Secondly, determine a preset multiple of the target distance as the target radius. Among them, the preset multiple is preset. For example, it is a default value, or a value determined by relevant personnel according to the actual situation. For another example, the preset multiple can take any value between 3 and 5.
[0074] S122. Create a hemisphere in the space coordinate system with a radius of the target radius, a cross-section located on the grounding surface of the three-dimensional model, and wrapping the three-dimensional model.
[0075] Exemplarily, as Figure 5 shown, create a hemisphere 203 with a radius of the target radius (r) in the space coordinate system XYZ, a cross-section located on the grounding surface 202 of the three-dimensional model 201, and wrapping the three-dimensional model 201.
[0076] S123. Divide the hemisphere into a plurality of grids according to a preset rule, and determine the center point coordinates of each grid as the camera position coordinates.
[0077] First, divide the hemisphere into a plurality of grids according to a preset rule. Among them, the preset rule includes at least one of dividing by area, dividing by shape, and dividing by angle.
[0078] Specifically, the hemisphere can be divided into a plurality of grids in an equal-area manner, or the hemisphere can be divided into a plurality of grids in an equal-shape (such as quadrilateral, triangle, etc.) manner, or the hemisphere can be divided into a plurality of grids according to an angle.
[0079] In some embodiments, when the space coordinate system is a spherical coordinate system and the preset rule is dividing by angle, the method for dividing the hemisphere into a plurality of grids according to the preset rule may be to divide the hemisphere along the zenith angle direction according to a first preset angle and along the azimuth angle direction according to a second preset angle to obtain a plurality of grids. Among them, both the first preset angle and the second preset angle are preset values. For example, they can be default values or values set by relevant personnel according to the actual situation. For another example, the first preset angle is 20°, the second preset angle is 20°, or the first preset angle is 20°, the second preset angle is 30°.
[0080] Exemplarily, as Figure 6 shown, a hemisphere is taken with a ring every 20° from bottom to top along the direction of the zenith angle θ, a total of 4 rings and a small spherical surface at the zenith. On this basis, the lowermost ring is taken with a plane every 20° along the direction of the azimuth angle , a total of 18 planes; recursively from bottom to top: the second ring is divided into 12 planes, the third ring is divided into 9 planes, and the fourth ring is divided into 6 planes. The four rings have a total of 45 planes, plus one plane at the zenith, a total of 46 planes, corresponding to 46 grids. Of course, according to the complexity of the building shape, more rings can be taken, and more grids can be cut out for each ring, then more grids will be obtained.
[0081] Secondly, the center point coordinates of each grid are determined as the camera position coordinates. Exemplarily, in the scenario as Figure 6 shown, the center point coordinates of grid 303 are determined as the camera position coordinates corresponding to grid 303.
[0082] In some embodiments, the hemisphere is divided into multiple grids according to a preset rule, and the center point coordinates of each grid are determined as the camera position coordinates. Alternatively, the hemisphere can be divided into multiple grids according to a preset rule, and some continuous grids in the multiple grids are determined as target grids according to the symmetry characteristics of the building to be evaluated, and the center point coordinates of the target grid are determined as the camera position coordinates. Exemplarily, when the building to be evaluated has a C2 symmetry characteristic, the hemisphere is divided into multiple grids according to a preset rule; half of the continuous grids in the multiple grids are determined as the first target grid; the center point coordinates of each first target grid are determined as the camera position coordinates; when the building to be evaluated has a C4 symmetry characteristic, the hemisphere is divided into multiple grids according to a preset rule; one quarter of the continuous grids in the multiple grids are determined as the second target grid; the center point coordinates of each second target grid are determined as the camera position coordinates; when the building to be evaluated has a C6 symmetry characteristic, the hemisphere is divided into multiple grids according to a preset rule; one sixth of the continuous grids in the multiple grids are determined as the third target grid; the center point coordinates of each third target grid are determined as the camera position coordinates, and so on. Among them, the C2 symmetry characteristic means that the building to be evaluated remains unchanged after rotating 180 degrees around a fixed axis; C4 symmetry (fourfold rotational symmetry) means that the building to be evaluated remains unchanged after rotating 0°, 90°, 180°, and 270° around a certain center point; C6 symmetry (sixfold rotational symmetry) means that the building to be evaluated remains unchanged after rotating 0°, 60°, 120°, 180°, 240°, and 360° around a certain center point. In the above scheme, the hemisphere is divided into multiple grids according to preset rules, and some continuous grids in the multiple grids are determined as target grids according to the symmetry characteristics of the building to be evaluated, and the center point coordinates of the target grid are determined as the camera position coordinates. In this way, when the building to be evaluated has symmetry characteristics, only a part of the viewing angles can be evaluated to obtain the evaluation results of all viewing angles, which greatly saves computing resources.
[0083] In the above scheme, the target distance is determined according to the building position coordinates, and the preset multiple of the target distance is determined as the target radius; a hemisphere with a radius of the target radius and a cross section located at the ground plane of the three-dimensional model and wrapping the three-dimensional model is created in the spatial coordinate system; the hemisphere is divided into multiple grids according to preset rules, and the center point coordinates of each grid are determined as the camera position coordinates; the preset rules include at least one of division by area, division by shape, and division by angle. In this way, it can be ensured that the determined camera position coordinates are evenly distributed on the hemisphere surrounding the building to be evaluated, and the building to be evaluated is fully covered from different angles, thereby improving the integrity and accuracy of the evaluation perspective; at the same time, the method of dividing the grid by area, shape or angle can optimize the perspective distribution, reduce redundant data, improve calculation and storage efficiency, help enhance the effect of visual analysis, and provide more accurate data support for evaluating the effect of architectural image design.
[0084] In some embodiments, such as Figure 7 shown, the method of generating multiple generated images according to multiple angular images and at least one target word may include the following steps:
[0085] S141. Perform extraction processing on the angular images to obtain an abstract image corresponding to each angular image.
[0086] Among them, a set of abstract images includes a hard-edge image (Canny image), a soft-edge image (SoftEdge image), and a depth image (Depth image). The hard-edge image refers to the area in the image where the edges are clear, the contrast is strong, and the changes are drastic, and represents the result of the edge structure with a high-contrast binary image or grayscale image. The soft-edge image refers to the effect that the edge region in the angular image gradually transitions rather than changes abruptly, that is, at the edge, the color, brightness, or other features smoothly transition from one region to another region, rather than forming a clear demarcation line to represent the result of the edge structure. The depth of each element in the depth image is calculated from the camera position coordinates and the building position coordinates.
[0087] Specifically, the method of performing extraction processing on the angular images to obtain an abstract image corresponding to each angular image may be to perform extraction processing on the angular images through a pre-trained large model to obtain an abstract image corresponding to each angular image; or perform extraction processing on the angular images through an edge extraction algorithm and a depth extraction algorithm to obtain an abstract image corresponding to each angular image.
[0088] S142. Use a first preset model to generate multiple generated images according to at least one target word and multiple sets of abstract images.
[0089] Among them, one target word and one set of abstract images generate one generated image.
[0090] Specifically, for each set of abstract images and each target word, use a set of abstract images as the inpainting image and one target word as the main content of the prompt word, and use the first preset model to generate a generated image corresponding to the set of abstract images and the target word according to the inpainting image and the prompt word.
[0091] In the above solution, first extract the core features of the angular images (such as hard-edge features, soft-edge features, depth features), and use the core features in combination with the target words to obtain the generated images. This helps to improve the diversity and pertinence of the generated images, improves the expression ability of the generated images, avoids the problem of insensitive numerical values when calculating similarities later (all calculate relatively small similarities), and improves the data expression ability of the subsequent similarity numerical values.
[0092] Embodiments of the present application can divide the functional modules of the detection device for the negative image of building design according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0093] As Figure 8 shown, it is a schematic structural diagram of the detection device for the negative image of building design provided by the embodiment of the present application. The detection device for the negative image of building design includes an acquisition module 51, a creation module 52, a generation module 53, a processing module 54, and a determination module 55.
[0094] The acquisition module 51 is configured to acquire a three-dimensional model of the building to be evaluated and at least one target word; the target word is a noun corresponding to the negative image; the creation module 52 is configured to establish a spatial coordinate system with the center point of the grounding surface of the three-dimensional model as the coordinate origin, and determine the building position coordinates of the three-dimensional model in the spatial coordinate system; the generation module 53 is configured to determine multiple camera position coordinates according to the building position coordinates, and generate an angular view of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates; the generation module 53 is further configured to generate multiple generated views according to the multiple angular views and at least one target word, and obtain an image description of each generated view; the processing module 54 is configured to perform vectorization processing on the image description to obtain a description vector, and perform vectorization processing on the target word to obtain a target word vector; the determination module 55 is configured to calculate the similarity between the description vector and the target word vector, and when the similarity is greater than a preset threshold, determine the angle corresponding to the camera position coordinate of the description vector as the negative image warning angle, and determine the negative image corresponding to the target word of the target word vector as the negative image of the building to be evaluated at the negative image warning angle.
[0095] In the above solution, first, obtain the three-dimensional model of the building to be evaluated and at least one target word, establish a spatial coordinate system with the center point of the grounding surface of the three-dimensional model as the coordinate origin, and determine the building position coordinates of the three-dimensional model in the spatial coordinate system. Among them, the target word is the noun corresponding to the negative image. After that, determine multiple camera position coordinates according to the building position coordinates, generate the angular maps of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates, generate multiple generated maps according to the multiple angular maps and at least one target word, and obtain the image description of each generated map. Finally, perform vectorization processing on the image description to obtain a description vector, perform vectorization processing on the target word to obtain a target word vector, calculate the similarity between the description vector and the target word vector, and when the similarity is greater than the preset threshold, determine the angle corresponding to the camera position coordinate of the description vector as the negative image warning angle, and determine the negative image corresponding to the target word of the target word vector as the negative image of the building to be evaluated at the negative image warning angle. In this way, on the one hand, it is possible to comprehensively evaluate the image of the building to be evaluated from multiple angles, improving the accuracy of the evaluation results; on the other hand, it is possible to evaluate the image of each angle of the building to be evaluated according to the similarity between the description vector of the generated map generated from the three-dimensional model of the building to be evaluated and the target word vector representing the negative image, avoiding the problem of strong subjectivity in the evaluation results due to the lack of a quantitative standard when relying solely on manual evaluation of the image design effect of the building to be evaluated, and enhancing the objectivity and accuracy of the building image evaluation results.
[0096] In some embodiments, the generation module 53 includes a determination sub-module, a creation sub-module, and a division sub-module: The determination sub-module is used to determine the target distance according to the building position coordinates and determine a preset multiple of the target distance as the target radius; The creation sub-module is used to create a hemisphere in the spatial coordinate system with a radius of the target radius, a cross-section located on the grounding surface of the three-dimensional model, and enclosing the three-dimensional model; The division sub-module is used to divide the hemisphere into multiple grids according to a preset rule and determine the center point coordinates of each grid as the camera position coordinates; The preset rule includes at least one of dividing by area, dividing by shape, and dividing by angle.
[0097] In some embodiments, the determination sub-module is specifically used to: determine the circumscribed sphere of the building to be evaluated according to the building position coordinates and determine the radius of the circumscribed sphere as the target distance; or calculate the average distance between the building position coordinates and the coordinate origin according to the building position coordinates and determine the average distance as the target distance.
[0098] In some embodiments, the division sub-module is specifically used to: divide the hemisphere into multiple grids according to a preset rule; determine some consecutive grids among the multiple grids as target grids according to the symmetry characteristics of the building to be evaluated; determine the center point coordinates of the target grids as the camera position coordinates.
[0099] In some embodiments, the sub - division sub - module is specifically configured to: when the spatial coordinate system is a spherical coordinate system and the preset rule is to divide by angles, divide the hemisphere along the zenith angle direction by a first preset angle and along the azimuth angle direction by a second preset angle to obtain a plurality of grids.
[0100] In some embodiments, the generation module 53 is specifically configured to: perform extraction processing on the angle map to obtain an abstract map corresponding to each angle map; a set of abstract maps includes a hard - edge map, a soft - edge map, and a depth map; the depth of each element in the depth map is calculated from the camera position coordinates and the building position coordinates; use a first preset model to generate a plurality of generated maps based on at least one target word and multiple sets of abstract maps; one target word and one set of abstract maps generate one generated map.
[0101] The detection device for the negative image of building design provided in this embodiment can execute the detection method for the negative image of building design provided in the above - mentioned method embodiment. Its implementation principle and technical effects are similar to those of the above - mentioned method, and will not be elaborated here.
[0102] Figure 9 An electronic device shown according to an exemplary embodiment. The electronic device may include a processor 902, and the processor 902 is configured to execute application program code to implement the detection method for the negative image of building design in the present application.
[0103] The processor 902 may be a central processing unit (CPU), a microprocessor, an application - specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application solution.
[0104] As Figure 9 shown, the electronic device may further include a memory 903. Among them, the memory 903 is used to store the application program code for executing the present application solution and is controlled by the processor 902 for execution.
[0105] The memory 903 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or it can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 903 can exist independently and be connected to the processor 902 through the bus 904. The memory 903 can also be integrated with the processor 902.
[0106] As Figure 9 shown, the electronic device can also include a communication interface 901. Among them, the communication interface 901, the processor 902, and the memory 903 can be coupled to each other. For example, they can be coupled to each other through the bus 904. The communication interface 901 is used for information interaction with other devices. For example, it supports information interaction between the electronic device and other devices.
[0107] It should be noted that Figure 9 the device structure shown in Figure 9 does not constitute a limitation on the electronic device. In addition to the components shown, the electronic device can include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements. And the electronic device provided in this embodiment can execute the method for detecting the negative image of building design provided in the above method embodiment. The implementation principle and technical effects are similar to those of the above method and will not be elaborated here.
[0108] This application embodiment provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it realizes each process of the method for detecting the negative image of building design in the above method embodiment and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0109] Among them, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.
[0110] An embodiment of the present application provides a computer program product. The computer program product stores a computer program, and when the computer program is executed by a processor, it implements each process of the method for detecting the negative image of building design in the above method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0111] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media that contain computer-usable program code.
[0112] In the present application, the memory may include non-permanent memory in a computer-readable medium, forms such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0113] In the present application, the computer-readable medium includes permanent and non-permanent, removable and non-removable storage media. The storage media can implement information storage by any method or technology, and the information can be computer-readable instructions, data structures, program modules, or other data. Examples of the computer's storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. According to the definition herein, computer-readable media do not include transitory computer-readable media, such as modulated data and carrier waves.
[0114] It should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.
[0115] The above are only specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments described herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting negative images of architectural design, characterized in that: include: Obtaining a three-dimensional model of a building to be evaluated and at least one target word; The target words are nouns corresponding to negative images; Establishing a spatial coordinate system with the center point of the ground plane of the three-dimensional model as the coordinate origin, and determining the building position coordinates of the three-dimensional model in the spatial coordinate system; Determine a plurality of camera position coordinates according to the building position coordinates, and generate an angle map of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates; Generate a plurality of generated graphs according to the plurality of angle graphs and at least one of the targeted words, and obtain an image description of each generated graph; Performing vectorization processing on the image description to obtain a description vector, and performing vectorization processing on the target word to obtain a target word vector; The similarity between the description vector and the targeting word vector is calculated, and when the similarity is greater than a preset threshold, the angle at which the description vector corresponds to the camera position coordinate is determined as the negative image warning angle, and the negative image of the targeting word corresponding to the targeting word vector is determined as the negative image of the building to be evaluated at the negative image warning angle.
2. The detection method according to claim 1, characterized in that: The step of determining a plurality of camera position coordinates according to the building position coordinates comprises: Determining a target distance according to the building location coordinates, and determining a preset multiple of the target distance as a target radius; Creating a hemisphere in the spatial coordinate system, with a radius equal to a target radius and a cross section located at a ground plane of the three-dimensional model and enclosing the three-dimensional model; The hemisphere is divided into a plurality of grids according to a preset rule, and the coordinates of the center point of each grid are determined as the camera position coordinates; the preset rule includes at least one of division by area, division by shape, and division by angle.
3. The detection method according to claim 2, characterized in that: The step of determining the target distance according to the building location coordinates includes: Determine an envelope sphere of the building to be evaluated according to the building location coordinates, and determine the radius of the envelope sphere as the target distance; or, The average distance between the building location coordinates and the coordinate origin is calculated according to the building location coordinates, and the average distance is determined as the target distance.
4. The detection method according to claim 2, characterized in that: The step of dividing the hemisphere into a plurality of grids according to a preset rule and determining the coordinates of the center point of each grid as the camera position coordinates includes: Divide the hemisphere into multiple grids according to preset rules; According to the symmetry characteristics of the building to be evaluated, some continuous grids among the multiple grids are determined as target grids; The center point coordinates of the target grid are determined as the camera position coordinates.
5. The detection method according to claim 2, characterized in that: When the spatial coordinate system is a spherical coordinate system and the preset rule is division by angle, dividing the hemisphere into a plurality of grids according to the preset rule includes: The hemisphere is divided according to a first preset angle along the zenith angle direction and according to a second preset angle along the azimuth angle direction to obtain a plurality of grids.
6. The detection method according to claim 1, characterized in that: The step of generating a plurality of generated graphs according to the plurality of angle graphs and at least one of the targeting words comprises: The angle images are extracted and processed to obtain an abstract image corresponding to each of the angle images; a set of abstract images includes a hard edge image, a soft edge image and a depth image; the depth of each element in the depth image is calculated by the camera position coordinates and the building position coordinates; A plurality of generated graphs are generated according to at least one of the target words and a plurality of groups of the abstract graphs using a first preset model; a target word and a group of abstract graphs generate a generated graph.
7. A device for detecting negative image of architectural design, characterized in that: include: An acquisition module, used for acquiring a three-dimensional model of a building to be evaluated and at least one target word; The target words are nouns corresponding to negative images; A creation module, used to establish a spatial coordinate system with the center point of the ground plane of the three-dimensional model as the coordinate origin, and determine the building position coordinates of the three-dimensional model in the spatial coordinate system; A generating module, configured to determine a plurality of camera position coordinates according to the building position coordinates, and to generate an angle diagram of the building to be evaluated at each camera position coordinate according to the building position coordinates and the camera position coordinates; The generating module is further used to generate a plurality of generated graphs according to the plurality of angle graphs and at least one of the targeted words, and obtain an image description of each generated graph; A processing module, used to perform vectorization processing on the image description to obtain a description vector, and to perform vectorization processing on the target word to obtain a target word vector; The determination module is used to calculate the similarity between the description vector and the targeting word vector, and when the similarity is greater than a preset threshold, the angle at which the description vector corresponds to the camera position coordinate is determined as the negative image warning angle, and the negative image of the targeting word corresponding to the targeting word vector is determined as the negative image of the building to be evaluated at the negative image warning angle.
8. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method for detecting the negative image of architectural design as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting a negative image of architectural design according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to implement the method for detecting a negative image of architectural design according to any one of claims 1 to 6.