Image classification method and device, electronic equipment and readable storage medium
Through feature extraction, reparameterized convolution, collaborative attention mechanism and cross-stage local network processing, the problem of insufficient accuracy and generalization capabilities of image classification models in complex image data processing is solved, and more efficient image classification and Better model performance.
Patent Information
- Application Number
- CN202411620589.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-01-07
AI Technical Summary
When processing complex image data, existing image classification models have insufficient feature extraction, insufficient relationship modeling between features, simple and rough feature fusion strategies, resulting in low accuracy and poor generalization ability.
Feature extraction processing is used to obtain feature vectors, and feature expression capabilities are enhanced through reparameterized convolution and synergistic attention mechanisms, combined with cross-stage local networks and pooling mapping, and combined weighted processing to generate target category data.
It improves the accuracy and generalization ability of image classification, optimizes computing efficiency, enhances scalability and flexibility, and visualization of the coordinated attention mechanism improves interpretability.
Smart Images

Figure CN119273996A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image classification method, device, electronic device and readable storage medium. Background Art
[0002] As one of the core tasks in the field of computer vision, current image classification technology is widely used in many fields such as intelligent monitoring, autonomous driving, and medical imaging diagnosis. Traditional image classification methods mainly rely on manually designed feature extraction algorithms, such as scale-invariant feature transformation and oriented gradient histogram. However, traditional methods have limited feature expression capabilities and poor generalization capabilities when dealing with large-scale, high-dimensional, and complex background image data. Under normal circumstances, convolutional neural networks significantly improve the accuracy and robustness of image classification by automatically learning multi-level features of images. However, as the depth of the network increases, the complexity of the model increases, leading to problems such as difficulty in training, high consumption of computing resources, and overfitting. In addition, when processing image features, existing convolutional neural network models ignore the correlation between features and global context information, which limits the model's ability to understand complex image structures.
[0003] It can be seen that the existing technology has problems such as low accuracy and poor generalization ability of image classification models when processing complex image data due to insufficient feature extraction, insufficient modeling of the relationship between features, and simple and rough feature fusion strategies. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide an image classification method, device, electronic device and readable storage medium to solve the problems in the prior art of low accuracy and poor generalization ability of image classification models when processing complex image data due to insufficient feature extraction, insufficient modeling of the relationship between features, and simple and rough feature fusion strategies.
[0005] According to a first aspect of an embodiment of the present disclosure, an image classification method is provided, including: performing feature extraction processing on an image to be classified to obtain a feature vector corresponding to the image to be classified; performing reparameterized convolution processing on the feature vector corresponding to the image to be classified to obtain a reparameterized vector corresponding to the image to be classified; processing the reparameterized vector corresponding to the image to be classified by a collaborative attention mechanism to obtain a collaborative attention vector corresponding to the image to be classified; determining a residual feature vector corresponding to the image to be classified according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified; performing weighted fusion processing on the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a feature splicing vector corresponding to the image to be classified; processing the feature splicing vector corresponding to the image to be classified based on a cross-stage local network to obtain a cross-level fusion vector corresponding to the image to be classified; performing pooling mapping processing on the cross-level fusion vector corresponding to the image to be classified to obtain target category data corresponding to the image to be classified.
[0006] According to a second aspect of an embodiment of the present disclosure, an image classification device is provided, including: a first processing module, used to perform feature extraction processing on an image to be classified to obtain a feature vector corresponding to the image to be classified; a second processing module, used to perform reparameterized convolution processing on the feature vector corresponding to the image to be classified to obtain a reparameterized vector corresponding to the image to be classified; a third processing module, used to process the reparameterized vector corresponding to the image to be classified through a collaborative attention mechanism to obtain a collaborative attention vector corresponding to the image to be classified; a determination module, used to determine a residual feature vector corresponding to the image to be classified according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified; a fourth processing module, used to perform fusion weighted processing on the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a feature splicing vector corresponding to the image to be classified; a fifth processing module, used to process the feature splicing vector corresponding to the image to be classified based on a cross-stage local network to obtain a cross-level fusion vector corresponding to the image to be classified; a sixth processing module, used to perform pooling mapping processing on the cross-level fusion vector corresponding to the image to be classified to obtain target category data corresponding to the image to be classified.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0008] According to a fourth aspect of an embodiment of the present disclosure, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0009] Compared with the prior art, the embodiments of the present disclosure have the following beneficial effects: by performing feature extraction processing on the image to be classified, a feature vector corresponding to the image to be classified is obtained, and then the feature vector corresponding to the image to be classified can be subjected to reparameterized convolution processing to obtain a reparameterized vector corresponding to the image to be classified, and the reparameterized vector corresponding to the image to be classified can be processed by a collaborative attention mechanism (MAC) to obtain a collaborative attention vector corresponding to the image to be classified, and then a residual feature vector corresponding to the image to be classified can be determined according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified, and the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified can be processed by fusion weighting to obtain a feature splicing vector corresponding to the image to be classified, and a cross-stage partial network (Cross Stage Partial Network) can be used to obtain a feature vector. Darknet, CSPDarknet) processes the feature splicing vector corresponding to the image to be classified to obtain the cross-level fusion vector corresponding to the image to be classified. The cross-level fusion vector corresponding to the image to be classified can be processed by pooling mapping to obtain the target category data corresponding to the image to be classified. In this way, the expressive power of the feature vector is enhanced through re-parameterized convolution processing and collaborative attention mechanism, the accuracy of the classification results is improved, the generalization ability is enhanced, the computational efficiency is optimized, the scalability and flexibility are enhanced, and the visualization of the collaborative attention mechanism improves the interpretability. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present disclosure;
[0012] Figure 2 is a flowchart of an image classification method provided by an embodiment of the present disclosure;
[0013] Figure 3 is a structural schematic diagram of an image classification model provided by an embodiment of the present disclosure;
[0014] Figure 4 is a structural schematic diagram of an image classification device provided by an embodiment of the present disclosure;
[0015] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0016] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0017] It should be noted that the user information (including but not limited to terminal device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0018] An image classification method and device according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0019] Figure 1 Schematic diagram of an application scenario of an embodiment of the present disclosure. The application scenario may include terminal devices 1, 2 and 3, a server 4 and a network 5.
[0020] Terminal devices 1, 2 and 3 can be hardware or software. When terminal devices 1, 2 and 3 are hardware, they can be various electronic devices with display screens and supporting communication with server 4, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers, etc.; when terminal devices 1, 2 and 3 are software, they can be installed in the above electronic devices. Terminal devices 1, 2 and 3 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present disclosure are not limited to this. Furthermore, various applications can be installed on terminal devices 1, 2 and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.
[0021] The server 4 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 4 may be a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in the embodiments of the present disclosure.
[0022] It should be noted that the server 4 can be hardware or software. When the server 4 is hardware, it can be various electronic devices that provide various services for the terminal devices 1, 2, and 3. When the server 4 is software, it can be multiple software or software modules that provide various services for the terminal devices 1, 2, and 3, or it can be a single software or software module that provides various services for the terminal devices 1, 2, and 3, and the embodiments of the present disclosure are not limited to this.
[0023] The network 5 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present disclosure.
[0024] The user can establish a communication connection with the server 4 via the network 5 through the terminal devices 1, 2 and 3 to receive or send information, etc. Specifically, the server 4 can obtain the image to be classified from the terminal devices 1, 2 and 3, and obtain the feature vector corresponding to the image to be classified by performing feature extraction processing on the image to be classified, and then the feature vector corresponding to the image to be classified can be processed by reparameterized convolution processing to obtain the reparameterized vector corresponding to the image to be classified, and the reparameterized vector corresponding to the image to be classified can be processed by MAC to obtain the collaborative attention vector corresponding to the image to be classified, and then the residual feature vector corresponding to the image to be classified can be determined according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified, and the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified can be processed by fusion weighting to obtain the feature splicing vector corresponding to the image to be classified, and the feature splicing vector corresponding to the image to be classified can be processed by CSPDarknet to obtain the cross-level fusion vector corresponding to the image to be classified, and the cross-level fusion vector corresponding to the image to be classified can be processed by pooling mapping to obtain the target category data corresponding to the image to be classified.
[0025] It should be noted that the specific types, quantities and combinations of the terminal devices 1, 2 and 3, the server 4 and the network 5 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present disclosure are not limited to this.
[0026] The image classification methods involved in the present disclosure are all specifically implemented through the structure configured in the image classification model.
[0027] Figure 2 It is a flowchart of an image classification method provided by an embodiment of the present disclosure. Figure 2 The image classification method can be Figure 1 The server executes. Figure 2 As shown, the image classification method includes:
[0028] Step 201 : performing feature extraction processing on the image to be classified to obtain a feature vector corresponding to the image to be classified.
[0029] Specifically, the image to be classified can be subjected to feature extraction processing through convolution (Convolution Batch Normalization Silu, CBS) to obtain a feature vector corresponding to the image to be classified. The feature vector can be used to characterize the quantitative description of the image to be classified in dimensions such as color, texture, and / or shape, thereby enhancing the expression ability of image information, improving the accuracy of image classification, and enhancing the depth of understanding of the image classification model for the content of the image to be classified.
[0030] The image to be classified may be the original image data that needs to be classified and identified, and the content of the image to be classified includes but is not limited to natural landscape photos, portraits, or professional images in specific fields. The feature vector corresponding to the image to be classified may be a vector extracted from the image to be classified through CBS processing, and the vector may be used to characterize the key features of the image to be classified, and the feature vector may be used in various applications such as image classification, identification, or retrieval.
[0031] For example, in the application scenario of judging whether the irrigation water of a corn planting area is uniform, the CBS can be used to perform feature extraction processing on the images collected from the corn planting area to obtain a feature vector that can be used to characterize information such as the growth status of the corn seedlings, leaf color, and / or soil moisture. This feature vector can be used to judge whether the irrigation water for corn seedlings is uniform. For example, if the feature vector represents that the soil color of a corn field is darker and the texture is more moist, it can be characterized that the irrigation water in the area is relatively sufficient; if the soil color is dry and the texture is rough, it can be characterized as insufficient or unevenly distributed irrigation water.
[0032] Step 202: Perform re-parameterized convolution processing on the feature vector corresponding to the image to be classified to obtain a re-parameterized vector corresponding to the image to be classified.
[0033] Specifically, the feature vector corresponding to the image to be classified can be processed by re-parameterized convolution (Re-parameterized Refocusing Convolution, RepConv), and the re-parameterized vector corresponding to the image to be classified can be obtained by dynamically adjusting and optimizing the parameters of the convolution kernel. This enhances the image classification model's ability to extract features of the image to be classified, improves the image classification model's adaptability to different image features, and improves the accuracy and robustness of the image classification results.
[0034] The re-parameterized vector corresponding to the image to be classified may be a vector obtained through the RepConv re-parameterization process, and the re-parameterized vector may be used in subsequent tasks such as image classification and recognition.
[0035] For example, the feature vector extracted from the corn planting field image can be subjected to reparameterized convolution processing to obtain a reparameterized vector corresponding to the corn planting field image. The reparameterized vector can be used in subsequent irrigation water uniformity judgment tasks, such as comparing it with a preset irrigation water uniformity standard vector to determine whether the irrigation water in the current corn planting field is uniform.
[0036] Step 203, processing the re-parameterized vector corresponding to the image to be classified through the collaborative attention mechanism to obtain the collaborative attention vector corresponding to the image to be classified.
[0037] Specifically, the reparameterized vector corresponding to the image to be classified can be processed by MAC, and the collaborative attention vector corresponding to the image to be classified can be obtained by calculating the correlation between different features, thereby enhancing the image classification model's ability to capture the features of the image to be classified, improving the image classification model's ability to process image information, and improving the accuracy and efficiency of image classification.
[0038] Among them, the collaborative attention mechanism can be used to process multimodal data in natural language processing tasks. The collaborative attention mechanism can adjust the weight of each element by analyzing each element in the feature vector and calculating its correlation, thereby emphasizing the features that have an important impact on the classification task.
[0039] The collaborative attention vector corresponding to the image to be classified can be a vector obtained by processing through the collaborative attention mechanism. The collaborative attention vector can be obtained by processing through the collaborative attention mechanism, and the collaborative attention vector can be used in subsequent image classification, recognition and other tasks to improve the accuracy and efficiency of classification.
[0040] For example, in an application where the image collected from a corn planting field is analyzed to determine whether the irrigation water before the corn seedlings emerge is uniform, the re-parameterized vector can be processed by a collaborative attention mechanism. The collaborative attention mechanism can analyze the correlation between features such as soil wet area, color, and / or texture, and emphasize the features that have an important impact on the judgment of irrigation water uniformity, thereby obtaining a more accurate and representative collaborative attention vector. The collaborative attention vector can be used in subsequent irrigation water uniformity judgment tasks, such as comparing it with a preset irrigation water uniformity standard to determine whether the irrigation water in the current corn planting field is uniform.
[0041] Step 204, determining a residual feature vector corresponding to the image to be classified according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified.
[0042] Specifically, the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified can be processed by residual connection to obtain the residual feature vector corresponding to the image to be classified, thereby enhancing the expression ability of the image classification model for image features, improving the utilization efficiency of the image classification model for image information, and improving the accuracy and stability of image classification.
[0043] The residual feature vector corresponding to the image to be classified can be a vector that combines the collaborative attention information and the original feature information. The residual feature vector can be obtained through residual connection processing and can be used in subsequent image classification, recognition and other tasks as an important basis for model decision-making.
[0044] For example, in an application of analyzing a corn field image to determine whether the irrigation water of the corn field is uniform, the residual feature vector corresponding to the corn field image can be determined based on the collaborative attention vector and the original feature vector. The residual feature vector can be used to characterize the original feature information such as soil wet area, color, and / or texture.
[0045] Step 205 , performing weighted fusion processing on the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified, to obtain a feature concatenation vector corresponding to the image to be classified.
[0046] Specifically, the residual feature vector corresponding to the image to be classified can be concatenated with the original feature vector to obtain the concatenated vector corresponding to the image to be classified, and then the concatenated vector corresponding to the image to be classified can be processed by the large core attention mechanism to obtain the attention vector corresponding to the image to be classified, and the attention vector corresponding to the image to be classified can be processed by CBS to obtain the feature concatenated vector, and the information balance of the vector in the fusion process can be ensured by configuring the weighting coefficients, thereby enhancing the image classification model's ability to understand and express image features, improving the image classification model's ability to integrate image information, and improving the accuracy and robustness of image classification.
[0047] The feature concatenation vector corresponding to the image to be classified may be used to represent a new vector that combines the residual feature vector and the feature vector corresponding to the image to be classified. The feature concatenation vector may be obtained by weighted summation or concatenation.
[0048] For example, in an application where images collected from corn fields are analyzed to determine whether the irrigation water in the corn fields is uniform, the residual feature vector can be fused and weighted with the original feature vector to obtain a feature splicing vector. The feature splicing vector can emphasize the features that have an important impact on the judgment of irrigation water uniformity through residual connection and collaborative attention mechanism, and fuse the features.
[0049] Step 206 , processing the feature concatenated vector corresponding to the image to be classified based on the cross-stage local network to obtain a cross-level fusion vector corresponding to the image to be classified.
[0050] Specifically, CSPDarknet can be used to perform cross-stage local connection and feature fusion on the feature splicing vectors corresponding to the image to be classified, so as to extract the deep features of the image to be classified and obtain the cross-level fusion vectors corresponding to the image to be classified. This enhances the image classification model's ability to extract deep features of the image to be classified, improves the image classification model's ability to process image information, and improves the accuracy and generalization of image classification.
[0051] Among them, CSPDarknet can be a deep learning network structure, which can achieve cross-level fusion of features and transmission of information by establishing local connections between different stages of the network.
[0052] The cross-level fusion vector corresponding to the image to be classified may be a vector obtained by processing the CSPDarknet network, and the cross-level fusion vector fuses feature information at different stages.
[0053] For example, in an application where the image collected from a corn field is analyzed to determine whether the irrigation water in the corn field is uniform, the feature splicing vector can be processed by the CSPDarknet network to obtain a cross-level fusion vector. The cross-level fusion vector can represent the original feature information such as soil moisture, color, and / or texture, and can obtain more comprehensive and in-depth image information through the cross-level fusion and deep feature extraction of the CSPDarknet network.
[0054] Step 207 , performing pooling mapping processing on the cross-level fusion vector corresponding to the image to be classified, to obtain target category data corresponding to the image to be classified.
[0055] Specifically, the cross-level fusion vector corresponding to the image to be classified can be subjected to global average pooling or global maximum pooling and other operations, which are not limited here, to reduce the dimension of the feature vector and retain key information, and then can be mapped through a fully connected layer or classifier to obtain the target category data corresponding to the image to be classified. The high-dimensional feature vector can be converted into a low-dimensional target category probability distribution or label, thereby enhancing the image classification model's ability to compress and express the features of the image to be classified, improving the image classification model's recognition accuracy of the target category, and improving the efficiency and accuracy of image classification.
[0056] The target category data corresponding to the image to be classified may be data used to characterize the category to which the image to be classified belongs, obtained by the image classification model according to the features of the input image to be classified through processing. The target category data may be displayed in the form of a probability distribution, which may be used to characterize the possibility that the image to be classified belongs to each category, or may be displayed as the most likely category label. The target category data may be obtained through global pooling or classifier mapping processing.
[0057] For example, in an application where the irrigation water of a corn field is determined to be uniform by analyzing the collected image of the corn field, the cross-level fusion vector can be pooled and mapped through the fully connected layer to obtain target category data. The target category data can be used to characterize the classification result of whether the irrigation water of the corn field in the collected image of the corn field is uniform.
[0058] According to the technical solution provided by the embodiment of the present disclosure, the image to be classified is processed by CBS to obtain a feature vector corresponding to the image to be classified, and then the feature vector corresponding to the image to be classified can be processed by reparameterized convolution to obtain a reparameterized vector corresponding to the image to be classified, and the reparameterized vector corresponding to the image to be classified can be processed by MAC to obtain a collaborative attention vector corresponding to the image to be classified, and then the residual feature vector corresponding to the image to be classified can be determined according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified, and the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified can be processed by fusion weighting to obtain a feature splicing vector corresponding to the image to be classified, and the feature splicing vector corresponding to the image to be classified can be processed by CSPDarknet to obtain a cross-level fusion vector corresponding to the image to be classified, and the cross-level fusion vector corresponding to the image to be classified can be processed by pooling mapping to obtain the target category data corresponding to the image to be classified, thereby enhancing the expressive power of the feature vector through reparameterized convolution processing and the collaborative attention mechanism, improving the accuracy of the classification result, enhancing the generalization ability, optimizing the computational efficiency, enhancing the scalability and flexibility, and the visualization of the collaborative attention mechanism improves the interpretability.
[0059] In some embodiments, the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified are fused and weighted to obtain a feature splicing vector corresponding to the image to be classified, including: splicing the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a splicing vector corresponding to the image to be classified; processing the splicing vector corresponding to the image to be classified through a large core attention mechanism to obtain an attention vector corresponding to the image to be classified; performing feature extraction processing on the attention vector corresponding to the image to be classified to obtain a feature splicing vector corresponding to the image to be classified.
[0060] Specifically, the residual feature vector corresponding to the image to be classified can be spliced with the original feature vector to obtain a splicing vector corresponding to the image to be classified, and then the splicing vector can be processed by a large core attention mechanism to obtain an attention vector corresponding to the image to be classified. The attention vector can be used to characterize the key feature areas in the image to be classified. The attention vector can be processed by CBS to obtain a feature splicing vector corresponding to the image to be classified.
[0061] Among them, the splicing vector corresponding to the image to be classified can be a vector obtained by splicing the residual feature vector and the feature vector corresponding to the image to be classified, which can provide a feature basis for subsequent attention mechanism processing.
[0062] The large core attention mechanism can be a kind of attention mechanism. The large core attention mechanism can obtain the long-distance relationship between vectors by calculating the correlation between features at different positions in the image, which helps the image classification model understand the image content and improve the classification performance.
[0063] The attention vector corresponding to the image to be classified can be a vector obtained by processing the splicing vector through a large core attention mechanism. The attention vector can be used to characterize the key feature areas in the image to be classified and suppress unimportant areas.
[0064] For example, in an application where images collected from corn fields are analyzed to determine whether the irrigation water in the corn fields is uniform, when there are slight differences in the distribution of soil moisture areas, the image classification model can concatenate the residual feature vector corresponding to the collected image and the feature vector corresponding to the collected image, and use the large-core attention mechanism to capture the difference information of the concatenation result to obtain the attention vector corresponding to the collected image. The attention vector can then be processed through CBS to obtain the feature concatenation vector corresponding to the collected image.
[0065] According to the technical solution provided by the embodiments of the present disclosure, the residual feature vector corresponding to the image to be classified is spliced with the original feature vector to obtain a spliced vector corresponding to the image to be classified, and then the spliced vector can be processed by a large core attention mechanism to obtain an attention vector corresponding to the image to be classified, and the attention vector can be processed by CBS to obtain a feature spliced vector corresponding to the image to be classified, thereby enhancing the image classification model's ability to fuse and refine image features, improving the image classification model's ability to capture and express features, and improving the accuracy and robustness of image classification.
[0066] In some embodiments, a residual feature vector corresponding to the image to be classified is determined based on a collaborative attention vector corresponding to the image to be classified and a feature vector corresponding to the image to be classified, including: adding the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a summed vector corresponding to the image to be classified; performing feature extraction processing on the summed vector corresponding to the image to be classified to obtain a residual feature vector corresponding to the image to be classified.
[0067] Specifically, the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified can be element-wise added to obtain the sum vector corresponding to the image to be classified. The sum vector can be used to characterize the information after the fusion of the attention mechanism and the original feature information, and then the sum vector can be used to extract features through CBS. The features can be refined and the amount of calculation can be reduced through convolution operations, activation functions, and pooling processing, and the residual feature vector corresponding to the image to be classified can be obtained.
[0068] Among them, the sum vector corresponding to the image to be classified can be a vector representation obtained by element-wise addition of the collaborative attention vector and the feature vector. The sum vector can be used to represent the information of the original features, and the features are weighted through the attention mechanism, so that the key features receive more attention in subsequent processing.
[0069] For example, in an application of analyzing images collected from corn fields to determine whether the irrigation water in the corn fields is uniform, the image classification model can add the collaborative attention vector corresponding to the collected image and the feature vector corresponding to the collected image to obtain the sum vector corresponding to the collected image, and then process the sum vector corresponding to the collected image through CBS to obtain the residual feature vector corresponding to the collected image.
[0070] According to the technical solution provided by the embodiments of the present disclosure, the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified are added element-wise to obtain a sum vector corresponding to the image to be classified, and then feature extraction is performed on the sum vector through CBS to obtain a residual feature vector corresponding to the image to be classified, thereby enhancing the image classification model's ability to integrate and refine image features, and through the adjustment of feature weights of the collaborative attention mechanism, the image classification model's sensitivity to key information is improved, and the accuracy and efficiency of image classification are improved, and feature extraction is performed through CBS to reduce computational complexity.
[0071] In some embodiments, the splicing vector corresponding to the image to be classified is processed by a large core attention mechanism to obtain an attention vector corresponding to the image to be classified, including: performing dimensionality reduction processing on the splicing vector corresponding to the image to be classified to obtain a low-dimensional vector corresponding to the image to be classified; processing the low-dimensional vector corresponding to the image to be classified by a large core attention unit to obtain a large core attention vector corresponding to the image to be classified; splicing the large core attention vector corresponding to the image to be classified and the splicing vector corresponding to the image to be classified to obtain an attention vector corresponding to the image to be classified.
[0072] Specifically, the splicing vector corresponding to the image to be classified can be reduced in dimensionality through the 1x1 convolution kernel in CBS, and the number of channels can be halved to obtain a low-dimensional vector corresponding to the image to be classified. The low-dimensional vector can then be processed by a large-core attention unit. The large-core attention unit can capture the long-range dependencies in the image to be classified through a large-size convolution kernel to obtain a large-core attention vector corresponding to the image to be classified. The large-core attention vector can then be spliced with the splicing vector to obtain an attention vector.
[0073] Among them, the low-dimensional vector corresponding to the image to be classified can be obtained by dimensionality reduction processing through the 1x1 convolution kernel in CBS. Processing through the 1x1 convolution kernel in CBS reduces the dimension of the spliced vector, reduces the amount of calculation, and retains the key feature information, providing a basis for subsequent large-core attention unit processing. The large-core attention unit can be an attention mechanism. The large-core attention unit can obtain the long-range dependency relationship in the image to be classified through a large-size convolution kernel to obtain a large-core attention vector that can emphasize key features. The large-core attention vector can be used for subsequent classification tasks or feature extraction. The large-core attention vector corresponding to the image to be classified can be obtained by processing the low-dimensional vector through the large-core attention unit. The large-core attention vector can be used to highlight the important feature areas in the image to be classified and suppress other unimportant areas.
[0074] For example, in an application of analyzing images collected from corn fields to determine whether the irrigation water in the corn fields is uniform, the splicing vector corresponding to the collected image can be reduced in dimension by the 1x1 convolution kernel in CBS to obtain a low-dimensional vector corresponding to the collected image, and then the low-dimensional vector corresponding to the collected image can be processed by the large-core attention unit to obtain a large-core attention vector corresponding to the collected image, and then the large-core attention vector corresponding to the collected image and the splicing vector corresponding to the collected image can be spliced to obtain an attention vector corresponding to the collected image.
[0075] According to the technical solution provided by the embodiment of the present disclosure, the splicing vector corresponding to the image to be classified is subjected to dimensionality reduction processing through the 1x1 convolution kernel in CBS, so as to obtain a low-dimensional vector corresponding to the image to be classified, and then the low-dimensional vector can be processed by the large-core attention unit to obtain the large-core attention vector corresponding to the image to be classified, and then the large-core attention vector can be spliced with the splicing vector to obtain the attention vector, thereby enhancing the image classification model's ability to capture the global features of the image to be classified, and improving the sensitivity to key features through the large-core attention unit, reducing the computational complexity, and improving the accuracy and efficiency of image classification.
[0076] In some embodiments, a cross-level fusion vector corresponding to the image to be classified is subjected to pooling mapping processing to obtain target category data corresponding to the image to be classified, including: performing average pooling processing on the cross-level fusion vector corresponding to the image to be classified to obtain a target vector corresponding to the image to be classified; performing full connection processing on the target vector corresponding to the image to be classified to obtain target category data corresponding to the image to be classified.
[0077] Specifically, the cross-level fusion vector of the image to be classified can be average pooled to obtain a target vector that can be used to characterize the image to be classified. The target vector can be processed through a fully connected layer to obtain target category data corresponding to the image to be classified.
[0078] Among them, the target vector corresponding to the image to be classified can be a feature vector processed by average pooling, and the target vector can be used to represent the fusion information of each level feature in the image to be classified. The target vector can be obtained by average pooling of cross-level fusion vectors.
[0079] For example, when the image classification method is used to analyze and determine whether the irrigation water of a corn planting field is uniform, the image of the corn planting field can be collected through an unmanned aerial vehicle or a ground camera to obtain multiple images of the corn field before the seedlings emerge. The collected images can then be input into the image classification model. The model will perform average pooling on the cross-level fusion vector corresponding to the collected image to obtain the target vector corresponding to the collected image, and then the target category data can be obtained through the fully connected layer processing, that is, the classification result of whether the irrigation water is uniform. According to the classification result, the irrigation strategy can be adjusted in time to ensure that the irrigation water of the corn field is evenly distributed, thereby improving the yield and quality of corn.
[0080] According to the technical solution provided by the embodiments of the present disclosure, by performing average pooling processing on the cross-level fusion vector of the image to be classified, a target vector representing the image to be classified is obtained, and the target vector can be processed by a fully connected layer to obtain target category data corresponding to the image to be classified, thereby enhancing the expression ability of image features, improving classification accuracy, and improving the recognition efficiency of the image classification model for images of different categories.
[0081] In some embodiments, feature extraction processing is performed on the image to be classified to obtain a feature vector corresponding to the image to be classified, including: convolution processing is performed on the image to be classified to obtain a convolution vector corresponding to the image to be classified; normalization processing is performed on the convolution vector corresponding to the image to be classified to obtain a normalized vector corresponding to the image to be classified; and the normalized vector corresponding to the image to be classified is processed by a preset activation function to obtain a feature vector corresponding to the image to be classified.
[0082] Specifically, a convolution operation can be performed on the image to be classified through a convolution neural network to extract local features in the image to be classified to obtain a convolution vector, which can be normalized so that each feature component tends to be consistent in numerical value to obtain a normalized vector, and then the normalized vector can be nonlinearly transformed through a Silu activation function to obtain a feature vector corresponding to the image to be classified.
[0083] Among them, the convolution vector corresponding to the image to be classified can be a vector obtained by convolution operation, and the convolution vector can be used to characterize the feature information of the local area in the image to be classified. The normalized vector corresponding to the image to be classified can be a vector obtained by normalizing the convolution vector, and the normalized vector can be used to make the values of each feature component tend to be consistent. The preset activation function can be a nonlinear function, which can be used to perform a nonlinear transformation on the normalized vector to introduce nonlinear factors. The preset activation function can be a Silu function.
[0084] For example, when the image classification method is applied to analyze and judge whether the irrigation water of a corn planting field is uniform, the image of the corn planting field can be obtained through the acquisition device and input into the image classification model, the acquired image can be convolved through the convolution layer configured in the image classification model to extract the local features in the acquired image and form a convolution vector, the convolution vector can be normalized to obtain a normalized vector, and then the normalized vector can be nonlinearly transformed through the Silu function to obtain a feature vector, which is input into the classifier to judge whether the irrigation water is uniform. According to the classification results, the irrigation situation of the corn field can be understood in time, and corresponding measures can be taken to adjust it to ensure the growth and development of corn.
[0085] According to the technical solution provided by the embodiments of the present disclosure, a convolution operation is performed on the image to be classified through a convolution neural network, and local features in the image to be classified are extracted to obtain a convolution vector. The convolution vector can be normalized so that each feature component tends to be consistent in numerical value to obtain a normalized vector. Then, the normalized vector can be nonlinearly transformed through a preset activation function to obtain a feature vector corresponding to the image to be classified, thereby enhancing the robustness and discrimination of image features, improving the efficiency of feature extraction, and improving the accuracy and generalization ability of image classification.
[0086] In some embodiments, a low-dimensional vector corresponding to the image to be classified is processed by a large core attention unit to obtain a large core attention vector corresponding to the image to be classified, including: performing spatial kernel convolution processing on the low-dimensional vector corresponding to the image to be classified to obtain a spatial kernel vector corresponding to the image to be classified; performing spatial long-range convolution processing on the spatial kernel vector corresponding to the image to be classified to obtain a spatial long-range vector corresponding to the image to be classified; performing channel convolution processing on the spatial long-range vector corresponding to the image to be classified to obtain a large core attention vector corresponding to the image to be classified.
[0087] Specifically, the low-dimensional vector corresponding to the image to be classified can be subjected to spatial kernel convolution processing through the depthwise separable convolution structure to obtain a spatial kernel vector containing spatial local feature information. The spatial kernel vector can be processed through the depthwise dilated convolution structure to increase the receptive field of the convolution kernel and capture the long-range dependencies in the image to be classified, thereby obtaining a spatial long-range vector containing spatial long-range feature information. The channel dimension can then be adjusted through 1×1 convolution to process the spatial long-range vector, and the features between different channels can be fused to obtain a large kernel attention vector that can be used to emphasize key features.
[0088] The spatial kernel vector corresponding to the image to be classified can be a vector obtained by processing a low-dimensional vector through deep separable convolution, and the spatial kernel vector can be used to represent the spatial local feature information of the image to be classified. The spatial long-range vector corresponding to the image to be classified can be a vector obtained by processing the spatial kernel vector through deep dilated convolution. The receptive field of the convolution kernel is expanded through deep dilated convolution structure processing, and the long-range dependency relationship in the image to be classified is captured.
[0089] For example, in an application where images collected from corn fields are analyzed to determine whether the irrigation water in the corn fields is uniform, the low-dimensional vector corresponding to the collected image can be processed by a deep separable convolution structure to obtain a spatial kernel vector corresponding to the collected image, which can then be processed by a deep dilated convolution to obtain a spatial long-range vector corresponding to the collected image. The channel dimension can then be adjusted by a 1×1 convolution to process the spatial long-range vector and obtain a large kernel attention vector corresponding to the collected image.
[0090] According to the technical solution provided by the embodiments of the present disclosure, spatial kernel convolution processing is performed on the low-dimensional vector corresponding to the image to be classified through a deep separable convolution structure to obtain a spatial kernel vector containing spatial local feature information. The spatial kernel vector can be processed through a deep dilated convolution structure to obtain a spatial long-range vector containing spatial long-range feature information. The channel dimension can then be adjusted through a 1×1 convolution to process the spatial long-range vector to obtain a large kernel attention vector that can be used to emphasize key features. This enhances the image classification model's ability to capture image spatial features, improves the sensitivity to long-range dependencies through spatial long-range convolution, reduces computational complexity, and improves the image classification model's ability to extract and express key features, making the classification results more accurate and improving the overall performance and efficiency of the image classification model.
[0091] Figure 3 Schematic diagram of the structure of an image classification model provided by the embodiment of the present disclosure. Figure 3 As shown, the structure of the image classification model includes:
[0092] Convolution 301 is used to perform feature extraction processing on the image to be classified to obtain a feature vector corresponding to the image to be classified;
[0093] The large core attention module 302 is used to process the splicing vector corresponding to the image to be classified to obtain the attention vector corresponding to the image to be classified;
[0094] A cross-stage local network 303 is used to process the feature concatenation vector corresponding to the image to be classified to obtain a cross-level fusion vector corresponding to the image to be classified;
[0095] The fully connected layer 304 is used to process the target vector corresponding to the image to be classified to obtain the target category data corresponding to the image to be classified.
[0096] According to the technical solution provided by the embodiment of the present disclosure, the image to be classified is processed by convolution 301 to obtain a feature vector corresponding to the image to be classified, and then the feature vector corresponding to the image to be classified can be re-parameterized by convolution to obtain a re-parameterized vector corresponding to the image to be classified, and the re-parameterized vector corresponding to the image to be classified can be processed by MAC to obtain a collaborative attention vector corresponding to the image to be classified, and then the residual feature vector corresponding to the image to be classified can be determined according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified, and the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified can be obtained by the large core attention module 302. The feature vector corresponding to the class image is processed to obtain the feature splicing vector corresponding to the image to be classified. The feature splicing vector corresponding to the image to be classified can be processed by the cross-stage local network 303 to obtain the cross-level fusion vector corresponding to the image to be classified. The cross-level fusion vector corresponding to the image to be classified can be processed by the fully connected layer 304 to obtain the target category data corresponding to the image to be classified. In this way, the expressive power of the feature vector is enhanced through the re-parameterized convolution processing and the collaborative attention mechanism, the accuracy of the classification results is improved, the generalization ability is enhanced, the computational efficiency is optimized, the scalability and flexibility are enhanced, and the visualization of the collaborative attention mechanism improves the interpretability.
[0097] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0098] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0099] Figure 4 Schematic diagram of an image classification device provided by an embodiment of the present disclosure. Figure 4 As shown, the image classification device includes:
[0100] The first processing module 401 is used to perform feature extraction processing on the image to be classified to obtain a feature vector corresponding to the image to be classified;
[0101] The second processing module 402 is used to perform a re-parameterized convolution process on the feature vector corresponding to the image to be classified to obtain a re-parameterized vector corresponding to the image to be classified;
[0102] The third processing module 403 is used to process the re-parameterized vector corresponding to the image to be classified through the collaborative attention mechanism to obtain the collaborative attention vector corresponding to the image to be classified;
[0103] A determination module 404, configured to determine a residual feature vector corresponding to the image to be classified according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified;
[0104] The fourth processing module 405 is used to perform a fusion weighted processing on the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a feature concatenation vector corresponding to the image to be classified;
[0105] A fifth processing module 406 is used to process the feature splicing vector corresponding to the image to be classified based on the cross-stage local network to obtain a cross-level fusion vector corresponding to the image to be classified;
[0106] The sixth processing module 407 is used to perform pooling mapping processing on the cross-level fusion vector corresponding to the image to be classified to obtain target category data corresponding to the image to be classified.
[0107] According to the technical solution provided by the embodiment of the present disclosure, the image to be classified is processed by CBS to obtain a feature vector corresponding to the image to be classified, and then the feature vector corresponding to the image to be classified can be processed by reparameterized convolution to obtain a reparameterized vector corresponding to the image to be classified, and the reparameterized vector corresponding to the image to be classified can be processed by MAC to obtain a collaborative attention vector corresponding to the image to be classified, and then the residual feature vector corresponding to the image to be classified can be determined according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified, and the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified can be processed by fusion weighting to obtain a feature splicing vector corresponding to the image to be classified, and the feature splicing vector corresponding to the image to be classified can be processed by CSPDarknet to obtain a cross-level fusion vector corresponding to the image to be classified, and the cross-level fusion vector corresponding to the image to be classified can be processed by pooling mapping to obtain the target category data corresponding to the image to be classified, thereby enhancing the expressive power of the feature vector through reparameterized convolution processing and the collaborative attention mechanism, improving the accuracy of the classification result, enhancing the generalization ability, optimizing the computational efficiency, enhancing the scalability and flexibility, and the visualization of the collaborative attention mechanism improves the interpretability.
[0108] In some embodiments, the fourth processing module 405 is specifically used to perform splicing processing on the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a splicing vector corresponding to the image to be classified; process the splicing vector corresponding to the image to be classified through the large core attention mechanism to obtain the attention vector corresponding to the image to be classified; perform feature extraction processing on the attention vector corresponding to the image to be classified to obtain a feature splicing vector corresponding to the image to be classified.
[0109] In some embodiments, the determination module 404 is specifically used to add the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain the sum vector corresponding to the image to be classified; and perform feature extraction processing on the sum vector corresponding to the image to be classified to obtain the residual feature vector corresponding to the image to be classified.
[0110] In some embodiments, the splicing vector corresponding to the image to be classified is processed by the large core attention mechanism to obtain the attention vector corresponding to the image to be classified, which is specifically used to perform dimensionality reduction processing on the splicing vector corresponding to the image to be classified to obtain the low dimensional vector corresponding to the image to be classified; the low dimensional vector corresponding to the image to be classified is processed by the large core attention unit to obtain the large core attention vector corresponding to the image to be classified; the large core attention vector corresponding to the image to be classified and the splicing vector corresponding to the image to be classified are spliced to obtain the attention vector corresponding to the image to be classified.
[0111] In some embodiments, the sixth processing module 407 is specifically used to perform average pooling processing on the cross-level fusion vector corresponding to the image to be classified to obtain the target vector corresponding to the image to be classified; and perform full connection processing on the target vector corresponding to the image to be classified to obtain the target category data corresponding to the image to be classified.
[0112] In some embodiments, the first processing module 401 is specifically used to perform convolution processing on the image to be classified to obtain a convolution vector corresponding to the image to be classified; perform normalization processing on the convolution vector corresponding to the image to be classified to obtain a normalized vector corresponding to the image to be classified; and process the normalized vector corresponding to the image to be classified through a preset activation function to obtain a feature vector corresponding to the image to be classified.
[0113] In some embodiments, the low-dimensional vector corresponding to the image to be classified is processed by a large core attention unit to obtain a large core attention vector corresponding to the image to be classified. Specifically, the low-dimensional vector corresponding to the image to be classified is processed by a large core attention unit to obtain a spatial kernel vector corresponding to the image to be classified; the spatial kernel vector corresponding to the image to be classified is processed by a spatial long-range convolution to obtain a spatial long-range vector corresponding to the image to be classified; the spatial long-range vector corresponding to the image to be classified is processed by a channel convolution to obtain a large core attention vector corresponding to the image to be classified.
[0114] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
[0115] Figure 5 Schematic diagram of an electronic device 5 provided in an embodiment of the present disclosure. Figure 5As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0116] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 The electronic device 5 is merely an example and does not limit the electronic device 5 , and may include more or less components than those shown in the figure, or different components.
[0117] The processor 501 may 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.
[0118] The memory 502 may be an internal storage unit of the electronic device 5, for example, a hard disk or memory of the electronic device 5. The memory 502 may also be an external storage device of the electronic device 5, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. The memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device.
[0119] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0120] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, 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.
[0121] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.
Claims
1. An image classification method, characterized in that: include: Perform feature extraction processing on the image to be classified to obtain a feature vector corresponding to the image to be classified; Performing a reparameterized convolution process on the feature vector corresponding to the image to be classified to obtain a reparameterized vector corresponding to the image to be classified; Processing the re-parameterized vector corresponding to the image to be classified by a collaborative attention mechanism to obtain a collaborative attention vector corresponding to the image to be classified; Determining a residual feature vector corresponding to the image to be classified according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified; Performing a fusion weighted processing on the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a feature splicing vector corresponding to the image to be classified; Processing the feature splicing vector corresponding to the image to be classified based on a cross-stage local network to obtain a cross-level fusion vector corresponding to the image to be classified; A pooling mapping process is performed on the cross-level fusion vector corresponding to the image to be classified to obtain target category data corresponding to the image to be classified.
2. The image classification method according to claim 1, characterized in that: The step of fusing the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified by weighted processing to obtain the feature concatenation vector corresponding to the image to be classified includes: Performing splicing processing on the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a splicing vector corresponding to the image to be classified; Processing the splicing vector corresponding to the image to be classified by a large core attention mechanism to obtain an attention vector corresponding to the image to be classified; Perform feature extraction processing on the attention vector corresponding to the image to be classified to obtain a feature splicing vector corresponding to the image to be classified.
3. The image classification method according to claim 1, characterized in that: The step of determining the residual feature vector corresponding to the image to be classified according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified includes: Adding the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a summed vector corresponding to the image to be classified; Perform feature extraction processing on the summed vector corresponding to the image to be classified to obtain a residual feature vector corresponding to the image to be classified.
4. The image classification method according to claim 2, characterized in that: The step of processing the splicing vector corresponding to the image to be classified by the large core attention mechanism to obtain the attention vector corresponding to the image to be classified includes: Performing dimensionality reduction processing on the splicing vector corresponding to the image to be classified to obtain a low-dimensional vector corresponding to the image to be classified; Processing the low-dimensional vector corresponding to the image to be classified by a large-core attention unit to obtain a large-core attention vector corresponding to the image to be classified; The large core attention vector corresponding to the image to be classified and the splicing vector corresponding to the image to be classified are spliced to obtain the attention vector corresponding to the image to be classified.
5. The image classification method according to claim 1, characterized in that: The performing pooling mapping processing on the cross-level fusion vector corresponding to the image to be classified to obtain target category data corresponding to the image to be classified includes: Performing average pooling processing on the cross-level fusion vector corresponding to the image to be classified to obtain a target vector corresponding to the image to be classified; Fully connect the target vector corresponding to the image to be classified to obtain target category data corresponding to the image to be classified.
6. The image classification method according to claim 1, characterized in that: The step of performing feature extraction processing on the image to be classified to obtain a feature vector corresponding to the image to be classified includes: Performing convolution processing on the image to be classified to obtain a convolution vector corresponding to the image to be classified; Normalizing the convolution vector corresponding to the image to be classified to obtain a normalized vector corresponding to the image to be classified; The normalized vector corresponding to the image to be classified is processed by a preset activation function to obtain a feature vector corresponding to the image to be classified.
7. The image classification method according to claim 4, characterized in that: The step of processing the low-dimensional vector corresponding to the image to be classified by the large-core attention unit to obtain the large-core attention vector corresponding to the image to be classified includes: Performing spatial kernel convolution processing on the low-dimensional vector corresponding to the image to be classified to obtain a spatial kernel vector corresponding to the image to be classified; Performing spatial long-range convolution processing on the spatial kernel vector corresponding to the image to be classified to obtain the spatial long-range vector corresponding to the image to be classified; Channel convolution processing is performed on the spatial long-range vector corresponding to the image to be classified to obtain a large kernel attention vector corresponding to the image to be classified.
8. An image classification device, characterized in that: include: The first processing module is used to perform feature extraction processing on the image to be classified to obtain a feature vector corresponding to the image to be classified; A second processing module is used to perform a reparameterized convolution process on the feature vector corresponding to the image to be classified to obtain a reparameterized vector corresponding to the image to be classified; A third processing module is used to process the re-parameterized vector corresponding to the image to be classified through a collaborative attention mechanism to obtain a collaborative attention vector corresponding to the image to be classified; A determination module, used to determine a residual feature vector corresponding to the image to be classified according to the collaborative attention vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified; A fourth processing module is used to perform fusion weighting processing on the residual feature vector corresponding to the image to be classified and the feature vector corresponding to the image to be classified to obtain a feature splicing vector corresponding to the image to be classified; A fifth processing module, used for processing the feature splicing vector corresponding to the image to be classified based on a cross-stage local network to obtain a cross-level fusion vector corresponding to the image to be classified; The sixth processing module is used to perform pooling mapping processing on the cross-level fusion vector corresponding to the image to be classified to obtain target category data corresponding to the image to be classified.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.