Traditional residential building material type identification method, system, equipment and medium

Through the method based on the object detection algorithm, the traditional residential building material type standards and training recognition models are solved, and the problem of lack of traditional residential building materials detection methods in the existing technology is solved, and the rapid and accurate identification and distribution of traditional Chinese residential building materials is achieved.

CN119810566AActive Publication Date: 2025-04-11SOUTH CHINA UNIV OF TECH +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510056934.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-11
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

The existing technology lacks detection methods for the types of traditional house building materials in China's entire region, and the existing research is mainly concentrated in local areas, and it is not possible to carefully identify and study traditional house building materials.

Method used

Using the method based on the object detection algorithm, we construct traditional house building materials type standards, create training sets and verification sets, and use the YOLOv8x-seg pre-trained weight model to train an optimized recognition model to achieve rapid and accurate identification of traditional house building materials types in China.

Benefits of technology

It has achieved rapid and accurate identification of traditional residential building materials with different materials and construction methods in various regions of China, and supported the research and protection of the distribution of traditional residential building materials types across the country.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810566A_ABST
    Figure CN119810566A_ABST
Patent Text Reader

Abstract

The invention discloses a traditional dwelling building material type identification method and system based on a target detection algorithm, electronic equipment and a storable medium, and the identification method comprises the following steps: determining 30 dwelling building material types according to the induction of literatures and building material characteristics; making a training set and a verification set of Chinese traditional dwelling building materials including 30 dwelling building material types; using the training set and the verification set, obtaining an optimized traditional residential building material type identification model through training and parameter adjustment on the basis of a pre-training model YOLOv8x-seg, inputting a to-be-predicted data set with geographic semantic information into the traditional residential building material type identification model, and identifying the traditional residential building material type. And obtaining a residential building material type identification result of each region throughout the county as a unit. The method can be used for rapidly detecting the types of the building materials used by the traditional dwellings nationwide.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traditional building material identification, and specifically relates to a method, system, electronic equipment and storable medium for identifying the type of traditional residential building materials based on a target detection algorithm. Background Art

[0002] There are a large number of traditional dwelling samples from different historical periods in my country. These samples are large in number and widely distributed, with rich types of building materials and diverse construction techniques. Existing studies often focus on the types and forms of traditional dwellings in a certain area, and there are few systematic studies on traditional dwellings across the country from the perspective of material types. Therefore, there is a lack of comprehensive understanding of the existing traditional dwelling building materials, and there is also a certain difficulty in identifying the types of building materials. In addition, it is difficult to conduct systematic and comprehensive surveys and collect samples from the national level in the current research on traditional dwellings, and it is impossible to obtain the distribution characteristics of the entire traditional dwelling material type through field surveys. Therefore, it is necessary to establish a detection model that can easily and quickly identify the material types of traditional dwellings in rural areas.

[0003] The main problems of the current detection methods of building materials types of traditional Chinese dwellings: (1) No detection method for traditional residential building materials has been proposed. Existing technologies focus on the identification of buildings, bridges, roads and other facilities in remote sensing images, as well as the detection of urban construction and municipal pipeline safety, but lack the identification and detection of traditional building materials in rural areas.

[0004] (2) No detection method for the types of building materials of traditional residential buildings in China has been proposed. On the one hand, existing research on material types in China is concentrated in local areas, and most of the material classification research is based on the perspective of construction techniques. On the other hand, the depth of material type research remains at the level of relatively broad natural materials such as stone and wood, and no detailed research has been conducted on specific stone types and wood types.

[0005] (3) No detection method that uses ground photos and drone bird's-eye view photos as a data set has been proposed. Existing detection methods mainly use ground photos or remote sensing images as basic data sets. Summary of the invention

[0006] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a method, system, electronic device and storable medium for identifying the types of building materials for traditional residential buildings based on a target detection algorithm. The identification method first classifies the building materials for traditional Chinese residential buildings according to the material application enclosure parts in the construction process as the division plates, that is, the roof and wall are used as the identification parts to divide the material types, and the classification standards for the building material types are formulated respectively. Secondly, by controlling and adjusting the model parameters of the training set and the validation set, an optimized model for identifying the types of building materials for traditional Chinese residential buildings is obtained based on the YOLOv8x-seg pre-trained weight model training, and the national traditional residential image data set is input to obtain the recognition results. This method can be used for the rapid and accurate identification of traditional residential building materials with different materials and different construction methods in various regions across China, and the recognition results can be used as a demonstration support for the research on the distribution of building material types for traditional residential buildings across China.

[0007] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a method for identifying the type of building materials of traditional residential buildings based on a target detection algorithm. The identification method is aimed at identifying a traditional Chinese residential building, and the identification part is the enclosure part of the building including the roof and the wall, comprising the following steps: S1. Construct the type standard of traditional residential building materials: Based on the public literature and material characteristics, the types of traditional Chinese residential building materials are summarized and classified into 30 types, including 12 types of roofing materials and 18 types of wall materials, including 34 material subdivision types; S2. Create training set and validation set: collect images from public image data websites using the keyword "material type + traditional dwellings", divide the collected data set into training set T and validation set Y in a ratio of 8:2, each of which contains 30 material types, and annotate the building material types in the images of training set T and validation set Y; S3. Training recognition model: Use the training set T produced in the previous step to train on the basis of the YOLOv8x-seg pre-trained model, and verify it on the verification set Y to obtain a model for identifying the types of building materials for traditional Chinese dwellings. S4. Inputting the image containing the traditional Chinese residential building to be tested into the traditional residential building material type recognition model for recognition, and obtaining the building material type recognition result in the image by calculation.

[0008] Furthermore, in step S1, by combing through existing historical data and documents, it is found that natural materials were first used by ancient working people and corresponding construction techniques were developed. Subsequently, bricks and tiles were processed and widely used in traditional residential building construction. Based on this, a classification framework covering the types of traditional residential materials in various regions of China is formed, that is, the classification of traditional brick and tile building materials and natural materials such as stone, earth, wood, tile, grass and bamboo. Traditional residential building materials are classified into two levels according to various material characteristics, shapes, types and building construction techniques. 12 types of roofing materials and 18 types of wall materials are formed. In addition, due to the different colors and construction techniques of different building materials during the training process, the image characteristics of the same material type will be quite different, thereby affecting the accuracy of model recognition. Therefore, on the basis of the original basic material types, some secondary material types are subdivided into small categories, and finally 34 subdivided material types are obtained.

[0009] Specifically, the characteristics of each type of material are: (1) Roofing materials: The first type of roofing material is blue tile. Its characteristics are: blue-gray color, fired tile form, and curved tile surface. It is recorded as WM_W_QW.

[0010] The second type of roofing material is red tiles. Its characteristics are: reddish brown in color, in the form of fired tiles, and with curved surfaces. It is denoted as WM_W_HW.

[0011] The third type of roofing material is glazed tile. Its characteristics are: it is made of fired tiles with colored glaze on the surface. The colors are mostly golden or green, and the surface of the tile is shiny due to the glaze. It is recorded as WM_W_LLW. Because there are two colors, it is subdivided into two subcategories, recorded as WM_W_LLW_HS and WM_W_LLW_LS.

[0012] The fourth type of roofing material is Burmese tile. Its characteristics are: blue-gray color, only a slight curvature on the tile surface, square sheet shape, and no glaze. It is recorded as WM_W_MW.

[0013] The fifth type of roofing material is seagrass. Its characteristics are: white and gray color, soft texture. It is recorded as WM_C_HC.

[0014] The sixth type of roofing material is thatch. Its characteristics are: yellow or golden color, and the stems used for the roof are straight and spike-like. It is recorded as WM_C_MC.

[0015] The seventh type of roofing material is wheat straw. Its characteristics are: it is black in color because it is susceptible to mold, and the roof is mostly made of straw. It is recorded as WM_C_MJC.

[0016] The eighth type of roofing material is wooden board. Its characteristics are: brown or wood color, slightly longer than tiles, and long strips. It is recorded as WM_M_MBP.

[0017] The ninth type of roofing material is bark. Its characteristics are: brown or white in color, long and flake-shaped, mostly made of fir and cypress bark. It is denoted as WM_M_SP.

[0018] The tenth type of roofing material is plaster. Its characteristics are: yellow-brown or light yellow in color, and fine surface texture. It is recorded as WM_T_MN.

[0019] The 11th roofing material type is sandstone. Its characteristics are: reddish brown or red in color, fine surface, frosted texture, and rectangular flake shape. It is recorded as WM_S_SY.

[0020] The 12th roofing material type is shale. Its characteristics are: grayish white or grayish black in color, and thin flaky layers. It is recorded as WM_S_YY.

[0021] (2) Wall materials: The first type of wall material is blue brick. Its characteristics are: blue-gray color, in the form of fired bricks. It is denoted as QM_Z_QZ.

[0022] The second type of wall material is red brick. Its characteristics are: reddish brown in color, in the form of fired bricks. It is denoted as QM_Z_HZ.

[0023] The third type of wall material is wood board. Its characteristics are: brown or brown in color, wood texture and grain, made of heartwood and sapwood, and long strip shape. It is recorded as QM_M_MB.

[0024] The fourth wall material type is log. Its characteristics are: brown or brown color, wood texture and grain, composed of 10-20cm round log columns, recorded as QM_M_MZ.

[0025] The fifth type of wall material is rammed earth. Its characteristics are: it is made of pressed mud blocks, the wall surface is relatively complete without any traces of masonry, and the color is earthy yellow. It is denoted as QM_T_HT.

[0026] The sixth type of wall material is adobe. Its characteristics are: it is made of bricks made of mud, its color is earthy yellow, and there are gaps in the wall. It is recorded as QM_T_TP.

[0027] The seventh type of wall material is bamboo strips. Its characteristics are: it is made of bamboo strips, has a net-like texture, and is light yellow or yellow in color. It is denoted as QM_Z_ZM.

[0028] The eighth type of wall material is bamboo poles. Its characteristics are: it is made of bamboo cut and tied together, with columnar texture and light yellow color. It is denoted as QM_Z_ZG.

[0029] The ninth type of wall material is felt cloth. Its characteristics are: it is made of hair or skin of livestock in nomadic areas, mostly black or dark yellow in color, and has a rough surface. It is denoted as QM_B_ZB. It is divided into three subcategories according to different characteristics. They are denoted as QM_B_ZHB_FBB, QM_B_ZHB_HZ, and QM_B_ZHB_SJZZ.

[0030] The tenth wall material is woven fabric. Its characteristics are: made of cotton, linen and textiles, mostly white in color, with patterns and smooth surface. It is denoted as QM_B_ZB. It is divided into two subcategories according to different characteristics. They are denoted as QM_B_ZB_MGB and QM_B_ZB_HZ.

[0031] The 11th wall material is granite. Its characteristics are: uniform texture, mostly yellow, white and black colors, and uniform and dense spotted texture due to the presence of quartz. The shapes are mostly block and strip. It is recorded as QM_S_HGS.

[0032] The 12th wall material is marble. Its characteristics are: fine matrix, uneven particle size, striped texture due to the presence of banded minerals. The colors are gray, white, cyan and yellow. The shapes are mostly block and strip. It is recorded as QM_S_DLS.

[0033] The 13th wall material is sandstone. Its characteristics are: light brown or red in color, fine surface, stable texture, no impurities, and frosted texture. The shapes are mostly block and strip. It is recorded as QM_S_SS.

[0034] The 14th wall material is slate. Its characteristics are: due to its structure, it is in the shape of a plate or flat strip, and its surface is uneven. The color is mostly blue or gray. It is recorded as QM_S_BS.

[0035] The 15th wall material is pebbles. Its characteristics are: due to river erosion, the shapes are mostly round or oval, without edges and corners. The surface is smooth. The color is mostly yellow or white. It is recorded as QM_S_LS.

[0036] The 16th wall material is volcanic stone. Its characteristics are: the surface has pores, is honeycomb-shaped, is mainly black in color, and is mostly block-shaped. It is recorded as QM_S_HSS.

[0037] The 17th wall material is oyster shell. Its characteristics are: the wall made of oyster shell is mostly grayish white in color. It is recorded as QM_TS_HK.

[0038] The 18th wall material is bark. Its characteristics are: it is made of bark of birch, fir and other trees, and its color is grayish white or dark brown, and is recorded as QM_M_SP.

[0039] Furthermore, the image requirements of the training set T, validation set Y, and test data set D used in step S2 are as follows: (1) Since YOLOv8 is a target detection algorithm, it identifies the target object and its location information in the image by analyzing and processing the input image. In the model algorithm, the default image size is set to 640 pixels. If the image pixels used for training recognition are lower than this precision, the accuracy of model recognition will be affected. In addition, to ensure that the characteristics of traditional building materials can be accurately identified, the photos should clearly show the color, material, texture, etc. of each type of material. Therefore, when constructing the data set D, the image size is selected to be no less than 640*640, and the image format is jpg.

[0040] (2) Since the recognition method of the present invention is a recognition method for building materials, the recognition subject is traditional Chinese residential buildings, and the recognition parts are the building enclosures, namely the roofs and walls. In order to avoid the difficulty in recognizing the characteristics of the building materials in the image due to the small area of ​​the characteristic pixels of the building materials in the training process, it is necessary to ensure that the collected image content should contain one or more complete walls and roofs.

[0041] (3) Since the traditional residential building materials to be identified and detected are mainly the walls and roofs of the buildings, the selection of image angle is critical. To ensure the final recognition effect, the selected images should be mainly front-facing photos, and the angle of side photos should not exceed 30°. Images with shooting angles that are too tilted will not be used as training set data.

[0042] Furthermore, in step S2, since there is currently no public dataset of Chinese traditional residential building material types for use in the present invention, the present invention collects and produces a training set T and a verification set Y of traditional residential building material types.

[0043] The image collection process is as follows: Based on the characteristics and composition of the above-mentioned types of materials, determine the image examples of building material types ( Figure 2a and Figure 2b ), enter "building material type + traditional dwellings / residential buildings" as keywords in the public image data platform, and obtain images of traditional residential buildings containing one or more types of materials by comparing with the determined image examples. Since the collected data images often contain multiple materials, one image can form multiple training sample labels. Therefore, when calculating the sample size of each secondary classification training data, the images are classified according to the material that accounts for the largest proportion in the image, and the number of each secondary classification image is guaranteed to be no less than 120, that is, the total image data volume of the final training set T and verification set Y is no less than 3,600.

[0044] The collected datasets are annotated using the LabelMe image annotation tool. LabelMe is an open source image annotation tool designed to help users create image datasets, especially for image annotation in computer vision tasks. It provides an intuitive graphical user interface (GUI) that allows users to easily annotate objects in images, such as rectangles, circles, polygons, and other shapes. LabelMe supports a variety of annotation methods, including object classification, bounding box annotation, segmentation annotation, etc., and is widely used in object detection, image segmentation, deep learning model training and other fields. LabelMe's annotation results are usually saved in JSON format, which contains the coordinates and category information of each annotated object.

[0045] Specifically, all wall and roof materials appearing in each image are marked according to the outer contour lines. Since the final detection is based on the segmentation function of the YOLO series, the image mask formed by the outer contour lines is crucial for recognition accuracy. At the same time, the marked coordinate anchor points should be within the image border to prevent out-of-bounds errors during data loading or data expansion.

[0046] Furthermore, in step S3, the selected YOLOv8-seg pre-trained weight model is a publicly published object detection and image segmentation model. There are many versions of the YOLOv8-seg pre-trained weight model, among which the YOLOv8x-seg series pre-trained weight models perform best in terms of accuracy, detection precision and performance, and are suitable for scenes requiring high-precision target detection. The use scenario of the present invention is the identification of building material types of traditional Chinese dwellings. The image scenes are complex, and the materials are rich in color and diverse in shape. The use of YOLOv8x-seg can improve the precision and accuracy of model recognition. How to obtain the YOLOv8x-seg pre-trained weight model: Download the YOLOv8 network data configuration file from the official website of the code and software development platform GitHub.

[0047] Specifically, the network structure of the YOLOv8 model includes an input end, a Backbone network, a Neck network, and a Head output end connected in sequence. The process of inputting the training set T, the verification set Y, and the image set D to be identified into the YOLOv8 network model for model training is as follows: (1) Input: Image preprocessing. The labeled training set and validation set are sent to the input of the model. The input preprocesses the images in the training set. The preprocessing includes adaptive image resizing and converting segmentation labels into masks, and then normalizing them. (2) Backbone network: image feature extraction. The preprocessed image enters the Backbone network, which includes the CBS module, C2F module, and SPPF module. The CBS module performs convolution on the input image, the C2F module extracts image features, and the SPPF module splices the data results, ultimately obtaining feature maps of three different scales. (3) Neck network: image feature fusion. The three feature maps of different scales obtained in the previous step are input for feature fusion. The features extracted by the feature extraction module are used by FPN+PAN to enable the model to obtain feature maps of three scales. (4) Prediction output: The feature map obtained in the previous step is input into the Head output end, thereby obtaining the position of the mask, the position of the prediction box, the category and the confidence level. In the training phase, the prediction box is matched with the true box to obtain positive and negative samples, and then the weight parameters are adjusted by calculating the loss function. In the verification phase, the prediction box is screened by weighted non-maximum suppression, and the model parameters are continuously optimized by calculating the accuracy and average precision.

[0048] Furthermore, in step S3, the transfer learning training process of training and acquiring the Chinese traditional residential building material type recognition model is as follows: (1) Custom configuration file: Customize the YOLOv8 network model data configuration file wjm2.yaml, including filling in the path of the dataset, the number of categories nc, and the names of the identified categories names; (2) Tuning parameters and training model: Place the set wjm2.yaml file into a computer with a configured environment; load the YOLOv8x-seg pre-trained weight model, whose format is yolov8x-seg.pt, and obtain the network model initialization parameters; load the training set T and the validation set Y, set the YOLOv8x-seg pre-trained weight model hyperparameters, set the number of training iterations to 500 generations, the initial learning rate to 0.01, the weight decay rate to 0.001, the batch size to 30 and start training; repeat the training process to allow the YOLOv8x-seg pre-trained weight model to gradually converge, and continuously adjust the data set through the validation set test to enable it to have generalization ability and improved accuracy.

[0049] (3) Model acquisition: During the training process, the validation set Y verification result data is observed in real time. After the training is completed, the optimal model BEST.pt is saved and recorded as the Chinese traditional residential building material type recognition model.

[0050] S5. Create a test data set: collect images on the public image data website in the form of "county-level administrative unit + traditional dwellings" to form a test data set D; S6. Test the model for identifying building material types of traditional Chinese dwellings: input the images in the test data set D into the model for identifying building material types of traditional Chinese dwellings for identification; set the image to be saved in txt document, and obtain the building material type identification results and txt document results of each traditional dwelling image by calculation. The image recognition results include material type labels, detection frames, masks, and confidence scores. Each detection frame corresponds to a material type, mask, and confidence score. The detection frame defines the rectangular boundary of the material type area, the mask indicates the specific shape and position of the building material appearing in the image, and the confidence indicates the probability of the material existing in the detection frame and the degree of certainty that the existing material belongs to a certain category; the txt document results include the category and the location information of the detection frame.

[0051] Furthermore, in step S5, the test data set D is the images of traditional dwellings of various county-level administrative units in China. The images are collected using a public image data website, and the keywords "name of China's county-level unit" + "traditional dwellings" are entered for searching. The images of traditional dwellings of the county-level administrative unit are verified and obtained, and named after the county-level unit to produce a test data set D with geographic semantic information. The use of county-level administrative units mainly has the following considerations: First, the purpose of the present invention is to identify the building materials of various types of traditional dwellings in China, and the images must have the semantics of national geographic spatial information. Secondly, at the scale of counties, the materials used for building construction are similar. At a larger level of administrative units such as provinces and cities, the geographical environment range is too large, which easily leads to weak characteristics of type distribution. At the smaller scale of townships, there are fewer sources of available image data sets, and it is difficult and time-consuming to obtain comprehensive data.

[0052] In step S6, the images in the test data set D are input into the Chinese traditional residential building material type recognition model for calculation, and the txt document result is set to be saved to obtain the image recognition result and txt document result of each traditional residential building; the image recognition result includes the material type label, detection frame, mask, and confidence score, and one detection frame corresponds to one category, mask, and confidence score. Among them, the detection frame defines the regional rectangular boundary of the material type, the mask represents the specific shape and position of the building material appearing in the image, and the confidence represents the probability of the existence of the material in the detection frame and the degree of certainty that the existing material belongs to a certain category; the txt document result includes the category and the location information of the detection frame.

[0053] Specifically, the image recognition results of each traditional dwelling are written into a separate txt file, and the txt file name is consistent with the source image; each txt file contains one or more records, and a record corresponds to the category recognition result and mask location information of an object in a detection box in the image recognition result. Specifically, each record contains the following information: ① Category. 0, corresponding to QM_B_ZB_MGB; 1, corresponding to QM_B_ZB_HZ; 2, QM_B_ZHB_HZ; 3, corresponding to QM_B_ZHB_SJZZ; 4, corresponding to QM_B_ZHB_FBB; 5, corresponding to QM_M_MB; 6, corresponding to QM_M_MZ; 7, corresponding to QM_T_HT; 8, corresponding to QM_T_TP; 9, corresponding to QM_Z_QZ; 10, corresponding to QM_Z_HZ; 11, corresponding to QM_S_DLS; 12, corresponding to QM_S_SS; 13, corresponding to QM_S_HGS; 14, corresponding to QM_S_BS; 15, corresponding to QM_S_HSS; 16, corresponding to QM_S_LS; 17, corresponding to Q M_Z_ZM; 18, corresponds to QM_Z_ZG; 19, corresponds to QM_TS_HK; 20, corresponds to QM_S_XWY; 21, corresponds to WM_W_MW; 22, corresponds to WM_W_HW; 23, corresponds to WM_W_QW; 24, corresponds to WM_W_LLW_HS; 25, corresponds to WM_W_LLW_LS; 26, corresponds to WM_S_SY; 27, corresponds to WM_S_YY; 28, corresponds to WM_C_MJC; 29, corresponds to WM_C_HC; 30, corresponds to WM_C_MC; 31, corresponds to WM_M_MBP; 32, corresponds to WM_M_SP; 33, corresponds to WM_T_MN; 34, corresponds to QM_M_SP.

[0054] ② Mask coordinate points. They record the specific position and shape of a certain type of building material in the image. They can be used to calculate the area, shape, proportion and other spatial features of the material type. The purpose of retaining the txt document results containing the coordinate points is to enrich the recognition results of the types of traditional residential building materials, which is an important basis for subsequent practical applications and research and analysis.

[0055] In a second aspect, the present invention provides a light traditional residential building material type identification system, which is used to execute the above-mentioned traditional residential building material type identification method, and the traditional residential building material type identification system comprises: The building material type standard building module is used to summarize and obtain the types of building materials for traditional Chinese residential buildings based on public literature and material characteristics. The building materials for traditional Chinese residential buildings are divided into 30 types, including 12 types of roofing materials and 18 types of wall materials. The training set and verification set production module is used to collect images from public image data websites using the keyword "material type + traditional dwellings", and divide the collected data set into a training set T and a verification set Y in a ratio of 8:2. The training set T and the verification set Y both contain 30 types of materials, and perform image annotation on the building material types in the images of the training set T and the verification set Y; The recognition model training module is used to use the training set T produced by the previous training set and verification set production module to train on the basis of the YOLOv8x-seg pre-trained model, and to verify on the verification set Y to obtain a Chinese traditional residential building material type recognition model; The residential building image recognition module is used to input the image containing the traditional Chinese residential building to be tested into the traditional residential building material type recognition model for recognition, and obtain the building material type recognition result in the image by calculation.

[0056] In a third aspect, the present invention provides an electronic device, comprising a processor and a memory for storing a program executable by the processor, wherein when the processor executes the program stored in the memory, the above-mentioned method for identifying the type of building materials of traditional residential buildings is implemented.

[0057] In a fourth aspect, the present invention provides a storage medium storing a program, which, when executed by a processor, implements the above-mentioned method for identifying the type of building materials of traditional residential buildings.

[0058] Compared with the prior art, the present invention has the following advantages and beneficial effects: (1) Based on the YOLOv8x-seg pre-trained model and combined with the self-collected building residential data set, this method proposes an innovative model specifically for the rapid identification and detection of building residential materials. This method fills the gap in the current field of traditional building material image recognition and provides technical support for the efficient and accurate identification of various building materials. By deeply optimizing the YOLOv8x-seg pre-trained model and adjusting it to the particularity of traditional residential building materials, we modify the hyperparameters and optimize the model structure to make it more suitable for material identification and detection tasks in this field. During the model optimization process, the weight decay rate is particularly adjusted to enhance the generalization ability of the model. This improvement enables the model to show higher recognition accuracy in different types of building materials and different building parts. Through this optimization, we can more accurately identify various material types in traditional residential buildings, which not only improves the accuracy of detection, but also expands the scope of application of the model. The application of this technology will greatly promote the digital protection and restoration of traditional building materials.

[0059] (2) The method of the present invention comprehensively applies the classification theories of multiple disciplines such as architecture, typology, botany, and materials science to carry out a refined subdivision of the types of building materials for traditional Chinese residential buildings. By referring to a large number of relevant literature and combining actual survey data, 30 representative types of traditional building materials are systematically summarized and refined. These material types cover the types of traditional residential building materials in various regions across the country. Corresponding image data are carefully selected for each material type, and a high-quality training data set is constructed. This data set contains image data of 30 types of traditional residential building materials, covering traditional material types in different regions, different architectural styles, and usage scenarios, and has strong representativeness and wide adaptability. Through the training of these data, the present invention realizes the accurate identification of traditional residential building materials across the country, ensuring that all types of traditional materials in traditional residential buildings can be effectively identified and classified, and achieving the full coverage effect of the identification of traditional residential building material types across the country.

[0060] (3) The technology of the present invention can be used for rapid identification and detection of traditional residential building materials across the country. By using the detection model formed by this technology and relying on data from public image data websites, the distribution of different types of traditional residential building materials across the country can be effectively studied. This greatly reduces the human and material costs required for the research. Ultimately, the research results will help to apply traditional building materials with regional characteristics in the protection and restoration of traditional residential buildings across the country. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0062] Figure 1 It is a flowchart of the steps of a method for identifying the type of building materials of traditional Chinese dwellings based on a target detection algorithm disclosed in the present invention; Figure 2a This is an example diagram of some roofing material types among the 30 types of building materials disclosed in the present invention. Figure 2b It is an example diagram of another part of the wall material types among the 30 types of building materials disclosed in the present invention; Figure 3a It is a record diagram of some optimal model training parameters obtained after multiple experiments in Example 1 of the present invention; Figure 3b is another part of the optimal model training parameter record diagram obtained after multiple experiments in Example 1 of the present invention; Figure 4is a partial image recognition result of the image set D to be recognized input into the recognition model in Embodiment 1 of the present invention; Figure 5a is a schematic diagram comparing a portion of the recognition results of the models in Examples 1 and 2 of the present invention, Figure 5b is a schematic diagram comparing another part of the recognition results of the models in Examples 1 and 2 of the present invention, Figure 5c is a schematic diagram comparing another part of the recognition results of the models in Examples 1 and 2 of the present invention; Figure 6 is a structural block diagram of a system for identifying building material types of traditional Chinese dwellings in Embodiment 3 of the present invention; Figure 7 It is a structural block diagram of an electronic device in embodiment 4 of the present invention. DETAILED DESCRIPTION

[0063] In order to make the implementation purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all 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.

[0064] Example 1 This embodiment specifically discloses a method for identifying the types of building materials of traditional Chinese dwellings based on a target detection algorithm. Figure 1 As shown, the identification method includes the following steps: S1. Construct the type standard of building materials for traditional Chinese residential buildings: The types of building materials for traditional Chinese residential buildings are obtained by sorting out the public literature data, and are summarized into 12 types of roof materials and 18 types of wall materials according to the type standard of building materials for traditional Chinese residential buildings; In step S1 of this embodiment, the construction of the types of building materials for traditional Chinese residential buildings is based on a large amount of literature combing and expert opinions, forming 30 main types of traditional residential building materials covering various regions of China. Building materials are classified according to the characteristics, colors, shapes, construction application methods and types of each type of material. Due to the differences in color and construction techniques of different building materials, the image characteristics of the same material type will be quite different, thus affecting the accuracy of model recognition. Therefore, on the basis of the original basic material types, small categories are subdivided for some material types. Finally, the 34 subdivided material types are obtained, as shown in Table 1.

[0065] Table 1. Information on types of building materials for traditional dwellings

[0066] In the training set T of this embodiment, there are 3599 sample images of 34 subdivided types of traditional dwellings, and the total number of samples is 19086. In the verification set Y of this embodiment, there are 900 sample images of 34 target types of traditional dwellings, and the total number of samples is 5323. The collected data set is annotated by the Labelme image annotation tool. Specifically, all wall and roof materials appearing in each picture are annotated according to the outer contour lines.

[0067] S3. Training recognition model: Use the training set T produced in the previous step to train on the basis of the YOLOv8x pre-trained weight model, and verify on the verification set Y to obtain a recognition model for the types of building materials of traditional Chinese dwellings; In step S4 of this embodiment, the transfer learning training process of training and acquiring the Chinese traditional residential building material type recognition model is as follows: (1) Custom configuration file: Customize the YOLOv8 network model data configuration file wjm2.yaml, including filling in the path of the dataset, the number of categories nc is 34, and the identification category names names are QM_B_ZB_MGB; QM_B_ZB_HZ; QM_B_ZHB_HZ; QM_B_ZHB_SJZZ; QM_B_ZHB_FBB; QM_M_MB; QM_M_MZ; QM_T_HT; QM_T_TP; QM_Z_QZ; QM_Z_HZ; QM_S_DLS;QM_S_SS;QM_S_HGS;QM_S_BS;QM_S_HSS;QM_S_LS;QM_Z_ZM;QM_Z_ZG;QM_TS_HK; _W_QW;WM_W_LLW_HS;WM_W_LLW_LS;WM_S_SY;WM_S_YY;WM_C_MJC;WM_C_HC;WM_C_MC;WM_M_MBP;WM_M_SP;WM_T_MN;QM_M_SP (2) Tuning parameters and training model: Place the set wjm2.yaml file into a computer with a configured environment; load the YOLOv8x-seg pre-trained weight model, whose format is yolov8x-seg.pt, and obtain the network model initialization parameters; load the training set T and the validation set Y, set the YOLOv8x pre-trained weight model hyperparameters, set the number of training iterations to 500 generations, the initial learning rate to 0.01, the weight decay rate to 0.001, the batch size to 30 and start training; repeat the training process to allow YOLOv8 to gradually converge, and continuously adjust the data set through the validation set test to enable it to have generalization ability and improved accuracy.

[0068] (3) Model acquisition: During the training process, the validation set Y validation result data is observed in real time. After the training is completed, the optimal model BEST.pt is saved and recorded as the Chinese traditional residential roof type recognition model. The training result data of the Chinese traditional residential roof type recognition model in the validation set are as follows: the detection box (Box) Precision is 0.70, Recall is 0.65, mAP@0.5 is 0.66, and mAP@0.5:0.95 is 0.53. The mask (Mask) Precision is 0.70, Recall is 0.66, mAP@0.5 is 0.67, and mAP@0.5:0.95 is 0.50. After the training is completed, the optimal model BEST.pt is saved; the Precision value represents the precision rate, the Recall value represents the recall rate, the mAP@0.5 value represents the average precision value, and the mAP@0.5:0.95 value represents the average precision value at different intersection-over-union thresholds.

[0069] Figure 3a and Figure 3b is a record diagram of the optimal model training parameters obtained after multiple experiments in Example 1 of the present invention, Figure 3a Here, train / box_loss represents the loss function result of the detection box in training; train / seg_loss represents the loss function result of the segmentation mask in training; train / cls_loss represents the loss function result of the classification in training; train / dfl_loss represents the loss function result of the feature point in training; accordingly, val / box_loss, val / seg_loss, val / cls_loss, and val / dfl_loss represent the loss function results of the detection box, segmentation mask, classification, and feature point in prediction, respectively. Figure 3b In the table, metrics / precision (B) indicates the precision calculation result of the detection box; metrics / recall (B) indicates the recall calculation result of the detection box; metrics / mAP50 (B) indicates the average precision of the detection box when the iou threshold is greater than 50; metrics / mAP50-95 (B) indicates the average precision of the detection box during the iou threshold of 50-95. Correspondingly, metrics / precision (M), metrics / recall (M), metrics / mAP50-95 (M), and metrics / mAP50-95 (M) indicate the calculation results of the precision, recall, and average precision of the mask. The y-axis in the parameter record diagram indicates the value of each training result, and the x-axis indicates the number of training rounds (epochs).

[0070] Figure 3aThe training curves of the four loss indicators related to "train / " in the figure are decreasing, indicating that the training effect is gradually improving and the loss value is showing a decreasing trend. Specifically, the curve of train / cls_loss tends to converge after 100 rounds, indicating that under the current data and optimization conditions, the classification training of traditional residential building materials has reached a good state. train / dfl_loss tends to converge after 150 rounds, indicating that the focus capture training of the characteristics of various types of materials in traditional residential buildings is good during training. The above two indicators prove the scientificity and effectiveness of this method in the classification of traditional residential building materials. The curves of train / box_loss and train / seg_loss do not converge until 200 rounds, indicating that under the current data and optimization conditions, the model converges slowly. The indicators related to "val / " also prove that the verification effect is general due to the incomplete data of some types of traditional residential building materials or the existence of some feature differences. Figure 3b The accuracy indicators related to "metrics / " in the figure show that the current model has a high detection precision and a good recall, while the recall of the mask is slightly higher than that of the detection box, indicating that the model has a stronger ability to capture targets in the segmentation task. It also proves that the training of the Chinese traditional residential building material type recognition model is indeed more suitable for the use of the segmentation model for related recognition and detection training. When the IoU threshold is 0.5, the average accuracy is high, indicating that the model has good positioning ability under the standard threshold. However, as the IoU threshold increases, the model recognition performance decreases significantly, indicating that the model's ability to predict boundaries or details is insufficient.

[0071] Overall, Figure 3a and Figure 3b The indicators prove the correctness of using the segmentation model to study this method and the scientificity and effectiveness of this method in the classification of traditional residential building materials. The model trained under the current data and optimization conditions has a good recognition effect and is capable of general recognition and detection tasks. However, due to the limited amount of current data samples, the performance of the model is weak under higher precision requirements, and the generalization ability is insufficient, which needs to be further improved.

[0072] S4, obtaining images of traditional Chinese dwellings: obtaining images of traditional Chinese dwellings from a public image data website to form an image set D to be identified; In step S4 of this embodiment, the image set D to be identified is the images of traditional dwellings of various county-level administrative units in China. First, images of traditional Chinese dwellings are downloaded from public websites such as Bing, Google, and Baidu. The keywords "name of Chinese county-level unit" + "traditional dwellings" are input for search, and the images of traditional dwellings of the county-level administrative unit are checked and obtained, and named after the county-level unit to produce the image set D to be identified with geographic semantic information. In order to avoid missing detection due to too few characteristic pixels of small-scale traditional Chinese residential buildings after convolution, the image set to be identified in step S1 needs to ensure that the proportion of the main body of the traditional residential building in the image is greater than or equal to 50% of the image pixels, and the image format is jpg. In this embodiment, a total of 69,169 images of traditional dwellings of various county-level administrative units in China are obtained from 2,843 county-level administrative units.

[0073] S5. Identify the types of building materials for traditional Chinese dwellings: Input the images in the to-be-identified image set D into the traditional dwelling building material type identification model for identification, and obtain the identification results of the building material type in each image by calculation.

[0074] In step S5 of this embodiment, the images in the image set D to be identified are input into the Chinese traditional residential building material type identification model for calculation, and the txt document result is set to be saved to obtain the image recognition result and txt document result of each traditional residential building; the image recognition result includes the material type label, detection frame, mask, and confidence score, and one detection frame corresponds to one category, mask, and confidence score. Among them, the detection frame defines the regional rectangular boundary of the material type, the mask represents the specific shape and position of the building material appearing in the image, and the confidence represents the probability of the existence of the material in the detection frame and the degree of certainty that the existing material belongs to a certain category; the txt document result includes the category and the location information of the detection frame.

[0075] Specifically, the image recognition results of each traditional dwelling are written into a separate txt file, and the txt file name is consistent with the source image; each txt file contains one or more records, and a record corresponds to the category recognition result and mask location information of an object in a detection box in the image recognition result. Specifically, each record contains the following information: ① Category. 0, corresponding to QM_B_ZB_MGB; 1, corresponding to QM_B_ZB_HZ; 2, QM_B_ZHB_HZ; 3, corresponding to QM_B_ZHB_SJZZ; 4, corresponding to QM_B_ZHB_FBB; 5, corresponding to QM_M_MB; 6, corresponding to QM_M_MZ; 7, corresponding to QM_T_HT; 8, corresponding to QM_T_TP; 9, corresponding to QM_Z_QZ; 10, corresponding to QM_Z_HZ; 11, corresponding to QM_S_DLS; 12, corresponding to QM_S_SS; 13, corresponding to QM_S_HGS; 14, corresponding to QM_S_BS; 15, corresponding to QM_S_HSS; 16, corresponding to QM_S_LS; 17, corresponding to Q M_Z_ZM; 18, corresponds to QM_Z_ZG; 19, corresponds to QM_TS_HK; 20, corresponds to QM_S_XWY; 21, corresponds to WM_W_MW; 22, corresponds to WM_W_HW; 23, corresponds to WM_W_QW; 24, corresponds to WM_W_LLW_HS; 25, corresponds to WM_W_LLW_LS; 26, corresponds to WM_S_SY; 27, corresponds to WM_S_YY; 28, corresponds to WM_C_MJC; 29, corresponds to WM_C_HC; 30, corresponds to WM_C_MC; 31, corresponds to WM_M_MBP; 32, corresponds to WM_M_SP; 33, corresponds to WM_T_MN; 34, corresponds to QM_M_SP.

[0076] ② Mask coordinate points. Mask coordinate points that record the type of segmented material.

[0077] Example 2 The method of this embodiment is substantially the same as that of the embodiment 1 provided, with the main difference being that in step S4, in the hyperparameter setting of the YOLOv8x-seg pre-trained weight model, the weight decay rate is adjusted to 0.0005. The weight decay rate is a regularization term applied to the model parameters each time the model weight is updated to prevent the model from overfitting. The total loss function is expressed as:

[0078] Among them, L_total is the total loss function; L is the original loss function, which is used to measure the gap between the model detection results and the actual results; λ is the weight decay rate; is the sum of the squares of all model weights; represents the regularization term, Represents the i-th weight parameter in the model, which is used to control the complexity of the model and reduce the weight decay rate to 0.0005.

[0079] The total number of samples and the total number of samples in the original training set T in this embodiment are the same as those in Embodiment 1. The training set T is input into the YOLOv8 network model for model training and verified by the verification set Y. The obtained optimal model is saved as BEST2.pt. The comparison with the model evaluation data of Embodiment 1 is shown in Table 2: Table 2. Comparison of model evaluation data between Example 1 and Example 2

[0080] Among them, Box is the detection box, Mask is the mask, Precision value represents the precision rate, Recall value represents the recall rate, mAP@0.5 value represents the average precision value, and mAP@0.5:0.95 value represents the average precision value at different intersection-over-union ratio thresholds.

[0081] In Example 2, the weight decay rate in the model parameters is reduced, so that the model maintains a large weight value during the training process. This practice increases the dependence on specific training samples and reduces the generalization ability of the model. Therefore, compared with the high-weight training model, the recognition performance of the model trained in Example 2 is slightly reduced. When verifying the verification set Y, the precision of Box and Mask is slightly increased, the recall rate is slightly decreased, and the confidence in the performance of the image recognition results is slightly decreased (as shown in Table 2).

[0082] like Figure 5a As shown, the left picture shows the image recognition result of a certain image in the prediction set D to be identified in Example 1, and 2 parts of materials are identified, namely roof tile materials and wall brick materials, with confidence levels of 0.84 and 0.36 respectively; the right picture shows the image recognition result of Example 2 for the same image, and 4 parts of materials are identified. The confidence levels of the materials in the same parts as in Example 1 are 0.78 and 0.38, and the confidence levels of 2 more wall brick materials are identified, with confidence levels of 0.61 and 0.82. On the one hand, it shows that reducing the weight decay rate enhances the generalization ability of the model and improves the recognition ability, and identifies the building materials that were not identified by the model in Example 1. On the other hand, it also shows that reducing the weight decay rate will increase the confidence scores of the originally identified materials with low confidence levels and decrease those with high confidence levels. In general, the recognition ability improves. Similarly, Figure 5b It also shows that the recognition ability of Example 2 has improved, and it correctly recognizes the building roof materials that were not recognized in Example 1. The left picture shows the image recognition result of a certain image in the prediction set D to be recognized in Example 1, and 2 parts of blue tile materials are recognized. The right picture shows the image recognition result of Example 2 for the same image, and 3 parts of blue tile materials are recognized.

[0083] In addition, reducing the weight decay rate will also cause the problem of misidentification due to enhanced generalization ability. Figure 5cAs shown, the left picture shows the image recognition result of a certain image in the prediction set D to be identified in Example 1. After verification, the Best.pt model correctly identifies the type and area shape of the rammed earth wall material. The right picture shows the image recognition result of Example 2 for the same image. After verification, the recognition result of the Best2.pt model misidentifies the building wall foundation part in the lower right corner of the picture as rammed earth, expanding the area of ​​rammed earth type material recognition.

[0084] Example 3 Reference Figure 6 The present invention provides a light traditional residential building material type recognition system, which is used to execute the above-mentioned traditional residential building material type recognition method. The traditional residential building material type recognition system includes: a building material type standard construction module 601, a training set and verification set preparation module 602, a recognition model training module 603 and a residential building image recognition module 604, which are connected in sequence, wherein: Building material type standard construction module 601 is used to summarize and obtain the types of building materials for traditional Chinese residential buildings based on public literature and material characteristics, and divide the building materials for traditional Chinese residential buildings into 30 types, including 12 types of roofing materials and 18 types of wall materials; The training set and verification set preparation module 602 is used to collect images from a public image data website using the keyword "material type + traditional dwellings", divide the collected data set into a training set T and a verification set Y in a ratio of 8:2, wherein both the training set T and the verification set Y contain 30 material types, and annotate the building material types in the images of the training set T and the verification set Y; The recognition model training module 603 is used to use the training set T produced by the previous training set and verification set production module to perform training on the basis of the YOLOv8x-seg pre-training model, and to perform verification on the verification set Y to obtain a Chinese traditional residential building material type recognition model; The residential building image recognition module 604 is used to input the image containing the traditional Chinese residential building to be tested into the traditional residential building material type recognition model for recognition, and obtain the building material type recognition result in the image by calculation.

[0085] Example 4 This embodiment provides an electronic device, which may be a computer. Figure 7As shown, a processor 702, a memory, an input device 703, a display 704 and a network interface 705 connected via a system bus 701 are provided. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium 706 and an internal memory 707. The non-volatile storage medium 706 stores an operating system, a computer program and a database. The internal memory 707 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the processor 702 executes the computer program stored in the memory, a method for identifying the type of light traditional residential building materials proposed in the above embodiment 1 is implemented. The method for identifying the type of traditional residential building materials includes the following steps: S1. Construct the type standard of traditional residential building materials: Based on the public literature and material characteristics, the types of traditional Chinese residential building materials are summarized and classified into 30 types, including 12 types of roofing materials and 18 types of wall materials, including 34 material subdivision types; S2. Create training set and validation set: collect images from public image data websites using the keyword "material type + traditional dwellings", divide the collected data set into training set T and validation set Y in a ratio of 8:2, each of which contains 30 material types, and annotate the building material types in the images of training set T and validation set Y; S3. Training recognition model: Use the training set T produced in the previous step to train on the basis of the YOLOv8x-seg pre-trained model, and verify it on the verification set Y to obtain a model for identifying the types of building materials for traditional Chinese dwellings. S4. Inputting the image containing the traditional Chinese residential building to be tested into the traditional residential building material type recognition model for recognition, and obtaining the building material type recognition result in the image by calculation.

[0086] Example 5 This embodiment provides a storage medium, which is a computer-readable storage medium, storing a computer program. When the computer program is executed by a processor, a method for identifying the type of traditional residential building materials proposed in the above embodiment 1 is implemented. The method for identifying the type of traditional residential building materials includes the following steps: S1. Construct the type standard of traditional residential building materials: Based on the public literature and material characteristics, the types of traditional Chinese residential building materials are summarized and classified into 30 types, including 12 types of roofing materials and 18 types of wall materials, including 34 material subdivision types; S2. Create training set and validation set: collect images from public image data websites using the keyword "material type + traditional dwellings", divide the collected data set into training set T and validation set Y in a ratio of 8:2, each of which contains 30 material types, and annotate the building material types in the images of training set T and validation set Y; S3. Training recognition model: Use the training set T produced in the previous step to train on the basis of the YOLOv8x-seg pre-trained model, and verify it on the verification set Y to obtain a model for identifying the types of building materials for traditional Chinese dwellings. S4. Inputting the image containing the traditional Chinese residential building to be tested into the traditional residential building material type recognition model for recognition, and obtaining the building material type recognition result in the image by calculation.

[0087] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0088] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0089] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A method for identifying the types of traditional residential building materials based on a target detection algorithm, characterized in that: The method for identifying the type of building materials of traditional residential buildings is aimed at identifying the traditional Chinese residential buildings, and the identification part is the enclosure part of the building including the roof and the wall, and comprises the following steps: S1. Construct the type standard of traditional residential building materials: Based on the public literature and material characteristics, the types of traditional Chinese residential building materials are summarized and classified into 30 types, including 12 types of roofing materials and 18 types of wall materials; S2. Create training set and validation set: collect images from public image data websites using the keyword "material type + traditional dwellings", divide the collected data set into training set T and validation set Y in a ratio of 8:2, and both training set T and validation set Y contain 30 types of materials. Annotate the building material types in the images of training set T and validation set Y; S3. Training recognition model: Use the training set T produced in the previous step to train on the basis of the YOLOv8x-seg pre-trained model, and verify it on the verification set Y to obtain a model for identifying the types of building materials for traditional Chinese dwellings. S4. Inputting the image containing the traditional Chinese residential building to be tested into the traditional residential building material type recognition model for recognition, and obtaining the building material type recognition result in the image by calculation.

2. The method for identifying the type of traditional residential building materials according to claim 1, characterized in that: In step S1, the classification of Chinese traditional residential building materials is based on the material application enclosure parts in the construction process as the division plate, and the roof and wall are used as the identification parts to divide the material types. Based on the classification of 6 natural materials and 2 traditional Chinese building materials, a type classification including 12 roof materials and 18 wall materials is constructed, wherein: (1) Roofing materials: The first type of roofing material is green tiles, denoted by WM_W_QW; the second type of roofing material is red tiles, denoted by WM_W_HW; the third type of roofing material is glazed tiles, denoted by WM_W_LLW; the fourth type of roofing material is Burmese tiles, denoted by WM_W_MW; the fifth type of roofing material is seaweed, denoted by WM_C_HC; the sixth type of roofing material is thatch, denoted by WM_C_M C; the seventh roofing material type is wheat straw, recorded as WM_C_MJC; the eighth roofing material type is wood board, recorded as WM_M_MBP; the ninth roofing material type is bark, recorded as WM_M_SP; the tenth roofing material type is plaster, recorded as WM_T_MN; the eleventh roofing material type is sandstone, recorded as WM_S_SY; the twelfth roofing material type is shale, recorded as WM_S_YY; (2) Wall materials: The first type of wall material is blue brick, recorded as QM_Z_QZ; the second type of wall material is red brick, recorded as QM_Z_HZ; the third type of wall material is wooden board, recorded as QM_M_MB; the fourth type of wall material is log, recorded as QM_M_MZ; the fifth type of wall material is rammed earth, recorded as QM_T_HT; the sixth type of wall material is adobe, recorded as QM_T_TP; the seventh type of wall material is bamboo strips, recorded as QM_Z_ZM; the eighth type of wall material is bamboo poles, recorded as QM_Z_ZG; the ninth type of wall material is felt cloth, recorded as QM_ B_ZH; the 10th wall material is woven cloth, recorded as QM_B_ZB; the 11th wall material is granite, recorded as QM_S_HGS; the 12th wall material is marble, recorded as QM_S_DLS; the 13th wall material is sandstone, recorded as QM_S_SS; the 14th wall material is slate, recorded as QM_S_BS; the 15th wall material is pebble, recorded as QM_S_LS; the 16th wall material is volcanic stone, recorded as QM_S_HSS; the 17th wall material is oyster shell, recorded as QM_TS_HK; the 18th wall material is tree bark, recorded as QM_M_SP.

3. The method for identifying the type of traditional residential building materials according to claim 1, characterized in that: The images collected in the data set in step S2 should have the following characteristics: ① the image content of a single image should include the roof or wall part of a traditional building, and the appearance ratio should not be less than 30% of the image area; ② the image size is ≥640*640, and the image format is jpg.

4. The method for identifying the type of traditional residential building materials according to claim 1, characterized in that: In the step S2, the labeling method of the building material type in the images of the training set and the verification set is implemented by the Labelme image labeling tool, and the labeling process includes the following stages: ① image loading and preprocessing; ② labeling the building roof and wall parts in the image, the roof labeling forms a closed polygon along the outer contour line of a single building roof, each building roof forms a label separately, and multiple building roofs in the image need to be separately labeled, the wall labeling forms different polygons according to the wall area boundaries of different materials, each wall forms a polygon label, and different walls need to be separately labeled; ③ avoid non-building objects; ④ save and export the labeling results: after the labeling is completed, the result is saved as a JSON format file, which contains the coordinates and label information of each labeled area.

5. The method for identifying the type of traditional residential building materials according to claim 1, characterized in that: The process of training and obtaining the Chinese traditional residential building material type recognition model in step S3 is as follows: S31, set the initial parameters of the network data configuration file of the YOLOv8x-seg pre-training model and input the pre-training model; S32, use the pre-trained weight parameters of the YOLOv8x-seg pre-trained model; S33. Set the hyperparameters of the YOLOv8x-seg pre-training model, set the number of training iterations to 500 generations, the initial learning rate to 0.01, the weight decay rate to 0.001, and the batch size to 30, and then start training. S34. The trained model is verified on the verification set Y, and finally a Chinese traditional residential roof type recognition model is obtained.

6. The method for identifying the type of traditional residential building materials according to claim 1, characterized in that: The method for identifying the type of traditional residential building materials also includes the following steps: S5. Create a test data set: collect images on public image data websites in the form of "county-level administrative units + traditional dwellings" to form a test data set D; S6. Test the model for identifying building material types of traditional Chinese dwellings: input the images in the test data set D into the model for identifying building material types of traditional Chinese dwellings for identification; set the function of saving txt document results to be turned on, and obtain the building material type identification results and txt document results of each traditional dwelling image through calculation. The image recognition results include material type labels, detection frames, masks, and confidence scores. Each detection frame corresponds to a material type, mask, and confidence score. The detection frame defines the rectangular boundary of the material type area, the mask indicates the specific shape and position of the building material appearing in the image, and the confidence indicates the probability of the material existing in the detection frame and the degree of certainty that the existing material belongs to a certain category; the txt document results include the category and the location information of the detection frame.

7. A light traditional residential building material type identification system, used to execute the traditional residential building material type identification method according to any one of claims 1 to 6, characterized in that: The traditional residential building material type identification system comprises: The building material type standard building module is used to summarize and obtain the types of building materials for traditional Chinese residential buildings based on public literature and material characteristics. The building materials for traditional Chinese residential buildings are divided into 30 types, including 12 types of roofing materials and 18 types of wall materials. The training set and verification set production module is used to collect images from public image data websites using the keyword "material type + traditional dwellings", and divide the collected data set into a training set T and a verification set Y in a ratio of 8:

2. The training set T and the verification set Y both contain 30 types of materials, and the building material types in the images of the training set T and the verification set Y are annotated; The recognition model training module is used to use the training set T produced by the previous training set and verification set production module to train on the basis of the YOLOv8x-seg pre-trained model, and to verify on the verification set Y to obtain a Chinese traditional residential building material type recognition model; The residential building image recognition module is used to input the image containing the traditional Chinese residential building to be tested into the traditional residential building material type recognition model for recognition, and obtain the building material type recognition result in the image by calculation.

8. An electronic device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the method for identifying the type of traditional residential building materials described in any one of claims 1 to 6 is implemented.

9. A storage medium storing a program, characterized in that: When the program is executed by a processor, the method for identifying the type of traditional residential building materials described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Roof type identification method and device based on multi-source geographic information and remote sensing image

    CN117746247A

  • Computer Vision Systems and Methods for Segmenting and Classifying Building Components, Contents, Materials, and Attributes

    US20230185839A1

  • Deep neural network-based hakka walled village building geographic space positioning method

    WO2024125141A1