Material segmentation method and system for building collapse scene
Through deep learning technology and model domain adaptive learning methods, the problem of low automation of material segmentation of demolition machinery in building collapse scenarios has been solved, the accuracy and efficiency of demolition operations have been improved, and it is suitable for a variety of scenarios.
Patent Information
- Application Number
- CN202410607227.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Existing demolition machinery has a low degree of automation in material segmentation in building collapse scenarios and cannot achieve complete intelligent automatic control, resulting in limited efficiency and accuracy when materials are complex and drill bits are frequently replaced.
Deep learning technology is combined with building collapse scene sample construction and model domain adaptive learning methods to train a deep semantic segmentation model through road scene data sets to generate a building collapse scene material segmentation model, and improve the adaptability and accuracy of the model through domain adaptive learning. sex.
It improves the accuracy and efficiency of demolition operations, ensures the safety of construction workers in harsh environments, and is suitable for mining, tunnels, building demolition and other fields, achieving efficient and accurate material identification.
Smart Images

Figure CN118587433A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of demolition machinery and relates to a material segmentation method and system for building collapse scenes. Background Art
[0002] When performing demolition operations, demolition machinery needs to use different drill bits according to the material of the work object and adjust the working parameters accordingly. At present, demolition machinery is mostly operated by manual remote control. This work is mostly determined by humans and requires long-term manual monitoring. In scenarios where the materials of the work objects are complex and drill bits need to be frequently replaced and parameters need to be adjusted, such as building demolition scenarios, the degree of automation of demolition machinery is obviously limited and it is impossible to achieve complete intelligent automatic control.
[0003] With the further development of cutting-edge technologies such as artificial intelligence, computer vision, and deep learning algorithms, intelligent and automated operations of demolition machinery are an inevitable development trend.
[0004] Therefore, there is a need for a material segmentation method and system suitable for demolition machinery and for building collapse scenes. Summary of the invention
[0005] The present invention solves the problems of sample labeling difficulties and weak scene adaptability when deep learning technology is used to achieve material area segmentation. It improves the model construction efficiency and material segmentation accuracy through building collapse scene sample construction and model domain adaptive learning method, and effectively improves the accuracy and efficiency of demolition operations. It can be widely used in mining, tunneling, building demolition, cement industry, emergency rescue and other fields, which can ensure the safety of construction workers in harsh working environments and effectively improve work efficiency.
[0006] Purpose: In order to overcome the deficiencies in the prior art, the present invention provides a material segmentation method and system for building collapse scenes, involving the control of an electric rotary system on a horizontal plane and an inclined plane.
[0007] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:
[0008] In a first aspect, a material segmentation method for a building collapse scene is provided, comprising:
[0009] Acquire a target building collapse scene image to be segmented;
[0010] Inputting the target building collapse scene image to be segmented into a trained building collapse scene material segmentation model to obtain a material segmentation result;
[0011] The acquisition of the trained building collapse scene material segmentation model includes:
[0012] Using a first road scene material dataset to train a first deep semantic segmentation model to obtain a road scene material segmentation model; wherein the first road scene material dataset includes a plurality of road scene material segmentation images and corresponding material annotations;
[0013] Processing a road scene semantic segmentation dataset using the road scene material segmentation model to obtain a labeled road scene material segmentation image; adding the labeled road scene material segmentation image to the first road scene material dataset to obtain a second road scene material dataset;
[0014] Mapping the road scene material segmentation image in the second road scene material data set to obtain a building scene material data set; adding collapsed area material objects and corresponding material annotations to the image of the building scene material data set to obtain a building collapse scene material data set;
[0015] Using the building collapse scene material data set to train a second deep semantic segmentation model to obtain a basic building collapse scene material segmentation model;
[0016] The labeled images in the target scene sequence images are used to perform domain adaptive learning on the basic building collapse scene material segmentation model to obtain a trained building collapse scene material segmentation model.
[0017] In some embodiments, domain adaptive learning of the basic building collapse scene material segmentation model is performed using annotated images in the target scene sequence image, including:
[0018] Select typical images from the target scene sequence images for annotation and data enhancement to obtain prototype images; and based on the prototype images, retrieve images with similar scene structures from the building collapse scene material dataset to form a domain transfer training set;
[0019] Using the domain transfer training set, fine-tuning the basic building collapse scene material segmentation model to obtain an advanced model;
[0020] The loop steps are iteratively executed until the preset conditions are met to obtain a trained building collapse scene material segmentation model, wherein the loop steps include: using the advanced model to process the target scene sequence image to obtain a labeled target scene image; retrieving scene structure-similar images from the building collapse scene material data set according to the target scene image to obtain an updated domain transfer training set; and using the updated domain transfer training set to fine-tune the advanced model to obtain an updated advanced model.
[0021] Furthermore, in some embodiments, the preset condition is to iteratively execute the loop step 3 to 5 times.
[0022] In some embodiments, the first deep semantic segmentation model and the second deep semantic segmentation model adopt the SegFormer model.
[0023] In some embodiments, the first road scene material dataset adopts the McubeS dataset.
[0024] In some embodiments, the road scene semantic segmentation dataset is selected from at least one of CamVid, CityScape, and Kitti datasets.
[0025] In some embodiments, mapping the road scene material segmentation image in the second road scene material data set to obtain a building scene material data set includes:
[0026] For each road scene material segmentation image in the second road scene material data set, the building scenes on both sides are transformed into front view building scenes using perspective projection transformation to obtain an annotated front view building image to form a building scene material data set.
[0027] In some embodiments, a collapsed area material object and a corresponding material annotation are added to an image of a building scene material dataset to obtain a building collapse scene material dataset, including:
[0028] Constructing a collapsed area on an image of a building scene material dataset; wherein the collapsed area is represented by a portion of the building that remains standing after natural collapse or artificial demolition;
[0029] Using the texture data set, pasting irregular texture block images on the building area of the image of the collapsed area, wherein the texture block images include at least one of bricks, rubble, adobe, steel bars, and window frames;
[0030] Using the COCO dataset, material objects are randomly superimposed on the remaining buildings to simulate the objects exposed inside the building after the exterior wall collapses.
[0031] Furthermore, a collapsed area is constructed on the image of the building scene material dataset, including:
[0032] Get the building circumscribed rectangle of the image of the building scene material dataset, and take a point on any two sides of the left, top and right sides of the building circumscribed rectangle to form a connecting line or a broken line. This connecting line or a broken line simulates the projection line of the waist-cut section on the image. Set the area enclosed by this connecting line or a broken line and the three sides of the building circumscribed rectangle to white or sky blue to simulate the building truncation in the building scene.
[0033] Alternatively, starting from the upper edge of the building image area, randomly use structural elements of different sizes and shapes to perform morphological erosion operations on continuous edge points in the building image area, and the eroded area is replaced by the average pixel value of the area surrounding the building.
[0034] Furthermore, in some embodiments, the data enhancement includes: performing at least one of cropping, flipping, translating, and brightness and color transformation on the typical image; and,
[0035] Add collapsed area material objects and corresponding material annotations to the typical image: obtain the image of the partially collapsed building through truncation and erosion operations, and superimpose the texture block image and material object.
[0036] In some embodiments, retrieving a scene structure similar image from the building collapse scene material dataset includes:
[0037] Calculate the mIoU of the annotated image of the prototype image / target scene image and the annotated image of each image in the building collapse scene material dataset, where mIoU is the average of the intersection over union ratio of each material category;
[0038] The images in the building collapse scene material dataset corresponding to the top 1% with larger mIoU values are taken as scene structure similar images.
[0039] In a second aspect, a material segmentation system for building collapse scenes is provided, comprising a memory and a processor, wherein the memory is used to store instructions, and the instructions are used to control the processor to operate so as to execute the material segmentation method for building collapse scenes according to the first aspect.
[0040] A third aspect provides a demolition machine, including the material segmentation system for building collapse scenes.
[0041] Beneficial effects: The material segmentation method and system for building collapse scenes provided by the present invention improves the model construction efficiency and material segmentation accuracy through building collapse scene sample construction and model domain adaptive learning method, and effectively improves the accuracy and efficiency of demolition operations. It can be widely used in mining, tunneling, building demolition, cement industry, emergency rescue and other fields, and can ensure the safety of construction workers in harsh working environments and effectively improve work efficiency. It has the following advantages:
[0042] (1) High efficiency of training samples and model construction
[0043] The model construction method designed in the present invention does not need to collect a large number of building collapse scene images and manually annotate the material category of each image at the pixel level. Instead, the designed method is used to directly obtain a large number of building collapse scene material segmentation sample images with direct material annotations from existing public road scene datasets (including a small number of material datasets and a large amount of semantic segmentation data). A building collapse scene material segmentation model can be efficiently constructed and trained, which can be quickly used for robot rescue, demolition, and excavation tasks.
[0044] (2) High material recognition accuracy
[0045] The training sample generation method designed in the present invention can generate diverse and accurate material annotated images, which can improve the material recognition ability of the model to a certain extent. On the one hand, the generated training data is very rich, especially with good coverage of the randomness of the collapsed area, and is suitable for selecting a semantic segmentation model with good effects but large parameters; on the other hand, compared with the actual data, the generated training data has a more balanced appearance of various materials, which avoids the problem of the model ignoring the heavy tail problem of classes with less frequent occurrence. All of these effectively guarantee the material recognition performance.
[0046] (3) Have good scene adaptability.
[0047] The designed domain adaptive method for building scene material segmentation model can achieve rapid adaptive adjustment of model parameters by only collecting and annotating a small amount of actual scene images, thus meeting the needs of switching working scenes of demolition machinery in different operating scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a material area map of a manually labeled building collapse scene image in the prior art;
[0049] Figure 2 This is a flow chart of a material segmentation method for a building collapse scene according to an embodiment of the present invention;
[0050] Figure 3 A schematic diagram of mapping a road scene material data set to a building scene material data set using perspective projection transformation in an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of a material segmentation training image of a partial building collapse scene generated in an embodiment of the present invention;
[0052] Figure 5 Schematic diagram of building collapse test scenario domain adaptation in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The present invention will be further described below in conjunction with specific embodiments.
[0054] As we all know, obtaining sufficient labeled training data is the key to training deep material segmentation models. For the deep material segmentation problem of building collapse scenes, it is also necessary to collect sufficient image data. In order to build a training set, each pixel in each image needs to be assigned a material category. This labeling work is very time-consuming and laborious. Even if a large amount of manual labeling is invested, the labeling results still have the following problems (such as Figure 1 shown):
[0055] (1) Missing labels: Potential material categories of objects are not marked, such as steel bars and metal window frames. Because they are too thin, marking them is time-consuming and laborious, and people often choose not to mark them.
[0056] (2) The material category of the object is vague. The material category of the object cannot be accurately identified visually. Even if it is marked, the marked category is inconsistent.
[0057] (3) The boundaries of material regions are relatively rough, making it difficult to distinguish between different material regions, resulting in under-labeling or over-labeling of some material regions.
[0058] To this end, we analyze the labeled material segmentation dataset, find out the images with common problems based on the above problems, and then manually clean and correct them. Figure 1 As shown in the figure, the exposed steel bars in the walls and floor concrete of the demolished buildings were not segmented as metal during the manual labeling process. The main reason is that these steel bars are very thin, similar to the electric poles in the road scene, and are difficult to label. In addition, there are some areas where it is ambiguous whether to label them, such as small stones in cement pavement and dirt roads. They do not belong to reinforced concrete / bricks and tiles, so whether they should be labeled is necessary.
[0059] In addition, the most important indicator of material segmentation performance is the mean intersection over union (mIoU), which is also one of the most commonly used indicators to measure image semantic segmentation performance. It takes into account the accuracy of semantic recognition (if the recognition is incorrect, the mIoU will be directly low), and while the accuracy is basically guaranteed, it also takes into account the accuracy of segmentation (under-segmentation or over-segmentation will lower the mIoU). Moreover, mIoU is the average of the IoUs of each class. Therefore, accuracy requirements are put forward for each class to prevent the situation where the improvement of the IoU performance of one class will lead to a decrease in the IoU of other classes.
[0060] To improve mIoU, first of all, it is obvious that the first is to ensure that the category recognition of each semantic area is accurate, and the second is that the segmentation of the semantic area must also be accurate. The identification of material categories requires the model to have a high learning ability. In addition to having a very high category recognition ability, it is also necessary to fully avoid learning from the training set the category imbalance bias carried in the segmentation mask. Only in this way can mIoU be improved. For the second point of segmentation, if the boundary annotation of the semantic area is relatively random when manually annotating the samples, then the trained model must be relatively random, the segmentation accuracy must be low, and the mIoU will not be high. Therefore, the labeled samples need to be as accurate as possible.
[0061] In view of the above problems, the present invention provides a material segmentation method for building collapse scenes, which uses a semi-automatic training sample generation method, which can not only improve the efficiency of material segmentation annotation, but also make the material categories in the annotated samples more balanced, and provide a domain adaptation method for the deep material segmentation model, which comprehensively ensures that the material segmentation model has good mIoU performance. The method includes:
[0062] 1. Generation of training samples for building collapse scenes: In order to effectively reduce the workload of pixel-level material category labeling in material segmentation, public datasets are used to generate training sample images and their labels. First, a more robust road scene material segmentation model is trained using a public road scene material dataset, and it is used to obtain more material segmentation results to expand the road scene material dataset. The buildings on both sides of the road scene are transformed through inverse perspective to obtain a frontal view of the building image; various material objects are randomly superimposed on the building image to simulate the collapse area.
[0063] 2. Use the real generated training samples to train the basic material segmentation model;
[0064] 3. Domain Adaptation Method for Architectural Scenes: The deep material segmentation model trained by the training samples generated by simulation (called the basic material segmentation model) has basic material recognition capabilities. In the face of actual specific application scenarios, domain adaptation methods are needed for further adaptation. First, a set of scene sequences are shot and several images are annotated. Then, the model can use the shot scene sequences and several annotated images, as well as the basic material segmentation model, to automatically realize the domain adaptation of the model.
[0065] Embodiment 1: This embodiment provides a material segmentation method for a building collapse scene, including:
[0066] Acquire a target building collapse scene image to be segmented;
[0067] Inputting the target building collapse scene image to be segmented into a trained building collapse scene material segmentation model to obtain a material segmentation result;
[0068] The acquisition of the trained building collapse scene material segmentation model includes:
[0069] Using a first road scene material dataset to train a first deep semantic segmentation model to obtain a road scene material segmentation model; wherein the first road scene material dataset includes a plurality of road scene material segmentation images and corresponding material annotations;
[0070] Processing a road scene semantic segmentation dataset using the road scene material segmentation model to obtain a labeled road scene material segmentation image; adding the labeled road scene material segmentation image to the first road scene material dataset to obtain a second road scene material dataset;
[0071] Mapping the road scene material segmentation image in the second road scene material data set to obtain a building scene material data set; adding collapsed area material objects and corresponding material annotations to the image of the building scene material data set to obtain a building collapse scene material data set;
[0072] Using the building collapse scene material data set to train a second deep semantic segmentation model to obtain a basic building collapse scene material segmentation model;
[0073] The labeled images in the target scene sequence images are used to perform domain adaptive learning on the basic building collapse scene material segmentation model to obtain a trained building collapse scene material segmentation model.
[0074] In some embodiments, domain adaptive learning of the basic building collapse scene material segmentation model is performed using annotated images in the target scene sequence image, including:
[0075] Select typical images from the target scene sequence images for annotation and data enhancement to obtain prototype images (target scene training samples); and based on the prototype images, retrieve images with similar scene structures from the building collapse scene material dataset to form a domain transfer training set;
[0076] Using the domain transfer training set, fine-tuning the basic building collapse scene material segmentation model to obtain an advanced model;
[0077] The loop steps are iteratively executed until the preset conditions are met to obtain a trained building collapse scene material segmentation model, wherein the loop steps include:
[0078] Using the advanced model to process the target scene sequence images to obtain labeled target scene images;
[0079] Retrieving scene structure-similar images from the building collapse scene material dataset according to the target scene image to obtain an updated domain transfer training set;
[0080] The advanced model is fine-tuned using the updated domain transfer training set to obtain an updated advanced model.
[0081] In some embodiments, the preset condition is to iteratively execute the loop step 3 to 5 times.
[0082] In some embodiments, the first deep semantic segmentation model and the second deep semantic segmentation model adopt the SegFormer model.
[0083] In some embodiments, the first road scene material dataset adopts the McubeS dataset.
[0084] In some embodiments, the road scene semantic segmentation dataset is selected from at least one of CamVid, CityScape, and Kitti datasets.
[0085] In some embodiments, mapping the road scene material segmentation image in the second road scene material data set to obtain a building scene material data set includes:
[0086] For each road scene material segmentation image in the second road scene material data set, the building scenes on both sides are transformed into front view building scenes using perspective projection transformation to obtain an annotated front view building image to form a building scene material data set.
[0087] In some embodiments, a collapsed area material object and a corresponding material annotation are added to an image of a building scene material dataset to obtain a building collapse scene material dataset, including:
[0088] Constructing a collapsed area on an image of a building scene material dataset; wherein the collapsed area is represented by a portion of the building that remains standing after natural collapse or artificial demolition;
[0089] Using the texture data set, pasting irregular texture block images on the building area of the image of the collapsed area, wherein the texture block images include at least one of bricks, rubble, adobe, steel bars, and window frames;
[0090] Using the COCO dataset, material objects are randomly superimposed on the remaining buildings to simulate the objects exposed inside the building after the exterior wall collapses.
[0091] In some embodiments, constructing a collapsed area on an image of a building scene material dataset includes:
[0092] Get the building circumscribed rectangle of the image of the building scene material dataset, and take a point on any two sides of the left, top and right sides of the building circumscribed rectangle to form a connecting line or a broken line. This connecting line or a broken line simulates the projection line of the waist-cut section on the image. Set the area enclosed by this connecting line or a broken line and the three sides of the building circumscribed rectangle to white or sky blue to simulate the building truncation in the building scene.
[0093] Alternatively, starting from the upper edge of the building image area, randomly use structural elements of different sizes and shapes to perform morphological erosion operations on continuous edge points in the building image area, and the eroded area is replaced by the average pixel value of the area surrounding the building.
[0094] In some embodiments, the data enhancement includes: performing at least one of cropping, flipping, translating, and brightness and color transformation on the typical image; and
[0095] Add collapsed area material objects and corresponding material annotations to the typical image: obtain the image of the partially collapsed building through truncation and erosion operations, and superimpose the texture block image and material object.
[0096] In some embodiments, retrieving a scene structure similar image from the building collapse scene material dataset includes:
[0097] Calculate the mIoU of the annotated image of the prototype image / target scene image and the annotated image of each image in the building collapse scene material dataset, where mIoU is the average of the intersection over union ratio of each material category;
[0098] The images in the building collapse scene material dataset corresponding to the top 1% with larger mIoU values are taken as scene structure similar images.
[0099] In some specific embodiments, Figure 2As shown in the figure, a road scene material segmentation model (any deep semantic segmentation model can be used, SegFormer is recommended) is trained using the public road scene material dataset Mcubes (only 500 training samples), and the model is used to process the public road scene semantic segmentation dataset. The processed result images with good material recognition effect are manually selected and added to the road scene material dataset Mcubes to expand the road scene material dataset. Using homography transformation, the buildings on both sides of the road scene material dataset are transformed from the side view area to the front view image, and all the front view images are combined into a building scene material dataset; further, each image in the building scene dataset is used as the building background, and material object images are randomly added to it to form a collapsed area, so as to obtain a building collapse scene material dataset. A deep semantic segmentation model (the same as the road scene material segmentation model, or other deep semantic segmentation models can be selected) is trained using the constructed building collapse scene material dataset to obtain a basic building collapse scene material segmentation model. For the specific working scenario where the model is actually deployed, we first collect a scene video and only need to annotate a few images. Then we can use it to perform domain adaptation on the basic material segmentation model of the building collapse scene to obtain an advanced material segmentation model that has strong adaptability to the application scenario.
[0100] The specific implementation is as follows:
[0101] 1. Mapping of road scene semantic segmentation dataset to road scene material segmentation dataset
[0102] There are many semantic segmentation datasets, but most of them are road scenes, mainly from the popular unmanned driving field this year, such as CamVid, CityScape, Kitti datasets, etc. These datasets provide a lot of target categories, such as roads, cars, bicycles, and buildings. This application first turns them into material datasets, thanks to some recently disclosed road scene material datasets, which provide 500 material segmentation images and their annotations, including 20 material categories, which can be used to learn road scene material segmentation. This application uses the material segmentation data to train the SegFormer material segmentation model, and through the transfer learning mechanism, it is better applied to the aforementioned road scene semantic segmentation dataset.
[0103] The analysis found that the recognition results of the training SegFormer material segmentation model in general road scenes are characterized by a small number of material category recognition errors, but more segmentation errors. A small number of material category recognition errors can be ignored or changed manually, while segmentation errors can be automatically corrected by making full use of the accurate semantic annotation results in the road scene semantic segmentation dataset. In this way, these datasets can also be converted into road scene material data, thereby obtaining more road scene material datasets.
[0104] 2. Mapping of road scene material segmentation dataset to building collapse scene material segmentation dataset
[0105] The scene structure of the road scene is mainly that there is a road in the middle and buildings on both sides, while the main scene structure of the building collapse scene is facing the building. There are also some intersections between the two. For example, when turning or at a T-junction, there are often buildings facing each other, and when the demolition machinery works sideways, the main building is also on the side. But in most cases, one is mainly viewed from the side and the other is mainly viewed from the front. Therefore, it is necessary to transform the road scene into a building scene, thereby transforming the road scene material data set into a building scene material data set. The implementation method is to use perspective projection transformation (homography transformation) to transform the building scenes on both sides into front-view building scenes. The perspective projection transformation is a 3x3 transformation matrix:
[0106] [ x ′ y ′ 1 ] = [ m 11 m 12 m 13 m 21 m 22 m 23 m 31 m 32 m 33 ] [ x y 1 ]
[0107] Generally, it is necessary to extract corresponding points in the images before and after the transformation (such as Figure 3 The corresponding points are shown by the blue straight line in the middle), and the parameters of the transformation matrix are obtained. . But here it is very simple. From the characteristics of the road scene structure and the perspective matrix, we can know that the buildings on both sides form a trapezoidal area with larger near and smaller far away due to perspective projection. In fact, it should be a rectangular area without perspective projection transformation. Therefore, this application can specify the appropriate trapezoidal area and rectangular size, and use the geometric relationship from the trapezoidal area to the rectangular area to obtain the transformation matrix and complete the inverse perspective projection transformation. The front view building image is obtained, and the material annotation image of the front view building image is obtained from the road scene material annotation image accordingly.
[0108] 3. Collapse area material objects and label generation
[0109] After having the building scene material data set, we further construct the collapsed area. The collapsed area mainly refers to the remaining standing part of the building after natural collapse or artificial demolition. First, obtain the building's circumscribed rectangle, and take a point on any two sides of the left, top and right sides of the circumscribed rectangle to form a connecting line, or a broken line (select some midpoints by dichotomy, and offset the midpoints up and down by several pixels). This line simulates the projection line of the waist-cut section on the image. According to this line, the area surrounded by it and the three sides of the circumscribed rectangle is set to white or sky blue to simulate the truncation of the building in the building scene. This method is similar to cutting off most of the top of the building, which is too simple. In order to simulate the collapse of a small part, another method starts from the upper edge of the building image area, and randomly uses structural elements of different sizes and shapes (such as circles and squares) to perform morphological corrosion operations on some continuous edge points in the building area. The eroded area is replaced by the average pixel value of the area around the building (mostly the sky area).
[0110] In addition, some specific texture block images, such as bricks, rubble, adobe, steel bars, window frames, etc., are pasted on the buildings to simulate the exposed bricks, concrete and steel bars of the buildings due to damage. Since these textures come from public texture datasets, grayscale consistency must be considered. When pasting in the form of corresponding texture block images, their grayscale values need to be adjusted. Adjust by its mean and contrast to get , to ensure the mean value of the texture block image and contrast Adjust to mean of pasted area and contrast , the formula is:
[0111]
[0112] For texture blocks such as bricks, rubble, and adobe, we can randomly generate a mask module image (background is 0, shape is 1) M similar to the various shapes (O, L, I, S, Z, J, T) in the Tetris game, and perform element-wise multiplication with the texture block image P to form a texture corresponding to the shape indicated by the mask module, and then paste it to the building area. For steel bars, we generate some curve clusters through the Bezier curve generation method. Their grayscale values are dark (the grayscale value is generally less than 30), but the grayscale value cannot be fixed, otherwise it lacks authenticity. Instead, it should be generated by setting the grayscale ratio. (Take a random number between 0.5 and 0.8), and then set the gray value according to the gray mean of the building background. Set the average gray value of the local background around the pixel point where the steel bar is to be pasted to , then the gray value of the steel bar according to calculate.
[0113] In addition to irregular texture block images, some material objects are superimposed on the remaining buildings, such as wooden boards, air conditioner outdoor units, signs, plastic curtains, etc. The material objects appear randomly and are distributed on the surface of the remaining buildings. Multiple material objects may be staggered. This application uses the COCO data set to generate material objects. COCO is a general object recognition database that contains a rich category of items in daily life. Except for a few objects with multiple materials, most of the material categories of these categories are relatively certain. This application selects categories with more consistent material categories in these data sets, and does some manual editing to remove some inconsistent object images. In this way, a rich variety of material objects are obtained. These material objects can be superimposed on the building through various shape transformations to simulate the objects exposed inside the building after the exterior wall collapses. Since the materials of these objects are bound to the object categories, that is, they are all known, and the COCO data set already has a mask image of the actual pixel where the object is located in the picture, when it is superimposed on the building image with the building as the background, the material type of the object in the collapsed area is also obtained. Annotation.
[0114] 4. Domain Adaptive Learning for Building Collapse Scenario
[0115] The building collapse scene material dataset obtained by the above steps (such as Figure 4 ) can train a basic material segmentation model. This application selects SegFormer as the basic material segmentation model, which was originally a semantic segmentation model. The material segmentation model can be obtained by transforming its object semantic category into the required material category and using the building collapse scene material segmentation dataset.
[0116] like Figure 5 As shown, when the model is actually used, a set of videos is first shot for the new scene, and only a few (such as three) typical images in the video are required for annotation. Conventional data enhancement methods such as conventional cropping, flipping, translation, brightness and color transformation are used. The sample generation method proposed in step 3 is also used, that is, the image of the partially collapsed building is obtained through truncation and corrosion operations, and the object and texture block images are superimposed. This process can be seen as a special data enhancement method. In this way, more training samples can be generated from these images. With the basic material segmentation model, the collected new scene video sequence images, and the material-annotated training samples expanded from several annotated result images, domain adaptive training can be carried out. It is divided into multiple stages. First, several images are selected from the material-annotated training samples expanded from the above data enhancement as prototype images, and then images with similar scene structures are found in all the building collapse scene material segmentation data sets used to train the basic material segmentation model. This process is achieved by calculating mIoU, which is the average of the intersection over union ratio of each material category. The calculation formula is as follows,
[0117]
[0118] in Indicates that The category prediction is Category. Note that the comparison here is to calculate mIoU between the annotated image of the prototype image and the annotated image of each image in the building collapse scene material segmentation dataset, and the top 1% is regarded as the image with similar scene structure.
[0119] The above retrieval process constitutes the initial domain transfer training set, and the basic material segmentation model is fine-tuned (Fine-Tuning) training, that is, a small number of training rounds are performed with a small learning rate to obtain the advanced model I. The advanced model I is used to process the new scene video sequence images and further select the images in the building collapse scene material data set to obtain the updated domain transfer training set, and then a second fine-tuning is performed to obtain the advanced model II, and then the above process is continuously cycled, generally 3 to 5 cycles are sufficient.
[0120] Embodiment 2: Based on Embodiment 1, this embodiment provides a material segmentation system for building collapse scenes, including a memory and a processor, the memory is used to store instructions, and the instructions are used to control the processor to operate to execute the material segmentation method for building collapse scenes according to Embodiment 1.
[0121] Embodiment 3: Based on Embodiment 1 and Embodiment 2, this embodiment provides a demolition machine, including the above-mentioned material segmentation system for building collapse scenes.
[0122] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0123] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0124] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0126] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A material segmentation method for building collapse scenes, characterized in that: include: Acquire a target building collapse scene image to be segmented; Inputting the target building collapse scene image to be segmented into a trained building collapse scene material segmentation model to obtain a material segmentation result; The acquisition of the trained building collapse scene material segmentation model includes: Using a first road scene material dataset to train a first deep semantic segmentation model to obtain a road scene material segmentation model; wherein the first road scene material dataset includes a plurality of road scene material segmentation images and corresponding material annotations; Processing a road scene semantic segmentation dataset using the road scene material segmentation model to obtain a labeled road scene material segmentation image; adding the labeled road scene material segmentation image to the first road scene material dataset to obtain a second road scene material dataset; Mapping the road scene material segmentation image in the second road scene material data set to obtain a building scene material data set; adding collapsed area material objects and corresponding material annotations to the image of the building scene material data set to obtain a building collapse scene material data set; Using the building collapse scene material data set to train a second deep semantic segmentation model to obtain a basic building collapse scene material segmentation model; The labeled images in the target scene sequence images are used to perform domain adaptive learning on the basic building collapse scene material segmentation model to obtain a trained building collapse scene material segmentation model.
2. The material segmentation method for building collapse scenes according to claim 1 is characterized in that: The basic building collapse scene material segmentation model is domain-adaptively learned using annotated images in the target scene sequence image, including: Select typical images from the target scene sequence images for annotation and data enhancement to obtain prototype images; and based on the prototype images, retrieve images with similar scene structures from the building collapse scene material dataset to form a domain transfer training set; Using the domain transfer training set, fine-tuning the basic building collapse scene material segmentation model to obtain an advanced model; The loop steps are iteratively executed until the preset conditions are met to obtain a trained building collapse scene material segmentation model, wherein the loop steps include: Using the advanced model to process the target scene sequence images to obtain labeled target scene images; Retrieving scene structure-similar images from the building collapse scene material dataset according to the target scene image to obtain an updated domain transfer training set; The advanced model is fine-tuned using the updated domain transfer training set to obtain an updated advanced model.
3. The material segmentation method for building collapse scenes according to claim 2 is characterized in that: The preset condition is to iterate the loop step 3 to 5 times.
4. The material segmentation method for building collapse scenes according to claim 1, characterized in that: The first deep semantic segmentation model and the second deep semantic segmentation model adopt the SegFormer model; And / or, the first road scene material dataset adopts the McubeS dataset; And / or, the road scene semantic segmentation dataset is selected from at least one of CamVid, CityScape, and Kitti datasets.
5. The material segmentation method for building collapse scenes according to claim 1, characterized in that: Mapping the road scene material segmentation image in the second road scene material data set to obtain a building scene material data set, including: For each road scene material segmentation image in the second road scene material data set, the building scenes on both sides are transformed into front view building scenes using perspective projection transformation to obtain an annotated front view building image to form a building scene material data set.
6. The material segmentation method for building collapse scenes according to claim 1, characterized in that: Add the collapsed area material objects and corresponding material annotations to the image of the building scene material dataset to obtain the building collapse scene material dataset, including: Constructing a collapsed area on an image of a building scene material dataset; wherein the collapsed area is represented by a portion of the building that remains standing after natural collapse or artificial demolition; Using the texture data set, pasting irregular texture block images on the building area of the image of the collapsed area, wherein the texture block images include at least one of bricks, rubble, adobe, steel bars, and window frames; Using the COCO dataset, material objects are randomly superimposed on the remaining buildings to simulate the objects exposed inside the building after the exterior wall collapses.
7. The material segmentation method for building collapse scenes according to claim 6, characterized in that: Construct collapse regions on images of the building scene material dataset, including: Get the building circumscribed rectangle of the image of the building scene material dataset, and take a point on any two sides of the left, top and right sides of the building circumscribed rectangle to form a connecting line or a broken line. This connecting line or a broken line simulates the projection line of the waist-cut section on the image. Set the area enclosed by this connecting line or a broken line and the three sides of the building circumscribed rectangle to white or sky blue to simulate the building truncation in the building scene. Alternatively, starting from the upper edge of the building image area, randomly use structural elements of different sizes and shapes to perform morphological erosion operations on continuous edge points in the building image area, and the eroded area is replaced by the average pixel value of the area surrounding the building.
8. The material segmentation method for building collapse scenes according to claim 2, characterized in that: The data enhancement includes: performing at least one of cropping, flipping, translating, and brightness and color transformation on the typical image; and Add collapsed area material objects and corresponding material annotations to the typical image: obtain the image of the partially collapsed building through truncation and erosion operations, and superimpose the texture block image and material object.
9. The material segmentation method for building collapse scenes according to claim 2, characterized in that: Retrieving images with similar scene structures from the building collapse scene material dataset includes: Calculate the mIoU of the annotated image of the prototype image / target scene image and the annotated image of each image in the building collapse scene material dataset, where mIoU is the average of the intersection over union ratio of each material category; The images in the building collapse scene material dataset corresponding to the top 1% with larger mIoU values are taken as scene structure similar images.
10. A material segmentation system for building collapse scenes, characterized in that: It comprises a memory and a processor, the memory is used to store instructions, and the instructions are used to control the processor to operate so as to execute the material segmentation method for building collapse scenes according to any one of claims 1-9.
11. A demolition machine, characterized in that: Including the material segmentation system for building collapse scenes as described in claim 10.
Citation Information
Patent Citations
Unstructured road adaptive attention semantic segmentation method based on Deeplabv3 + network
CN114863102A
Dam bank collapse detection method and system based on deep learning technology
CN115908797A
5G multi-source information fusion remote control system for forcible entry robot
CN117742153A
Concrete slump and expansion degree detection method and system based on machine vision
CN117929695A
Building remodeling information provision system based on construction waste calculation
KR102665885B1
Cited By
Material segmentation method and system for building collapse scene
EP4672169B1
Material segmentation method and system for building collapse scene
WO2025236517A1
