Housing safety monitoring method and related device
By enhancing and defogging the house image and building a safety monitoring model with historical data, the problem of low efficiency in checking house safety hazards in the existing technology is solved, and efficient house safety monitoring is achieved.
Patent Information
- Application Number
- CN202411731694.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In the existing technology, the investigation of house safety hazards mainly relies on on-site inspections by urban management department staff, resulting in large manpower investment, low work efficiency, and the inability to timely discover and supervise houses with safety hazards.
By acquiring the original house images of the target area, enhancing and defogging, a security monitoring model based on historical house data is built, and the safety level of the house is monitored in real time by combining the house's own data and external data.
It improves the efficiency of house safety monitoring, can promptly detect and supervise houses with safety hazards, and reduces the problems of manpower investment and low work efficiency.
Smart Images

Figure CN119228793B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of house monitoring, and in particular to a house safety monitoring method and related devices. Background Art
[0002] The number of housing buildings is increasing. Due to decades of high-density and high-intensity development and construction, the number of old buildings is gradually increasing, and the safety risks of housing are increasing.
[0003] At present, the inspection of houses with safety hazards mainly relies on on-site inspections by staff from relevant urban management departments. This method not only requires a large amount of manpower and has low work efficiency, but also fails to promptly discover and supervise houses with safety hazards. Summary of the invention
[0004] In order to solve the problem that the current inspection of houses with safety hazards mainly relies on on-site inspections by staff of relevant urban management departments, which not only requires a large amount of manpower investment and has low work efficiency, but also cannot promptly discover houses with safety hazards and conduct supervision, the present application provides a house safety monitoring method and related devices.
[0005] In the first aspect, the present application provides a housing safety monitoring method using the following technical solutions:
[0006] A housing safety monitoring method, comprising:
[0007] Get the original house image of the target area;
[0008] Performing enhancement processing on the original house image to obtain a reference house image;
[0009] Performing defogging processing on the reference house image to obtain a target house image;
[0010] Building a housing safety monitoring model based on historical housing basic data and historical housing external data, wherein the historical housing basic data includes the historical housing's own structural data, and the historical housing external data includes historical meteorological data and historical policy data;
[0011] Based on the target house image, basic house data of the target area is acquired, and external house data of the target area is acquired, and the basic house data and the external house data are input into the house safety monitoring model to obtain the safety level of the house;
[0012] The safety of the houses in the target area is monitored according to the safety level of the houses.
[0013] Optionally, the enhancing the original house image to obtain a reference house image includes:
[0014] Determine the width of the original house image;
[0015] constructing a transformation matrix based on the width;
[0016] Taking the central axis of the original house image as a reference, transforming the original house image based on the transformation matrix to obtain a transformed house image;
[0017] Randomly select a pixel point from the transformed house image, construct a region centered on the pixel point according to a preset size, determine a pixel mean of the region based on the pixel values of each pixel point in the region, and determine a standard deviation variance based on the pixel mean of the region;
[0018] Determine the global pixel mean corresponding to the transformed house image, determine the enhancement parameters according to the global pixel mean, the standard deviation variance and preset parameters, and determine the enhanced pixel value corresponding to the pixel point based on the enhancement parameters and the pixel mean of the area, return to execute the steps of arbitrarily selecting a pixel point from the transformed house image, constructing an area centered on the pixel point according to a preset size, and determining the pixel mean of the area based on the pixel values of each pixel point in the area, and determining the standard deviation variance based on the pixel mean of the area until the corresponding enhanced pixel values of all pixels are determined, and obtain a reference house image according to the corresponding enhanced pixel values of all pixels.
[0019] Optionally, performing defogging on the reference house image to obtain the target house image includes:
[0020] identifying a dark channel in the reference house image;
[0021] Sort the dark channels by brightness, take the first several pixel values with the largest brightness, and mark the position information of the pixel points corresponding to the first several pixel values in the area corresponding to the dark channel;
[0022] The position information is matched with the reference house image, three component values of the pixel points meeting the requirements are added and the average value is calculated to obtain a first parameter value;
[0023] The reference house image is defogged according to the first parameter value and the second preset parameter value to obtain a target house image.
[0024] Optionally, the building of a housing safety monitoring model based on historical housing basic data and historical housing external data includes:
[0025] Perform regional classification and fusion of historical housing basic data and historical housing external data to obtain a reference housing dataset;
[0026] Annotating the reference house dataset to obtain a target house dataset, wherein the annotation includes highlighting houses in the house image corresponding to the reference house dataset with a rectangular frame in a preset form, and marking the category to which the house belongs with a corresponding category identifier;
[0027] Inputting the target house data set into a preset network model for training, and obtaining the output result of the preset network model during the training process in real time;
[0028] Constructing a confusion matrix table according to the output results and determining a prediction box corresponding to the prediction results;
[0029] Determining precision and recall according to the confusion matrix table;
[0030] Determine an intersection-and-union ratio according to a prediction box corresponding to the prediction result and a rectangular box of a preset form in the target house data set;
[0031] When the precision, the recall and the intersection-over-union ratio all meet the training requirements, it is determined that the preset network model has completed training to obtain a housing safety monitoring model.
[0032] Optionally, the preset network model includes an input end, a backbone network, a neck network, and an output end, and inputting the target house data set into the preset network model for training includes:
[0033] The input end randomly selects 4 images each time from the house images corresponding to the target house data set, randomly transforms the sizes of the selected 4 images, randomly arranges the selected 4 images in a positional relationship, and stacks them, and adaptively scales the processed house images to obtain a first house image set corresponding to the target house data set, wherein the image size in the first house image set is A×A×3;
[0034] The backbone network slices each house image in the first house image set, generates a reference feature map of (A / 2)×(A / 2)×3 after slicing, and obtains a target feature map of (A / 2)×(A / 2)×32 after convolution operation of the reference feature map with 32 convolution kernels;
[0035] The neck network selects a small-size feature map smaller than a preset size from the target feature map, expands the size of the small-size feature map, and fuses the small-size feature map of the current layer and the size feature map greater than or equal to the preset size with the size feature map corresponding to the previous layer to obtain a predicted feature map;
[0036] The output end outputs the predicted feature map.
[0037] Optionally, the input end includes Mosaic data enhancement, adaptive anchor box calculation and adaptive image scaling; the backbone network includes a Focus structure and a CSP structure; the neck network includes an FPN structure and a PAN structure; the output end is composed of a loss function and non-maximum suppression of a bounding box, and a CIoU loss function is selected in the position information bounding box loss part to detect the detection loss of the position prediction box. In the target detection prediction result processing stage, a weighted non-maximum suppression operation is selected, and a box that meets the standard is selected as the output prediction box.
[0038] Optionally, monitoring the safety of houses in the target area according to the safety level of the houses includes:
[0039] comparing the housing safety level with a level threshold;
[0040] If the safety level of the house is less than the safety threshold, the corresponding house in the target area is determined to be a dangerous house;
[0041] Calculating the difference between the safety level of the house and the safety threshold;
[0042] The risk level of the dangerous building is determined according to the difference and the dangerous building type corresponding to the dangerous building, and rectification information is output.
[0043] In a second aspect, the present application provides a housing safety monitoring device, the housing safety monitoring device comprising:
[0044] An acquisition module, used to obtain the original house image of the target area;
[0045] An enhancement module, used for performing enhancement processing on the original house image to obtain a reference house image;
[0046] A defogging module, used for performing defogging processing on the reference house image to obtain a target house image;
[0047] A construction module, for constructing a housing safety monitoring model based on historical housing basic data and historical housing external data, wherein the historical housing basic data includes the historical housing's own structural data, and the historical housing external data includes historical meteorological data and historical policy data;
[0048] A processing module, for acquiring basic house data of the target area based on the target house image, and acquiring external house data of the target area, and inputting the basic house data and the external house data into the house safety monitoring model to obtain the safety level of the house;
[0049] A monitoring module is used to monitor the safety of the houses in the target area according to the safety level of the houses.
[0050] Optionally, the enhancement module is used to determine the width of the original house image;
[0051] constructing a transformation matrix based on the width;
[0052] Taking the central axis of the original house image as a reference, transforming the original house image based on the transformation matrix to obtain a transformed house image;
[0053] Randomly select a pixel point from the transformed house image, construct a region centered on the pixel point according to a preset size, determine a pixel mean of the region based on the pixel values of each pixel point in the region, and determine a standard deviation variance based on the pixel mean of the region;
[0054] Determine the global pixel mean corresponding to the transformed house image, determine the enhancement parameters according to the global pixel mean, the standard deviation variance and preset parameters, and determine the enhanced pixel value corresponding to the pixel point based on the enhancement parameters and the pixel mean of the area, return to execute the steps of arbitrarily selecting a pixel point from the transformed house image, constructing an area centered on the pixel point according to a preset size, and determining the pixel mean of the area based on the pixel values of each pixel point in the area, and determining the standard deviation variance based on the pixel mean of the area until the corresponding enhanced pixel values of all pixels are determined, and obtain a reference house image according to the corresponding enhanced pixel values of all pixels.
[0055] Optionally, the defogging module is used to identify dark channels in the reference house image;
[0056] Sort the dark channels by brightness, take the first several pixel values with the largest brightness, and mark the position information of the pixel points corresponding to the first several pixel values in the area corresponding to the dark channel;
[0057] The position information is matched with the reference house image, three component values of the pixel points meeting the requirements are added and the average value is calculated to obtain a first parameter value;
[0058] The reference house image is defogged according to the first parameter value and the second preset parameter value to obtain a target house image.
[0059] In summary, the present application includes the following beneficial technical effects:
[0060] The present application obtains the original house image of the target area; enhances the original house image to obtain a reference house image; defogs the reference house image to obtain a target house image; constructs a house safety monitoring model based on historical house basic data and historical house external data; obtains basic data of houses in the target area based on the target house image, and obtains house external data in the target area, inputs the basic data of the houses to be monitored and the house external data into the house safety monitoring model, obtains the house safety level, monitors the safety of houses in the target area according to the house safety level, constructs a house safety monitoring model by combining the house's own data with external data in the above manner, and finally uses the model to perform house safety monitoring, which greatly improves the detection efficiency and improves the efficiency of house supervision. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a schematic diagram of the structure of a housing security monitoring device in the hardware operating environment involved in the embodiment of the present application;
[0062] Figure 2 It is a flow chart of the first embodiment of the housing safety monitoring method of the present application;
[0063] Figure 3 It is a structural block diagram of the first embodiment of the housing safety monitoring device of the present application. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below through the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0065] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a house security monitoring device in the hardware operating environment involved in the embodiment of the present application.
[0066] like Figure 1As shown, the housing security monitoring device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0067] Those skilled in the art will understand that Figure 1 The structure shown in does not constitute a limitation on the housing security monitoring device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0068] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a house security monitoring program.
[0069] exist Figure 1 In the house security monitoring device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the present application can be set in the house security monitoring device, and the house security monitoring device calls the house security monitoring program stored in the memory 1005 through the processor 1001, and executes the house security monitoring method provided in the embodiment of the present application.
[0070] The present application embodiment provides a housing safety monitoring method, referring to Figure 2 , Figure 2 This is a flow chart of the first embodiment of the housing safety monitoring method of the present application.
[0071] Step S10: Acquire the original house image of the target area.
[0072] In this embodiment, the executor of this embodiment is a house security monitoring device, wherein the house security monitoring device has functions such as data processing, data communication and program running. The house security monitoring device can be a computer terminal device or other network device, and of course it can also be other devices with similar functions, and this embodiment does not limit this.
[0073] It should be noted that the current inspection of houses with safety hazards mainly relies on on-site inspections by staff from relevant urban management departments. This method not only requires a large amount of manpower and has low work efficiency, but also fails to promptly detect and supervise houses with safety hazards.
[0074] In order to solve the above technical problems, in this embodiment, the original house image of the target area is obtained; the original house image is enhanced to obtain a reference house image; the reference house image is defogged to obtain a target house image; a house safety monitoring model is constructed based on historical house basic data and historical house external data; basic data of houses in the target area are obtained based on the target house image, and external data of houses in the target area are obtained, and the basic data of the houses to be monitored and the external data of the houses are input into the house safety monitoring model to obtain the safety degree of the houses. The safety of the houses in the target area is monitored according to the safety degree of the houses, and a house safety monitoring model is constructed by combining the house's own data with external data in the above manner. Finally, the model is used to perform house safety monitoring, which greatly improves the detection efficiency and the efficiency of house supervision. Specifically, it can be achieved as follows.
[0075] In the specific implementation, in this embodiment, the images of the houses in the target area are collected by drones. This method can improve the efficiency of collecting house images, and at the same time can better reflect the specific location and surrounding environment of the target houses on the ground, and can extract more features such as contours.
[0076] Step S20: performing enhancement processing on the original house image to obtain a reference house image.
[0077] Due to the topography, house characteristics and weather conditions of different regions and drone shooting, in order to improve the detection accuracy, it is necessary to further process the original house image after it is collected by the drone. The first step of the processing is to transform the original house image and then enhance it. The specific process of the enhancement processing in this embodiment is to determine the width of the original house image; construct a transformation matrix based on the width; transform the original house image based on the transformation matrix with the central axis of the original house image as the reference to obtain the transformed house image; arbitrarily select a pixel point from the transformed house image, construct an area centered on the pixel point according to a preset size, and determine the pixel average of the area based on the pixel values of each pixel point in the area. value, and determine the standard deviation variance based on the pixel mean of the area; determine the global pixel mean corresponding to the transformed house image, determine the enhancement parameter according to the global pixel mean, the standard deviation variance and preset parameters, and determine the enhanced pixel value corresponding to the pixel point based on the enhancement parameter and the pixel mean of the area, return to execute the steps of arbitrarily selecting a pixel point from the transformed house image, constructing an area centered on the pixel point according to a preset size, and determining the pixel mean of the area based on the pixel values of each pixel point in the area, and determining the standard deviation variance based on the pixel mean of the area until the corresponding enhanced pixel values of all pixels are determined, and obtain the reference house image according to the corresponding enhanced pixel values of all pixels.
[0078] It should be noted that the transformation process of the transformation matrix constructed based on the width of the original house image is as follows:
[0079] ;
[0080] in, is the transformation matrix, x0, y0 are the coordinates of any pixel in the original house image, w is the width of the original house image, and x, y are the coordinates of the same pixel in the transformed house image.
[0081] After completing the above transformation, a specific enhancement process is performed. Assuming that the arbitrarily selected pixel point is Q(i, j), the length and width of the area centered on Q(i, j) are m and n respectively, and the calculation formula for the pixel mean of the area is as follows:
[0082] ;
[0083] Among them, s = in, k = jm, is the pixel value of any other pixel point in the area. After that, the standard deviation variance can be further calculated, and the calculation formula is as follows:
[0084] ;
[0085] Above That is, standard deviation variance.
[0086] Furthermore, the enhanced parameter calculation formula is as follows:
[0087] ;
[0088] Among them, M is the global pixel mean, that is, the pixel average value of the entire transformed house image, is the preset parameter, and finally combined with the pixel mean of the area centered on Q(i,j) Enhancement is performed, for example, I(i,j)=M(i,j)+G. In this way, the area centered on Q(i,j) can be enhanced, and then the above process is repeated to enhance each area in the transformed house image, thereby obtaining a reference house image.
[0089] Step S30: performing defogging processing on the reference house image to obtain a target house image.
[0090] The dehazing process in this embodiment is specifically to identify the dark channel in the reference house image; sort the dark channel by brightness, take the first several pixel values with the largest brightness, and calibrate the position information of the pixel points corresponding to the first several pixel values in the area corresponding to the dark channel; correspond the position information with the reference house image, add the three component values of the pixel points that meet the requirements and calculate the average value to obtain a first parameter value; and perform dehazing on the reference house image according to the first parameter value and the second preset parameter value to obtain a target house image.
[0091] It should be noted that the reference house image is a color image, and its corresponding channel is RGB. The dark channel means that in most non-sky local areas, the pixel values of certain color channels will be very low, almost close to 0, that is, in the dark area of the image, at least one color channel has a very small value, so the dark channel can be determined. For this dark channel, the first 0.1% pixel addresses with the largest brightness can be taken. The three component values are the pixel values corresponding to the RGB channels of the pixel points corresponding to these pixel values. The first parameter value can be obtained by adding the mean values. The formula for defogging is as follows:
[0092] ;
[0093] in, represents the reference house image, S is the first parameter value, t represents the refractive index, and its value range is 0~1. is the target house image.
[0094] Step S40: constructing a housing safety monitoring model based on historical housing basic data and historical housing external data.
[0095] Step S50: Based on the target house image, basic house data of the target area is obtained, and external house data of the target area is obtained, and the basic house data and the external house data are input into the house safety monitoring model to obtain the safety level of the house.
[0096] The basic data of the house can be directly obtained through the above-mentioned target house image. The basic data of the house is also the data related to the house itself, such as cracks in the house, the tilt of the house, and the settlement of the house. It should be understood that under different circumstances, the safety standards of the house are different. Therefore, in this embodiment, it is also necessary to combine meteorological data and policy data for comprehensive judgment. At the same time, the policy data can also identify illegal buildings on the basis of identifying dangerous houses.
[0097] The training process of the housing safety monitoring model in this embodiment is specifically to perform regional classification and fusion of historical housing basic data and historical housing external data to obtain a reference housing data set; annotate the reference housing data set to obtain a target housing data set, wherein the annotation includes highlighting the houses in the housing image corresponding to the reference housing data set in a preset rectangular frame, and annotating the category to which the houses belong with corresponding category identifiers; inputting the target housing data set into a preset network model for training, and obtaining the output results of the preset network model during the training process in real time; constructing a confusion matrix table according to the output results and determining the prediction box corresponding to the prediction result; determining the precision and recall rate according to the confusion matrix table; determining the intersection-and-union ratio according to the prediction box corresponding to the prediction result and the preset rectangular frame in the target housing data set; when the precision, the recall rate and the intersection-and-union ratio all meet the training requirements, determining that the preset network model has completed training to obtain a housing safety monitoring model.
[0098] It should be noted that the policy data in the external data is related to regions, and the housing safety standards corresponding to different regions are also different. Therefore, before training, it is necessary to classify the external data and basic data by region, and obtain the basic housing data and external housing data belonging to the same region, so as to obtain the reference housing data set. For the reference housing data set, it is annotated in this embodiment, and specifically marked that the house can be annotated with a red rectangular frame. The area of the red rectangular frame should not be too large or too small, and the minimum rectangular frame that can completely cover the entire area of the house is used as the standard. For each annotated rectangular frame, a corresponding label needs to be set at the same time. The label is used to identify the house category and the location of the house in the target area.
[0099] After obtaining the target house data set, the target house data set is input into the preset network model to start training. In order to ensure the accuracy of the model, the output result of each training of the preset network model is obtained in real time in this embodiment. The confusion matrix table constructed according to the output result contains 4 types of samples. For example, the first sample means a true positive, that is, the attribute of the target itself is a positive sample, and the result of the prediction is also a positive sample; the second sample means a true negative, that is, the attribute of the target itself is a negative sample, but the result of the prediction is a negative sample; the third sample means a false positive, that is, the target itself is a negative sample, and the result after the prediction is a positive sample; the fourth sample means a false negative, that is, the target itself is a positive sample, but the result of the prediction is a negative sample. According to the above 4 samples, the precision and recall can be calculated. The specific calculation formulas are: P=TP / (TP+FP), R=TP / (TN+FP), wherein P and R are precision and recall respectively, TP is the above first sample, TN is the above second sample, FP is the above third sample, and FN is the above fourth sample.
[0100] Furthermore, a prediction box corresponding to the prediction result can be obtained according to the output result, and the prediction box is compared with the pre-annotated rectangular box in the previously constructed data set. The specific comparison method can be to calculate the intersection-and-union ratio between the two, for example:
[0101] ;
[0102] in, represents the area intersection between the two, Represents the area union between the two. When the two completely overlap, the above The value of is 1, and the model works best at this time. Finally, based on the preset precision threshold, recall threshold, and intersection-over-union threshold, a judgment can be made. If they exceed their corresponding thresholds, the model is judged to have been trained and can be used as a housing safety monitoring model.
[0103] Furthermore, the preset network model in this embodiment includes an input end, a backbone network, a neck network and an output end, wherein the input end includes Mosaic data enhancement, adaptive anchor box calculation and adaptive image scaling; the backbone network includes a Focus structure and a CSP structure; the neck network includes an FPN structure and a PAN structure; the output end is composed of a loss function and a non-maximum suppression of a bounding box, and a CIoU loss function is selected in the position information bounding box loss part to detect the detection loss of the position prediction box. In the target detection prediction result processing stage, a weighted non-maximum suppression operation is selected, and a box that meets the standard is selected as the output prediction box.
[0104] The process of inputting the target house data set into the preset network model for training specifically includes the following steps: the input end randomly selects 4 images from the house images corresponding to the target house data set each time, randomly transforms the sizes of the selected 4 images, and randomly arranges the selected 4 images in a positional relationship, and stacks them, and adaptively scales the processed house images to obtain a first house image set corresponding to the target house data set, wherein the image size in the first house image set is A×A×3; the backbone network slices each house image in the first house image set, generates a reference feature map of (A / 2)×(A / 2)×3 after slicing, and obtains a target feature map of (A / 2)×(A / 2)×32 after convolution operation of 32 convolution kernels on the reference feature map; the neck network selects a small-size feature map smaller than a preset size from the target feature map, expands the size of the small-size feature map, and fuses the small-size feature map of the current layer and the size feature map greater than or equal to the preset size with the size feature map corresponding to the previous layer to obtain a predicted feature map; the output end outputs the predicted feature map.
[0105] It should be noted that, regarding the input end, after the above-mentioned 4 randomly selected images in this embodiment are enhanced by Mosaic data, the image samples in the data set are richer, making the model more effective in detecting the target and reducing the demand for GPU resources. The size of the selected anchor frame corresponding to the adaptive anchor frame calculation proposed in this embodiment is not fixed. During training, different versions of the network initial anchor frame have different size information. On this basis, the predicted anchor frame is output. After comparing the two anchor frames, the difference is calculated and the network parameters are updated to make the model prediction result more reasonable. In addition, no additional standardized size operation is required. Adaptive image scaling will be used to autonomously expand the minimum black edge of the original image, reduce the amount of calculation when inputting the image, and improve the processing speed when performing the target detection task. Regarding the backbone network, taking the above as an example, assuming that the image size in the first house image set is 512×512×3, a reference feature map of 256×256×3 can be obtained after slicing through the Focus structure, and finally a target feature map of 256×256×32 is obtained after the convolution operation of 32 convolution kernels. This embodiment implements the above-mentioned slicing cropping operation through the Slice operation. Regarding the neck network, the FPN structure mainly uses upsampling for calculation. The smaller feature image is upsampled multiple times to expand the size of the feature map, and the semantic feature information is transmitted from small size to large size. It is combined with the previous layer structure to achieve the fusion of feature information and obtain the predicted feature map. The PAN structure connects a transmission channel from low-level images to high-level images, and adopts bottom-up feature pyramid transmission to achieve effective transmission of strong positioning features, further improving the utilization of underlying information. Regarding the output end, the output of the prediction box is performed through non-maximum suppression, and the loss function is CIoU, which can detect the loss of the prediction box.
[0106] Step S60: monitoring the safety of the houses in the target area according to the safety level of the houses.
[0107] In the specific implementation, after obtaining the safety level of the house, this embodiment needs to compare the safety level of the house with the level threshold. If the safety level of the house is less than the level threshold, in this case, this embodiment considers that the house is a dangerous building. Taking the safety level of a newly built house as 100 as an example, the safety threshold can be set to 80. The specific level threshold can be set according to actual needs, and this is not limited in this embodiment.
[0108] After determining that the house is a dangerous building, the present embodiment continues to calculate the difference between the safety level of the house and the level threshold, and also needs to determine the type of dangerous building. The relationship between the difference and risk level corresponding to different types of dangerous buildings is different. For example, in areas with many earthquakes, the severity of house cracks is less than that of house tilt. Therefore, when the difference corresponding to the cracks of dangerous buildings is 10, the corresponding risk level is 1, and when the difference corresponding to the tilt of dangerous buildings is 10, the corresponding risk level is 2. The safety risk of risk level 2 is greater than that of risk level 1. Finally, the corresponding rectification information is output according to the above risk level, which is used by the subsequent relevant departments to rectify the dangerous buildings.
[0109] This embodiment obtains the original house image of the target area; enhances the original house image to obtain a reference house image; defogs the reference house image to obtain a target house image; builds a house safety monitoring model based on historical house basic data and historical house external data; obtains basic data of houses in the target area based on the target house image, and obtains house external data in the target area, inputs the basic data of the houses to be monitored and the house external data into the house safety monitoring model to obtain the house safety level, monitors the safety of houses in the target area according to the house safety level, builds a house safety monitoring model by combining the house's own data with external data in the above manner, and finally uses the model to perform house safety monitoring, which greatly improves the detection efficiency and the efficiency of house supervision.
[0110] Reference Figure 3 , Figure 3 This is a structural block diagram of the first embodiment of the housing safety monitoring device of the present application.
[0111] like Figure 3 As shown, the housing safety monitoring device proposed in the embodiment of the present application includes:
[0112] The acquisition module 10 is used to acquire the original house image of the target area.
[0113] The enhancement module 20 is used to perform enhancement processing on the original house image to obtain a reference house image.
[0114] The defogging module 30 is used to perform defogging processing on the reference house image to obtain a target house image.
[0115] The construction module 40 is used to construct a house safety monitoring model based on historical house basic data and historical house external data, wherein the historical house basic data includes the historical house's own structural data, and the historical house external data includes historical meteorological data and historical policy data.
[0116] The processing module 50 is used to obtain the basic house data of the target area based on the target house image, and obtain the external house data of the target area, and input the basic house data and the external house data into the house safety monitoring model to obtain the house safety level.
[0117] The monitoring module 60 is used to monitor the safety of the houses in the target area according to the safety level of the houses.
[0118] This embodiment obtains the original house image of the target area; enhances the original house image to obtain a reference house image; defogs the reference house image to obtain a target house image; builds a house safety monitoring model based on historical house basic data and historical house external data; obtains basic data of houses in the target area based on the target house image, and obtains house external data in the target area, inputs the basic data of the houses to be monitored and the house external data into the house safety monitoring model to obtain the house safety level, monitors the safety of houses in the target area according to the house safety level, builds a house safety monitoring model by combining the house's own data with external data in the above manner, and finally uses the model to perform house safety monitoring, which greatly improves the detection efficiency and the efficiency of house supervision.
[0119] In some embodiments, the enhancement module 20 is used to determine the width of the original house image; construct a transformation matrix based on the width; transform the original house image based on the transformation matrix with the central axis of the original house image as the reference to obtain a transformed house image; arbitrarily select a pixel point from the transformed house image, construct a region centered on the pixel point according to a preset size, determine the pixel mean of the region based on the pixel values of each pixel point in the region, and determine the standard deviation variance based on the pixel mean of the region; determine the global pixel mean corresponding to the transformed house image, determine the enhancement parameter according to the global pixel mean, the standard deviation variance and the preset parameter, and determine the enhanced pixel value corresponding to the pixel point based on the enhancement parameter and the pixel mean of the region, return to execute the steps of arbitrarily selecting a pixel point from the transformed house image, constructing a region centered on the pixel point according to a preset size, determining the pixel mean of the region based on the pixel values of each pixel point in the region, and determining the standard deviation variance based on the pixel mean of the region until the corresponding enhanced pixel values of all pixels are determined, and obtain the reference house image according to the corresponding enhanced pixel values of all pixels.
[0120] In some embodiments, the defogging module 30 is used to identify a dark channel in the reference house image; sort the dark channels by brightness, take the first several pixel values with the largest brightness, and calibrate the position information of the pixel points corresponding to the first several pixel values in the area corresponding to the dark channel; correspond the position information with the reference house image, add the three component values of the pixel points that meet the requirements and calculate the average value to obtain a first parameter value; defog the reference house image according to the first parameter value and the second preset parameter value to obtain a target house image.
[0121] In some embodiments, the construction module 40 is used to perform regional classification and fusion of historical house basic data and historical house external data to obtain a reference house data set; annotate the reference house data set to obtain a target house data set, wherein the annotation includes highlighting the houses in the house image corresponding to the reference house data set in a preset rectangular frame, and marking the category to which the houses belong with corresponding category identifiers; inputting the target house data set into a preset network model for training, and obtaining the output results of the preset network model during the training process in real time; constructing a confusion matrix table according to the output results and determining the prediction box corresponding to the prediction result; determining the precision and recall rate according to the confusion matrix table; determining the intersection-and-union ratio according to the prediction box corresponding to the prediction result and the preset rectangular frame in the target house data set; when the precision, the recall rate and the intersection-and-union ratio all meet the training requirements, determining that the preset network model has completed training to obtain a house safety monitoring model.
[0122] In some embodiments, the preset network model includes an input end, a backbone network, a neck network, and an output end, and the construction module 40 is used for the input end to randomly select 4 images each time from the house images corresponding to the target house data set, randomly transform the sizes of the selected 4 images, and randomly arrange the selected 4 images in a positional relationship and stack them, and adaptively scale the processed house images to obtain a first house image set corresponding to the target house data set, wherein the image size in the first house image set is A×A×3; the backbone network scales the first house image Each house image in the collection is sliced, and after slicing, a reference feature map of (A / 2)×(A / 2)×3 is generated, and a target feature map of (A / 2)×(A / 2)×32 is obtained after a convolution operation of 32 convolution kernels on the reference feature map; the neck network selects a small-size feature map smaller than a preset size from the target feature map, expands the size of the small-size feature map, and fuses the small-size feature map of the current layer and the size feature map greater than or equal to the preset size with the size feature map corresponding to the previous layer to obtain a predicted feature map; the output end outputs the predicted feature map.
[0123] In some embodiments, the preset network model includes an input end, a backbone network, a neck network and an output end, the input end includes Mosaic data enhancement, adaptive anchor box calculation and adaptive image scaling; the backbone network includes a Focus structure and a CSP structure; the neck network includes an FPN structure and a PAN structure; the output end is composed of a loss function and non-maximum suppression of a bounding box, and a CIoU loss function is selected in the position information bounding box loss part to detect the detection loss of the position prediction box. In the target detection prediction result processing stage, a weighted non-maximum suppression operation is selected, and a box that meets the standard is selected as the output prediction box.
[0124] In some embodiments, the monitoring module 60 is used to compare the safety level of the house with a level threshold; if the safety level of the house is less than the level threshold, the corresponding house in the target area is determined to be a dangerous building; the difference between the safety level of the house and the level threshold is calculated; the risk level of the dangerous building is determined according to the difference and the type of dangerous building corresponding to the dangerous building, and rectification information is output.
[0125] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present application. In practical applications, technicians in this field can select part or all of it according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0126] In addition, for technical details not fully described in this embodiment, please refer to the method for house safety monitoring provided in any embodiment of the present application, which will not be repeated here.
[0127] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0128] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0130] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A housing safety monitoring method, characterized in that: include: Get the original house image of the target area; Performing enhancement processing on the original house image to obtain a reference house image; Performing defogging processing on the reference house image to obtain a target house image; Building a housing safety monitoring model based on historical housing basic data and historical housing external data, wherein the historical housing basic data includes the historical housing's own structural data, and the historical housing external data includes historical meteorological data and historical policy data; Based on the target house image, basic house data of the target area is acquired, and external house data of the target area is acquired, and the basic house data and the external house data are input into the house safety monitoring model to obtain the safety level of the house; Monitoring the safety of houses in the target area according to the safety level of the houses; The step of performing enhancement processing on the original house image to obtain a reference house image includes: Determine the width of the original house image; constructing a transformation matrix based on the width; Taking the central axis of the original house image as a reference, transforming the original house image based on the transformation matrix to obtain a transformed house image; Randomly select a pixel point from the transformed house image, construct a region centered on the pixel point according to a preset size, determine a pixel mean of the region based on the pixel values of each pixel point in the region, and determine a standard deviation variance based on the pixel mean of the region; Determine the global pixel mean corresponding to the transformed house image, determine the enhancement parameters according to the global pixel mean, the standard deviation variance and preset parameters, and determine the enhanced pixel value corresponding to the pixel point based on the enhancement parameters and the pixel mean of the area, return to execute the steps of arbitrarily selecting a pixel point from the transformed house image, constructing an area centered on the pixel point according to a preset size, and determining the pixel mean of the area based on the pixel values of each pixel point in the area, and determining the standard deviation variance based on the pixel mean of the area until the corresponding enhanced pixel values of all the pixels are determined, and obtain the reference house image according to the corresponding enhanced pixel values of all the pixels; The defogging process is performed on the reference house image to obtain the target house image, including: identifying a dark channel in the reference house image; Sort the dark channels by brightness, take the first several pixel values with the largest brightness, and mark the position information of the pixel points corresponding to the first several pixel values in the area corresponding to the dark channel; The position information is matched with the reference house image, three component values of the pixel points meeting the requirements are added and the average value is calculated to obtain a first parameter value; The reference house image is defogged according to the first parameter value and the second preset parameter value to obtain a target house image.
2. The housing safety monitoring method according to claim 1, characterized in that: The building of a housing safety monitoring model based on historical housing basic data and historical housing external data includes: Perform regional classification and fusion of historical housing basic data and historical housing external data to obtain a reference housing dataset; Annotating the reference house dataset to obtain a target house dataset, wherein the annotation includes highlighting houses in the house image corresponding to the reference house dataset with a rectangular frame in a preset form, and marking the category to which the house belongs with a corresponding category identifier; Inputting the target house data set into a preset network model for training, and obtaining the output result of the preset network model during the training process in real time; Constructing a confusion matrix table according to the output results and determining a prediction box corresponding to the prediction results; Determining precision and recall according to the confusion matrix table; Determine an intersection-and-union ratio according to a prediction box corresponding to the prediction result and a rectangular box of a preset form in the target house data set; When the precision, the recall and the intersection-over-union ratio all meet the training requirements, it is determined that the preset network model has completed training to obtain a housing safety monitoring model.
3. The housing safety monitoring method according to claim 2, characterized in that: The preset network model includes an input end, a backbone network, a neck network and an output end, and the target house data set is input into the preset network model for training, including: The input end randomly selects 4 images each time from the house images corresponding to the target house data set, randomly transforms the sizes of the selected 4 images, randomly arranges the selected 4 images in a positional relationship, and stacks them, and adaptively scales the processed house images to obtain a first house image set corresponding to the target house data set, wherein the image size in the first house image set is A×A×3; The backbone network slices each house image in the first house image set, generates a reference feature map of (A / 2)×(A / 2)×3 after slicing, and obtains a target feature map of (A / 2)×(A / 2)×32 after convolution operation of the reference feature map with 32 convolution kernels; The neck network selects a small-size feature map smaller than a preset size from the target feature map, expands the size of the small-size feature map, and fuses the small-size feature map of the current layer and the size feature map greater than or equal to the preset size with the size feature map corresponding to the previous layer to obtain a predicted feature map; The output end outputs the predicted feature map.
4. The housing safety monitoring method according to claim 3, characterized in that: The input end includes Mosaic data enhancement, adaptive anchor box calculation and adaptive image scaling; the backbone network includes Focus results and CSP structure; the neck network includes FPN structure and PAN structure; the output end is composed of the loss function and non-maximum suppression of the bounding box, and the CIoU loss function is selected in the position information bounding box loss part to detect the detection loss of the position prediction box. In the target detection prediction result processing stage, the weighted non-maximum suppression operation is selected, and the box that meets the standard is selected as the output prediction box.
5. The housing safety monitoring method according to any one of claims 1 to 4, characterized in that: The step of monitoring the safety of houses in the target area according to the safety level of the houses includes: comparing the housing safety level with a level threshold; If the safety level of the house is less than the safety threshold, the corresponding house in the target area is determined to be a dangerous building; Calculating the difference between the safety level of the house and the safety threshold; The risk level of the dangerous building is determined according to the difference and the dangerous building type corresponding to the dangerous building, and rectification information is output.
6. A housing safety monitoring device, characterized in that: Executing the method according to claim 1, the housing safety monitoring comprises: An acquisition module, used to obtain the original house image of the target area; An enhancement module, used for performing enhancement processing on the original house image to obtain a reference house image; A defogging module, used for performing defogging processing on the reference house image to obtain a target house image; A construction module, for constructing a housing safety monitoring model based on historical housing basic data and historical housing external data, wherein the historical housing basic data includes the historical housing's own structural data, and the historical housing external data includes historical meteorological data and historical policy data; A processing module, for acquiring basic house data of the target area based on the target house image, and acquiring external house data of the target area, and inputting the basic house data and the external house data into the house safety monitoring model to obtain the safety level of the house; A monitoring module is used to monitor the safety of the houses in the target area according to the safety level of the houses.
7. The housing safety monitoring device according to claim 6, characterized in that: The enhancement module is used to determine the width of the original house image; constructing a transformation matrix based on the width; Taking the central axis of the original house image as a reference, transforming the original house image based on the transformation matrix to obtain a transformed house image; Randomly select a pixel point from the transformed house image, construct a region centered on the pixel point according to a preset size, determine a pixel mean of the region based on the pixel values of each pixel point in the region, and determine a standard deviation variance based on the pixel mean of the region; Determine the global pixel mean corresponding to the transformed house image, determine the enhancement parameters according to the global pixel mean, the standard deviation variance and preset parameters, and determine the enhanced pixel value corresponding to the pixel point based on the enhancement parameters and the pixel mean of the area, return to execute the steps of arbitrarily selecting a pixel point from the transformed house image, constructing an area centered on the pixel point according to a preset size, and determining the pixel mean of the area based on the pixel values of each pixel point in the area, and determining the standard deviation variance based on the pixel mean of the area until the corresponding enhanced pixel values of all pixels are determined, and obtain a reference house image according to the corresponding enhanced pixel values of all pixels.
8. The housing safety monitoring device according to claim 6, characterized in that: The defogging module is used to identify dark channels in the reference house image; Sort the dark channels by brightness, take the first several pixel values with the largest brightness, and mark the position information of the pixel points corresponding to the first several pixel values in the area corresponding to the dark channel; The position information is matched with the reference house image, three component values of the pixel points meeting the requirements are added and the average value is calculated to obtain a first parameter value; The reference house image is defogged according to the first parameter value and the second preset parameter value to obtain a target house image.
Citation Information
Patent Citations
SAR image house extraction method and system based on evolution mixed attention mechanism
CN115393717A
House Displacement Judging Method, House Displacement Judging Device
US20090136090A1