A fine-grained image recognition method and device based on cross-dataset information mining

Through the fine-grained image recognition neural network pre-trained based on cross-dataset information, the problem of fine-grained visual classification algorithms relying on a single data set is solved, and the recognition accuracy and application effect are improved.

CN116563607BActive Publication Date: 2024-09-17BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310382101.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2024-09-17
Estimated Expiration
2043-04-11

AI Technical Summary

Technical Problem

Current fine-grained visual classification algorithms rely on a single training data, resulting in long analysis time, large storage space, and affected accuracy. The positive and negative transfer of different data sets is ignored, resulting in data confusion and reduced recognition accuracy.

Method used

A fine-grained image recognition neural network pre-trained based on cross-dataset information is used to learn positive and negative transfer between different data sets through feature extraction, spatial attention, feature decorrelation and feature aggregation modules to improve recognition accuracy.

Benefits of technology

Effectively balances positive and negative transfer across data sets, improves the accuracy of fine-grained image recognition, can accurately predict fine-grained category labels of target images, and promotes the application of fine-grained visual classification algorithms in practice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116563607B
    Figure CN116563607B
Patent Text Reader

Abstract

The present application relates to a method and device for fine-grained image recognition based on cross-dataset information mining. The method comprises: obtaining a target fine-grained image; inputting the target fine-grained image into a trained fine-grained image recognition neural network, wherein the fine-grained image recognition neural network comprises a feature extraction module, a spatial attention module, a feature decorrelation module, a feature aggregation module, and a recognition module, and the feature extraction module, the spatial attention module, the feature decorrelation module, the feature aggregation module, and the recognition module are all pre-trained based on cross-dataset information; the trained fine-grained image recognition neural network outputs a recognition result corresponding to the target fine-grained image. The present application recognizes the target fine-grained image through a fine-grained image recognition neural network pre-trained based on cross-dataset information, because the training process learns the positive and negative transfers between different data sets, and also balances the positive and negative transfers across data sets, thereby improving the recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing and information technology. More specifically, the present application relates to a fine-grained image recognition method and device based on cross-dataset information mining. Background Art

[0002] In daily life, most people can quickly distinguish the coarse-grained label of an object (such as car, bird, airplane). If we want to further distinguish fine-grained labels (such as Ferrari, palm tree, Boeing 727-200), we must learn and master the relevant knowledge. But it is impossible to master the knowledge and classification topology of all objects in this world. With the rapid development of deep learning, the current fine-grained visual classification algorithm has abandoned the dependence on additional information (such as attributes, bounding boxes), and has achieved more than 90% recognition performance on a wide range of fine-grained datasets, which has the ability of practical application.

[0003] However, current fine-grained visual classification algorithms are all based on single training data. To identify the fine-grained label of an object, you must first use a coarse-grained visual classification model to "know" its coarse-grained label (such as cars and birds), and then select the corresponding fine-grained model from the existing fine-grained visual classification model to identify its fine-grained label. This will result in longer analysis time and require more storage space. The accuracy of coarse-grained image recognition directly affects the accuracy of fine-grained recognition, resulting in error accumulation. In addition, the positive and negative migration between different data sets is ignored, which will also cause data confusion and even anomalies, thereby affecting the recognition accuracy of the model. Summary of the invention

[0004] Based on the above technical problems, the present invention aims to recognize the target fine-grained image through a fine-grained image recognition neural network pre-trained based on cross-dataset information. Because the training process learns the positive and negative transfers between different data sets, it also balances the positive and negative transfers across data sets, thereby improving the recognition accuracy.

[0005] A first aspect of the present invention provides a fine-grained image recognition method based on cross-dataset information mining, the method comprising:

[0006] Acquire a target fine-grained image;

[0007] Inputting the target fine-grained image into a trained fine-grained image recognition neural network, wherein the fine-grained image recognition neural network includes a feature extraction module, a spatial attention module, a feature decorrelation module, a feature aggregation module, and a recognition module, and the feature extraction module, the spatial attention module, the feature decorrelation module, the feature aggregation module, and the recognition module are all pre-trained based on cross-dataset information;

[0008] The trained fine-grained image recognition neural network outputs a recognition result corresponding to the target fine-grained image.

[0009] In some embodiments of the present invention, the training process of the fine-grained image recognition neural network includes:

[0010] Select training sample images based on cross-dataset information;

[0011] Inputting the training sample image into the feature extraction module for training to obtain deep features;

[0012] Inputting the deep features into the spatial attention module for weight learning to obtain deep features with spatial attention;

[0013] Training the deep features with spatial attention to pass through a feature decorrelation module, a feature aggregation module, and a recognition module in sequence;

[0014] The training is stopped when a preset number of training times is reached or the fine-grained image recognition neural network converges on the loss function.

[0015] In some embodiments of the present invention, the deep features are input into the spatial attention module for weight learning to obtain the deep features with spatial attention, including:

[0016] The deep features are divided into 8 groups on the channel, and the grouped deep features are input into the spatial attention module to obtain deep features with spatial attention.

[0017] In some embodiments of the present invention, after inputting the training sample image into the feature extraction module for training to obtain the deep feature, the method further includes:

[0018] Randomly selecting a data set from the training sample images as a meta-test set, and taking all data sets from the training sample images excluding the meta-test set as a meta-training set;

[0019] Performing meta-learning training on the spatial attention module using the meta-training set to optimize and update parameters in the spatial attention module;

[0020] The meta-learning loss function is calculated using the meta-test set until the meta-learning loss function converges.

[0021] In some embodiments of the present invention, the feature decorrelation module includes a projection head; training the deep features with spatial attention through the feature decorrelation module includes:

[0022] The training is to decorrelate the deep features with spatial attention through the projection head to obtain unique features.

[0023] In some embodiments of the present invention, the feature aggregation module is a channel-based feature aggregation module based on gating and is provided with a weighted fusion layer and a fully connected layer; the training process of the feature aggregation module includes:

[0024] Input the unique features into the feature aggregation module, train the unique features to be connected in series at the channel level, and implement the fusion of the corresponding weights in each unique feature through the weighted fusion layer;

[0025] The training outputs the fusion result through the fully connected layer.

[0026] In some embodiments of the present invention, the recognition module is implemented by setting a joint classifier.

[0027] A second aspect of the present invention provides a fine-grained image recognition device based on cross-dataset information mining, the device comprising:

[0028] An acquisition module, configured to acquire a target fine-grained image;

[0029] An input module is configured to input the target fine-grained image into a trained fine-grained image recognition neural network, wherein the fine-grained image recognition neural network includes a feature extraction module, a spatial attention module, a feature decorrelation module, a feature aggregation module, and a recognition module, and the feature extraction module, the spatial attention module, the feature decorrelation module, the feature aggregation module, and the recognition module are all pre-trained based on cross-dataset information;

[0030] The output module is configured to output a recognition result corresponding to the target fine-grained image to the trained fine-grained image recognition neural network.

[0031] A third aspect of the present invention provides an electronic 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 fine-grained image recognition method based on cross-dataset information mining described in each embodiment of the present invention is implemented.

[0032] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the fine-grained image recognition method based on cross-dataset information mining described in each embodiment of the present invention.

[0033] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:

[0034] This application recognizes the target fine-grained image through a fine-grained image recognition neural network pre-trained based on cross-dataset information. Because the training process learns the positive and negative transfers between different data sets, it also balances the positive and negative transfers across data sets, thereby improving the accuracy of recognition. This application can effectively and accurately predict the fine-grained category label of an object such as a target image based on the combined category space, thereby promoting the application of fine-grained visual classification algorithms in practice.

[0035] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0037] Figure 1 A schematic diagram of the steps of a fine-grained image recognition method based on cross-dataset information mining in an exemplary embodiment of the present application is shown;

[0038] Figure 2 A schematic diagram of another fine-grained image recognition method process based on cross-dataset information mining in an exemplary embodiment of the present application is shown;

[0039] Figure 3 A schematic diagram of the structure of an attention module in an exemplary embodiment of the present application is shown;

[0040] Figure 4 A schematic diagram of the structure of a feature decorrelation module in an exemplary embodiment of the present application is shown;

[0041] Figure 5 A schematic diagram of the structure of a feature aggregation module in an exemplary embodiment of the present application is shown;

[0042] Figure 6 A schematic diagram of the structure of a fine-grained image recognition device based on cross-dataset information mining in an exemplary embodiment of the present application is shown;

[0043] Figure 7 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] Below, the embodiment of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In addition, in the following description, the description of known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present application. It is obvious to those skilled in the art that the present application can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present application, some technical features known in the art are not described.

[0045] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of the features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0046] Now, exemplary embodiments according to the present application will be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in a variety of different forms and should not be construed as being limited to the embodiments described herein. The accompanying drawings are not drawn to scale, and certain details may be magnified and certain details may be omitted for the purpose of clear expression. The shapes of the various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are merely exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0047] The following is attached to the instruction manual Figure 1 -Attached Figure 7 Several embodiments are given to describe exemplary implementations according to the present application. It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementations of the present application are not limited in this regard. On the contrary, the implementations of the present application can be applied to any applicable scenario.

[0048] In some exemplary embodiments of the present application, a fine-grained image recognition method based on cross-dataset information mining is provided, such as Figure 1 As shown, the method includes:

[0049] S1, obtain the target fine-grained image;

[0050] S2, inputting the target fine-grained image into a trained fine-grained image recognition neural network, wherein the fine-grained image recognition neural network includes a feature extraction module, a spatial attention module, a feature decorrelation module, a feature aggregation module, and a recognition module, and the feature extraction module, the spatial attention module, the feature decorrelation module, the feature aggregation module, and the recognition module are all pre-trained based on cross-dataset information;

[0051] S3. The trained fine-grained image recognition neural network outputs a recognition result corresponding to the target fine-grained image.

[0052] It should be noted that the target fine-grained image in the above S1 is an image in an actual application scenario, such as a real-time image obtained in an actual monitoring scenario. The image here includes one or more frames of images captured from various real-time videos, such as a fine-grained image captured from an aircraft route monitoring video, etc.

[0053] The above working process from S1 to S3 can refer to Figure 2 ,like Figure 2 As shown, Represents the work of the feature extraction module. The extracted deep features are then passed through the spatial attention module (i.e. Figure 2 The deep features after adding spatial attention are then input into the feature decorrelation module to obtain unique features. Then, the feature aggregation module is used to aggregate multiple unique features, and finally the recognition module is used for recognition.

[0054] In a preferred implementation process, the deep features are input into the spatial attention module for weight learning to obtain the deep features with spatial attention, including: dividing the deep features into 8 groups on the channel, and inputting the grouped deep features into the spatial attention module to obtain the deep features with spatial attention. The process can be expressed by formula (1):

[0055]

[0056] in, C is the deep feature The number of channels, H and W are the height and width of each channel. Obtaining deep features with spatial attention is essentially an enhancement technique for deep features, such as Figure 3 As shown in Figure 1, the spatial dimension of the deep features is weighted to learn the weights corresponding to each deep feature.

[0057] Preferably, after the training sample image is input into the feature extraction module for training to obtain the deep features, Figure 3, also includes: randomly selecting a data set from the training sample image as a meta-test set, and taking all data sets in the training sample image excluding the meta-test set as a meta-training set; using the meta-training set to perform meta-learning training on the spatial attention module, and optimizing and updating the parameters in the spatial attention module; and calculating the meta-learning loss function through the meta-test set until the meta-learning loss function converges.

[0058] The above meta-test set can be expressed by formula (2):

[0059]

[0060] The meta-training set can be expressed by formula (3):

[0061]

[0062] Meta-learning is used to optimize the parameters of the spatial attention layer. The loss function of meta-training can be expressed as formula (4):

[0063]

[0064] Among them, θ represents the parameters of the spatial attention layer, and the parameters of the spatial attention layer are updated after optimization as α is the learning rate.

[0065] The loss function of the parameters on the meta-test set can be expressed by formula (5):

[0066]

[0067] Meta-training and meta-testing are optimized simultaneously, and the meta-learning loss function is used to train the spatial attention layer. The meta-learning loss function can be expressed as formula (6):

[0068]

[0069] The optimized spatial attention module is trained by meta-learning, and the weights are learned and updated. Then the grouped deep features are input into the spatial attention module, and then trained to obtain the deep features with spatial attention, which can be expressed by formula (7):

[0070]

[0071] Among them, each Conv k (·) is a 1×1 convolutional layer (the input channel is The output channel is 1), Sigmoid represents the activation function, and Cat(·) represents the concatenation of multiple features at the channel level.

[0072] The training of the above-mentioned spatial attention module includes two levels. On the one hand, the weights are learned after meta-learning optimization. On the other hand, the deep features are divided into 8 groups on the channel, and the grouped deep features are input into the spatial attention module. The deep features with spatial attention are obtained through training, so that the weight update results are displayed on the grouped deep features, thereby obtaining the deep features of spatial attention. By training the spatial attention module based on cross-dataset information, the sensitivity and accuracy of the spatial attention module are improved because the training process learns the positive and negative transfers between different data sets.

[0073] In a preferred implementation, the structure of the feature decorrelation module refers to Figure 4 , the feature decorrelation module includes a projection head ( Figure 4 (not shown); training the deep features with spatial attention through a feature decorrelation module, including: training the deep features with spatial attention through the projection head to decorrelate, and obtain a unique feature. Decorrelation can be expressed by formula (8):

[0074]

[0075] in, is a unique feature, f represents the overall deep feature with spatial attention, and f n represents the features separated from the common encoding, BN n (·) is a batch normalization layer and ReLU is a nonlinear activation function.

[0076] In another preferred implementation, referring to Figure 5 The feature aggregation module is a channel-based feature aggregation module based on gate control and is provided with a weighted fusion layer and a fully connected layer; the training process of the feature aggregation module includes: inputting the unique features into the feature aggregation module, training to connect the unique features in series at the channel level, and realizing the fusion of the corresponding weights in each unique feature through the weighted fusion layer; training to output the series connection result through the fully connected layer. Feature aggregation can be expressed by formula (9):

[0077]

[0078] in, express The cth channel of , c∈[1,C, C represents the number of channels, N represents the number of data sets, Cat(·) represents the concatenation of multiple features at the channel level, and FC(·) represents the full connection with an output dimension equal to N. It can be understood that after the above weight learning It is a unique feature with weights. In other words, each unique feature has a corresponding learned weight. In the feature aggregation module, the features are connected in series and the corresponding weights are fused, which enhances the overall image and promotes subsequent recognition targets to improve recognition accuracy.

[0079] In some embodiments of the present application, the recognition module is implemented by setting a joint classifier. To predict the joint classification results, the loss function is expressed by formula (10):

[0080]

[0081] in, is the cross entropy loss.

[0082] The loss functions for training the feature extractor, feature decorrelation module, feature aggregation module and classifier are respectively expressed as formula (11) and formula (12):

[0083] Loss(·)=Loss all (θ) Formula (11)

[0084] Loss all (·)=Loss main (·)+Loss aux (·) Formula (12)

[0085] Among them, Θ represents the parameters of the entire neural network except the spatial attention layer.

[0086] It is understandable that by balancing the positive and negative migration between different data sets through feature decorrelation and feature aggregation, the fine-grained category label of an object such as a target image can be effectively and accurately predicted based on the combined category space, promoting the application of fine-grained visual classification algorithms in practice. After each module is trained, the entire fine-grained image recognition neural network is also considered to be trained. Then, for the target fine-grained image, the specific working process is similar to the training process. The target fine-grained image passes through the feature extraction module, spatial attention module, feature decorrelation module, feature aggregation module, and recognition module in turn to obtain accurate recognition results.

[0087] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention.

[0088] In some exemplary embodiments of the present application, a fine-grained image recognition device based on cross-dataset information mining is also provided, which executes the fine-grained image recognition method based on cross-dataset information mining described in each embodiment of the present application, such as Figure 6 As shown, the device comprises:

[0089] An acquisition module 601 is configured to acquire a target fine-grained image;

[0090] An input module 602 is configured to input the target fine-grained image into a trained fine-grained image recognition neural network, wherein the fine-grained image recognition neural network includes a feature extraction module, a spatial attention module, a feature decorrelation module, a feature aggregation module, and a recognition module, and the feature extraction module, the spatial attention module, the feature decorrelation module, the feature aggregation module, and the recognition module are all pre-trained based on cross-dataset information;

[0091] The output module 603 is configured to output a recognition result corresponding to the target fine-grained image to the trained fine-grained image recognition neural network.

[0092] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.

[0093] It should also be emphasized that the system provided in the embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system of simulating, extending and expanding human intelligence, perceiving the environment, acquiring knowledge and using knowledge to obtain the best results using digital computers or machines controlled by digital computers. Basic artificial intelligence technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robotics, biometrics, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0094] Please refer to the following Figure 7 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 7 As shown, the electronic device 2 includes: a processor 200, a memory 201, a bus 202 and a communication interface 203, and the processor 200, the communication interface 203 and the memory 201 are connected via the bus 202; the memory 201 stores a computer program that can be run on the processor 200, and when the processor 200 runs the computer program, it executes the fine-grained image recognition method based on cross-dataset information mining provided by any of the aforementioned embodiments of the present application.

[0095] The memory 201 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 203 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0096] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store a program, and the processor 200 executes the program after receiving an execution instruction. The fine-grained image recognition method based on cross-dataset information mining disclosed in any implementation of the aforementioned embodiment of the present application may be applied to the processor 200, or implemented by the processor 200.

[0097] The processor 200 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 200. The above processor 200 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.

[0098] An embodiment of the present application also provides a computer-readable storage medium corresponding to the fine-grained image recognition method based on cross-dataset information mining provided in the aforementioned embodiment, on which a computer program is stored. When the computer program is run by a processor, it will execute the fine-grained image recognition method based on cross-dataset information mining provided in any of the aforementioned embodiments.

[0099] In addition, examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0100] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the fine-grained image recognition method based on cross-dataset information mining provided in any of the aforementioned embodiments, the method comprising: obtaining a target fine-grained image; inputting the target fine-grained image into a trained fine-grained image recognition neural network, wherein the fine-grained image recognition neural network includes a feature extraction module, a spatial attention module, a feature decorrelation module, a feature aggregation module, and a recognition module, and the feature extraction module, the spatial attention module, the feature decorrelation module, the feature aggregation module, and the recognition module are all pre-trained based on cross-dataset information; the trained fine-grained image recognition neural network outputs a recognition result corresponding to the target fine-grained image.

[0101] It should be noted that the algorithms and displays provided herein are not inherently related to any particular computer, virtual device or other device. Various general devices can also be used together with the teachings based thereon. According to the above description, it is obvious that the structure required for constructing such devices is constructed. In addition, the present application is not directed to any specific programming language. It should be understood that the content of the present application described herein can be implemented using various programming languages, and the above description of specific languages ​​is to disclose the best implementation mode of the present application. In the specification provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this specification.

[0102] Those skilled in the art will appreciate that the various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of the virtual machine creation device according to the embodiments of the present application.

[0103] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A fine-grained image recognition method based on cross-dataset information mining, characterized in that: The method comprises: Acquire target fine-grained image; Inputting the target fine-grained image into a trained fine-grained image recognition neural network, wherein the fine-grained image recognition neural network includes a feature extraction module, a spatial attention module, a feature decorrelation module, a feature aggregation module, and a recognition module, and the feature extraction module, the spatial attention module, the feature decorrelation module, the feature aggregation module, and the recognition module are all pre-trained based on cross-dataset information; The trained fine-grained image recognition neural network outputs a recognition result corresponding to the target fine-grained image; The training process of the fine-grained image recognition neural network includes: Select training sample images based on cross-dataset information; Inputting the training sample image into the feature extraction module for training to obtain deep features; Inputting the deep features into the spatial attention module for weight learning to obtain deep features with spatial attention, so that the spatial attention module can learn positive and negative migration between different data sets; The training passes the deep features with spatial attention through a feature decorrelation module, a feature aggregation module, and a recognition module in sequence; Stop training when a preset number of training times is reached or the fine-grained image recognition neural network converges on the loss function; After inputting the training sample image into the feature extraction module for training to obtain the deep features, the method further includes: Randomly selecting a data set from the training sample images as a meta-test set, and taking all data sets from the training sample images excluding the meta-test set as a meta-training set; Performing meta-learning training on the spatial attention module using the meta-training set to optimize and update parameters in the spatial attention module; Calculating a meta-learning loss function using the meta-test set until the meta-learning loss function converges; The loss function of the meta-learning is: Among them, LoSSmeta represents the loss function of the meta-learning, represents the loss associated with the meta-training set, represents the loss associated with the meta-test set; Inputting the deep features into the spatial attention module for weight learning to obtain deep features with spatial attention, including: Divide the depth features into 8 groups on the channel, input the grouped depth features into the spatial attention module, and obtain depth features with spatial attention; The feature decorrelation module includes a projection head; training the deep features with spatial attention through the feature decorrelation module includes: Training the projection head to decorrelate the deep features with spatial attention to obtain unique features; The feature aggregation module is a gated channel-based feature aggregation module and is provided with a weighted fusion layer and a fully connected layer; the training process of the feature aggregation module includes: Inputting the unique features into the feature aggregation module, training the unique features to be connected in series at the channel level, and fusing the corresponding weights of each unique feature through the weighted fusion layer; The training outputs the fusion result through the fully connected layer; The recognition module is implemented by setting a joint classifier.

2. A fine-grained image recognition device based on cross-dataset information mining, characterized in that: The device comprises: An acquisition module is configured to acquire a target fine-grained image; an input module configured to input the target fine-grained image into a trained fine-grained image recognition neural network, wherein the fine-grained image recognition neural network includes a feature extraction module, a spatial attention module, a feature decorrelation module, a feature aggregation module, and a recognition module, and the feature extraction module, the spatial attention module, the feature decorrelation module, the feature aggregation module, and the recognition module are all pre-trained based on cross-dataset information; an output module configured to output a recognition result corresponding to the target fine-grained image for the trained fine-grained image recognition neural network; The training process of the fine-grained image recognition neural network includes: Select training sample images based on cross-dataset information; Inputting the training sample image into the feature extraction module for training to obtain deep features; Inputting the deep features into the spatial attention module for weight learning to obtain deep features with spatial attention, so that the spatial attention module can learn positive and negative migration between different data sets; The training passes the deep features with spatial attention through a feature decorrelation module, a feature aggregation module, and a recognition module in sequence; Stop training when a preset number of training times is reached or the fine-grained image recognition neural network converges on the loss function; After inputting the training sample image into the feature extraction module for training to obtain the deep features, the method further includes: Randomly selecting a data set from the training sample images as a meta-test set, and taking all data sets from the training sample images excluding the meta-test set as a meta-training set; Performing meta-learning training on the spatial attention module using the meta-training set to optimize and update parameters in the spatial attention module; Calculating a meta-learning loss function using the meta-test set until the meta-learning loss function converges; The loss function of the meta-learning is: Among them, LoSSmeta represents the loss function of the meta-learning, represents the loss associated with the meta-training set, represents the loss associated with the meta-test set; Inputting the deep features into the spatial attention module for weight learning to obtain deep features with spatial attention, including: Divide the depth features into 8 groups on the channel, input the grouped depth features into the spatial attention module, and obtain depth features with spatial attention; The feature decorrelation module includes a projection head; training the deep features with spatial attention through the feature decorrelation module includes: Training the projection head to decorrelate the deep features with spatial attention to obtain unique features; The feature aggregation module is a gated channel-based feature aggregation module and is provided with a weighted fusion layer and a fully connected layer; the training process of the feature aggregation module includes: Inputting the unique features into the feature aggregation module, training the unique features to be connected in series at the channel level, and fusing the corresponding weights of each unique feature through the weighted fusion layer; The training outputs the fusion result through the fully connected layer; The recognition module is implemented by setting a joint classifier.

3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to claim 1 is implemented.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to claim 1 is implemented.

Citation Information

Patent Citations

  • Vehicle fine-grained identification method and device

    CN111126459A

  • Fine-grained bird image retrieval method based on graph neural network and deep hash

    CN114329031A