Historical and cultural block building roof gradient intelligent batch identification method applying YOLO

Through YOLO algorithm and deep learning technology, combined with image processing and cluster analysis, it solves the problems of low efficiency and high cost of roof slope identification in traditional methods, achieves efficient and accurate roof slope identification, and provides scientific protection and planning support. .

CN118608933APending Publication Date: 2024-09-06BEIJING UNIV OF TECH
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410471918.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-18
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Traditional methods have low efficiency, high cost, and high professional threshold when identifying the roof slopes of buildings in historical and cultural districts. They are difficult to adapt to large-scale and high-precision requirements, and there is a potential risk of damage to historical buildings.

Method used

The YOLO algorithm is combined with deep learning and image processing technology to identify the morphological features of building roofs by training deep neural networks to realize intelligent batch identification of roof slopes. OpenCV is used for edge detection and perspective correction, and finally K-means clustering analysis is performed through the SPSS platform. , obtain the roof slope interval.

Benefits of technology

It achieves efficient and accurate roof slope identification, reduces the difficulty of operation, avoids the intrusion of on-site measurements on historical buildings, provides scientific and efficient technical support, and provides real-time data for the protection and planning of historical and cultural blocks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608933A
    Figure CN118608933A
Patent Text Reader

Abstract

The invention discloses a historical and cultural block building roof slope intelligent batch identification method applying YOLO, and the method comprises the steps: collecting a large amount of historical and cultural block streetscape image data, learning the morphological characteristics of a building roof through a deep neural network, and achieving the intelligent and automatic identification and classification of the styles and features of the building roof, and achieving the intelligent batch identification of the slope of the building roof. And the gradient of the building roof is rapidly detected and calculated through an image processing technology. According to the method, the recognition efficiency and accuracy can be greatly improved, the actual operation threshold is low, meanwhile, complex and changeable block landscapes can be processed, and scientific and efficient technical support is provided for protection and planning of historical and cultural blocks. According to the method, the influence of urban environment factors on building visual perception is also considered, and the recognition model is further optimized by customizing category parameters of various style and feature elements, so that the recognition model is more suitable for an actual application scene, and more accurate data and technical support are provided for historical and cultural block heritage protection and style and feature genetic map construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an intelligent batch recognition method for roof slopes of buildings in a historical and cultural block using a YOLO algorithm, and belongs to the technical field of urban and rural planning heritage protection. Background Art

[0002] In the current field of urban planning, the protection and development of historical and cultural blocks face new challenges and opportunities. Especially in historical and cultural blocks, the roof slope of buildings not only reflects the era characteristics of their architectural style and construction technology, but is also an important part of the overall visual image and cultural connotation of the block. Therefore, the identification and analysis of the roof slope of buildings in historical and cultural blocks is of great significance for identifying, protecting, restoring and controlling the historical features of the blocks, enhancing the city's cultural identity, and promoting the development of cultural tourism.

[0003] Traditional methods for determining the roof slope values ​​of buildings in historical and cultural blocks mainly include field measurement, remote sensing technology, optical measurement, computer-aided design modeling, etc. Field measurement can provide accurate roof slope data, but it is very time-consuming and labor-intensive, especially for large or inaccessible roofs, and the measurement method also has the risk of damaging historical buildings; remote sensing technology is suitable for large-scale surveys and analysis, and the resolution and accuracy of images are limited; optical measurement can provide high-precision three-dimensional data and quickly obtain information, but the equipment cost is high and the operation requires high professional skills; computer-aided design allows flexible data analysis and visualization, but it relies on the accuracy of input data and requires high professional knowledge.

[0004] Due to the complexity of historical and cultural blocks and the diversity of architectural heritage, traditional roof slope identification methods rely on on-site manual measurement and visual judgment, are inefficient, costly, and have high professional barriers. They are difficult to adapt to the needs of large-scale and high-precision protection and renewal of historical and cultural blocks. With the rapid development of artificial intelligence technology, deep learning technology provides a new solution for measuring the slope of building roofs in historical and cultural blocks. Deep learning technology can process large amounts of complex data in batches, and has a strong ability to intelligently process image recognition tasks by training to identify patterns and features of data.

[0005] Therefore, the present invention proposes a method for identifying the slope of building roofs in historical and cultural blocks using the YOLO algorithm. This method can realize intelligent batch identification of the slope of building roofs in historical and cultural blocks in an efficient and accurate manner, taking into account both efficiency and accuracy, and providing a new perspective for detailed planning such as protection planning, control planning and revision of regulations, which is different from the previous method for determining the slope value of roofs. This method collects a large amount of street view image data of historical and cultural blocks, uses deep neural networks to learn the morphological characteristics of building roofs, realizes intelligent automatic identification and classification of style elements such as building roofs, and quickly detects and calculates the slope of building roofs through image processing technology. This method can not only greatly improve the efficiency and accuracy of identification, but also has a low threshold for actual operation, and can handle complex and changeable block landscapes at the same time, providing scientific and efficient technical support for the protection and planning of historical and cultural blocks. In addition, the invention also takes into account the influence of urban environmental factors on the visual perception of buildings, and further optimizes the recognition model by customizing the category parameters of multiple style elements, so that it is more in line with the actual application scenario, and provides more accurate data and technical support for the protection of heritage and the construction of style gene maps of historical and cultural blocks. Summary of the invention

[0006] In view of the above-mentioned existing problems and shortcomings, the present invention provides an intelligent batch identification method for the roof slopes of buildings in historical and cultural blocks using deep learning. On the one hand, it can efficiently and accurately identify and measure the roof slopes of historic buildings, providing a scientific basis for the protection and restoration of the buildings; on the other hand, it can realize dynamic monitoring of the roof slopes of block buildings, provide real-time data support for block management, and provide a decision-making basis for the protection and control of the style of historical and cultural blocks.

[0007] To achieve the above object, the steps of the technical solution adopted by the present invention are as follows:

[0008] (1) Collect street view and video data of the blocks that need to be recognized, take screenshots in batches at an appropriate frame rate, and preprocess them in Photoshop, including adjusting the image resolution and cropping unnecessary edges, to build a basic data set for YOLOv5 model training.

[0009] (2) Input the dataset into the YOLOv5 model for training and obtain the optimal weights.

[0010] (3) Based on the trained YOLO model, intelligent batch recognition of street scenes in historical and cultural blocks is performed, and the roofs of buildings in the blocks are quickly selected and labeled.

[0011] (4) Based on OpenCV, the boundary coordinates of the roof recognition frame are intelligently batch-recognized and cropped, and the obtained images are automatically perspective-corrected to form a roof recognition dataset.

[0012] (5) Based on the Canny algorithm, the roof dataset images are automatically edge detected, and the edge slope is detected through OpenCV, and finally the dataset of roof slope values ​​is converted.

[0013] (6) K-means cluster analysis was performed on the exported slope and grade data sets based on the SPSS platform to obtain statistical eigenvalues ​​and finally the slope range of the building roof was obtained.

[0014] The steps for intelligently batch-snapshotting videos at appropriate frame rates in step (1) above are as follows:

[0015] (a) Based on the opencv-python library, the video file is read through the “cv2.VideoCapture” function.

[0016] (b) Obtain information such as the frame rate (FPS) and total number of frames of the video, and set a fixed interval (such as capturing an image every 3 seconds).

[0017] (c) Traverse the video frames and check whether the current frame number is the predetermined screenshot frame number. If so, save the frame as a picture through the "cv2.imwrite" function.

[0018] The steps for training and identifying using the YOLO model in steps (2) and (3) above are as follows:

[0019] (a) Dataset preparation: Based on the customized landscape element classification, the basic dataset is annotated by Labelimg.

[0020] (b) Model training: First, modify the data configuration file, including data category, data path, training rounds, etc.; then modify the number of categories in the model configuration file; then input the training weight, data configuration file, model configuration file path and training rounds into the YOLO model for training, and enable tensorbord to view the training parameters. After the training is completed, the optimal weight of the YOLO model can be obtained.

[0021] (c) Model reasoning: The street scene dataset to be identified and the optimal weight path obtained through training are input into the YOLO model for model reasoning. The model can then intelligently batch-recognize street scene elements including building roofs, and export a label file containing all identification box classification and location coordinate information.

[0022] The steps of OpenCV image processing and perspective correction in step (4) above are as follows:

[0023] (a) Cropping the roof recognition dataset based on the recognition frame: Automatically identify the Label file exported by the YOLO model, obtain the coordinates of the four endpoints of the building roof recognition frame, and then crop the dataset to obtain the detection dataset.

[0024] (b) Dataset screening: The image dataset obtained by cropping in step (a) is intelligently screened according to the following principles, and finally an image dataset that can be used for building roof slope recognition is obtained:

[0025] ① Use image processing techniques (such as edge detection) to assess the clarity of the roof outline.

[0026] ② Evaluate the degree of perspective deformation of the roof by analyzing the shape and orientation of the bounding box.

[0027] ③ Check whether the image resolution and roof coverage meet the minimum requirements.

[0028] ④ Determine whether enough reference points can be identified for effective perspective correction.

[0029] (c) Perspective correction: First, the image to be corrected stored in a specific path is read through the “cv2.imread” function in OpenCV. Secondly, the height and width of the corrected image are intelligently calculated based on the set four-point correction area, and the four corner points of the transformed image are set accordingly. Next, the perspective transformation matrix is ​​calculated through the “cv2.getPerspectiveTransform” function in OpenCV. Finally, the “cv2.warpPerspective” function of OpenCV is applied to automatically generate the corrected image based on the perspective transformation matrix and the size of the new image.

[0030] The steps of edge detection and straight line slope detection based on the Canny algorithm in the above step (5) are as follows:

[0031] (a) Image reading and edge detection: The rectified image file is read through OpenCV’s “cv2.imread” and the Canny algorithm is applied to perform intelligent edge detection on the image to determine the edge position.

[0032] (b) Line detection and slope calculation: Detect straight lines from the results of step (a) using Hough transform (“cv2.HoughLinesP”); then define a function “calculate-slope” to automatically calculate the slope of each detected straight line and export the slope results to a CSV file.

[0033] (c) Based on the conversion between the angle and the slope of the straight line, the slope value of the detected building roof can be quickly obtained.

[0034] The steps of performing K-means cluster analysis based on the SPSS platform in step (6) above are as follows:

[0035] (a) Import the CSV data file into SPSS.

[0036] (b) After setting the clustering variables and the number of clusters, K-means clustering analysis is automatically performed.

[0037] (c) Output the cluster analysis results and visualize them in the form of a scatter plot.

[0038] Advantages of the invention

[0039] Compared with the prior art, the present invention has the following advantages:

[0040] 1. By combining the YOLO model in deep learning with image processing technology, the roof slopes of buildings in historical and cultural blocks can be accurately, quickly, batch-wise and intelligently identified, thereby quickly summarizing the roof features of historical and cultural blocks;

[0041] 2. Simple operation reduces the actual difficulty of manually measuring and calculating the slope of the roofs of buildings in historical and cultural blocks;

[0042] 3. Through the block video photo collection and intelligent recognition technologies such as Python-OpenCV, non-contact measurement can be achieved to avoid the intrusion and damage to historical buildings caused by on-site measurement;

[0043] 4. Based on the statistical characteristic values ​​of the roof slope, the abnormal data can be identified according to the deviation, and the inconsistent roof slope can be effectively identified. This method greatly promotes the rapid identification of inconsistent features, thereby achieving the protection and dynamic long-term management of the block features. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a flow chart of the intelligent batch recognition method for the roof slopes of buildings in historical and cultural blocks using the YOLO algorithm described in the present invention.

[0045] Figure 2 This is the original picture of the implementation case.

[0046] Figure 3 This is the basic data chart for implementing case training.

[0047] Figure 4 Label the category name diagram for the implementation case.

[0048] Figure 5 YOLOv5 model training diagram for implementation example.

[0049] Figure 6 Statistical eigenvalues ​​and SPSS-based K-means cluster analysis diagram for the implementation case. DETAILED DESCRIPTION

[0050] The present invention is further illustrated below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. After reading the present invention, modifications to various equivalent forms of the present invention by those skilled in the art all fall within the scope defined by the appended claims of the present application.

[0051] The intelligent batch recognition method of the roof slopes of buildings in historical and cultural blocks using the YOLO algorithm of the present invention takes the streetscape image dataset of the historical and cultural blocks as the rational selection basis, trains based on the YOLOv5 model and obtains the optimal weight, and uses this to carry out reasoning, and intelligently batch recognizes the roofs of buildings in the historical and cultural blocks; at the same time, it completes edge line detection and slope detection based on image processing technology, improves the efficiency and accuracy of recognition and detection, and realizes dynamic monitoring of the slopes of building roofs in the block.

[0052] The following is a case study of the Dashilan Historical and Cultural District in Beijing to further illustrate the technical solution of the present invention. Figure 1 As shown, the specific method is as follows:

[0053] (1) Collect street view photos and videos of the Dashilan Historical and Cultural District in Beijing, automatically batch screenshot the videos at 5-second intervals, and then combine the screenshots and street view photos into a street view picture set. Subsequently, the street view picture set was imported into Photoshop for preprocessing, including adjusting the image resolution, cropping unnecessary edges, etc., and the pictures were selected according to the following principles to construct a basic training data set:

[0054] ① The main features and edges of the roofs of buildings in streets and alleys should be clearly visible without being obscured or blurred.

[0055] ②The perspective distortion of the photo should not be too extreme.

[0056] (2) After using Labelimg to annotate the dataset, it is imported into the YOLOv5 model for training to obtain the optimal weight.

[0057] (2.1) Using Labelimg to label data and prepare datasets

[0058] (2.1.1) Create a new folder named VOC2007. In this folder, create a new folder named JPEGImages to store the street view image files of Dashilan; create a new folder named Annotations to store the label files exported after annotation; finally, create a new txt file named predefined_classes to store the custom annotation category names. The annotation categories are divided into 7 categories: door, window, roof, greenery, person, car, bicycle.

[0059] (2.1.2) Start Labelimg in the VOC2007 folder directory, open the JPEGImages folder, and initialize the feature classification defined in predefined_classes.txt.

[0060] (2.1.3) Based on the defined landscape element classification, use the Create RectBox command to annotate the images in the JPEGImages folder one by one, and save the label file in XML format to the Annotations folder.

[0061] (2.1.4) Based on the Python platform, the xml label file exported after the annotation is converted into a label file in txt format, and the basic data set and the corresponding label file are divided into a training set and a validation set in a ratio of 80%:20%.

[0062] (2.1.5) Create a new folder named YOLOv5 as the working directory for YOLO model training and reasoning, and save the official pre-trained weights yolov5s.pt file required for model training in the weights directory of YOLOv5. Then, create a new training data folder named VOCdevkit in the YOLOv5 directory, and create a new labels folder and images folder in this folder to store the divided street view images and label files respectively. The training set and validation set are stored in the train folder and val folder in the corresponding directory respectively. At this point, the data preparation for YOLOv5 model training is completed.

[0063] (2.2) YOLOv5 model training

[0064] (2.2.1) Use Pycharm platform to open the YOLOv5 folder and modify the data and model configuration files respectively. First, open the voc.yaml file in the data directory, enter the absolute path of the training set and validation set data respectively, modify the number of categories, and fill in all the category names. Then open the yolov5s.yaml file in the data directory and modify the number of categories. At this point, the corresponding parameter modification of the YOLOv5 model training is completed.

[0065] (2.2.2) Open the train.py file in Pycharm and modify the model's weights, cfg, and data parameters respectively. Enter the relative path of the training weights in the weights parameter: weights / yolov5s.pt; enter the relative path of the model configuration file in the cfg parameter: models / yolov5s.yaml; enter the relative path of the data configuration file in the data parameter: data / voc.yaml. Next, enter 200 rounds of training in the epochs parameter and adjust the value of the batch-size parameter to 4. Finally, run the train.py file to start YOLOv5 model training.

[0066] (2.2.3) After the training is completed, two weight files, last.pt and best.pt, will be generated in the run / train / exp / weights directory, which represent the weight file of the last round of model training and the best weight file respectively.

[0067] (2.3) YOLOv5 model reasoning

[0068] (2.3.1) Save the image set to be inferred in the data / images directory of YOLOv5. Open the detect.py file in Pycharm and modify the weights, source and save-txt parameters of the model respectively. In the weights parameter, enter the relative path of the trained best.pt: runs / train / exp / weights / best.pt; in the source parameter, enter the image path to be inferred: data / images; in the save-txt parameter, change the default value from False to True.

[0069] (2.3.2) Run the detect.py file to start YOLOv5 model inference, and finally complete the intelligent recognition of street features including building roofs, and export the label file containing all the recognition box classification and location coordinate information. The relative storage path of the model inference image file and the label file is runs / detect / exp.

[0070] (3) Image perspective correction based on OpenCV-Python

[0071] (3.1) Define the "convert_to_xyxy" function in OpenCV-Python and input the label file, set the image size to 1920*1080, convert the normalized coordinates in the label file into absolute coordinates, and obtain the four-point coordinates of the roof recognition box.

[0072] (3.2) Use OpenCV to read the image data in the YOLOv5 directory runs / detect / exp, identify the object belonging to "roof" in the image, and crop the corresponding area according to its bounding box coordinates, save it in the same directory, and name it roofimage.

[0073] (3.3) Perform image perspective correction

[0074] (3.3.1) Based on the OpenCV and NumPy libraries in the Python platform, read the roofimage image and manually locate the four points of the area to be corrected. Based on the above four points, the Euclidean distance between the two diagonal points is calculated through the linear algebra function of the NumPy library to determine the width and height of the corrected image.

[0075] (3.3.2) According to the calculated new width and height, set the positions of the corresponding four corner points on the new image to provide a target frame for perspective transformation.

[0076] (3.3.3) Through OpenCV's "getPerspectiveTransform" function, the perspective transformation matrix is ​​automatically calculated based on the four points of the original image and the four points after the transformation.

[0077] (3.3.4) Using the perspective transformation matrix calculated in the previous step, the original image is perspective corrected through the "warpPerspective" function of OpenCV. Finally, the corrected image is generated and saved to runs / detect / exp in the YOLOv5 directory, named corrected-perspective.jpg.

[0078] (4) Image edge detection and edge slope detection based on Canny algorithm

[0079] (4.1) Read the corrected-perspective.jpg file based on the OpenCV library in the Python platform.

[0080] (4.2) Apply the Canny algorithm to perform edge detection on the read image to identify the boundary lines in the image.

[0081] (4.3) The Hough Transform method is used to identify and extract straight line features in the image based on the detected edges, and the slope of each detected straight line is automatically calculated, including special considerations for the slope processing of vertical lines to avoid errors in the denominator being zero.

[0082] (4.4) Export all slope calculation results to a CSV file.

[0083] (4.5) Conversion of edge slope: In Excel, first use the ATAN function to convert the slope into an angle, then use the DEGREES function to convert the obtained radian value into an angle value, and finally obtain the slope value of the building roof.

[0084] (5) Statistical eigenvalues ​​and K-means clustering analysis based on SPSS

[0085] (5.1) The derived slope data are statistically characterized to gain a preliminary understanding of the data distribution metric, identify abnormal data based on the deviation, and ultimately form a K-means clustering data set.

[0086] (5.2) Import the K-means clustering data set into the SPSS platform, set the slope value as the independent variable, set the number of clusters to 3 based on the estimation of the clustering results, and then perform K-means clustering analysis. The slope values ​​of the cluster centers obtained by quick calculation are approximately: 0.447, 0.554, and 0.681.

[0087] (5.3) The K-means cluster analysis results are visualized in the form of a scatter plot, and it is found that the slope values ​​of most building roofs are in the range of 26-32.

[0088] (6) The initialization configuration of the present invention is now completed, including the training and recognition of the YOLOv5 model and the various settings of image processing. After the YOLO model training is completed, the street view photos of the historical and cultural blocks are directly imported, and the relevant file paths are modified to complete the rapid recognition and detection without tedious work.

Claims

1. An intelligent batch recognition method for roof slopes of buildings in historical and cultural blocks using YOLO is characterized by: The implementation steps of this method are as follows: Step (1), collecting street scenes and video data of the blocks to be recognized, taking screenshots in batches according to the number of frames, and preprocessing them in Photoshop, including adjusting the image resolution, cropping unnecessary edge parts, and constructing a basic data set for YOLOv5 model training; Step (2), input the data set into the YOLOv5 model for training and obtain the optimal weight; Step (3), based on the trained YOLO model, intelligent batch recognition of street scenes in historical and cultural blocks is performed, and the roofs of the buildings in the blocks are quickly selected and marked; Step (4), based on OpenCV intelligent batch recognition of the boundary coordinates of the roof recognition frame and cropping, the obtained image is automatically perspective corrected to form a roof recognition data set; Step (5), automatically detect the edge of the roof dataset image based on the Canny algorithm, detect the edge slope through OpenCV, and finally convert it into a dataset of roof slope values; Step (6), perform K-means cluster analysis on the derived slope and grade data set based on the SPSS platform to obtain statistical eigenvalues ​​and finally obtain the slope range of the building roof.

2. The intelligent batch recognition method for roof slopes of buildings in historical and cultural blocks using YOLO according to claim 1 is characterized in that: The steps for intelligently batch-snapshotting videos at appropriate frame rates in step (1) above are as follows: (a) Based on the opencv-python library, read the video file through the "cv2.VideoCapture" function; (b) Obtain the frame rate FPS and total frame number information of the video and set a fixed interval; (c) Traverse the video frames and check whether the current frame number is the predetermined screenshot frame number; if so, save the video frame as a picture through the "cv2.imwrite" function.

3. The intelligent batch recognition method for roof slopes of buildings in historical and cultural blocks using YOLO according to claim 1 is characterized in that: The steps for training and identifying using the YOLO model in steps (2) and (3) above are as follows: (a) Dataset preparation: According to the customized landscape element classification, the basic dataset is annotated by Labelimg; (b) Model training: First, modify the data configuration file, including data category, data path, and training rounds; second, modify the number of categories in the model configuration file; then input the training weight, data configuration file, model configuration file path, and training rounds into the YOLO model for training, and enable tensorbord to view the training parameters; After completing the training, the optimal weights of the YOLO model are obtained; (c) Model reasoning: The street scene dataset to be identified and the optimal weight path obtained through training are input into the YOLO model for model reasoning. The model can then intelligently batch-recognize street scene elements including building roofs, and export a label file containing all identification box classification and location coordinate information.

4. The intelligent batch recognition method for roof slopes of buildings in historical and cultural blocks using YOLO according to claim 1 is characterized in that: The steps of OpenCV image processing and perspective correction in step (4) are as follows: (a) Crop the roof recognition dataset based on the recognition frame: Automatically identify the Label file exported by the YOLO model, obtain the coordinates of the four endpoints of the building roof recognition frame, and then crop the dataset to obtain the detection dataset; (b) Dataset screening: The image dataset obtained by cropping in step (a) is intelligently screened according to the following principles, and finally an image dataset for building roof slope recognition is obtained: ①Use image processing technology to evaluate the clarity of the roof outline; ② Evaluate the degree of perspective deformation of the roof by analyzing the shape and orientation of the bounding box; ③ Check whether the image resolution and roof coverage meet the minimum requirements; ④Determine whether the reference points are identified for effective perspective correction; (c) Perspective correction: First, the image to be corrected stored in a specific path is read through the "cv2.imread" function in OpenCV; secondly, the height and width of the corrected image are intelligently calculated based on the set four-point correction area, and the four corner points of the transformed image are set based on this; then the perspective transformation matrix is ​​calculated through the "cv2.getPerspectiveTransform" function in OpenCV; finally, the "cv2.warpPerspective" function of OpenCV is applied to automatically generate the corrected image based on the perspective transformation matrix and the size of the new image.

5. The intelligent batch recognition method for roof slopes of buildings in historical and cultural blocks using YOLO according to claim 1 is characterized in that: The steps of edge detection and straight line slope detection based on the Canny algorithm in step (5) are as follows: (a) Image reading and edge detection: Use OpenCV's "cv2.imread" to read the rectified image file, and apply the Canny algorithm to perform intelligent edge detection on the image to determine the edge position; (b) Line detection and slope calculation: Detect lines from the results of step (a) using Hough transform; then define the function "calculate-slope" to automatically calculate the slope of each detected line and export the slope results to a CSV file; (c) Based on the conversion between the angle and the slope of the straight line, the slope value of the detected building roof can be quickly obtained.

6. The intelligent batch recognition method for roof slopes of buildings in historical and cultural blocks using YOLO according to claim 1 is characterized in that: The steps for performing K-means cluster analysis based on the SPSS platform in step (6) are as follows: (a) Import CSV data file into SPSS; (b) Automatically perform K-means clustering analysis after setting the clustering variables and the number of clusters; (c) Output the cluster analysis results and visualize them in the form of a scatter plot.

Citation Information

Cited By

  • Mask-RCNN instance segmentation model-based building facade hole opening rate intelligent batch measurement and calculation method

    CN119169469A

  • Intelligent generation method and system for new building model of historical and cultural block

    CN122087899A

  • A method and system for intelligent generation of new building models in historical and cultural districts

    CN122087899B

  • Historical and cultural block building style and feature coordination image evaluation method and system

    CN122289266A

  • Historical and cultural block building style coordination image evaluation method and system

    CN122289266B