Damage identification method and device for building window, terminal equipment and storage medium

By using the semantic segmentation model and damage identification method, combined with data enhancement and learning rate scheduling, to identify small damage to building windows, it solves the problem of difficulty in identifying non-crack damage in the existing technology, and achieves a higher recognition success rate and damage Assessment intelligence.

CN118711129APending Publication Date: 2024-09-27HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410810321.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing building window damage identification methods are difficult to accurately identify small, inconspicuous, non-crack type damage.

Method used

Using a pre-trained semantic segmentation model, through the MultiDice Loss loss function and AdamW optimizer, combined with data augmentation technology and learning rate scheduling strategy, the damage identification model is trained to identify undamaged, unpenetrated and penetrating damage areas, and calculate the building exterior Window damage index.

Benefits of technology

It improves the success rate of identifying inconspicuous damage, can accurately identify small damage to building windows, and enhances the automation and intelligence level of damage assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118711129A
    Figure CN118711129A
Patent Text Reader

Abstract

The invention provides a damage identification method and device for a building window, terminal equipment and a storage medium. The damage identification method comprises the steps of obtaining a to-be-identified image of a target building window; inputting the to-be-recognized image into a damage recognition model, and obtaining a damage recognition result of the target building window based on the output of the damage recognition model; wherein the damage identification model is obtained by training through a pre-trained semantic segmentation model based on a plurality of sample images and annotation images corresponding to the sample images; the annotation content comprises an undamaged area, a non-penetrated damaged area and a penetrated damaged area of the sample image. According to the method, the damage identification model is obtained through marking various damage types of the sample image and training, so that the method is used for identifying the target building window, small damage not limited to crack types can be identified, and the identification success rate of unobvious damage is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image evaluation, and in particular to a method, a device, a terminal device and a computer-readable storage medium for identifying damage of a building window. Background Art

[0002] A wide variety of natural disasters pose a major threat to social and economic development and people's safety. Hail disasters are a common and major meteorological disaster in my country. They are sudden and destructive, and often cause serious damage to buildings. Building exterior windows are an important part of the building maintenance structure, and they bear the function of thermal insulation. Their integrity is directly related to the normal life of residents. Therefore, after a hail disaster, it is particularly important to assess the degree of damage to the building exterior windows.

[0003] With the development of artificial intelligence technology, deep learning has been widely used in the field of image processing, providing new solutions for improving the automation and intelligence level of damage assessment of building exterior windows. For example, the crack pixel-level detection technology based on the fully convolutional network (FCN) not only realizes the recognition of cracks, but also quantitatively analyzes the morphological characteristics of cracks through the central axis algorithm. However, the current window damage recognition scheme can only detect more obvious damage such as cracks, while some small and inconspicuous non-crack types of damage are more difficult to detect. Summary of the invention

[0004] The present invention provides a damage identification method, device, terminal equipment and computer-readable storage medium for a building window, which can accurately identify relatively small damages.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a damage identification method for a building window, comprising:

[0006] Obtain the image to be identified of the target building window;

[0007] Inputting the image to be identified into a damage identification model, and obtaining a damage identification result of the target building window based on the output of the damage identification model;

[0008] The damage recognition model is based on several sample images and annotated images corresponding to the sample images, and is trained by a pre-trained semantic segmentation model; the annotation content includes an undamaged area, a non-penetrated damaged area, and a penetrated damaged area of ​​the sample image.

[0009] As a preferred solution, the training process of the damage identification model includes:

[0010] Acquire a data set for training; the data set includes the plurality of sample images and annotated images corresponding to the sample images;

[0011] The semantic segmentation model is trained using the data set, and when the semantic segmentation model converges, the damage identification model is obtained;

[0012] Among them, the convergence condition is obtained by setting the following loss function MultiDice Loss:

[0013] MultiDice Loss=1-MultiDice Score;

[0014]

[0015] Wherein, X represents the predicted result of the semantic segmentation model, Y represents the true result, n is the number of categories in the segmentation task, and MultiDice Score represents the similarity between the two graphic contours of the predicted result and the true result.

[0016] As a preferred solution, the semantic segmentation model is trained using the data set, specifically:

[0017] Adopting AdamW optimizer to iteratively optimize the semantic segmentation model through the data set;

[0018] In the first stage of iterative optimization, a linear learning rate growth strategy is adopted; in the second stage of iterative optimization, a learning rate decay strategy is adopted.

[0019] As a preferred solution, the current learning rate lr of the semantic segmentation model is expressed by the following formula:

[0020]

[0021] Among them, LR start Represents the learning rate at the beginning of the learning rate growth strategy, LR end Represents the learning rate at the end of the learning rate growth strategy, epoch represents the current number of iterations, EPOCH represents the total number of planned iterations, and p represents the power exponent in the learning rate decay strategy.

[0022] As a preferred solution, the step of obtaining a data set for training includes:

[0023] Collect a number of building window images; perform data enhancement operations on the building window images, wherein the data enhancement operations include at least one of random rotation operations, scaling operations, cropping operations, and expansion operations, and adjust the building window images to target pixels; and obtain the building window images.

[0024] As a preferred solution, the damage identification method further includes:

[0025] Calculating the number of pixels of different colors in the damage identification result; wherein the pixels of different colors are used to represent an undamaged area, a non-penetrated damaged area, and a penetrated damaged area, respectively;

[0026] Then the building exterior window damage index EWDI is calculated according to the following formula:

[0027]

[0028] Among them, S0 represents the area of ​​the undamaged area, S1 represents the area of ​​the damaged area that is not penetrated, S2 represents the area of ​​the damaged area that is penetrated, α represents the relative area of ​​the damaged area that is not penetrated, β represents the relative area of ​​the damaged area that is penetrated, 2(S0+S1+S2) represents the total area of ​​the building exterior window glass panel, and S1+2S2 represents the area of ​​the damaged glass panel.

[0029] As a preferred solution, the step of obtaining the image to be identified of the target building window includes:

[0030] The original image of the target building window is obtained; when the original image is an obliquely shot image, the perspective transformation technology is used to process it to obtain the pre-processed image to be identified.

[0031] As a preferred solution, the model performance of the semantic segmentation model is evaluated by at least one of accuracy, intersection-over-union, precision, recall and F1 score.

[0032] Correspondingly, the present invention also provides a damage identification device for a building window, comprising an acquisition module and an identification module; wherein:

[0033] The acquisition module is used to acquire the image to be identified of the target building window;

[0034] The recognition module is used to input the image to be recognized into a damage recognition model, and obtain a damage recognition result of the target building window based on the output of the damage recognition model;

[0035] The damage recognition model is based on several sample images and annotated images corresponding to the sample images, and is trained by a pre-trained semantic segmentation model; the annotation content includes an undamaged area, a non-penetrated damaged area, and a penetrated damaged area of ​​the sample image.

[0036] As a preferred solution, the damage identification device further includes a training module, and the training process of the damage identification model includes:

[0037] The training module acquires a data set for training; the data set includes the plurality of sample images and annotated images corresponding to the sample images;

[0038] The semantic segmentation model is trained using the data set, and when the semantic segmentation model converges, the damage identification model is obtained;

[0039] Among them, the convergence condition is obtained by setting the following loss function MultiDice Loss:

[0040] MultiDice Loss=1-MultiDice Score;

[0041]

[0042] Wherein, X represents the predicted result of the semantic segmentation model, Y represents the true result, n is the number of categories in the segmentation task, and MultiDice Score represents the similarity between the two graphic contours of the predicted result and the true result.

[0043] As a preferred solution, the training module uses the data set to train the semantic segmentation model, specifically:

[0044] The training module uses the AdamW optimizer to iteratively optimize the semantic segmentation model through the data set;

[0045] In the first stage of iterative optimization, a linear learning rate growth strategy is adopted; in the second stage of iterative optimization, a learning rate decay strategy is adopted.

[0046] As a preferred solution, the current learning rate lr of the semantic segmentation model is expressed by the following formula:

[0047]

[0048] Among them, LR start Represents the learning rate at the beginning of the learning rate growth strategy, LR end Represents the learning rate at the end of the learning rate growth strategy, epoch represents the current number of iterations, EPOCH represents the total number of planned iterations, and p represents the power exponent in the learning rate decay strategy.

[0049] As a preferred solution, the training module obtains a data set for training, including:

[0050] The training module collects a number of building window images; performs data enhancement operations on the building window images, wherein the data enhancement operations include at least one of random rotation operations, scaling operations, cropping operations, and expansion operations, and adjusts the building window images to target pixels; and obtains the building window images.

[0051] As a preferred solution, the damage identification device further includes a damage assessment module, and the damage assessment module is used to:

[0052] Calculating the number of pixels of different colors in the damage identification result; wherein the pixels of different colors are used to represent an undamaged area, a non-penetrated damaged area, and a penetrated damaged area, respectively;

[0053] Then the building exterior window damage index EWDI is calculated according to the following formula:

[0054]

[0055] Among them, S0 represents the area of ​​the undamaged area, S1 represents the area of ​​the damaged area that is not penetrated, S2 represents the area of ​​the damaged area that is penetrated, α represents the relative area of ​​the damaged area that is not penetrated, β represents the relative area of ​​the damaged area that is penetrated, 2(S0+S1+S2) represents the total area of ​​the building exterior window glass panel, and S1+2S2 represents the area of ​​the damaged glass panel.

[0056] As a preferred solution, the acquisition module acquires the image to be identified of the target building window, including:

[0057] The acquisition module acquires the original image of the target building window; when the original image is an obliquely shot image, the perspective transformation technology is used to process it to obtain the pre-processed image to be identified.

[0058] As a preferred solution, the model performance of the semantic segmentation model is evaluated by at least one of accuracy, intersection-over-union, precision, recall and F1 score.

[0059] Correspondingly, the present invention application also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the damage identification method of the building window when executing the computer program.

[0060] Correspondingly, the present application also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the damage identification method for the building window.

[0061] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0062] The present invention application provides a damage recognition method, device, terminal device and computer-readable storage medium for building windows. The damage recognition method includes: obtaining an image to be recognized of a target building window; inputting the image to be recognized into a damage recognition model, and obtaining a damage recognition result for the target building window based on the output of the damage recognition model; wherein the damage recognition model is trained by a pre-trained semantic segmentation model based on a number of sample images and annotated images corresponding to the sample images; the annotation content includes an undamaged area, a non-penetrated damaged area and a penetrated damaged area of ​​the sample image. By implementing the present invention application, a damage recognition model is trained by annotating various damage types of sample images, so as to be used for the recognition of the target building window, and can recognize small damage that is not limited to crack types, thereby improving the recognition success rate of inconspicuous damage. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 : A flow chart of an embodiment of a damage identification method for a building window provided by the present invention.

[0064] Figure 2 : A schematic diagram of the effects of an embodiment of the predicted results and actual results in the test set provided by the present invention.

[0065] Figure 3 : A schematic diagram of the effect of an embodiment of pixel points in the OpenVC statistical damage identification result provided by the present invention.

[0066] Figure 4 : A schematic structural diagram of an embodiment of a damage identification device for a building window provided by the present invention. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0068] Embodiment one:

[0069] Please refer to Figure 1 , Figure 1 A damage identification method for a building window provided in an embodiment of the present invention includes steps S1 to S2; wherein:

[0070] Step S1, obtaining an image to be identified of a target building window.

[0071] In this embodiment, an original image of the target building window is obtained; when the original image is an obliquely shot image, perspective transformation technology is used for processing to obtain the preprocessed image to be identified; conversely, when the original image is not an obliquely shot image, the above-mentioned preprocessing is not required, and the above-mentioned original image can be directly used for damage identification.

[0072] Step S2: input the image to be identified into a damage identification model, and obtain a damage identification result for the target building window based on the output of the damage identification model.

[0073] The damage recognition model is based on several sample images and annotated images corresponding to the sample images, and is trained by a pre-trained semantic segmentation model; the annotation content includes an undamaged area, a non-penetrated damaged area, and a penetrated damaged area of ​​the sample image.

[0074] In this embodiment, in view of the lack of public data sets specifically for building window damage assessment in existing research, this embodiment can use crawler tools such as "Easy Spider" to collect a number of building window image data from online forums, news reports, social media platforms and other channels with keywords such as "building window" and "broken window". Through screening and deduplication, irrelevant or low-quality images are removed, and valid data is retained for subsequent processing.

[0075] Furthermore, tools such as LabelMe can be used to annotate the acquired images in detail, including undamaged areas, non-penetrating damaged areas, and penetrating damaged areas.

[0076] In order to enhance the generalization ability of the model, a data enhancement operation is performed on the building window image, wherein the data enhancement operation includes at least one of a random rotation operation, a scaling operation, a cropping operation and an expansion operation, and the building window image is adjusted to a target pixel; thereby obtaining the building window image.

[0077] Exemplarily, when the collected building window image data is less than 500 images, a data set of at least 500 images can be obtained through the above expansion operation, and the building window images can be adjusted to an image resolution of 512×512 pixels.

[0078] As a preferred implementation, the Swin Transformer model pre-trained on the ADE20K dataset can be selected as the basic model and fine-tuned through transfer learning. MultiDice Loss is used as the loss function to alleviate the problem of sample category imbalance. Among them, MultiDice Loss is an improved Dice algorithm, which can better handle multi-category segmentation tasks, specifically by calculating the Dice Score of each category, and then taking their average as one of the indicators for evaluating model performance.

[0079] MultiDice Loss=1-MultiDice Score;

[0080]

[0081] X represents the predicted result of the semantic segmentation model, Y represents the true result, n is the number of categories in the segmentation task, and MultiDice Score represents the similarity between the two graphic contours of the predicted result and the true result. Preferably, n in this embodiment can be equal to 4, |X∩Y| represents the intersection of the predicted result and the true result, and |X| and |Y| represent the number of predicted mask and true mask elements respectively.

[0082] Thus, the training process of the damage identification model includes:

[0083] Acquire a data set for training; the data set includes the plurality of sample images and annotated images corresponding to the sample images;

[0084] The semantic segmentation model is trained using the data set, and when the semantic segmentation model converges, the damage identification model is obtained;

[0085] Among them, the convergence condition is obtained according to the above loss function MultiDice Loss setting.

[0086] Furthermore, for the step of training the semantic segmentation model using the data set, the step is specifically as follows:

[0087] Adopting AdamW optimizer to iteratively optimize the semantic segmentation model through the data set;

[0088] In the first stage of iterative optimization, a linear learning rate growth strategy is adopted; in the second stage of iterative optimization, a learning rate decay strategy is adopted.

[0089] For example, a linear learning rate growth strategy (LinearLR) is used in the early stage of training, that is, the first stage mentioned above, so that the initial learning rate is increased from Increase linearly to This is repeated for 1,500 iterations, which helps the model to adapt to the data stably in the early stages of training and quickly improve performance, avoiding the problem of model instability during training due to an overly high learning rate.

[0090] In the later stage of training, i.e. the second stage mentioned above, a learning rate decay strategy (PolyLR) is adopted to reduce the learning rate from 6e 10-5 The smooth decay to 0 is completed until 15,000 iterations are completed, which helps to improve the generalization ability of the model and avoid overfitting of the model during training.

[0091] For example, the current learning rate lr of the semantic segmentation model can be expressed as follows:

[0092]

[0093] Among them, LR start Represents the learning rate at the beginning of the learning rate growth strategy, LR end It represents the learning rate at the end of the learning rate growth strategy, epoch represents the current number of iterations, EPOCH represents the total number of planned iterations, and p represents the power exponent in the learning rate decay strategy, which determines the speed of learning rate decay and the shape of the curve. The larger the exponent, the faster the learning rate decreases. The above two formulas are in parallel and jointly complete the scheduling of the learning rate.

[0094] Optionally, at least one of accuracy, intersection over union (IoU), precision, recall and F1 score may be used to evaluate the model performance of the semantic segmentation model or the damage identification model.

[0095] The corresponding calculation formula is as follows:

[0096]

[0097] Among them, TP represents a true positive example, TN represents a true negative example, FP represents a false positive example, and FN represents a false negative example. The damage recognition model trained by the above method can achieve pixel-level recognition.

[0098] Furthermore, the damage degree of the building's exterior windows can be accurately reflected by calculating the relative area ratio of the non-penetrated damage area and the penetrated damage area.

[0099] Therefore, the damage identification method also includes: using OpenCV to calculate and count the number of pixels of different colors in the damage identification result; wherein the pixels of different colors are used to represent an undamaged area, a non-penetrated damaged area, and a penetrated damaged area, respectively.

[0100] Then the building exterior window damage index (Exterior Window Damage Index, referred to as EWDI) is calculated according to the following formula:

[0101]

[0102] Among them, S0 represents the area of ​​the undamaged area, S1 represents the area of ​​the damaged area that is not penetrated, S2 represents the area of ​​the damaged area that is penetrated, α represents the relative area of ​​the damaged area that is not penetrated, β represents the relative area of ​​the damaged area that is penetrated, and α+β≤1, 2(S0+S1+S2) represents the total area of ​​the exterior window glass panels of the building, and S1+2S2 represents the area of ​​the damaged glass panels.

[0103] In this embodiment, for a building window composed of single-layer glass, when penetrating damage occurs, it means that the glass panel in the area is completely destroyed; while for a building window composed of double-layer glass, non-penetrating damage means that only one layer of the glass panel is damaged, and penetrating damage means that both layers of the glass panels are damaged.

[0104] For example, for the implementation effect of the embodiment of the present application, the predicted results and the actual results in the test set of the model are as follows: Figure 2 The effect of pixel points in the damage recognition result based on OpenCV statistics is shown as follows: Figure 3 shown.

[0105] Accordingly, refer to Figure 4 The present invention also provides a damage identification device for a building window, including an acquisition module 101 and an identification module 102; wherein,

[0106] The acquisition module 101 is used to acquire the image to be identified of the target building window;

[0107] The recognition module 102 is used to input the image to be recognized into a damage recognition model, and obtain a damage recognition result of the target building window based on the output of the damage recognition model;

[0108] The damage recognition model is based on several sample images and annotated images corresponding to the sample images, and is trained by a pre-trained semantic segmentation model; the annotation content includes an undamaged area, a non-penetrated damaged area, and a penetrated damaged area of ​​the sample image.

[0109] As a preferred solution, the damage identification device further includes a training module, and the training process of the damage identification model includes:

[0110] The training module acquires a data set for training; the data set includes the plurality of sample images and annotated images corresponding to the sample images;

[0111] The semantic segmentation model is trained using the data set, and when the semantic segmentation model converges, the damage identification model is obtained;

[0112] Among them, the convergence condition is obtained by setting the following loss function MultiDice Loss:

[0113] MultiDice Loss=1-MultiDice Score;

[0114]

[0115] Wherein, X represents the predicted result of the semantic segmentation model, Y represents the true result, n is the number of categories in the segmentation task, and MultiDice Score represents the similarity between the two graphic contours of the predicted result and the true result.

[0116] As a preferred solution, the training module uses the data set to train the semantic segmentation model, specifically:

[0117] The training module uses the AdamW optimizer to iteratively optimize the semantic segmentation model through the data set;

[0118] In the first stage of iterative optimization, a linear learning rate growth strategy is adopted; in the second stage of iterative optimization, a learning rate decay strategy is adopted.

[0119] As a preferred solution, the current learning rate lr of the semantic segmentation model is expressed by the following formula:

[0120]

[0121] Among them, LR start Represents the learning rate at the beginning of the learning rate growth strategy, LR end Represents the learning rate at the end of the learning rate growth strategy, epoch represents the current number of iterations, EPOCH represents the total number of planned iterations, and p represents the power exponent in the learning rate decay strategy.

[0122] As a preferred solution, the training module obtains a data set for training, including:

[0123] The training module collects a number of building window images; performs data enhancement operations on the building window images, wherein the data enhancement operations include at least one of random rotation operations, scaling operations, cropping operations, and expansion operations, and adjusts the building window images to target pixels; and obtains the building window images.

[0124] As a preferred solution, the damage identification device further includes a damage assessment module, and the damage assessment module is used to:

[0125] Calculating the number of pixels of different colors in the damage identification result; wherein the pixels of different colors are used to represent an undamaged area, a non-penetrated damaged area, and a penetrated damaged area, respectively;

[0126] Then the building exterior window damage index EWDI is calculated according to the following formula:

[0127]

[0128] Among them, S0 represents the area of ​​the undamaged area, S1 represents the area of ​​the damaged area that is not penetrated, S2 represents the area of ​​the damaged area that is penetrated, α represents the relative area of ​​the damaged area that is not penetrated, β represents the relative area of ​​the damaged area that is penetrated, 2(S0+S1+S2) represents the total area of ​​the building exterior window glass panel, and S1+2S2 represents the area of ​​the damaged glass panel.

[0129] As a preferred solution, the acquisition module 101 acquires the image to be identified of the target building window, including:

[0130] The acquisition module 101 acquires the original image of the target building window; when the original image is an obliquely shot image, the perspective transformation technology is used to process it to obtain the pre-processed image to be identified.

[0131] As a preferred solution, the model performance of the semantic segmentation model is evaluated by at least one of accuracy, intersection-over-union, precision, recall and F1 score.

[0132] Correspondingly, the present invention application also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the damage identification method of the building window when executing the computer program.

[0133] The processor may be a central processing unit (CPU), 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. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal, and various interfaces and lines are used to connect various parts of the entire terminal.

[0134] The memory can be used to store the computer program, and the processor realizes various functions of the terminal by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0135] Correspondingly, the present application also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the damage identification method for the building window.

[0136] Wherein, if the module integrated in the damage identification device of the building window 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 such an understanding, the present invention 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. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Wherein, 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 can include: any entity or device that can carry 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.

[0137] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0138] The embodiment of the present invention provides a damage identification method, apparatus, terminal device and computer-readable storage medium for a building window. The damage identification method includes: obtaining an image to be identified of a target building window; inputting the image to be identified into a damage identification model, and obtaining a damage identification result for the target building window based on the output of the damage identification model; wherein the damage identification model is obtained by training a pre-trained semantic segmentation model based on a number of sample images and annotated images corresponding to the sample images; the annotation content includes an undamaged area, a non-penetrated damaged area and a penetrated damaged area of ​​the sample image. By implementing the embodiment of the present invention, a damage identification model is obtained by training various damage types of the sample images, so as to be used for the identification of the target building window, and can identify small damage that is not limited to crack types, thereby improving the success rate of identifying inconspicuous damage, and can achieve damage identification for different types of disasters.

[0139] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A damage identification method for a building window, characterized in that: include: Obtain the image to be identified of the target building window; Inputting the image to be identified into a damage identification model, and obtaining a damage identification result of the target building window based on the output of the damage identification model; The damage recognition model is based on several sample images and annotated images corresponding to the sample images, and is trained by a pre-trained semantic segmentation model; the annotation content includes an undamaged area, a non-penetrated damaged area, and a penetrated damaged area of ​​the sample image.

2. A damage identification method for a building window as claimed in claim 1, characterized in that: The training process of the damage identification model includes: Acquire a data set for training; the data set includes the plurality of sample images and annotated images corresponding to the sample images; The semantic segmentation model is trained using the data set, and when the semantic segmentation model converges, the damage identification model is obtained; Among them, the convergence condition is obtained by setting the following loss function MultiDice Loss: MultiDice Loss=1-MultiDice Score; Wherein, X represents the predicted result of the semantic segmentation model, Y represents the true result, n is the number of categories in the segmentation task, and MultiDice Score represents the similarity between the two graphic contours of the predicted result and the true result.

3. A damage identification method for a building window as claimed in claim 2, characterized in that: The using the data set to train the semantic segmentation model is specifically: Adopting AdamW optimizer to iteratively optimize the semantic segmentation model through the data set; In the first stage of iterative optimization, a linear learning rate growth strategy is adopted; in the second stage of iterative optimization, a learning rate decay strategy is adopted; The model performance of the semantic segmentation model is evaluated by at least one of accuracy, intersection-over-union, precision, recall and F1 score.

4. A damage identification method for a building window as claimed in claim 3, characterized in that: The current learning rate lr of the semantic segmentation model is expressed as follows: Among them, LR start Represents the learning rate at the beginning of the learning rate growth strategy, LR end Represents the learning rate at the end of the learning rate growth strategy, epoch represents the current number of iterations, EPOCH represents the total number of planned iterations, and p represents the power exponent in the learning rate decay strategy.

5. A damage identification method for a building window as claimed in claim 2, characterized in that: The step of obtaining a data set for training includes: Collect a number of building window images; perform data enhancement operations on the building window images, wherein the data enhancement operations include at least one of random rotation operations, scaling operations, cropping operations, and expansion operations, and adjust the building window images to target pixels; and obtain the building window images.

6. A damage identification method for a building window as claimed in claim 1, characterized in that: The damage identification method further comprises: Calculating the number of pixels of different colors in the damage identification result; wherein the pixels of different colors are used to represent an undamaged area, a non-penetrated damaged area, and a penetrated damaged area, respectively; Then the building exterior window damage index EWDI is calculated according to the following formula: Among them, S0 represents the area of ​​the undamaged area, S1 represents the area of ​​the damaged area that is not penetrated, S2 represents the area of ​​the damaged area that is penetrated, α represents the relative area of ​​the damaged area that is not penetrated, β represents the relative area of ​​the damaged area that is penetrated, 2(S0+S1+S2) represents the total area of ​​the building exterior window glass panel, and S1+2S2 represents the area of ​​the damaged glass panel.

7. A damage identification method for a building window as claimed in claim 1, characterized in that: The step of obtaining the image to be recognized of the target building window comprises: The original image of the target building window is obtained; when the original image is an obliquely shot image, the perspective transformation technology is used to process it to obtain the pre-processed image to be identified.

8. A damage identification device for a building window, characterized in that: It includes an acquisition module and an identification module; wherein, The acquisition module is used to acquire the image to be identified of the target building window; The recognition module is used to input the image to be recognized into a damage recognition model, and obtain a damage recognition result of the target building window based on the output of the damage recognition model; The damage recognition model is based on several sample images and annotated images corresponding to the sample images, and is trained by a pre-trained semantic segmentation model; the annotation content includes an undamaged area, a non-penetrated damaged area, and a penetrated damaged area of ​​the sample image.

9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the damage identification method for a building window as claimed in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the damage identification method for a building window as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Building external window hail damage automatic assessment method based on image semantic segmentation

    CN117058395A

  • Remote sensing image windbreak semantic segmentation model construction method, segmentation method and device

    CN118172658A