Southern Fujian historical block typical culture gene identification method
By dividing the identification elements into three categories in the southern Fujian historical district, and combining architectural features, street aspect ratio, color analysis and planar layout model, the fusion model is formed, which solves the problem of low identification efficiency in the existing technology and the problem of strong subjectivity has achieved more accurate and efficient cultural gene recognition and provided technical support for the protection of cultural heritage.
Patent Information
- Application Number
- CN202411179994.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-20
AI Technical Summary
The existing technology lacks targeted models in cultural gene recognition in southern Fujian's historical districts, resulting in low recognition efficiency and strong subjectivity, and lack of objective verification methods.
The identification elements are divided into three categories: macro, meso and micro. The fusion model is formed through the joint action of building feature object detection model, street aspect ratio judgment model, color analysis model and planar layout judgment model, which is used to judge the Whether the cultural gene belongs to the typical cultural genes of the historical district in southern Fujian.
It has improved the accuracy and efficiency of typical cultural gene identification in southern Fujian's historical districts, and provided new technical means and theoretical support for the protection and inheritance of cultural heritage.
Smart Images

Figure CN119169624A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of picture recognition, and in particular to a method for identifying typical cultural genes of a historical block in southern Fujian. Background Art
[0002] The identification of traditional cultural genes currently mainly adopts the inefficient methods of manual classification and manual identification. Through field surveys, researchers collect research photos of specific research areas and subjectively classify and record them one by one. This research method requires a lot of manpower and material resources, and is limited to a fixed research area. It is highly subjective, and the identification and verification methods are mainly based on literature research and field investigation verification, lacking objective research methods. At present, some scholars have proposed the use of CNN convolutional networks to identify some cultural genes. However, the types of cultural genes identified by previous models are relatively single, and there is no cultural gene identification model for the historical blocks in southern Fujian. There is still a gap in the machine identification of cultural genes in the historical blocks in southern Fujian, and there is still room for further improvement in the efficiency of cultural gene identification.
[0003] Based on this, the present invention proposes a method for identifying typical cultural genes of historical blocks in southern Fujian. Summary of the invention
[0004] The purpose of the present invention is to propose a method for identifying typical cultural genes of southern Fujian historical blocks. Based on the characteristics of southern Fujian historical blocks, the identification elements are divided into three categories: macro, meso and micro. A fusion model is formed through the joint action of four sub-models: architectural feature target detection model, street aspect ratio judgment model, color analysis model and plane layout judgment model to determine whether the object to be identified belongs to the typical cultural genes of southern Fujian historical blocks.
[0005] To achieve the above purpose, the technical solution of the present invention is: a method for identifying typical cultural genes of historical blocks in southern Fujian, which specifically includes the following steps:
[0006] Step S1: Determine the cultural gene identification elements; divide the identification elements into three categories: macro, meso and micro according to the identification principle;
[0007] Step S2: Database construction; including data collection, data organization, image annotation and data division;
[0008] Step S3: Model construction; including four sub-models: building feature target detection model, street aspect ratio judgment model, color analysis model and plane layout judgment model, and the four sub-models work together to form a fusion model to identify micro features, meso features and macro features in the picture, so as to judge whether the cultural gene in the picture belongs to the typical cultural gene of the historical block in southern Fujian;
[0009] Step S4: Use the training set and test set obtained by database construction to perform model training and model evaluation on the fusion model, complete model optimization by adjusting the network structure and hyperparameters, export the trained model into a deployable format and deploy it on a computer device;
[0010] Step S5: Input the image to be identified to identify the typical cultural genes of the historical district in southern Fujian.
[0011] Preferably, the microscopic identification elements include building gable features, building roof features, building column features, and regular pointed plaster plastic decoration features.
[0012] Preferably, the mesoscopic identification elements include architectural color features, plane layout features, and arcade facade features. The plane layout features refer to whether the plane layout is "comb-shaped" and continuously distributed through aerial photos of historical blocks, etc., to determine whether it meets the characteristics of southern Fujian historical blocks; the arcade facade features are specified as three-section, and the middle section is a pure red brick arcade, a red brick and wooden wall arcade, or a special style arcade, to determine whether it meets the characteristics of southern Fujian historical blocks.
[0013] Preferably, the macroscopic identification elements include street aspect ratio features.
[0014] Preferably, the step S2 is specifically:
[0015] Data collection: Use drone oblique photography and SLR photography to obtain high-definition pictures of the historical districts in southern Fujian according to actual needs;
[0016] Data collation: Select high-quality and representative pictures from the high-definition pictures of the historical districts in southern Fujian, and ensure that the picture formats and sizes are consistent;
[0017] Image annotation: uniformly classify and encode the images after data sorting according to the classification of the previously identified elements to obtain a unified annotation information set, which includes the classification code of each element and the text information of each element;
[0018] Training and testing: The data set obtained after image annotation is randomly sampled and divided into a training set and a test set; the training set is used as a data set for model training to provide the input and output required for the model to learn, and the test set is used for final performance evaluation.
[0019] Preferably, the building feature target detection model includes a Transformer backbone network and an edge information enhancement module to identify features in the image; the Transformer backbone network captures global information in the image; the edge information enhancement module obtains an edge map by performing edge detection on the input image using the canny operator at the input end of the neural network, and the edge map and the original image are subjected to preliminary feature extraction through a two-stream convolutional network and then sent to a weight distribution network to obtain a mixed input, which is then sent to the detection network, thereby obtaining stronger prior knowledge of the edge information of the image, enhancing the network's attention to the edge information, extracting the edge and contour information of the image and performing feature enhancement, and judging whether it conforms to the characteristics of the southern Fujian historical district based on the global information and edge information; and introducing the Focal-EIoU bounding box regression loss function to optimize the position and size of the bounding box; the loss function formula is as follows:
[0020]
[0021] EIoU(A, B) = 1 - IoU(A, B) + R d +R w +R h
[0022] Focal-EIoU(A,B)=(1-EIoU(A,B))γ·EIoU(A,B)
[0023] Where A is the predicted bounding box, B is the actual bounding box, IoU(A, B) represents the intersection over union of bounding box A and bounding box B, (x A ,y A ) and (x B ,y B ) are the center point coordinates of the predicted bounding box and the true bounding box, respectively, w A and h A is the width and height of the predicted bounding box, w B and h B is the width and height of the true bounding box, w c and h c is the width and height of the smallest bounding box that encloses both the predicted bounding box and the true bounding box, d c represents the distance between the predicted bounding box and the center point of the true bounding box, c represents the diagonal length of the bounding box, and R d Represents the normalized value of the center point distance, R w , R h They represent the difference in aspect ratio, respectively. EIoU(A, B) represents a comprehensive measure of the distance between the predicted bounding box and the center point of the true bounding box, the aspect ratio, and the intersection over union ratio. γ is a hyperparameter used to adjust the weight of difficult and easy samples.
[0024] Preferably, the street aspect ratio judgment model uses the MiDaS model to generate a depth map from an RGB image, and uses homography transformation to obtain the height and width information of the streets in the image, and compares the height and width information with a preset street D / H (street width / street height) value range to determine whether the height and width information conforms to the characteristics of the southern Fujian historical district.
[0025] The preset street D / H value range is 0.86-1.29.
[0026] Preferably, the color analysis model converts the image from the RGB color space to the HSV color space, extracts the pixel ratio within a specified hue range in the HSV color space, and determines whether it conforms to the characteristics of the southern Fujian historical district.
[0027] Preferably, the hue range is specified as a red hue range, and the specific hue range includes from 0° to 30° and from 330° to 360°. It is determined whether the pixel ratio within the specified hue range is within the range of 80-85% to determine whether it meets the characteristics of the southern Fujian historical district.
[0028] Preferably, the plane layout judgment model uses image processing technology to extract straight line contours in the picture, and judges whether it conforms to the characteristics of the southern Fujian historical district by whether it contains one or more main axes and corresponding several short straight lines of 90 degrees.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] Based on the characteristics of the historical blocks in southern Fujian, the present invention divides the identification factors into three categories: macro, meso and micro, and forms a fusion model through the joint action of four sub-models: building feature target detection model, street aspect ratio judgment model, color analysis model and plane layout judgment model. Through comprehensive consideration from multiple aspects, the present invention can accurately identify the characteristics of the typical cultural genes of the historical blocks in southern Fujian, improve the accuracy and efficiency of the identification of the typical cultural genes of the historical blocks in southern Fujian, and thus provide a new technical means and theoretical support for the protection and inheritance of cultural heritage. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is the technical roadmap of cultural gene identification of the present invention;
[0032] Figure 2 This is a schematic diagram of classification coding in database construction according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following is combined with Figure 1 , the technical solution of the present invention is specifically described.
[0034] The present invention proposes a method for identifying typical cultural genes of a historical block in southern Fujian, which specifically includes the following steps:
[0035] Step S1: Determine the cultural gene identification elements; divide the identification elements into three categories: macro, meso and micro according to the identification principle;
[0036] Step S2: Database construction; including data collection, data organization, image annotation and data division;
[0037] Step S3: Model construction; including four sub-models: building feature target detection model, street aspect ratio judgment model, color analysis model and plane layout judgment model, and the four sub-models work together to form a fusion model to identify micro features, meso features and macro features in the picture, so as to judge whether the cultural gene in the picture belongs to the typical cultural gene of the historical block in southern Fujian;
[0038] Step S4: Use the training set and test set obtained by database construction to perform model training and model evaluation on the fusion model, complete model optimization by adjusting the network structure and hyperparameters, export the trained model into a deployable format and deploy it on a computer device;
[0039] Step S5: Input the image to be identified to identify the typical cultural genes of the historical district in southern Fujian.
[0040] In this implementation, the microscopic identification elements include building gable features, building roof features, building column features, and regular-pointed plaster decoration features. Among them, building gable features include dovetail ridge, herringbone gable, and horseback gable; building roof features include ridge styles mainly including three-river ridge and broken eaves rising arrow mouth; building column features include red brick square columns as the main column style for the bottom pillars; regular-pointed plaster refers to the decoration that goes down from the top of the gable.
[0041] Mesoscopic identification elements include architectural color features, which are mainly composed of four colors: red, yellow, white, and blue, with the red color accounting for 80-85%. Mesoscopic identification elements also include plane layout features and arcade facade features. The arcade facade features are identified through the detection model; the plane layout features are identified through the plane layout judgment model.
[0042] Macro-identification factors include the height-to-width ratio of the street, and the D / H value of the arcade street is 0.86-1.29.
[0043] In this implementation, the step S2 is specifically:
[0044] Data collection: Use drone oblique photography and SLR photography to obtain high-definition pictures of the historical districts in southern Fujian according to actual needs;
[0045] Data collation: Select high-quality and representative pictures from the high-definition pictures of the historical districts in southern Fujian, and ensure that the picture formats and sizes are consistent;
[0046] Image annotation: The images after data sorting are uniformly classified and coded according to the classification of the previously identified elements to obtain a unified annotation information set, which includes the classification code of each element and the text information of each element; Figure 2 As shown, the classification code Qllm-tsysql represents arcade facade-special style arcade; Qlzs-hzfz represents arcade column type-red brick square column; Qllm-chzql represents arcade facade-pure red brick arcade; in addition, other examples of classification codes are as follows: Wj-scj represents ridge-three-river ridge; Qllm-hzmqql represents arcade facade-red brick and wooden wall arcade; Qllm-tsysql represents arcade facade-special style arcade; Sq-ywj represents gable-swallowtail ridge; Sq-rzg represents gable-herringbone rule; Sq-mbsq represents gable-horseback gable; Sqhs-cs represents gable gray plastic-colored plastic; Sqhs-hs represents gable gray plastic-gray plastic.
[0047] Training and testing: The data set obtained after image annotation is randomly sampled and divided into a training set and a test set; the training set is used as the data set for model training, providing the input and output required for the model to learn, and the test set is randomly selected from the entire data set for final performance evaluation.
[0048] In this embodiment, the building feature target detection model includes a Transformer backbone network and an edge information enhancement module to identify features in the image, including arcade facade features of micro features and meso features; and a bounding box regression loss function is introduced to optimize the position and size of the bounding box.
[0049] a. Use the Transformer backbone network: Since most architectural features are related to information around the target, for example, the ancient city of Zhangzhou follows the principle of "relying on mountains and water, facing the sun and backing the shade" in site selection. Zhangzhou is located in a unique geographical location and is famous for "resting on Santai Mountain, flanked by two rivers, thousands of streams entangled, and graceful mountains". Building windows only appear on the wall, and swallowtail ridges only appear on the roof, so the comprehensive use of global information can better judge the target. Using the Transformer backbone network can better capture the global information in the image and improve the accuracy of target detection.
[0050] b. Edge information enhancement module: Since the characteristic information of building targets is mostly more related to the contour and edge information, an edge information enhancement module is proposed to improve the detection accuracy. The edge information enhancement module uses the canny operator to perform edge detection on the input image at the input end of the neural network to obtain an edge map, and then performs preliminary feature extraction on the edge map and the original image through a two-stream convolutional network, and then sends them to the weight distribution network to obtain a mixed input, and then sends them to the detection network, so as to obtain stronger prior knowledge of the edge information of the image and enhance the network's attention to the edge information.
[0051] c. Boundary regression optimization: Since the target feature boundary of cultural genes is difficult to define, the angle of recognition photos varies. For example, in the religious buildings in the ancient city of Zhangzhou, the roof design often uses three-river ridges and broken eaves rising arrow mouths as the main ridge styles. The three-river ridge specifically refers to a complete roof structure in which the middle section of the main ridge is lifted and auxiliary ridge lines are added on both sides to form a ridge line layout with a higher middle section and lower ends, and decorated with four dovetail shapes. The broken eaves rising arrow mouth refers to the lifting of the middle section of the hard mountain or hanging mountain roof (the wider the width of one or three rooms), resulting in a break at the eaves, which is called "broken eaves rising arrow mouth". In actual shooting, it is often difficult to obtain similar drone orthophotos, and existing models cannot determine the target feature boundaries. Therefore, we introduce the bounding box regression loss function to optimize the position and size of the bounding box and improve the accuracy of boundary positioning. The loss function formula is as follows:
[0052]
[0053]
[0054] EIoU(A, B) = 1 - IoU(A, B) + R d +R w +R h
[0055] Focal-EIoU(A,B)=(1-EIoU(A,B))γ·EIoU(A,B)
[0056] Where A is the predicted bounding box, B is the actual bounding box, IoU(A, B) represents the intersection over union of bounding box A and bounding box B, (x A ,y A ) and (x B ,y B ) are the center point coordinates of the predicted bounding box and the true bounding box, respectively, w A and h A is the width and height of the predicted bounding box, w B and h B is the width and height of the true bounding box, w c and h cis the width and height of the smallest bounding box that encloses both the predicted bounding box and the true bounding box, d c represents the distance between the predicted bounding box and the center point of the true bounding box, c represents the diagonal length of the bounding box, and R d Represents the normalized value of the center point distance, R w , R h They represent the difference in aspect ratio, respectively. EIoU(A, B) represents a comprehensive measure of the distance between the predicted bounding box and the center point of the true bounding box, the aspect ratio, and the intersection over union ratio. γ is a hyperparameter used to adjust the weight of difficult and easy samples.
[0057] In this implementation, the street aspect ratio judgment model uses the MiDaS model and homography transformation. After studying, the D / H value of Zhangzhou Qilou Street is 0.86-1.29. Due to interference from camera angles, camera parameters, etc., it is difficult to accurately judge the street aspect ratio from the RGB image. Therefore:
[0058] a. Generate depth map from RGB image using MiDaS model;
[0059] b. Use homography transformation to obtain accurate height and width information, and determine whether it conforms to the characteristics of the historical district in southern Fujian through the street height-to-width ratio.
[0060] In this embodiment, since the architectural colors of the historical districts in southern Fujian are mainly composed of four colors: red, yellow, white, and blue, and the red area accounts for 80-85%, the color analysis model includes color space conversion and color feature extraction:
[0061] a. Color space conversion: Convert the image from RGB color space to HSV color space to better separate hue and brightness information.
[0062] b. Color feature extraction: In the HSV color space, extract the pixel ratio within the specified hue range and determine whether it conforms to the characteristics of the Southern Fujian historical district.
[0063] Among them, the hue range specifies the hue range of the red series that can be selected, and the specific hue range includes from 0° to 30° and from 330° to 360°; it is determined whether the proportion of pixels in the specified hue range is within the range of 80-85% to determine whether it conforms to the characteristics of the southern Fujian historical district.
[0064] In this embodiment, the plane layout judgment model uses image processing technology to extract straight line contours in the picture, and judges whether it meets the characteristics of the southern Fujian historical district by whether it contains one or more main axes and corresponding 90-degree short straight lines.
[0065] The present invention determines whether the cultural gene in the recognized image belongs to the typical cultural gene of the historical block in southern Fujian by integrating the micro features (gables, roofs, columns, regular pointed gray plastics, etc.) identified by the fusion model with the meso features and the macro street aspect ratio features. And the model includes a comparison link with the cultural genes of other regions, so it can effectively distinguish the situation where the micro features belong to multiple regions at the same time. For example, a micro feature may belong to the cultural genes of multiple regions, but it can be judged as the typical cultural gene of the historical block in southern Fujian through other micro, meso or macro information. Through this comprehensive consideration, we can accurately identify the characteristics of the typical cultural genes of the historical block in southern Fujian, thereby providing a new technical means and theoretical support for the protection and inheritance of cultural heritage.
[0066] The present invention provides a method for identifying typical cultural genes in the historical blocks of southern Fujian. Researchers can directly input photos to identify cultural genes, so as to conduct rapid research on the cultural genes of the historical blocks of southern Fujian. The specific advantages are: 1. Targeting the historical blocks of southern Fujian, promoting the renewal and transformation of historical blocks. 2. The model is easy to deploy and iterate. 3. The preliminary preparation work is simple and no complex training is required. 4. The model has strong scalability and can be supplemented with new cultural gene identification content at any time.
[0067] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions do not exceed the scope of the technical solution of the present invention, belong to the protection scope of the present invention.
Claims
1. A method for identifying typical cultural genes in the historical districts of southern Fujian, characterized by: The specific steps include: Step S1: Determine the cultural gene identification elements; divide the identification elements into three categories: macro, meso and micro according to the identification principle; Step S2: Database construction; including data collection, data organization, image annotation and data division; Step S3: model construction; It includes four sub-models: building feature target detection model, street aspect ratio judgment model, color analysis model and plane layout judgment model. The four sub-models work together to form a fusion model to identify microscopic features, mesoscopic features and macroscopic features in the picture, so as to judge whether the cultural gene in the picture belongs to the typical cultural gene of the historical block in southern Fujian. Step S4: Use the training set and test set obtained by database construction to perform model training and model evaluation on the fusion model, complete model optimization by adjusting the network structure and hyperparameters, export the trained model into a deployable format and deploy it on a computer device; Step S5: Input the image to be identified to identify the typical cultural genes of the historical district in southern Fujian.
2. The method for identifying typical cultural genes of historical blocks in southern Fujian according to claim 1 is characterized in that: Micro-identification elements include building gable features, building roof features, building column features, and regular-pointed gray plastic decoration features.
3. The method for identifying typical cultural genes of the historical blocks in southern Fujian according to claim 2 is characterized in that: The meso-level identification elements include architectural color characteristics, plane layout characteristics, and arcade facade characteristics; the plane layout characteristics refer to the comb-like continuous distribution of the plane layout of the historical block; the arcade facade characteristics are specified as three-section, and the arcade styles in the middle section include pure red brick arcades and red brick and wooden wall arcades.
4. The method for identifying typical cultural genes of the historical blocks in southern Fujian according to claim 3 is characterized in that: Macro-identification elements include street height-to-width ratio characteristics.
5. The method for identifying typical cultural genes of a historical block in southern Fujian according to any one of claim 4, characterized in that: The step S2 specifically comprises: Data collection: Use drone oblique photography and SLR photography to obtain high-definition pictures of the historical districts in southern Fujian according to actual needs; Data collation: Select high-quality and representative pictures from the high-definition pictures of the historical districts in southern Fujian, and ensure that the picture formats and sizes are consistent; Image annotation: uniformly classify and encode the images after data sorting according to the classification of the previously identified elements to obtain a unified annotation information set, which includes the classification code of each element and the text information of each element; Training and testing: The data set obtained after image annotation is randomly sampled and divided into a training set and a test set; the training set is used as a data set for model training to provide the input and output required for the model to learn, and the test set is used for final performance evaluation.
6. The method for identifying typical cultural genes of the historical blocks in southern Fujian according to claim 4 is characterized in that: The architectural feature target detection model includes a Transformer backbone network and an edge information enhancement module to identify features in the image; the Transformer backbone network captures global information in the image; the edge information enhancement module obtains an edge map by performing edge detection on the input image using the canny operator at the input end of the neural network, and the edge map and the original image are initially extracted through a two-stream convolutional network and then sent to a weight distribution network to obtain a mixed input, which is then sent to the detection network to obtain a strong prior knowledge of the edge information of the image, enhance the network's attention to the edge information, extract the edge and contour information of the image, and perform feature enhancement; based on the global information and edge information, it is determined whether it meets the characteristics of the southern Fujian historical block; and the Focal-EIoU bounding box regression loss function is introduced to optimize the position and size of the bounding box; the loss function formula is as follows: EIoU(A,B)=1-IoU(A,B)+R d +R w +R h Focal-EIoU(A,B)=(1-EIoU(A,B)) γ ·EIoU(A,B) Among them, A is the predicted bounding box, B is the real bounding box, IoU(A,B) represents the intersection-over-union ratio of bounding box A and bounding box B, (x A ,y A ) and (x B ,y B ) are the center point coordinates of the predicted bounding box and the true bounding box, respectively, w A and h A is the width and height of the predicted bounding box, w B and h B is the width and height of the true bounding box, w c and h c is the width and height of the smallest bounding box that encloses both the predicted bounding box and the true bounding box, d c represents the distance between the predicted bounding box and the center point of the true bounding box, c represents the diagonal length of the bounding box, and R d Represents the normalized value of the center point distance, R w , R h They represent the difference in aspect ratio, respectively. EIoU(A,B) represents a comprehensive measure of the distance between the predicted bounding box and the center point of the true bounding box, the aspect ratio, and the intersection over union ratio. γ is a hyperparameter used to adjust the weight of difficult and easy samples.
7. The method for identifying typical cultural genes of the historical blocks in southern Fujian according to claim 4 is characterized in that: The street aspect ratio judgment model uses the MiDaS model to generate a depth map from an RGB image, and uses homography transformation to obtain the height and width information of the streets in the image, and compares the height and width information with a preset street D / H value range to determine whether the height and width information conforms to the characteristics of the southern Fujian historical district. The street D / H value is the ratio of street width to street height; the preset street D / H value range is 0.86-1.
29.
8. The method for identifying typical cultural genes of the historical blocks in southern Fujian according to claim 4 is characterized in that: The color analysis model converts the image from the RGB color space to the HSV color space, extracts the pixel ratio within a specified hue range in the HSV color space, and determines whether it conforms to the characteristics of the southern Fujian historical district.
9. The method for identifying typical cultural genes of the historical blocks in southern Fujian according to claim 8 is characterized in that: The hue range is designated as the hue range of the red series, and it is determined whether the proportion of pixels within the designated hue range is within the range of 80-85% to determine whether it conforms to the characteristics of the southern Fujian historical district.
10. The method for identifying typical cultural genes of the historical blocks in southern Fujian according to claim 4, characterized in that: The plane layout judgment model uses image processing technology to extract the straight line contours in the picture, and judges whether it conforms to the characteristics of the southern Fujian historical district by whether it contains one or more main axes and corresponding several 90-degree short straight lines.
Citation Information
Cited By
Intelligent identification and language conversion method for traditional building-riding facade component based on hierarchical coding system
CN120544203A
Traditional Arcade Facade Component Intelligent Recognition and Language Conversion Methods Based on Hierarchical Coding System
CN120544203B
Historical building intelligent identification method and system based on multi-source spatio-temporal data
CN121033679A
Historical building intelligent identification method and system based on multi-source spatio-temporal data
CN121033679B
