Vision Transformer Image Feature Extraction with Multi-Scale Patches
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current image feature extraction technologies, such as convolutional neural networks (CNNs), face limitations in efficiently processing images with varying patch sizes and capturing correlations between different regions, which hinders accurate object recognition and segmentation.
Innovation Solution
A multi-scale transformer-based approach that performs parallel embedding and transformer encoding on patches of different sizes, utilizing attention mechanisms to generate a final feature map by calculating correlations between patches through Key, Query, and Value embeddings, and applying self-attention operations to extract features from overlapping patches.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If convolutional neural networks (CNNs) are used for image feature extraction, then the processing is computationally efficient, but the ability to capture correlations between different regions and handle varying patch sizes is limited
Solution Approach 1:
The image is divided into multiple patches of different sizes, and each patch is processed independently through embedding layers. This segmentation allows the model to handle varying patch sizes effectively while maintaining computational efficiency through parallel processing of each patch.
Solution Approach 2:
The patent introduces a multi-scale dimension by processing patches at different sizes simultaneously. This dimensional approach allows the model to capture features at various levels of abstraction and spatial relationships, improving adaptability without proportionally increasing complexity.
2Measurement precision
If traditional CNNs are used, then the model structure is simple, but the accuracy in capturing correlations between different image regions is insufficient
Solution Approach 1:
Self-attention mechanisms are introduced as an intermediary component between the embedding layer and the output layer. This attention mechanism computes correlations between different patches by calculating attention scores, enabling accurate capture of regional relationships while maintaining a relatively simple overall architecture.
Solution Approach 2:
The model employs dynamic attention scores that are computed based on the content of each patch and its relationships with other patches. This dynamic computation allows the model to adaptively focus on relevant regions and capture correlations accurately, improving measurement precision without requiring a fixed complex structure.
3Adaptability or versatility
If multi-scale patches are processed independently, then the adaptability to various patch sizes is improved, but the computational time increases
Solution Approach 1:
By segmenting the image into patches and processing them independently through parallel embedding and attention mechanisms, the model achieves adaptability to various patch sizes. The parallel processing architecture reduces the computational time penalty by avoiding sequential processing of different scales.
Solution Approach 2:
The patent designs a universal processing framework that can handle multiple patch sizes using the same embedding and attention mechanisms. This multi-functional approach eliminates the need for separate processing pipelines for different scales, reducing computational overhead and processing time.
4Measurement precision
If attention mechanisms are used to calculate correlations between patches, then the feature extraction accuracy is improved, but the computational complexity increases
Solution Approach 1:
The attention mechanism computes correlations by segmenting the computation into pairwise comparisons between patches. This segmented approach allows for efficient calculation of attention scores using matrix operations, improving accuracy while managing computational complexity through structured computation.
Solution Approach 2:
The patent optimizes the attention mechanism by changing computational parameters, such as using simplified attention score calculations and efficient matrix multiplication. These parameter changes reduce the computational complexity of the attention mechanism while maintaining the accuracy improvements it provides for object recognition.
Data Source
AI summary
The disclosure relates to a method of extracting image features based on a vision transformer, a method of performing embedding on an input image in units of patches and extracting visual features through global attention. An apparatus for extracting an image feature based on a vision transformer according to an embodiment of the disclosure includes a memory configured to store data and a processor configured to control the memory, wherein the processor is configured to perform embedding on multi-patches for an input image, extract feature maps for the embedding multi-patches, perform transformer encoding based on a neural network using the extracted feature maps, extract a feature of the input image through a final feature map extracted through the transformer encoding, and wherein the patches have different sizes.


