Method and system for detecting building facility defects based on adaptive cutting algorithm

By using adaptive cutting algorithms in the detection of disease in building facilities, the problem of low detection efficiency and accuracy in the prior art is solved, and more efficient and accurate disease detection is achieved.

CN119338845BActive Publication Date: 2025-03-21SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411880118.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-21
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The prior art has poor efficiency and accuracy when detecting building facilities diseases.

Method used

Using an adaptive cutting algorithm method, the suspected disease areas in the image to be detected are marked, feature complexity calculations and block cutting, and the suspected disease areas are refined to improve the accuracy and efficiency of detection.

Benefits of technology

It improves the efficiency and accuracy of disease detection in building facilities, reduces the possibility of false detection and missed detection, and can more accurately identify diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338845B_ABST
    Figure CN119338845B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of engineering inspection, and provides a method and system for detecting defects of building facilities based on an adaptive cutting algorithm, wherein the method includes: marking suspected defect areas in the image to be detected corresponding to the building facilities to obtain at least one first marking frame; calculating the feature complexity of the first image block in each of the first marking frames to obtain the first complexity of each of the first image blocks in the first marking frame; determining the first block cutting granularity for cutting each of the first image blocks in the first marking frame based on the first complexity; cutting the first image blocks in the first marking frame according to the first block cutting granularity to obtain at least one second marking frame corresponding to each of the first marking frames; performing defect detection on the second image block in each second marking frame to obtain the defect detection result of the building facilities. This solution can improve the efficiency and accuracy of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of engineering detection, and in particular, relates to a method and system for detecting defects in building facilities based on an adaptive cutting algorithm. Background Art

[0002] With the development of modernization, the number of buildings and facilities such as bridges, dams, and houses is increasing. Affected by factors such as age and natural environment, various defects such as cracks, rust, and peeling will occur in building facilities. If these defects are not promptly intervened, they will pose a serious threat to people's lives and property safety. Therefore, it is particularly important to timely detect and properly handle these defects.

[0003] Manual inspections can be used to detect whether building facilities have defects, but the detection efficiency is low. In recent years, neural network algorithms can be used to process images of building facilities such as bridges to detect defects in building facilities such as bridges, and this method has achieved certain results. However, the environment in which building facilities are located is relatively complex, and the types of defects are relatively diverse. When using neural network algorithms to detect defects, the efficiency and accuracy of defect detection are relatively poor. Summary of the invention

[0004] The embodiments of the present application provide a method and system for detecting building facility defects based on an adaptive cutting algorithm to solve the problem of poor efficiency and accuracy in detecting building facility defects in the prior art.

[0005] A first aspect of an embodiment of the present application provides a method for detecting building facility defects based on an adaptive cutting algorithm, comprising:

[0006] Marking the suspected disease area in the image to be detected corresponding to the building facility to obtain at least one first marking frame; each of the first marking frames includes at least one first image block;

[0007] Calculating the feature complexity of the first image block in each of the first marked frames to obtain a first complexity of each of the first image blocks in the first marked frames;

[0008] Determine, based on the first complexity, a first block cutting granularity for cutting each of the first image blocks in the first marking frame;

[0009] According to the first block cutting granularity, the first image block in the first marking frame is cut to obtain at least one second marking frame corresponding to each first marking frame; each second marking frame includes a second image block;

[0010] Performing a defect detection on the second image block in each of the second marking frames to obtain a defect detection result of the building facility.

[0011] A second aspect of an embodiment of the present application provides a building facility disease detection system based on an adaptive cutting algorithm, comprising:

[0012] A marking module, used for marking the suspected disease area in the to-be-detected image corresponding to the building facility to obtain at least one first marking frame; each of the first marking frames includes at least one first image block;

[0013] A calculation module, configured to calculate the feature complexity of the first image block in each of the first marked frames to obtain a first complexity of each of the first image blocks in the first marked frames;

[0014] A determination module, configured to determine, based on the first complexity, a first block cutting granularity for cutting each of the first image blocks in the first marking frame;

[0015] a cutting module, configured to cut the first image block in the first marking frame according to the first block cutting granularity, to obtain at least one second marking frame corresponding to each first marking frame; each second marking frame includes a second image block;

[0016] The detection module is used to perform a defect detection on the second image block in each second marking frame to obtain a defect detection result of the building facility.

[0017] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.

[0018] A fourth aspect of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0019] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0020] As can be seen from the above, the present application first marks the suspected disease area in the image to be detected, obtains the first marking frame, realizes the rapid locking of the area where the disease may exist, reduces the interference of irrelevant areas, reduces unnecessary calculations for subsequent processing, and improves the overall detection efficiency. Afterwards, the feature complexity of each first image block in each first marking frame is calculated, and the first block cutting granularity is determined according to the calculated first complexity, so as to realize the targeted cutting of the first marking frame and obtain the second marking frame containing the second image block. The introduction of feature complexity helps to determine the richness of image information in the block, and can be combined with the feature complexity calculation results to realize adaptive cutting. The second marking frame covers the suspected disease area more accurately, avoids the loss and redundancy of feature information, reduces the possibility of false detection and missed detection, and thus improves the detection efficiency and detection accuracy. Finally, the second image block based on the second marking frame is used for disease detection to obtain the disease detection result of the building facility. The second marking frame is a marking frame that has undergone refined regional adjustment. Disease detection based on the second image block can more accurately identify the disease, thereby improving the detection accuracy while ensuring the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 It is a flow chart of a method for detecting building facility defects based on an adaptive cutting algorithm provided in an embodiment of the present application;

[0023] Figure 2 is a structural diagram of a building facility disease detection system based on an adaptive cutting algorithm provided in an embodiment of the present application;

[0024] Figure 3 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0026] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0027] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0028] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0029] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0030] In a specific implementation, the terminal described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).

[0031] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.

[0032] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.

[0033] Various applications that can be executed on the terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within corresponding applications. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.

[0034] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0035] With the development of modernization, the number of bridges, dams, houses, docks, tunnels and other construction facilities is increasing, and the area where they are located is expanding. Affected by factors such as age and natural environment, construction facilities will suffer from various diseases such as cracks, rust, and peeling.

[0036] Take bridges as an example. Bridges are overhead structures with load-bearing capacity and are an important part of the transportation network. Due to a series of factors such as the increase in service life, the impact of the natural environment, and the increase in traffic loads, bridges will suffer from cracks, rust, peeling, water seepage, exposed steel bars, and other diseases. The health of bridges has dropped sharply, seriously threatening the safety and sustainability of bridges and the safety of people's lives and property. Early detection and repair of bridge diseases can prevent the occurrence of serious accidents such as bridge breakage, tilting, and collapse, improve the health of bridges, extend the service life of bridges, ensure smooth traffic, and reduce capital investment costs.

[0037] It can be seen that the defects of building facilities will pose a serious threat to people’s lives and property safety. Timely discovery and proper treatment of the defects of building facilities can effectively prevent accidents and protect people’s lives and property safety.

[0038] At present, manual inspections can be used to detect whether building facilities have defects. This method is simple and intuitive, but the detection efficiency is low and the labor cost is high.

[0039] In recent years, neural network algorithms can be used to process images of building facilities and detect building defects. However, the environment in which building facilities are located is relatively complex, and the types of defects are diverse. The defect detection capabilities of neural network algorithms are limited, and the detection efficiency and accuracy of defect detection are relatively poor.

[0040] To solve the above problems, the present application provides a method and system for detecting building facility defects based on an adaptive cutting algorithm.

[0041] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0042] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for detecting building damage based on an adaptive cutting algorithm provided in an embodiment of the present application. Figure 1 As shown, a method for detecting building damage based on an adaptive cutting algorithm comprises the following steps:

[0043] Step 101 : Mark the suspected disease area in the to-be-detected image corresponding to the building facility to obtain at least one first marking frame; each of the first marking frames includes at least one first image block.

[0044] In some embodiments, the image to be detected is a pre-processed image.

[0045] In some embodiments, original images of the building facilities to be inspected are collected by image acquisition devices such as drones, fixed cameras, and industrial cameras.

[0046] Subsequently, the original image is cleaned to remove redundant interference information such as noise, reduce the storage space occupied by the image, help save storage space resources, reduce storage costs, improve image clarity and accuracy, reduce the error recognition rate, and improve the effect of subsequent image applications.

[0047] Adjusting the cleaned image to a standardized image with a set resolution can simplify the image processing process, reduce the amount of calculation, and improve image processing efficiency. Standardized images can also eliminate the impact of different resolutions and sizes on data analysis, making the analysis results more accurate and reliable, and more conducive to subsequent image analysis and recognition.

[0048] In some embodiments, a color balancing and normalization method is used to perform color normalization processing on the standardized image to obtain an image to be detected, thereby reducing interference caused by lighting and weather conditions.

[0049] In addition, preprocessing can also include image enhancement processing, such as contrast enhancement and color enhancement. According to the manifestation of the disease in the image, targeted enhancement methods are selected to better highlight the characteristics of suspected diseases and obtain optimized images to be detected, thereby improving the accuracy of disease detection.

[0050] In some embodiments, before marking the suspected disease area in the image to be detected corresponding to the building facility to obtain at least one first marking frame, it also includes: generating a building facility heat map based on the image to be detected; and performing pixel screening on the building facility heat map according to a set pixel threshold to determine the suspected disease area.

[0051] Initially extract features from the image that are related to the disease, such as color, texture, shape, etc. The initial extracted features are relatively broad to avoid missing suspected disease features.

[0052] Based on the extracted features, a building facility heat map corresponding to the image to be detected is generated. In this building facility heat map, the value of the pixel represents the feature intensity of the location, that is, the possibility of disease. The heat map provides an intuitive way to display the distribution of suspected disease features in the image, which helps to quickly locate the suspected disease area.

[0053] In some embodiments, the building facility thermal map may be provided to the staff, and the staff may also understand the distribution and severity of suspected diseases through the color or brightness of the building facility thermal map.

[0054] In some embodiments, the building facility disease detection method based on the adaptive cutting algorithm in the present application is applied to the building facility disease detection system based on the adaptive cutting algorithm. The disease detection system is constructed based on the Vision Transformer (ViT) architecture system. In the system, the input is the image to be detected, and the output is the disease detection result, such as the output of whether there is a disease, the location of the disease, the type of disease, and the severity of the disease.

[0055] In some embodiments, combined with the features of real diseases, the features of suspected diseases in the image to be detected are preliminarily extracted through shallow ViT, and these features are converted into pixel values ​​by combining weighting, normalization and other methods to generate a heat map.

[0056] Through the analysis of disease characteristics, the pixel threshold is determined, and the pixel threshold is used to distinguish between suspected disease characteristic pixels and non-suspected disease characteristic pixels. This pixel screening process also belongs to the screening process of suspected disease characteristics.

[0057] In some embodiments, pixel points whose pixel values ​​are greater than the set pixel threshold are determined as suspected disease pixels, and accordingly, a suspected disease area composed of the suspected disease pixels is obtained, thereby realizing the transformation of the detection area from the global area to the local area, reducing image processing overhead and saving resources without missing suspected disease features.

[0058] In some embodiments, the pixel threshold is set to 0.7-0.8.

[0059] The heat map and pixel screening process can more accurately identify suspected disease areas, reduce false positives and missed positives, greatly shorten the time of disease detection, and improve detection efficiency. This method of identifying suspected disease areas is suitable for different types of disease detection, such as cracks, rust, peeling, etc., and can adjust feature extraction and set pixel thresholds according to the characteristics of the disease.

[0060] Through the marking operation, the suspected disease area is marked so that the detection focus can be focused on the image block where the marking box is located, that is, the suspected disease area.

[0061] In some embodiments, the marking frame in the present application is a region of interest (ROI) frame. By defining the ROI frame, the region of interest in the image can be processed and analyzed more accurately, thereby improving detection efficiency and detection accuracy.

[0062] The marking frame in the present application corresponds to a variety of information, such as location information, disease type information, priority information, etc. Take the marking frame as an ROI frame as an example for explanation, as shown in the following Table 1, which is a schematic table of marking frame association information provided in an embodiment of the present application.

[0063] Table 1 Schematic diagram of label frame related information

[0064]

[0065] Table 1 shows ROI frames of different priorities. Different priorities correspond to different ROI frame numbers. The priority in Table 1 is the complexity priority determined based on the feature complexity of the image block marked with the frame, that is, the complexity level. Each ROI frame in Table 1 corresponds to the information of priority, comprehensive coordinates, disease type, and confidence of each disease type. and They are the horizontal and vertical coordinates of the upper left corner of the ROI frame in the coordinate system corresponding to the image to be detected. and The width and height of the ROI box respectively reflect the size of the ROI box. The comprehensive coordinate information is used to represent the position information and shape and size information of the ROI box.

[0066] The disease type corresponding to the marked box is the predicted suspected disease type. This information indicates that the marked box may have the corresponding disease, and the confidence level is the possibility of the corresponding disease existing.

[0067] It can be seen from Table 1 that each marking frame contains one or more suspected disease types, that is, the marking frame is a single disease marking frame or a complex disease marking frame.

[0068] There is also a priority level for each type of disease. The priority level can be determined based on the degree of danger. For example: cracks > rust > peeling > water seepage. When displaying the types of diseases, high-priority disease types are displayed first so that people can pay more attention to them.

[0069] In some embodiments, the information corresponding to the marked frame may be used to assist in adjusting the marked frame, extracting features from an image block of the marked frame, and the like.

[0070] In some embodiments, the marking of suspected disease areas in the image to be detected corresponding to the building facility to obtain at least one first marking frame includes: marking the suspected disease areas to obtain at least one third marking frame; each of the third marking frames includes a third image block; calculating the feature complexity of the third image block of each of the third marking frames to obtain the third complexity of the third image block of the third marking frame; based on the third complexity, determining the third block cutting granularity for cutting the third image block of the third marking frame; cutting the third image block of the third marking frame according to the third block cutting granularity to obtain at least one fourth marking frame; and adjusting the marking frame shape of each of the fourth marking frames based on the disease label corresponding to each of the fourth marking frames to obtain the first marking frame.

[0071] The suspected diseased area is preliminarily marked to obtain at least one third marking frame, each of which marks a suspected diseased area in the image to be detected and corresponds to an image block in the image to be detected.

[0072] The feature complexity of the third image block of each third marked frame is calculated to obtain a third complexity. The calculation process of the complexity is referred to the following step 102 and the corresponding description, which will not be described in detail here.

[0073] According to the complexity and priority thresholds, the priority or complexity level of the marked frame or image block can be determined, and different priorities correspond to different block cutting granularities. The granularity is the block size of the image block of the marked frame.

[0074] In some embodiments, the priority levels are high, medium, and low priority.

[0075] In some embodiments, the priority determination threshold includes two: and The complexity is expressed as Indicates that , They respectively represent the row and column numbers of the image block in the marked frame.

[0076] In some embodiments, different disease types correspond to different determination thresholds.

[0077] For example, the edge characteristics of crack disease are obvious, and the identification of crack disease depends on the directional gradient eigenvalue. The judgment threshold of crack disease is the lower quartile and upper quartile of the directional gradient characteristic statistical value. The color change characteristics of rust disease are obvious, and the identification of rust disease depends on the color change eigenvalue. The judgment threshold of rust disease is the 30th percentile and 70th percentile of the color change characteristic value distribution. Spalling disease and water seepage disease rely on texture change eigenvalue and color gradient eigenvalue for identification. The judgment threshold can be determined by the peak spacing of the texture change eigenvalue distribution or the color gradient characteristic statistical value.

[0078] In some embodiments, the initial judgment threshold is determined based on different judgment thresholds corresponding to different disease types and in combination with the quantile method or data distribution statistics method. The cross entropy loss function is used to minimize the classification error and adjust the initial judgment threshold. Finally, the convergence result of the loss function is determined as and .

[0079] The appropriate judgment threshold can effectively distinguish the diseased area from the background area and avoid misjudgment and missed judgment.

[0080] In some embodiments, according to and The complexity is classified into three priorities, i.e. three complexity levels.

[0081] , indicating lower complexity, low complexity level, and low priority.

[0082] , indicating medium complexity, medium complexity level, and medium priority.

[0083] , indicating that the complexity is higher, the complexity level is high, and the priority is high.

[0084] In some embodiments, if the complexity level is low, that is, the priority is low priority, the current image block granularity is increased, that is, the block cutting granularity is greater than the current image block granularity; if the complexity level is medium, that is, the priority is medium priority, the current image block granularity is maintained, that is, the block cutting granularity is equal to the current image block granularity; if the complexity level is high, that is, the priority is high priority, the current image block granularity is reduced, that is, the block cutting granularity is smaller than the current image block granularity, and the image blocks need to be subdivided.

[0085] In some embodiments, high priority refers to areas with dense suspected disease features, and the block cutting granularity of the blocks in the marked box is, for example, 256×256; medium priority refers to areas with relatively sparse suspected disease features, and the block cutting granularity of the blocks in the marked box is, for example, 512×512; low priority refers to areas with extremely sparse suspected disease features, which are equivalent to background areas, and the block cutting granularity of the blocks in the marked box is, for example, 1024×1024. The unit of the block cutting granularity is pixel. The granularity values ​​here are given as examples for easy understanding.

[0086] The blocks are of different sizes and contain different complexities of features. In practical applications, they cannot be cut strictly according to specific granularity values.

[0087] In some embodiments, the block segmentation granularity of the block in the high priority mark box is 1 / 2 of the current image block granularity of the block. , for example, the granularity of the current image block The block cutting granularity of the block in the medium priority marked box is equal to the current image block granularity of the original block; the block cutting granularity of the low priority marked box is the current image block granularity of the original block. times, for example, twice the granularity of the current image block. and Is a positive integer.

[0088] The setting of the priority determination threshold and the setting of the block cutting granularity are examples. The specific selection of the value and how to set it should be determined according to the actual detection requirements.

[0089] It should be noted that the enlargement and reduction involved in cutting is not unlimited.

[0090] When increasing the granularity of image blocks, the granularity cannot be increased indefinitely to avoid losing local feature details in blocks that are too large.

[0091] The constraint condition when the granularity is increased may be that the blocks covered by the final image granularity of all image blocks cannot exceed the limited block range of the corresponding marking frame. For example, the marking frame contains an image block, and the block covered by the current image block granularity of the image block is equal to the limited block range of the marking frame. If the priority of the marking frame is low, and the determined block cutting granularity is greater than the current image block granularity, the block cutting granularity is limited to the current image block size, and the block retention cutting is implemented.

[0092] The constraint condition when the granularity is increased may also be to set a maximum block cutting granularity reference value, and if the determined block cutting granularity is greater than the maximum block cutting granularity reference value, the block cutting granularity is limited to the maximum block cutting granularity reference value.

[0093] When reducing the granularity of image blocks, the granularity cannot be reduced indefinitely to avoid image blocks that are too small affecting computational efficiency.

[0094] The constraint condition when the granularity is reduced may be to set a minimum block cutting granularity reference value, and if the determined block cutting granularity is smaller than the minimum block cutting granularity reference value, the block cutting granularity is limited to the minimum block cutting granularity reference value.

[0095] In some embodiments, the determination of the block cutting granularity of each image block is not only related to the complexity level of the image block, but also to the complexity levels of the image blocks located around it. The block cutting granularity determination process can refer to the example process of determining the first block cutting granularity.

[0096] In the present application, there is only one image block in the third marked frame, namely the third image block, and there is no influence of other image blocks in the third marked frame. Therefore, when determining the third block cutting granularity of each third image block, only the third complexity of the third image block is considered.

[0097] Correspondingly, the third block cutting granularity of the third image block is the block cutting granularity corresponding to the high complexity level, or the block cutting granularity corresponding to the medium complexity level.

[0098] When the third image block of the third marking frame is cut according to the third block cutting granularity, the third image block remains unchanged or is further subdivided, and accordingly at least one fourth marking frame is obtained, the fourth marking frame including a fourth image block.

[0099] Different types of diseases have different manifestations of characteristic shapes. For example, the characteristic shape of crack diseases is slender to reflect linear characteristics; the characteristic shape of rust or peeling diseases is extended to cover areas with larger texture distribution; the characteristic shape of water seepage diseases is irregular to fit the color change of irregular areas caused by suspected water seepage.

[0100] In some embodiments, to adapt to the characteristic shape of the disease type, the shape of the marking frame is adjusted according to the disease type corresponding to the marking frame. Accordingly, according to the disease type in the fourth disease label corresponding to each fourth marking frame, the shape of the marking frame of each fourth marking frame is adjusted to obtain the first marking frame.

[0101] In some embodiments, the disease label of the marked box can be predicted by a model such as shallow ViT. Each disease label includes one or more disease types.

[0102] In some embodiments, the disease label of the marked box can be predicted by calculating the feature values ​​required for the complexity.

[0103] By cutting blocks and adjusting marking frames, redundant areas can be removed and suspected disease areas can be further refined, which helps improve the efficiency and accuracy of disease detection.

[0104] Step 102 : Calculate the feature complexity of the first image block in each of the first marked frames to obtain a first complexity of each of the first image blocks in the first marked frames.

[0105] After obtaining the first marked frame, if the image block granularity of the overall image block of the first marked frame is much larger than the set granularity, the first marked frame is divided as evenly as possible according to the set granularity, and the sub-blocks obtained after the division are determined as the first image block. Otherwise, no division is performed, and the overall image block corresponding to the first marked frame is determined as the first image block.

[0106] Afterwards, feature complexity calculation is performed based on the first image block.

[0107] In some embodiments, the calculating the feature complexity of the first image block in each first marking frame to obtain the first complexity of each first image block in the first marking frame includes: calculating multiple feature values ​​of each first image block in each first marking frame; the multiple feature values ​​include directional gradient feature values, color gradient feature values, texture change feature values ​​and color change feature values, and each feature value corresponds to a feature calculation coefficient; performing a weighted sum calculation based on the directional gradient feature value, the color gradient feature value, the texture change feature value, the color change feature value and the feature calculation coefficient to obtain the first complexity of each first image block in the first marking frame.

[0108] When calculating the feature complexity, the directional gradient feature value, the color gradient feature value, the texture change feature value and the color change feature value of each first image block are calculated.

[0109] use refers to the image block, where , Respectively represent the number of rows and columns of the image block in the marked frame.

[0110] Based on the following formula (1), the directional gradient eigenvalue of the image block is calculated: .

[0111]

[0112] in, For image blocks The directional gradient eigenvalue is used to quantify the edge strength of the image block. for The total number of pixels. and They are The horizontal and vertical coordinates of the pixel points in . For I The gradient of the direction, For I The gradient of the direction, I is the whole image block of the first marked frame or the third image block of the third marked frame.

[0113] Based on the following formula (2), the color gradient feature value of the image block is calculated: .

[0114]

[0115] in, is the color change characteristic value, for exist The gradient of the direction, for exist Direction gradient.

[0116] The texture change feature value of the image block is calculated based on the following formula (3): .

[0117]

[0118] Among them, Local Binary Pattern (LBP) is a visual description operator used for texture classification. LBP can be used to describe the local texture distribution pattern and calculate the texture change feature value of the image block.

[0119] The color change feature value of the image block is calculated based on the following formula (4): .

[0120]

[0121] In some embodiments, based on the above formulas (1), (2), (3) and (4), the directional gradient feature value, color gradient feature value, texture change feature value and color change feature value of the image block are calculated. The above calculation formulas are only examples. In this application, feature values ​​can also be calculated based on other methods.

[0122] Through calculation, multiple characteristic values ​​of each first image block are obtained. Through calculation, multiple characteristic values ​​of each third image block are also obtained.

[0123] In some embodiments, the complexity is calculated based on multiple eigenvalues ​​and the characteristic calculation coefficient of each eigenvalue. , as described in the following formula (5).

[0124]

[0125] in, , , and Compute the coefficient for each eigenvalue of the eigenvalue.

[0126] The first complexity of each first image block is obtained by calculation. The third complexity of each third image block is also obtained by calculation.

[0127] Different disease types correspond to different basic characteristic coefficients at each characteristic value.

[0128] For example, the determination of crack damage mainly depends on the eigenvalue of the directional gradient , accordingly, the relationship between the basic characteristic coefficients of crack disease at each characteristic value is: Greater than , and The determination of spalling disease mainly depends on the characteristic value of texture change , accordingly, the relationship between the basic characteristic coefficients of spalling disease at each characteristic value is: Greater than , and The determination of rust disease mainly depends on the characteristic value of color change , accordingly, the relationship between the basic characteristic coefficients of rust disease at each characteristic value is: and Approximately equal, both are greater than and The determination of water seepage disease mainly depends on the color gradient characteristic value and color change feature value , accordingly, the relationship between the basic characteristic coefficients of water seepage disease at each characteristic value is: Greater than , both of which are greater than and .

[0129] After obtaining the new marking frame, the disease label of the marking frame and the confidence of the disease type in the disease label and other information are obtained accordingly.

[0130] In some embodiments, based on the first confidence of each disease type contained in the first disease label of the first marking frame and the different basic characteristic coefficients corresponding to each disease type on each characteristic value, the confidence characteristic coefficient of each disease type on multiple characteristic values ​​is calculated; based on the confidence characteristic coefficients of all the disease types corresponding to each characteristic value and the first confidence, a weighted summation calculation is performed to obtain the characteristic calculation coefficient of each characteristic value in the first marking frame.

[0131] In some embodiments, the basic feature coefficient may be directly determined as the feature calculation coefficient. For example, when the first disease label of the first marking frame contains only one disease type. In the above example, the product of the basic feature coefficient and the corresponding first confidence level may also be determined as the feature calculation coefficient.

[0132] In some embodiments, the feature calculation coefficients required for calculating the third complexity may also be determined based on the above method.

[0133] Through complexity calculation, the richness of suspected disease features in each image block is determined.

[0134] Step 103 : determining a first block cutting granularity for cutting each of the first image blocks in the first marking frame based on the first complexity.

[0135] According to the first complexity, the first block cutting granularity of each first image block is determined. This facilitates the refinement of image blocks with dense suspected disease features, the amplification of the local area, and the extraction of more relatively small features. At the same time, the image blocks with sparse suspected disease features are maintained or expanded to reduce the image processing overhead.

[0136] Adaptive cutting can be achieved according to the first complexity.

[0137] In some embodiments, the first block cutting granularity for cutting each of the first image blocks in the first marking frame based on the first complexity includes: determining the complexity level of the first image block according to the first complexity of the first image block; different complexity levels correspond to different cutting granularities; determining the initial cutting granularity of each of the first image blocks according to the complexity level; if the initial cutting granularity of the first image block obtained by comparison is greater than the current first image block granularity of the first image block and greater than the initial cutting granularity of the surrounding adjacent image blocks, reducing the first image block size; The initial cutting granularity of the first image block is determined to obtain the first block cutting granularity of the first image block; if the initial cutting granularity of the first image block obtained by comparison is not greater than the current first image block granularity of the first image block, or is not greater than the initial cutting granularity of the surrounding adjacent image blocks, the initial cutting granularity of the first image block is determined as the first block cutting granularity of the first image block; after performing granularity comparison and granularity re-determination on all the first image blocks in the first marking frame, the first block cutting granularity of each first image block in the first marking frame is obtained.

[0138] The determination of the first block cutting granularity of the first image block is not only related to its complexity level, but also related to the complexity levels of other first image blocks adjacent to it, or, related to the complexity levels of other first image blocks within a set area around it. The complexity levels and proportions of the first image blocks around it are analyzed to determine the first block cutting granularity of the first image block.

[0139] In some embodiments, the complexity level of the first image block is determined according to the priority determination threshold and the first complexity of the first image block. Then, the initial cutting granularity of the first image block is determined according to the complexity level. Subsequently, the first block cutting granularity of the first image block is determined by combining the initial cutting granularity corresponding to the complexity level of other first image blocks adjacent to the first image block, or the initial cutting granularity corresponding to the complexity level of other first image blocks within a set area around the first image block, through granularity comparison.

[0140] If the initial cutting granularity of the first image block obtained by comparison is larger than the current image block granularity and larger than the initial cutting granularity of the surrounding adjacent image blocks, the initial cutting granularity of the first image block is reduced to obtain the first block cutting granularity to avoid the block expansion from damaging the surrounding block area that needs to be refined, thereby affecting the detection accuracy. Otherwise, the initial cutting granularity is determined as the first block cutting granularity.

[0141] After the granularity comparison and granularity re-determination are performed on all the first image blocks in the first marking frame, the first block cutting granularity of each first image block is obtained.

[0142] In some embodiments, the complexity levels are high, medium, and low.

[0143] In some embodiments, the first block cutting granularity of the first image block is greater than, less than or equal to the current image block granularity of the first image block.

[0144] In some embodiments, if a first image block with a low priority is adjacent to a first image block with a medium priority, the initial cutting granularity of the first image block with a low priority is reduced to the cutting granularity corresponding to the medium priority to prevent the feature distribution of the adjacent first image block with a medium priority from being destroyed.

[0145] In some embodiments, if the first image block of the low complexity level is adjacent to the first image block of the high complexity level, the integrity of the first image block of the high complexity level shall be guaranteed first to avoid affecting the block refinement of the first image block of the high complexity level. At the same time, the first image block of the low complexity level is divided, that is, some blocks close to the first image block of the high complexity level are set as isolation areas to avoid the granularity cutting error affecting the first image block of the high priority level.

[0146] In some embodiments, a transitional image block is generated between image blocks of different complexity levels, and the image block granularity of the transitional image block is determined based on the image block granularity of the above-mentioned image blocks of different complexity levels. For example, the image block granularity in the transitional image block decreases along a certain direction to reduce the influence of the complexity level difference on the features in the image block, which can prevent the features of the first image block with a high priority from being covered by the first image block with a low priority.

[0147] In some embodiments, if a first image block is determined to be a transition image block, the average first complexity of other adjacent first image blocks may be calculated as the transition complexity of the transition image block, and the block cutting granularity of the transition image block may be determined according to the transition complexity.

[0148] Step 104 , cutting the first image block in the first marking frame according to the first block cutting granularity to obtain at least one second marking frame corresponding to each first marking frame; each second marking frame includes a second image block.

[0149] The first image block is cut according to the first block cutting granularity, wherein the cutting includes block refinement cutting, block retention cutting and block expansion cutting based on the block. The image block obtained after cutting is marked by a second marking frame.

[0150] When the first block cutting granularity of the first image block is greater than its current first image block granularity, block expansion cutting is performed based on the first image block, and the second image block granularity of the second image block of the second marking frame obtained is greater than the first image block granularity. The surrounding image blocks of the first image block are extended and combined with the first image block.

[0151] When the first block cutting granularity of the first image block is equal to its current first image block granularity, block keeping cutting is performed based on the first image block, and the second image block granularity of the second image block of the second marking frame is equal to the first image block granularity.

[0152] When the first block cutting granularity of the first image block is smaller than its current first image block granularity, block refinement cutting is performed based on the first image block, and the second image block granularity of the second image block of the second marking frame obtained is smaller than the first image block granularity. Refinement cutting divides the local area into smaller blocks so that each block can focus more on the detailed features in the image. In each refined and cut block, more specific and representative features can be extracted, which is helpful to identify and analyze more subtle diseases in the image.

[0153] Step 105 , performing a defect detection on each of the second image blocks in the second marking frame to obtain a defect detection result of the building facility.

[0154] The second image block of the obtained second marking frame is subjected to a disease detection to obtain a disease detection result of the building facility, wherein the disease detection result includes information such as whether a disease exists, which types of diseases exist, the location of each type of disease, and the severity of the disease.

[0155] In some embodiments, before performing defect detection on the second image block in each second marking frame to obtain the defect detection result of the building facility, it also includes: obtaining the second confidence of each defect type contained in the second defect label of the second marking frame and the different first-layer weights corresponding to each of the defect types on each processing layer in the feature extraction model; performing weighted sum calculation based on the first-layer weights and the second confidence of all the defect types corresponding to each of the processing layers in the feature extraction model to obtain the second-layer weight of each of the processing layers; and normalizing the second-layer weights of multiple processing layers to obtain the third-layer weight of each of the processing layers.

[0156] Correspondingly, the defect detection is performed on the second image block in each second marking frame to obtain the defect detection result of the building facility, including: extracting suspected disease image features in the second image block of the second marking frame according to the third layer weights of the multiple processing layers; performing type detection and disease degree detection based on the suspected disease image features to obtain the disease detection result of the building facility.

[0157] In some embodiments, the feature layers of the feature extraction model are different resolution layers, such as a high-resolution layer and a low-resolution layer. The high-resolution layer can provide detailed information and is suitable for detecting small-scale defects such as cracks; the low-resolution layer can provide global semantic information and is suitable for identifying large-scale defects such as rust.

[0158] In some embodiments, the feature extraction model is a feature extraction sub-model in a Feature Pyramid Network (FPN) model.

[0159] Different types of damage have different characteristic distributions. For example, crack damage relies on high-resolution layers, corrosion relies on low-resolution layers, and spalling and water seepage require both high-resolution and low-resolution layers.

[0160] According to the disease type, different resolution processing layers are assigned different weights, and the feature extraction model is adjusted to focus on global and local information, so that the model can adapt to the characteristics of different disease types. When extracting features, different processing layers are flexibly called to extract richer and more complete features of suspected disease images.

[0161] By setting the layer weights of the processing layer, the feature extraction process can be made more targeted, the influence of the key feature layer related to the current suspected disease type can be enhanced, more relevant suspected disease image features can be extracted, the type detection accuracy can be improved, the influence of the feature layer that is not related to the current suspected disease type can be weakened, and the interference of irrelevant features can be reduced, thereby reducing false detections and improving detection accuracy.

[0162] In addition, the present application can dynamically adjust the layer weights of the processing layers, so that it can meet the detection needs of various types of diseases in different building facilities, without the need to design different models for each disease type, reducing development costs. By dynamically adjusting the layer weights, the feature fusion process can also be indirectly optimized when the disease type is unknown, ensuring that the feature contributions of different processing layers, i.e., different resolution layers, meet actual needs.

[0163] In some embodiments, before the defect detection is performed on the second image block in each second marking frame to obtain the defect detection result of the building facility, it also includes: based on the second complexity of the second image block of each second marking frame, the second marking frames, i.e., the second image blocks, are sorted to obtain the priority order of each second marking frame, i.e., the second image blocks. During feature extraction, feature extraction processing can be performed on the second image blocks in each second marking frame in turn according to the priority order to obtain the suspected defect image features. Second image blocks with high complexity are extracted first, so that defects with more prominent features can be identified as early as possible, and timely intervention can be carried out to avoid the increase in the risk factor of building facilities caused by the aggravation of the defects.

[0164] Among them, from the first image block with high complexity, the second complexity of the second image block obtained by block refinement cutting needs to be recalculated to ensure accuracy. Based on the first image block with medium complexity, the second image block obtained by block retention cutting can calculate the directional gradient eigenvalue or color gradient eigenvalue, and the remaining eigenvalues ​​can reuse the eigenvalues ​​of the corresponding first image block, and the second complexity of the second image block is obtained by weighted calculation. Based on the first image block with low complexity, the second complexity of the second image block obtained by block expansion cutting can directly reuse the first complexity of the corresponding first image block.

[0165] The calculation method of the second complexity is determined according to the source of the second image block, which not only ensures the accuracy of the high-complexity image block, but also reduces the calculation cost.

[0166] In some embodiments, the second image block that is suspected to be a background area may be screened out according to the second complexity.

[0167] The obtained suspected disease image features of each second image block are fused to obtain the features of the disease to be detected. Prior to this, the layer weights of the processing layers during feature extraction are pre-set, so that the suspected disease image features extracted by the processing layers with high weights account for a higher proportion in the final fusion result, that is, contribute more.

[0168] In some embodiments, multi-classification detection head technology is introduced to detect the fused disease features to be detected, and the disease detection results are output, so as to realize the identification and detection of multiple disease types and multiple disease degrees, thereby improving the detection efficiency.

[0169] In the event of a defect, an alarm can be issued to remind staff to inspect and repair the corresponding defect locations of the building facilities based on the defect detection results.

[0170] In the present application, the characteristic values ​​of the image blocks are calculated, and the complexity of the image blocks is calculated in combination with the disease type and confidence level, and multiple adaptive cutting is performed based on the complexity level, thereby further refining the suspected disease features in the local area. When extracting the features in the second image block of the second marking frame, the layer weights of each processing layer used to extract features are set in combination with the disease type and confidence level to highlight key features and weaken non-key features, thereby indirectly improving the feature fusion process and improving the credibility and accuracy of the disease features to be detected. Through the above method, the detection efficiency and accuracy of building facility disease detection are improved, which is a great improvement compared to manual inspections and existing neural network algorithm detection.

[0171] In the embodiment of the present application, the suspected disease area in the image to be detected is first marked to obtain a first marking frame, so as to quickly lock the area where the disease may exist, reduce the interference of irrelevant areas, reduce unnecessary calculations for subsequent processing, and improve the overall detection efficiency. After that, the feature complexity of each first image block in each first marking frame is calculated, and the first block cutting granularity is determined according to the calculated first complexity, so as to achieve targeted cutting of the first marking frame and obtain a second marking frame containing the second image block. The introduction of feature complexity helps to determine the richness of image information in the block, and adaptive cutting can be achieved in combination with the feature complexity calculation result. The second marking frame covers the suspected disease area more accurately, avoids the loss and redundancy of feature information, reduces the possibility of false detection and missed detection, and thus improves the detection efficiency and detection accuracy. Finally, the second image block of the second marking frame is used for disease detection, and the disease detection result of the building facility is obtained. The second marking frame is a marking frame after refined regional adjustment. The disease detection based on its second image block can more accurately identify the disease, while ensuring the detection efficiency, and improving the detection accuracy.

[0172] See also Figure 2 , Figure 2 This is a structural diagram of a building facility disease detection system based on an adaptive cutting algorithm provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0173] The building facility disease detection system 200 based on the adaptive cutting algorithm includes: a marking module 201 , a calculation module 202 , a determination module 203 , a cutting module 204 , and a detection module 205 .

[0174] The marking module 201 is used to mark the suspected disease area in the to-be-detected image corresponding to the building facility to obtain at least one first marking frame; each of the first marking frames includes at least one first image block.

[0175] The calculation module 202 is configured to calculate the feature complexity of the first image block in each of the first marked frames to obtain a first complexity of each of the first image blocks in the first marked frames.

[0176] The determination module 203 is configured to determine, based on the first complexity, a first block cutting granularity for cutting each of the first image blocks in the first marking frame.

[0177] The cutting module 204 is used to cut the first image block in the first marking frame according to the first block cutting granularity to obtain at least one second marking frame corresponding to each first marking frame; each second marking frame includes a second image block.

[0178] The detection module 205 is used to perform a defect detection on each of the second image blocks in the second marking frame to obtain a defect detection result of the building facility.

[0179] In some embodiments, the system further comprises a suspected disease area determination module, which is used to:

[0180] Based on the image to be detected, generating a thermal map of the building facilities;

[0181] According to the set pixel threshold, the building facility thermal map is subjected to pixel screening to determine the suspected disease area.

[0182] In some embodiments, the marking module is specifically used to:

[0183] Marking the suspected disease area to obtain at least one third marking frame; each of the third marking frames includes a third image block;

[0184] Calculating the feature complexity of the third image block of each of the third marked frames to obtain a third complexity of the third image block of the third marked frame;

[0185] Determining a third block cutting granularity for cutting the third image block of the third marking frame based on the third complexity;

[0186] cutting the third image block of the third marking frame according to the third block cutting granularity to obtain at least one fourth marking frame;

[0187] Based on the disease label corresponding to each of the fourth marking frames, the shape of each of the fourth marking frames is adjusted to obtain the first marking frame.

[0188] In some embodiments, the computing module is specifically used for:

[0189] Calculating a plurality of eigenvalues ​​of each of the first image blocks in each of the first marking frames; the plurality of eigenvalues ​​include directional gradient eigenvalues, color gradient eigenvalues, texture change eigenvalues ​​and color change eigenvalues, each of the eigenvalues ​​corresponding to a feature calculation coefficient;

[0190] A weighted sum calculation is performed based on the directional gradient eigenvalue, the color gradient eigenvalue, the texture change eigenvalue, the color change eigenvalue and the feature calculation coefficient to obtain the first complexity of each of the first image blocks in the first marking frame.

[0191] Based on the first confidence of each disease type included in the first disease label of the first marking frame and different basic characteristic coefficients corresponding to each disease type on each characteristic value, the confidence characteristic coefficient of each disease type on the multiple characteristic values ​​is calculated;

[0192] A weighted sum calculation is performed based on the confidence characteristic coefficients of all the disease types corresponding to each of the characteristic values ​​and the first confidence level to obtain the characteristic calculation coefficient of each of the characteristic values ​​in the first marking frame.

[0193] In some embodiments, the determining module is specifically used to:

[0194] Determining a complexity level of the first image block according to the first complexity of the first image block; different complexity levels correspond to different cutting granularities;

[0195] Determining an initial cutting granularity of each first image block according to the complexity level;

[0196] If the initial cutting granularity of the first image block obtained by comparison is greater than the current first image block granularity of the first image block and greater than the initial cutting granularity of surrounding adjacent image blocks, then reducing the initial cutting granularity of the first image block to obtain the first block cutting granularity of the first image block;

[0197] If the initial cutting granularity of the first image block obtained by comparison is not greater than the current first image block granularity of the first image block, or is not greater than the initial cutting granularity of the surrounding adjacent image blocks, the initial cutting granularity of the first image block is determined as the first block cutting granularity of the first image block;

[0198] After granularity comparison and granularity re-determination are performed on all the first image blocks in the first marking frame, the first block cutting granularity of each of the first image blocks in the first marking frame is obtained.

[0199] In some embodiments, the computing module is further configured to:

[0200] Obtaining a second confidence of each disease type included in the second disease label of the second marking frame and different first-layer weights corresponding to each disease type at each processing layer in the feature extraction model;

[0201] Performing a weighted sum calculation based on the first layer weights and the second confidences of all the disease types corresponding to each of the processing layers in the feature extraction model to obtain a second layer weight of each of the processing layers;

[0202] The second-layer weights of the plurality of processing layers are normalized to obtain the third-layer weights of the respective processing layers.

[0203] In some embodiments, the detection module is specifically used to:

[0204] Extracting suspected disease image features in the second image block of the second marking frame according to the third layer weights of the plurality of processing layers;

[0205] Based on the suspected disease image features, type detection and disease degree detection are performed to obtain the disease detection result of the building facility.

[0206] The building facility defect detection system based on the adaptive cutting algorithm provided in the embodiment of the present application can implement the various processes of the embodiment of the above-mentioned building facility defect detection method based on the adaptive cutting algorithm, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0207] Figure 3 is a structural diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device 3 of the embodiment includes: at least one processor 30 ( Figure 3 Only one is shown in the figure), a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps of any of the above-mentioned method embodiments when executing the computer program 32.

[0208] The electronic device 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of the electronic device 3 and does not constitute a limitation of the electronic device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0209] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0210] The memory 31 may be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 31 may also be an external storage device of the electronic device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the electronic device 3. The memory 31 is used to store the computer program and other programs and data required by the electronic device. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0211] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0212] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0213] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0214] In the embodiments provided in the present application, it should be understood that the disclosed systems / electronic devices and methods can be implemented in other ways. For example, the system / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0215] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0216] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0217] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0218] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be implemented through a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0219] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting building damage based on an adaptive cutting algorithm, characterized in that: include: Marking the suspected disease area in the image to be detected corresponding to the building facility to obtain at least one first marking frame; each of the first marking frames includes at least one first image block; Calculating the feature complexity of the first image block in each of the first marked frames to obtain a first complexity of each of the first image blocks in the first marked frames; The calculating the feature complexity of the first image block in each of the first marked frames to obtain the first complexity of each of the first image blocks in the first marked frames includes: calculating a plurality of feature values ​​of each of the first image blocks in each of the first marked frames; the plurality of feature values ​​include a directional gradient feature value, a color gradient feature value, a texture change feature value, and a color change feature value, and each of the feature values ​​corresponds to a feature calculation coefficient; performing a weighted sum calculation based on the directional gradient feature value, the color gradient feature value, the texture change feature value, the color change feature value, and the feature calculation coefficient to obtain the first complexity of each of the first image blocks in the first marked frame; Based on the first complexity, determining a first block cutting granularity for cutting each of the first image blocks in the first marking frame; the first block cutting granularity of each of the first image blocks is determined based on the first complexity of the first image block and the first complexity of other first image blocks adjacent to the first image block; According to the first block cutting granularity, the first image block in the first marking frame is cut to obtain at least one second marking frame corresponding to each first marking frame; each second marking frame includes a second image block; Performing a defect detection on the second image block in each of the second marking frames to obtain a defect detection result of the building facility.

2. The method according to claim 1, characterized in that Before marking the suspected disease area in the to-be-detected image corresponding to the building facility to obtain at least one first marking frame, the method further includes: Based on the image to be detected, generating a thermal map of the building facilities; According to the set pixel threshold, the building facility thermal map is subjected to pixel screening to determine the suspected disease area.

3. The method according to claim 1, characterized in that The step of marking the suspected disease area in the image to be detected corresponding to the building facility to obtain at least one first marking frame includes: Marking the suspected disease area to obtain at least one third marking frame; each of the third marking frames includes a third image block; Calculating the feature complexity of the third image block of each of the third marked frames to obtain a third complexity of the third image block of the third marked frame; Determining a third block cutting granularity for cutting the third image block of the third marking frame based on the third complexity; cutting the third image block of the third marking frame according to the third block cutting granularity to obtain at least one fourth marking frame; Based on the disease label corresponding to each of the fourth marking frames, the shape of each of the fourth marking frames is adjusted to obtain the first marking frame.

4. The method according to claim 1, characterized in that: The method further comprises: Based on the first confidence of each disease type included in the first disease label of the first marking frame and different basic characteristic coefficients corresponding to each disease type on each characteristic value, the confidence characteristic coefficient of each disease type on the multiple characteristic values ​​is calculated; A weighted sum calculation is performed based on the confidence characteristic coefficients of all the disease types corresponding to each of the characteristic values ​​and the first confidence level to obtain the characteristic calculation coefficient of each of the characteristic values ​​in the first marking frame.

5. The method according to claim 1, characterized in that The determining, based on the first complexity, a first block cutting granularity for cutting each of the first image blocks in the first marking frame includes: Determining a complexity level of the first image block according to the first complexity of the first image block; different complexity levels correspond to different cutting granularities; Determining an initial cutting granularity of each first image block according to the complexity level; If the initial cutting granularity of the first image block obtained by comparison is greater than the current first image block granularity of the first image block and greater than the initial cutting granularity of surrounding adjacent image blocks, then reducing the initial cutting granularity of the first image block to obtain the first block cutting granularity of the first image block; If the initial cutting granularity of the first image block obtained by comparison is not greater than the current first image block granularity of the first image block, or is not greater than the initial cutting granularity of the surrounding adjacent image blocks, the initial cutting granularity of the first image block is determined as the first block cutting granularity of the first image block; After granularity comparison and granularity re-determination are performed on all the first image blocks in the first marking frame, the first block cutting granularity of each of the first image blocks in the first marking frame is obtained.

6. The method according to claim 1, characterized in that Before performing the defect detection on the second image block in each second marking frame to obtain the defect detection result of the building facility, the method further includes: Obtaining a second confidence of each disease type included in the second disease label of the second marking frame and different first-layer weights corresponding to each disease type at each processing layer in the feature extraction model; Performing a weighted sum calculation based on the first layer weights and the second confidences of all the disease types corresponding to each of the processing layers in the feature extraction model to obtain a second layer weight of each of the processing layers; Normalizing the second-layer weights of the plurality of processing layers to obtain the third-layer weights of the respective processing layers; The performing defect detection on the second image block in each second marking frame to obtain the defect detection result of the building facility includes: Extracting suspected disease image features in the second image block of the second marking frame according to the third layer weights of the plurality of processing layers; Based on the suspected disease image features, type detection and disease degree detection are performed to obtain the disease detection result of the building facility.

7. A building facility disease detection system based on an adaptive cutting algorithm, characterized in that: include: A marking module, used for marking the suspected disease area in the to-be-detected image corresponding to the building facility to obtain at least one first marking frame; each of the first marking frames includes at least one first image block; a calculation module, configured to calculate the feature complexity of the first image block in each of the first marked frames, and obtain the first complexity of each of the first image blocks in the first marked frames; the calculation module is specifically configured to: calculate a plurality of feature values ​​of each of the first image blocks in each of the first marked frames; the plurality of feature values ​​include a directional gradient feature value, a color gradient feature value, a texture change feature value, and a color change feature value, and each of the feature values ​​corresponds to a feature calculation coefficient; and perform a weighted sum calculation based on the directional gradient feature value, the color gradient feature value, the texture change feature value, the color change feature value, and the feature calculation coefficient to obtain the first complexity of each of the first image blocks in the first marked frames; A determination module, configured to determine, based on the first complexity, a first block cutting granularity for cutting each of the first image blocks in the first marking frame; The first block cutting granularity of each first image block is determined based on the first complexity of the first image block and the first complexity of other first image blocks adjacent to the first image block; a cutting module, configured to cut the first image block in the first marking frame according to the first block cutting granularity, to obtain at least one second marking frame corresponding to each first marking frame; each second marking frame includes a second image block; The detection module is used to perform disease detection on the second image block in each second marking frame to obtain a disease detection result of the building facility.

8. An electronic device, characterized in that: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method according to any one of claims 1 to 6.

9. A computer program product, characterized in that The invention comprises a computer program which, when executed, causes the method according to any one of claims 1 to 6 to be performed.

Citation Information

Patent Citations

  • Road apparent disease intelligent identification method and system

    CN114529522A

  • Flexible circuit board defect area rapid segmentation method based on computer vision

    CN116503427A