Multi-type building image retrieval method and system based on convolution multi-attention

By introducing the convolutional multi-head attention mechanism and adaptive attention matrix into the architectural image retrieval model, the accuracy problem caused by layout dispersion in multi-body architectural image retrieval is solved, and the effective capture and integration of long-distance features are achieved, improving The search accuracy is improved.

CN118733807AActive Publication Date: 2024-10-01XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY

Patent Information

Application Number
CN202410820973.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-01
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

When dealing with multi-body buildings, existing building image retrieval models have poor retrieval accuracy due to layout dispersion, making it difficult to effectively capture the long-range feature dependencies between buildings.

Method used

The convolutional multi-head attention mechanism is used to implement attention calculation in the convolutional neural network through the adaptive size self-attention matrix, combined with the Resnet image retrieval backbone network, compound pooling module, adaptive convolutional attention module and convolution The feedforward module extracts local and global features and establishes long-range feature dependencies.

Benefits of technology

It has significantly improved the accuracy of multi-type building image retrieval, can better understand the structural logic and spatial relationships of complex buildings, and improved retrieval performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733807A_ABST
    Figure CN118733807A_ABST
Patent Text Reader

Abstract

The invention provides a multi-type building image retrieval method and system based on convolutional multi-attention, and the method comprises the steps: inputting a to-be-detected multi-type building image into a convolutional multi-attention multi-type building image retrieval network model, and obtaining a multi-type building image retrieval result; the convolutional multi-head attention multi-type building image retrieval network model comprises a Resnet image retrieval backbone network and a convolutional attention module which are connected in sequence, and the Resnet image retrieval backbone network is used for obtaining original features with local depth description; and the convolution attention module comprises a composite pooling module, a self-adaptive convolution attention module and a convolution feedforward module, and the self-adaptive convolution attention module and the convolution feedforward module are used for obtaining refined significant local features with a long-distance feature dependency relationship. The problem that the retrieval precision is limited due to scattered building layout is effectively relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image retrieval methods, and relates to a multi-type building image retrieval method and system based on convolutional multi-head attention. Background Art

[0002] With the advent of the digital age, architectural image data has shown explosive growth. In this context, architectural image retrieval technology has been widely used because it can efficiently filter out the images required by users from massive databases. Buildings can be divided into single buildings with unique functions and characteristics and multi-buildings with large scale and complex structure connected by multiple building units. At present, architectural image retrieval mainly relies on models based on deep learning, which usually include advanced technologies such as convolutional neural networks (CNNs) and vision transformers (ViTs). These methods perform well in the recognition and retrieval of single buildings, can accurately capture the key features of buildings, and efficiently filter out similar architectural images from large-scale image databases.

[0003] Although existing architectural image retrieval models have achieved relatively good results, most methods only target single buildings, while multi-buildings are often composed of multiple independent but interrelated building units. The spatial arrangement of these units is not fixed and may form a complex layout. Such a decentralized layout increases the complexity of information in the image. The model needs to recognize not only the characteristics of a single building unit, but also understand the spatial relationship and structural logic between these units, which makes the existing models perform poorly in retrieval accuracy. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the present invention provides a multi-type building image retrieval method and system based on convolutional multi-head attention. Through the convolutional attention module and the self-attention matrix of adaptive size, a convolutional method is adopted to implement attention calculation similar to Transformer in a convolutional neural network, so that the network can more easily mine the long-range feature dependency relationship between buildings, thereby effectively alleviating the problem of limited retrieval accuracy caused by the dispersed building layout.

[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a multi-type building image retrieval method based on convolutional multi-head attention, inputting the multi-type building images to be detected into a convolutional multi-head attention multi-type building image retrieval network model to obtain multi-type building image retrieval results; the convolutional multi-head attention multi-type building image retrieval network model includes a Resnet image retrieval backbone network and a convolutional attention module connected in sequence, the Resnet image retrieval backbone network is used to obtain original features with local depth description, and the convolutional attention module includes a composite pooling module, an adaptive convolutional attention module and a convolutional feedforward module for obtaining significant local features with long-distance feature dependencies.

[0006] Furthermore, the Resnet image retrieval backbone network is composed of Resnet101.

[0007] Furthermore, the composite pooling module includes a CBR module, d maximum pooling layers and a CBR module. The CBR module includes a 3×3 convolution kernel, batch normalization processing and a Relu activation function. The CBR module is used to capture local features, and the maximum pooling layer and the CBR module are used to downsample the local features to adjust the size of the local features.

[0008] Furthermore, the adaptive convolution attention module constructs a scalable convolution kernel A for each pixel in the local feature. i ,j , specifically:

[0009]

[0010] Among them, E q and is a learnable projection matrix, and c q They correspond to the embedding dimensions of the query vector Q, key vector K, and value vector V in Transformer respectively;

[0011] Merge the features of neighboring pixels in a 3×3 neighborhood into the pixels of the local feature, and use cosine similarity to get the initial custom convolution kernel for the pixel

[0012]

[0013] in,

[0014] Dynamically determine the convolution kernel through a learnable Gaussian distance map M The size of the convolution kernel A is obtained i,j , specifically:

[0015] A i,j =I i,j ×Mi,j

[0016]

[0017] Among them, θ∈(0,1) is the control A i,j The learnable network parameters of the receptive field, α is a hyperparameter that controls the trend of the receptive field;

[0018] The convolution kernel A can be expanded i,j Multiplying with the value vector V, that is, establishing an adaptive long-range dependency, for the scalable convolution kernel A i,j The result of multiplication with the value vector V is subjected to CBR processing to obtain feature data with long-range feature dependencies.

[0019] Furthermore, the convolutional feed-forward module includes multiple groups of 1×1 convolutions, batch normalization and ReLU.

[0020] Furthermore, MadaCos loss, triplet loss and hash loss were used to train the convolutional multi-head attention multi-type building image retrieval network to obtain the convolutional multi-head attention multi-type building image retrieval network model.

[0021] Furthermore, the multi-type building images to be detected are input into the convolutional multi-head attention multi-type building image retrieval network model to obtain refined significant local features with long-distance feature dependencies. The similarity is measured by MadaCos loss, triple loss and hash loss. After obtaining the query image hash code and the database image hash code, the similarity is calculated by calculating the Hamming distance between the hash codes. The calculation results are sorted in order from small to large and the final image detection result is output.

[0022] The present invention provides a multi-type building image retrieval system based on convolutional multi-head attention, comprising:

[0023] An image acquisition module is used to acquire images of multiple types of buildings to be detected;

[0024] The multi-type building image retrieval module is used to input the multi-type building images to be detected into the convolutional multi-head attention multi-type building image retrieval network model to obtain the multi-type building image retrieval results;

[0025] The convolutional multi-head attention multi-type building image retrieval network model includes a Resnet image retrieval backbone network and a convolutional attention module connected in sequence. The Resnet image retrieval backbone network is used to obtain original features with local depth descriptions. The convolutional attention module includes a composite pooling module, an adaptive convolutional attention module and a convolutional feedforward module for obtaining refined significant local features with long-distance feature dependencies.

[0026] The present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned multi-type building image retrieval method based on convolutional multi-head attention are implemented.

[0027] The present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned multi-type building image retrieval method based on convolutional multi-head attention are implemented.

[0028] Compared with the prior art, the present invention has at least the following beneficial effects:

[0029] The present invention provides a multi-type architectural image retrieval method based on convolutional multi-head attention. With Resnet network as the feature extraction backbone network, it can extract rich local deep features. By introducing a composite pooling module, an adaptive convolutional attention module and a convolutional feedforward module, the network can more effectively focus on the significant local and global information in the image. In particular, the adaptive convolutional attention module allows the network to construct an adaptive receptive field for each pixel, thereby capturing and integrating long-distance feature dependencies, which greatly enhances the network's ability to understand and model complex architectural features, thereby effectively alleviating the problem of limited retrieval accuracy caused by the scattered architectural layout.

[0030] The present invention combines MadaCos loss, triplet loss and hash loss, so that the network can simultaneously consider the similarity of global features, local features and hash codes during the training process, which helps to improve the overall retrieval performance of the network and improve the retrieval accuracy of the multi-type building image retrieval method proposed in the present invention.

[0031] The convolutional multi-head attention multi-type architectural image retrieval network proposed in the present invention can capture and integrate long-range feature dependencies, as well as focus on significant local and global information. Therefore, it can be applied to the retrieval of various types of architectural images, including buildings of different styles, structures and layouts. At the same time, by introducing the convolutional attention mechanism and combining multiple loss functions, the network can learn more discriminative feature representations, thereby improving the retrieval accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A flow chart for the implementation of the present invention;

[0033] Figure 2 This is a diagram of the feature extraction network architecture of the present invention;

[0034] Figure 3 Schematic diagram of the convolutional attention module structure;

[0035] Figure 4 This is a schematic diagram of the search results of the search method of the present invention on the building dataset CNLd2437;

[0036] Figure 5 This is a visualization diagram of some of the search results of the method of the present invention. DETAILED DESCRIPTION

[0037] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0038] like Figure 1 As shown, the present invention provides a multi-type building image retrieval method based on convolutional multi-head attention, and the specific steps are as follows:

[0039] 1. Collect architectural image data in natural scenes and construct a training dataset T r With the test data set T e , data enhancement is performed on the dataset: the original architectural image data is erased, flipped and cropped to obtain the enhanced dataset.

[0040] 2. Construct a convolutional multi-head attention multi-type building image retrieval network, such as Figure 2 As shown in the figure, the network includes a Resnet image retrieval backbone network and a convolutional attention module, wherein the Resnet image retrieval backbone network is composed of Resnet101 to obtain original features; the convolutional attention module is connected to Resnet, and the convolutional attention module includes a composite pooling module, an adaptive convolutional attention module and a convolutional feedforward module. With the help of an adaptive self-attention matrix to learn global context information, the network is easier to mine the long-range feature dependency between buildings, enhance the ability of the building image retrieval network to pay attention to significant local and global information, and improve the network's modeling ability for long-range feature dependency of multi-type building images. The establishment of this long-range feature dependency greatly improves the model's ability to understand complex layouts, thereby improving the network's retrieval accuracy.

[0041] 3. In order to improve the network's supervision ability on intra-class tightness, the convolutional multi-head attention multi-type architectural image retrieval network is trained through Madacos loss, triple loss and hash loss functions to obtain the optimal weight parameters of the architectural image retrieval network and obtain the architectural image retrieval model;

[0042] 4. The building test dataset T to be retrieved eInput the building image retrieval model to obtain multiple significant local features of the building, and perform similarity measurement through MadaCos loss, triple loss and hash loss. After obtaining the hash code of the query image and the hash code of the database image, calculate the similarity by calculating the Hamming distance between the hash codes, sort the calculation results in ascending order and output the final result.

[0043] In step 2, the Resnet image retrieval backbone network is composed of resnet101 to obtain the original feature F with local depth description l ∈R C×W×H , where C, W, and H are the dimensions of the channel and feature map width and height, respectively.

[0044] In step 2, if Figure 3 As shown in the figure, the convolutional attention module includes a composite pooling module, an adaptive convolutional attention module and a convolutional feedforward module. The original features with local depth description are fed into the composite pooling module to capture local features; the output of the composite pooling module is fed into the adaptive convolutional attention module, and an adaptive receptive field is constructed for each pixel by designing a convolution kernel of adaptive size. This enables the network to more effectively capture and integrate long-range feature dependencies between different positions in the input data, thereby enhancing the ability to recognize and process complex feature patterns; the output of the adaptive convolutional attention module is fed into the convolutional feedforward module, aiming to further refine the features generated by the adaptive convolutional attention module and improve the network's accuracy in capturing details of multiple types of architectural images.

[0045] The composite pooling module includes a CBR module, d maximum pooling layers, and a CBR module (abbreviation for convolution, batch normalization, and Relu activation function) connected in sequence (where d = log2S). l ∈R C×W×H First, a 3×3 convolution kernel, batch normalization, and Relu activation are used in the CBR module to capture local features. Then, a total of t=log2S downsampling operations are applied, and the input data is adjusted to the required output size by adjusting the number of downsampling operations. Here, each downsampling operation includes a 2×2 max pooling and CBR module (a 3×3 convolution combination, batch normalization, and Relu activation function). Finally, the output of the composite pooling module can be recorded as Among them, c m Corresponds to the embedding dimension in Transformer.

[0046] In the adaptive convolutional attention module, the output of the composite pooling module Send it to the adaptive convolutional attention module to Each pixel xi,j , scalable convolution kernel A of custom size i,j It can be constructed based on the following intermediate variables:

[0047]

[0048]

[0049] Among them, E q and is a learnable projection matrix, and c q They correspond to the embedding dimensions of the query vector (Q), key vector (K), and value vector (V) in the Transformer, respectively.

[0050] This module merges the features of neighboring pixels in a 3×3 neighborhood into x i,j After that, by calculating the cosine similarity, we get x i,j The initial custom convolution kernel

[0051]

[0052] here,

[0053] By introducing a learnable Gaussian distance map M, x is dynamically determined. i,j The size of the adaptive convolution kernel. The calculation formula of M is as follows:

[0054]

[0055] Among them, θ∈(0,1) is the control A i,j The learnable network parameters of the receptive field, α is a hyperparameter that controls the receptive field trend, and the learnable network parameters that control A and α are hyperparameters that control the receptive field tendency. θ is proportional to the receptive field. The larger α is, the smaller A i,j The more it tends to have a global receptive field.

[0056] Based on the obtained A i,j It can be calculated by formula (6):

[0057] A i,j =I i,j ×M i,j (6)

[0058] In this way, each pixel has a customized scalable convolution kernel.

[0059] Then, by adding A i,jBy multiplying A with V, an adaptive long-range dependency relationship can be established, enabling the network to capture global context information, improving the robustness and generalization ability of the model, and reducing the limitations of relying only on local information. This effectively improves the accuracy and reliability of architectural image retrieval. The result of multiplying A with V is then fed into a CBR module to obtain the final output of the adaptive convolutional attention module. Finally, the final output of the adaptive convolutional attention module is fed into the convolutional feedforward module.

[0060] The convolutional feed-forward module includes multiple groups of 1×1 convolutions, batch normalization and ReLU. The convolutional feed-forward module can be used to integrate the features learned from long-range dependencies by the refined adaptive convolutional attention module.

[0061] In step 3, the loss function of the present invention can dynamically adjust the scale factor and the additional cosine edge in each small batch, and gradually increase it to strengthen the supervision and intra-class compactness during the training process. In order to better learn the hash code that can maintain the similarity between the query image and the image to be retrieved, the loss function reduces the difference between the inner product of the semantic similarity matrix and the query-database image hash code pair, so that the network can more accurately reflect the similarity between images, thereby improving the overall retrieval performance. In addition, in order to integrate the global features with the geometric information of the discriminative local areas and improve the image retrieval accuracy, the loss function uses semantic relationships to integrate the global features with the geometric information of the discriminative local areas, thereby improving the image retrieval accuracy.

[0062] To achieve the above functions, the present invention uses MadaCos loss, triple loss and hash loss to optimize the network during the entire training process. MadaCos loss is a loss based on adaptive SoftMax, which is used to learn global representation. In order to better learn hash codes that can maintain the similarity between query images and images to be retrieved, the hash loss between the similarity matrix and the inner product of the query-image to be retrieved hash code pair is optimized. In the first E training periods, only MadaCos loss and hash loss are used to make the network aware of the prominent feature areas after the convolutional attention module. After E training periods, triple loss is used to construct triplets for local descriptor matching. By combining the three losses to jointly train the network, the global features are integrated into the geometric information of the discriminative local areas, thereby further improving the retrieval accuracy of the network.

[0063] The specific form of the total loss function is:

[0064]

[0065] In the formula, Loss represents the total loss, L mda represents the MadaCos loss, L trip represents the triplet loss, represents the hash loss. During training, λ is set to 0.05. The specific formulas of the loss functions of each part are shown in (8), (9) and (10).

[0066]

[0067] The + in the lower right corner of the formula means that when the value in [] is greater than 0, the value is taken as loss, and when it is less than 0, the loss is 0;

[0068]

[0069] Where γ is a hyperparameter and θ is the network parameter. ξ={1,2,…,n} represents the index value of the database image. Represents the index value of all query images. x i There are two representations, namely the binary code r in the database image j and the binary code q in the image to be retrieved i =tanh(F(x i ;θ)); define database point Q∈{-1,+1} m×c .

[0070] An embodiment of the present invention further provides a multi-type building image retrieval system based on convolutional multi-head attention, comprising:

[0071] An image acquisition module is used to acquire images of multiple types of buildings to be detected;

[0072] The multi-type building image retrieval module is used to input the multi-type building images to be detected into the convolutional multi-head attention multi-type building image retrieval network model to obtain the multi-type building image retrieval results;

[0073] The convolutional multi-head attention multi-type building image retrieval network model includes a Resnet image retrieval backbone network and a convolutional attention module connected in sequence. The Resnet image retrieval backbone network is used to obtain original features with local depth descriptions. The convolutional attention module includes a composite pooling module, an adaptive convolutional attention module and a convolutional feedforward module for obtaining refined significant local features with long-distance feature dependencies.

[0074] An embodiment of the present invention provides a terminal device, which includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the multi-type building image retrieval method based on convolutional multi-head attention are implemented; or, when the processor executes the computer program, the functions of each module in the multi-type building image retrieval system based on convolutional multi-head attention are implemented.

[0075] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to accomplish the present invention.

[0076] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0077] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0078] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.

[0079] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0080] Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned multi-type building image retrieval method based on convolutional multi-head attention can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc.

[0081] The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0082] Figure 4 is the search result of the method of the present invention on the building dataset CNLd2437. Figure 4 The first column in each row represents the image to be queried, and the 2nd to 6th images in each row represent the query results. According to the query results, it can be found that the matching accuracy of the method of the present invention is relatively high.

[0083] Figure 5 The method of the present invention is in the training data set T r The first column is the original image of the collected data, the second column is the heat map after the convolutional multi-head attention multi-type architectural image retrieval network, and the third column is the superposition of the first two columns of images. It can be found that the method of the present invention pays attention to the global information, and on this basis can extract the significant local detail features in the network, thereby improving the retrieval accuracy of architectural images.

[0084] The detection performance of the method of the present invention and other excellent methods on the public data sets Roxf, Rpar and CNLd437 are compared, and the results are shown in Tables 1 and 2:

[0085] Table 1 shows the results of the method of the present invention and the existing excellent methods on Roxf and Rpar:

[0086]

[0087] It can be seen from Table 1 that compared with other advanced algorithms, the image matching performance of the method of the present invention is further improved, and the mAP is increased by 10.22% over the R101-DELG method, which once again proves the effectiveness of the method of the present invention.

[0088] Table 2 shows the results of the method of the present invention and the existing excellent methods on CNLd437:

[0089]

[0090] It can be seen from Table 2 that compared with other advanced algorithms, the image matching performance of the method of the present invention has been further improved, and the mAP is increased by 3.37% compared with the R101-DOLG method, which once again proves the effectiveness of the method of the present invention.

[0091] In summary, the convolutional multi-head attention multi-type building image retrieval method of the present invention collects building image data in natural scenes and constructs a training data set T r With the test data set T e ; Construct a convolutional multi-head attention multi-type building image retrieval network using Resnet, including the Resnet backbone network and the convolutional attention module; Based on the hash loss, the total loss function is constructed by combining the MadaCos loss and the triple loss; Use the training dataset T for building retrieval r Train the architectural image retrieval network to obtain the architectural image retrieval model; use the test dataset T e The architectural image retrieval model is input to obtain the architectural image retrieval results, which improves the network's ability to distinguish samples of different categories in the feature space and effectively alleviates the problem of limited retrieval accuracy caused by the scattered building layout.

Claims

1. A multi-type architectural image retrieval method based on convolutional multi-head attention, It is characterized in that The multi-type building images to be detected are input into a convolutional multi-head attention multi-type building image retrieval network model to obtain multi-type building image retrieval results; the convolutional multi-head attention multi-type building image retrieval network model includes a Resnet image retrieval backbone network and a convolutional attention module connected in sequence, the Resnet image retrieval backbone network is used to obtain original features with local depth description, and the convolutional attention module includes a composite pooling module, an adaptive convolutional attention module and a convolutional feedforward module for obtaining significant local features with long-distance feature dependencies.

2. According to the multi-type building image retrieval method based on convolutional multi-head attention according to claim 1, It is characterized in that The Resnet image retrieval backbone network is composed of Resnet101.

3. According to the multi-type building image retrieval method based on convolutional multi-head attention according to claim 1, It is characterized in that The composite pooling module includes a CBR module, d maximum pooling layers and a CBR module. The CBR module includes a 3×3 convolution kernel, batch normalization processing and a Relu activation function. The CBR module is used to capture local features. The maximum pooling layer and the CBR module are used to downsample the local features and adjust the size of the local features.

4. According to claim 1, a multi-type building image retrieval method based on convolutional multi-head attention, It is characterized in that The scalable convolution kernel A for each pixel in the local feature is constructed in the adaptive convolution attention module i,j , specifically: Among them, E q and is a learnable projection matrix, and c q They correspond to the embedding dimensions of the query vector Q, key vector K, and value vector V in Transformer respectively; Merge the features of neighboring pixels in a 3×3 neighborhood into the pixels of the local feature, and use cosine similarity to get the initial custom convolution kernel for the pixel in, Dynamically determine the convolution kernel through a learnable Gaussian distance map M The size of the convolution kernel A is obtained i,j , specifically: A i,j =I i,j ×M i,j Among them, θ∈(0,1) is the control A i,j The learnable network parameters of the receptive field, α is a hyperparameter that controls the trend of the receptive field; The convolution kernel A can be expanded i,j Multiplying with the value vector V, that is, establishing an adaptive long-range dependency, for the scalable convolution kernel A i,j The result of multiplication with the value vector V is subjected to CBR processing to obtain feature data with long-range feature dependencies.

5. According to claim 1, a multi-type building image retrieval method based on convolutional multi-head attention, It is characterized in that The convolutional feed-forward module includes multiple groups of 1×1 convolutions, batch normalization, and ReLU.

6. According to claim 1, a multi-type building image retrieval method based on convolutional multi-head attention, It is characterized in that MadaCos loss, triplet loss and hash loss are used to train the convolutional multi-head attention multi-type building image retrieval network to obtain the convolutional multi-head attention multi-type building image retrieval network model.

7. According to claim 1, a multi-type building image retrieval method based on convolutional multi-head attention, It is characterized in that The multi-type building images to be detected are input into the convolutional multi-head attention multi-type building image retrieval network model to obtain refined significant local features with long-distance feature dependencies. The similarity is measured by MadaCos loss, triple loss and hash loss. After obtaining the hash code of the query image and the hash code of the database image, the similarity is calculated by calculating the Hamming distance between the hash codes. The calculation results are sorted in ascending order and the final image detection result is output.

8. A multi-type architectural image retrieval system based on convolutional multi-head attention. It is characterized in that include: An image acquisition module is used to acquire images of multiple types of buildings to be detected; The multi-type building image retrieval module is used to input the multi-type building images to be detected into the convolutional multi-head attention multi-type building image retrieval network model to obtain the multi-type building image retrieval results; The convolutional multi-head attention multi-type building image retrieval network model includes a Resnet image retrieval backbone network and a convolutional attention module connected in sequence. The Resnet image retrieval backbone network is used to obtain original features with local depth descriptions. The convolutional attention module includes a composite pooling module, an adaptive convolutional attention module and a convolutional feedforward module for obtaining refined significant local features with long-distance feature dependencies.

9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of a multi-type building image retrieval method based on convolutional multi-head attention are implemented as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of a multi-type building image retrieval method based on convolutional multi-head attention are implemented as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cross-view-angle image real-time matching geographic positioning method and system based on deep learning

    CN114241464A

  • Ventral-dorsal neural networks: object detection via selective attention

    US20200097723A1

Cited By

  • Target tracking method and system based on scale perception convolution feature extraction network

    CN118898638A