A vehicle classification method, device and medium based on a perturbation reconstruction learning network

By constructing a perturbation-reconstruction learning network and utilizing the perturbation mechanism in collaboration with the discriminative network, the accuracy problem of fine-grained vehicle classification in existing technologies is solved, achieving improved accuracy and deeper understanding of vehicle classification without increasing annotation costs and computational overhead.

CN116403049BActive Publication Date: 2026-02-13INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310417580.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-13
Publication Date
2026-02-13
Estimated Expiration
2043-04-13

AI Technical Summary

Technical Problem

Existing fine-grained vehicle classification methods struggle to achieve accurate fine-grained vehicle classification without increasing additional annotation costs and computational overhead.

Method used

A perturbation reconstruction learning network to be trained is constructed, including a classification network, a discrimination network, and an alignment network. Sample images are preprocessed through a perturbation mechanism. A convergent classification network is obtained through end-to-end training, which enhances the attention to discriminative local detail features and eliminates positional perturbation noise interference. The correlation of local regions of the image is reconstructed through the alignment network to improve classification accuracy.

Benefits of technology

Without increasing additional annotation costs and computational overhead, it improves the accuracy of fine-grained vehicle classification and enhances the deep understanding of vehicle targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116403049B_ABST
    Figure CN116403049B_ABST
Patent Text Reader

Abstract

The application discloses a vehicle classification method and device based on a perturbation reconstruction learning network and a medium. The method comprises the following steps: constructing a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network comprises a to-be-trained classification network, a discrimination network and an alignment network; pre-processing sample images based on a perturbation mechanism to obtain perturbation images; inputting input images into the to-be-trained perturbation reconstruction learning network for end-to-end training until a convergent classification network is obtained; wherein the input images comprise the perturbation images and the sample images; and in the case of needing to perform fine-grained classification on a to-be-identified image, inputting the to-be-identified image into the classification network to obtain a classification result. Through the above method, the application can perform accurate fine-grained classification of vehicles existing in real scenes without increasing additional labeling costs and computing expenses.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to a vehicle classification method based on a perturbation reconstruction learning network, a device and a medium. BACKGROUND

[0002] Fine-grained vehicle classification is a classification of sub-classes (such as "Audi", "BMW", etc.) under the "car" category, and the granularity of the category division is more refined. However, due to the problem of too small inter-class difference and large intra-class difference of the sub-classes, it is necessary to mine discriminative detail features to distinguish the sub-classes.

[0003] Existing fine-grained vehicle classification methods can be roughly divided into two categories: one is a positioning-classification-based method, which first locates a target local area (such as a car light, a front bumper, etc.) with discriminative features, and then classifies according to these discriminative areas; this method usually needs to add an additional bounding box on the target or target local area, and the required labeling cost is high. The other is to automatically locate the discriminative area in an unsupervised manner through an attention mechanism; this kind of method does not need additional labeling, but usually needs additional network structure, so it introduces additional computational overhead in the network training and inference stage.

[0004] Therefore, how to accurately classify the fine-grained vehicles in the real scene without increasing the additional labeling cost and computational overhead has become a technical problem to be solved. SUMMARY

[0005] The embodiments of the present application provide a vehicle classification method based on a perturbation reconstruction learning network, a device and a medium, to solve the technical problem of how to accurately classify the fine-grained vehicles in the real scene without increasing the additional labeling cost and computational overhead.

[0006] In a first aspect, the embodiments of the present application provide a vehicle classification method based on a perturbation reconstruction learning network, characterized in that the method comprises: constructing a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network comprises a to-be-trained classification network, a discriminator network and an alignment network; pre-processing a sample image based on a perturbation mechanism to obtain a perturbed image; inputting an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training until a converged classification network is obtained; wherein the input image comprises the perturbed image and the sample image; in the case where fine-grained classification of a to-be-identified image is needed, inputting the to-be-identified image into the classification network to obtain a classification result.

[0007] In an implementation of the present application, the sample image is preprocessed based on a perturbation mechanism to obtain a perturbed image, specifically including: based on a preset region segmentation coefficient, segmenting the sample image to obtain a specified number of identical sample sub-regions; wherein the specified number is the square of the region segmentation coefficient; based on a preset random function, randomly disrupting the spatial layout of the specified number of identical sample sub-regions to obtain the perturbed image.

[0008] In an implementation of the present application, after the sample image is preprocessed based on the perturbation mechanism to obtain the perturbed image, the method further includes: after segmenting the sample image, determining the original coordinate information corresponding to each sample sub-region in the spatial layout of the sample image; and after obtaining the perturbed image, determining the changed coordinate information corresponding to each sample sub-region in the spatial layout of the perturbed image.

[0009] In an implementation of the present application, the to-be-trained perturbation reconstruction learning network is constructed, specifically including: constructing a to-be-trained classification network; wherein the to-be-trained classification network includes: a backbone layer, a 1x1 convolutional layer, and a first classification layer; constructing a discriminator network; wherein the discriminator network includes: a second classification layer; constructing an alignment network; wherein the alignment network includes: a position mapping layer; the position mapping layer includes a 1x1 convolutional layer, a tanh activation layer, and an average pooling layer; connecting the second classification layer with the 1x1 convolutional layer, and connecting the position mapping layer with the backbone layer; setting a loss function of the to-be-trained perturbation reconstruction learning network.

[0010] In an implementation of the present application, the input image is input to the to-be-trained perturbation reconstruction learning network for end-to-end training, specifically including: based on the backbone layer, processing the input image to obtain image backbone features; inputting the image backbone features to the 1x1 convolutional layer for processing to determine the classification feature vector corresponding to the input image, and inputting the image backbone features to the position mapping layer to determine the predicted coordinate information corresponding to each sample sub-region of the input image; inputting the classification feature vector to the first classification layer for processing to determine the classification result corresponding to the input image, and inputting the classification feature vector to the second classification layer to determine whether the input image is a perturbed image.

[0011] In an implementation of the present application, the loss function of the to-be-trained perturbation reconstruction learning network includes: an overall training loss function, a classification network loss function, a discriminator network loss function, and an alignment network loss function; the overall training loss function is used to determine the training convergence degree of the to-be-trained perturbation reconstruction learning network; the classification network loss function is used to determine the training convergence degree of the classification network; the discriminator network loss function is used to determine the training convergence degree of the discriminator network; and the alignment network loss function is used to determine the training convergence degree of the alignment network.

[0012] In an implementation form of the present application, the overall training loss function is represented by the following formula:

[0013] L = aL cls + L adv + L loc

[0014] wherein L is the overall training loss function, L cls is the classification network loss function, L adv is the discriminative network loss function, and L loc is the alignment network loss function; a, b and g respectively represent the weight parameters of the classification network, the discriminative network and the alignment network.

[0015] The classification network loss function is represented by the following formula:

[0016]

[0017] wherein I is an input image, and Q is a training set containing a plurality of sample images; t represents the one-hot label of the vehicle fine-grained category to which the input image belongs; C(I) represents the fine-grained category result predicted for the sample image; and C(I)) represents the fine-grained category result predicted for the perturbed image.

[0018] The discriminative network loss function is represented by the following formula:

[0019]

[0020] wherein d e {0, 1} 2 is a perturbation category label vector, 0 represents a sample image, and 1 represents a perturbed image; D(I) represents the perturbation category result predicted for the sample image; and D(σ(I)) represents the perturbation category result predicted for the perturbed image.

[0021] The alignment network loss function is represented by the following formula:

[0022]

[0023] wherein N is a region segmentation coefficient, i is a horizontal coordinate, j is a vertical coordinate, and σ(I) represents a perturbed image; M σ(i,j) () represents the predicted coordinate information corresponding to each sample sub-region of the perturbed image, M i,j () represents the predicted coordinate information corresponding to each sample sub-region of the sample image, M σ(i,j) () and M i,j () correspond to the true value (i, j), and |*|1 represents the L1 distance.

[0024] In an implementation form of the present application, the backbone layer is a classification network without a fully connected layer.

[0025] In a second aspect, the embodiments of the present application also provide a vehicle classification device based on a perturbation reconstruction learning network, which is characterized in that the device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: construct a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network comprises a to-be-trained classification network, a discriminator network and an alignment network; pre-process a sample image based on a perturbation mechanism to obtain a perturbed image; input an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training until a converged classification network is obtained; wherein the input image comprises the perturbed image and the sample image; and in the case where fine-grained classification of a to-be-identified image is required, input the to-be-identified image into the classification network to obtain a classification result.

[0026] In a third aspect, the embodiments of the present application also provide a nonvolatile computer storage medium based on a vehicle classification based on a perturbation reconstruction learning network, which stores computer executable instructions, and the computer executable instructions are configured to: construct a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network comprises a to-be-trained classification network, a discriminator network and an alignment network; pre-process a sample image based on a perturbation mechanism to obtain a perturbed image; input an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training until a converged classification network is obtained; wherein the input image comprises the perturbed image and the sample image; and in the case where fine-grained classification of a to-be-identified image is required, input the to-be-identified image into the classification network to obtain a classification result.

[0027] The vehicle classification method, device and medium based on a perturbation reconstruction learning network provided by the embodiments of the present application enhance the attention of the classification network to the discriminative local detailed features through the perturbation learning of the perturbation mechanism and the discriminator network in cooperation, while excluding the interference of the position perturbation noise features; the alignment network is used to reconstruct the learning of the correlation between the local regions of the image to guide the classification network to establish a deep understanding of the vehicle target. The perturbation learning and the reconstruction learning further improve the accuracy of the fine-grained classification of the classification network without increasing additional computational overhead. BRIEF DESCRIPTION OF DRAWINGS

[0028] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:

[0029] Figure 1 A vehicle classification method based on a perturbation reconstruction learning network is provided for the embodiments of the present application;

[0030] Figure 2 A vehicle classification device based on a perturbation reconstruction learning network is provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be described below in conjunction with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0032] An embodiment of the present application provides a vehicle classification method and device based on a perturbation reconstruction learning network, to solve the technical problem of how to perform accurate vehicle fine-grained classification on vehicles existing in a real scene without increasing additional labeling cost and computing overhead.

[0033] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the drawings.

[0034] Figure 1 A vehicle classification method based on a perturbation reconstruction learning network is provided in an embodiment of the present application. As shown in Figure 1 The vehicle classification method based on the perturbation reconstruction learning network provided in an embodiment of the present application specifically includes the following steps:

[0035] Step 101, constructing a to-be-trained perturbation reconstruction learning network.

[0036] In an embodiment of the present application, to achieve accurate vehicle fine-grained classification of vehicles, a to-be-trained perturbation reconstruction learning network is constructed. The to-be-trained perturbation reconstruction learning network includes a to-be-trained classification network, a discrimination network, and an alignment network.

[0037] Specifically, the to-be-trained classification network is constructed, and the to-be-trained classification network includes a backbone layer, a 1x1 convolutional layer, and a first classification layer. The discrimination network is constructed, and the discrimination network includes a second classification layer. The alignment network is constructed, and the alignment network includes a position mapping layer. The position mapping layer includes a 1x1 convolutional layer, a tanh activation layer, and an average pooling layer. The second classification layer is connected with the 1x1 convolutional layer, and the position mapping layer is connected with the backbone layer. A loss function of the to-be-trained perturbation reconstruction learning network is set.

[0038] In an embodiment of the present application, the backbone layer is a classification network without a full connection layer. The classification network can be selected from Resnet50, VGG16, and the like.

[0039] In an embodiment of the present application, the loss function of the to-be-trained perturbation reconstruction learning network comprises: an overall training loss function, a classification network loss function, a discriminator network loss function, and an alignment network loss function; the overall training loss function is used to determine the training convergence degree of the to-be-trained perturbation reconstruction learning network; the classification network loss function is used to determine the training convergence degree of the classification network; the discriminator network loss function is used to determine the training convergence degree of the discriminator network; and the alignment network loss function is used to determine the training convergence degree of the alignment network.

[0040] In an embodiment of the present application, the overall training loss function is represented by the following formula:

[0041] L = aL cls + L adv + L loc

[0042] Wherein, L is the overall training loss function, L cls is the classification network loss function, L adv is the discriminator network loss function, and L loc is the alignment network loss function; a, β and γ represent the weight parameters of the classification network, the discriminator network and the alignment network, respectively;

[0043] The classification network loss function is represented by the following formula:

[0044]

[0045] Wherein, I is an input image, Θ is a training set containing a plurality of sample images; t represents the one-hot label of the vehicle fine-grained category to which the input image belongs; C(I) represents the fine-grained category result predicted for the sample image; and C(I)) represents the fine-grained category result predicted for the perturbation image.

[0046] The discriminator network loss function is represented by the following formula:

[0047]

[0048] Wherein, d∈{0,1} 2 is a perturbation category label vector, 0 represents a sample image, and 1 represents a perturbation image; D(I) is the perturbation category result predicted for the sample image; and D(σ(I)) is the perturbation category result predicted for the perturbation image.

[0049] The alignment network loss function is represented by the following formula:

[0050]

[0051] Wherein, N is a region segmentation coefficient, i is a horizontal coordinate, j is a vertical coordinate, σ(I) represents a perturbation image, and Mσ(i,j) () represents the prediction coordinate information corresponding to each sample sub-region of the perturbed image, M i,j () represents the prediction coordinate information corresponding to each sample sub-region of the sample image, M σ(i,j) () and M i,j () are all true values (i,j), and |*|1 represents the L1 distance.

[0052] Step 102, pre-processing the sample image based on the perturbation mechanism to obtain a perturbed image.

[0053] In an embodiment of the present application, in order to enhance the attention of the classification network to the local detailed features with discriminability and at the same time exclude the interference of the position perturbation noise features, before training the to-be-trained perturbation reconstruction learning network, the sample image is first pre-processed based on the perturbation mechanism to obtain a perturbed image, so that the training set for training the to-be-trained perturbation reconstruction learning network can contain the perturbed image and the original sample image.

[0054] Specifically, based on a preset region segmentation coefficient N, the sample image is segmented to obtain a specified number of identical sample sub-regions. It should be noted that the specified number is the square of the region segmentation coefficient.

[0055] Further, based on a preset random function, the spatial layout of the specified number of identical sample sub-regions is randomly disturbed to obtain a perturbed image.

[0056] It can be understood that the pre-processed sample image I is uniformly divided into N×N regions represented by R ij , 1≤i,j≤N.

[0057] Further, after segmenting the sample image, the original coordinate information corresponding to each sample sub-region in the spatial layout of the sample image is determined; and after obtaining the perturbed image, the changed coordinate information corresponding to each sample sub-region in the spatial layout of the perturbed image is determined.

[0058] In an embodiment of the present application, the original coordinate information can be represented by (i,j), the changed coordinate information can be represented by σ(i,j), and the perturbed image can be represented as σ(I).

[0059] Step 103, inputting an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training until a converged classification network is obtained.

[0060] In an embodiment of the present application, in order to obtain a converged to-be-trained perturbation reconstruction learning network, an input image is input into the to-be-trained perturbation reconstruction learning network for end-to-end training. It should be noted that the input image includes: a perturbed image, a sample image.

[0061] Specifically, based on the backbone layer, the input image is processed to obtain image backbone features; the image backbone features are input into a 1x1 convolutional layer for processing to determine the classification feature vector corresponding to the input image, and the image backbone features are input into a location mapping layer to determine the predicted coordinate information corresponding to each sample sub-region of the input image; the classification feature vector is input into a first classification layer for processing to determine the classification result corresponding to the input image, and the classification feature vector is input into a second classification layer to determine whether the input image is a perturbed image.

[0062] Immediately, the classification network maps the input image to a vehicle classification result C(I). The input image passes through the backbone layer and outputs the backbone features F(I,θ). backbone Then, the backbone features are mapped to a classification feature vector F(I,(θ) through a 1x1 convolutional layer. backbone ,θ conv Finally, the classification layer outputs the vehicle classification result C(I). Where θ backbone Represents the basal layer parameters, θ conv Represents the parameters of a 1x1 convolutional layer, θ fc This represents the classification layer parameters.

[0063] The discrimination network is used to determine whether the input image is perturbed. The input image is processed through the backbone layer and 1x1 convolutional layer of the classification network to extract the classification feature vector F(I,(θ)). backbone ,θ conv The classification layer of the discrimination network outputs the discrimination result D(I) = softmax(θ). adv (F(I,(θ backbone ,θ conv )))). Where θ adv These are all the learnable parameters in the discrimination network. When the discrimination network cannot determine whether the input image is the original image or a perturbed image, it means that the classification network has eliminated the interference of positional noise and is focusing more on the discriminative local detail features of the vehicle image.

[0064] The alignment network outputs the location information of each sub-region in the input image. The input image is processed by the backbone layer of the classification network, where the backbone features F(I,θ) are extracted. backbone After passing through the position mapping layer (i.e., a 1x1 convolutional layer, a tanh activation layer, and an average pooling layer), a position matrix M(I) of size 2×N×N is obtained. loc ((,θ backbone M(I) represents the positional information of each sub-region image patch in the input image. The two channels in M(I) correspond to the row and column coordinates of the sub-region, respectively, and θ... locis all the learnable parameters in the alignment network. When the alignment network can accurately reconstruct the original position coordinates of each sub-region, it means that the classification network has established a deep understanding of the local details of the target.

[0065] Step 104, in the case of needing to perform fine-grained classification on the to-be-identified image, inputting the to-be-identified image into the classification network to obtain a classification result.

[0066] The above is the method embodiment of the present application. Based on the same inventive concept, the present application embodiment also provides a vehicle classification device based on a perturbation reconstruction learning network, the structure of which is as shown in Figure 2 .

[0067] Figure 2 The above is the method embodiment of the present application. Based on the same inventive concept, the present application embodiment also provides a vehicle classification device based on a perturbation reconstruction learning network, the structure of which is as shown in Figure 2 .

[0068] at least one processor 201;

[0069] and a memory 202 in communication connection with the at least one processor;

[0070] Wherein the memory 202 stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor 201 to enable the at least one processor 201 to:

[0071] construct a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network includes a to-be-trained classification network, a discriminator network and an alignment network;

[0072] preprocess the sample image based on the perturbation mechanism to obtain a perturbed image;

[0073] input the input image into the to-be-trained perturbation reconstruction learning network for end-to-end training until a converged classification network is obtained; wherein the input image includes the perturbed image and the sample image;

[0074] in the case of needing to perform fine-grained classification on the to-be-identified image, inputting the to-be-identified image into the classification network to obtain a classification result.

[0075] The non-volatile computer storage medium provided by some embodiments of the present application corresponds to Figure 1 a vehicle classification based on a perturbation reconstruction learning network, and stores computer executable instructions, which are set to:

[0076] construct a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network includes a to-be-trained classification network, a discriminator network and an alignment network;

[0077] Preprocess the sample image based on the perturbation mechanism to obtain a perturbed image;

[0078] input the input image into the perturbation reconstruction learning network to be trained for end-to-end training until a converged classification network is obtained; wherein the input image includes the perturbed image and the sample image;

[0079] In the case of needing to perform fine-grained classification on the to-be-recognized image, input the to-be-recognized image into the classification network to obtain a classification result.

[0080] Each of the embodiments in the present application is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the Internet of Things device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.

[0081] The system and medium provided by the embodiments of the present application are one-to-one corresponding to the method, and therefore, the system and medium also have similar beneficial technical effects as the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the system and medium will not be described here.

[0082] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0083] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The device that implements the functions specified in one block or multiple blocks.

[0084] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0085] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0086] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0087] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.

[0088] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media 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 memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0089] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0090] The above description is merely illustrative of the application, and not restrictive. Various modifications and changes can become apparent to those skilled in the art. Incorporating any modification, equivalent substitution, improvement, etc. within the spirit and principle of the application, shall be included in the scope of the claims of the application.

Claims

1. A vehicle classification method based on a perturbation reconstruction learning network, characterized in that, The method comprises: constructing a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network comprises a to-be-trained classification network, a discrimination network and an alignment network; preprocessing a sample image based on a perturbation mechanism to obtain a perturbed image; inputting an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training until a converged classification network is obtained; wherein the input image comprises a perturbed image and a sample image; in the case of needing to perform fine-grained classification on a to-be-identified image, inputting the to-be-identified image into the classification network to obtain a classification result; preprocessing a sample image based on a perturbation mechanism to obtain a perturbed image, specifically comprising: segmenting the sample image based on a preset region segmentation coefficient to obtain a specified number of identical sample sub-regions; wherein the specified number is the square of the region segmentation coefficient; randomly rearranging the spatial layout of the specified number of identical sample sub-regions based on a preset random function to obtain a perturbed image; constructing a to-be-trained perturbation reconstruction learning network, specifically comprising: constructing a to-be-trained classification network; wherein the to-be-trained classification network comprises a backbone layer, a 1x1 convolutional layer and a first classification layer; constructing a discrimination network; wherein the discrimination network comprises a second classification layer; constructing an alignment network; wherein the alignment network comprises a position mapping layer; the position mapping layer comprises a 1x1 convolutional layer, a tanh activation layer and an average pooling layer; connecting the second classification layer with the 1x1 convolutional layer and connecting the position mapping layer with the backbone layer; setting a loss function of the to-be-trained perturbation reconstruction learning network; inputting an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training, specifically comprising: processing the input image based on the backbone layer to obtain image backbone features; inputting the image backbone features into the 1x1 convolutional layer for processing to determine a classification feature vector corresponding to the input image, and inputting the image backbone features into the position mapping layer to determine predicted coordinate information corresponding to each sample sub-region of the input image; inputting the classification feature vector into the first classification layer for processing to determine a classification result corresponding to the input image, and inputting the classification feature vector into the second classification layer to determine whether the input image is a perturbed image. 2.The vehicle classification method based on the perturbation reconstruction learning network according to claim 1, wherein, After preprocessing a sample image based on a perturbation mechanism to obtain a perturbed image, the method further comprises: after segmenting the sample image, determining original coordinate information corresponding to each sample sub-region in the spatial layout of the sample image; and after obtaining a perturbed image, determining changed coordinate information corresponding to each sample sub-region in the spatial layout of the perturbed image.

3. The vehicle classification method based on a perturbation reconstruction learning network according to claim 1, characterized in that: the loss function of the to-be-trained perturbation reconstruction learning network comprises an overall training loss function, a classification network loss function, a discrimination network loss function and an alignment network loss function. The overall training loss function is used to determine the training convergence of the to-be-trained perturbation reconstruction learning network. The classification network loss function is used to determine the training convergence of the classification network. The discriminator network loss function is used to determine the training convergence of the discriminator network. The alignment network loss function is used to determine the training convergence of the alignment network.

4. The vehicle classification method based on the perturbation reconstruction learning network according to claim 3, wherein the overall training loss function is represented by the following formula: The classification network loss function is represented by the following formula: wherein, is the overall training loss function, is the classification network loss function, is the discriminator network loss function, is the alignment network loss function; , and represent the weight parameters of the classification network, the discriminator network and the alignment network, respectively. The discriminator network loss function is represented by the following formula: wherein, is an input image, is a training set comprising several sample images; is a one-hot label representing a vehicle fine-grained class to which the input image belongs; is a fine-grained class result predicted for the sample image; is a fine-grained class result predicted for the perturbed image; The alignment network loss function is represented by the following formula: wherein, is a vector of perturbation class labels, 0 indicates a sample image, and 1 indicates a perturbed image; represents a predicted perturbation class result for a sample image; represents a predicted perturbation class result for a perturbed image; 5. The vehicle classification method based on the perturbation reconstruction learning network according to claim 1, wherein the backbone layer is a classification network without a fully connected layer. where N is the region segmentation coefficient, i is the horizontal coordinate, and j is the vertical coordinate, denotes the perturbed image, denotes the prediction coordinate information corresponding to each sample sub-region of the perturbed image, denotes the prediction coordinate information corresponding to each sample sub-region of the sample image, and The corresponding true value is , denotes the L1 distance. The device comprises: at least one processor; 6. A vehicle classification apparatus based on a perturbation reconstruction learning network, characterized by, and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: construct a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network comprises a to-be-trained classification network, a discriminator network, and an alignment network; preprocess a sample image based on a perturbation mechanism to obtain a perturbed image; input an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training until a converged classification network is obtained; wherein the input image comprises a perturbed image and a sample image; in the case of needing to perform fine-grained classification on a to-be-identified image, input the to-be-identified image into the classification network to obtain a classification result; preprocess a sample image based on a perturbation mechanism to obtain a perturbed image, specifically comprising: segment the sample image based on a preset region segmentation coefficient to obtain a specified number of identical sample sub-regions; wherein the specified number is the square of the region segmentation coefficient; randomly rearrange the spatial layout of the specified number of identical sample sub-regions based on a preset random function to obtain a perturbed image; construct a to-be-trained perturbation reconstruction learning network, specifically comprising: construct a to-be-trained classification network; wherein the to-be-trained classification network comprises a backbone layer, a 1x1 convolutional layer, and a first classification layer; construct a discriminator network; wherein the discriminator network comprises a second classification layer; construct an alignment network; wherein the alignment network comprises a position mapping layer; the position mapping layer comprises a 1x1 convolutional layer, a tanh activation layer, and an average pooling layer; connect the second classification layer with the 1x1 convolutional layer, and connect the position mapping layer with the backbone layer; set the loss function of the to-be-trained perturbation reconstruction learning network; input an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training, specifically comprising: process the input image based on the backbone layer to obtain image backbone features; ​ ​ inputting the image backbone feature into the 1x1 convolution layer for processing to determine a classification feature vector corresponding to the input image, and inputting the image backbone feature into a position mapping layer to determine predicted coordinate information corresponding to each sample sub-region of the input image; inputting the classification feature vector into the first classification layer for processing to determine a classification result corresponding to the input image, and inputting the classification feature vector into a second classification layer to determine whether the input image is a perturbed image. 7.A non-transitory computer storage medium storing computer-executable instructions for vehicle classification based on a perturbation-reconstruction learning network, the computer-executable instructions comprising: The computer executable instructions are configured to: construct a to-be-trained perturbation reconstruction learning network; wherein the to-be-trained perturbation reconstruction learning network comprises a to-be-trained classification network, a discrimination network, and an alignment network; preprocess a sample image based on a perturbation mechanism to obtain a perturbed image; input an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training until a converged classification network is obtained; wherein the input image comprises a perturbed image and a sample image; in a case where fine-grained classification of a to-be-recognized image is required, input the to-be-recognized image into the classification network to obtain a classification result; preprocess a sample image based on a perturbation mechanism to obtain a perturbed image, specifically comprising: segment the sample image based on a preset region segmentation coefficient to obtain a specified number of identical sample sub-regions; wherein the specified number is the square of the region segmentation coefficient; randomly shuffle the spatial layout of the specified number of identical sample sub-regions based on a preset random function to obtain a perturbed image; constructing a to-be-trained perturbation reconstruction learning network, specifically comprising: constructing a to-be-trained classification network; wherein the to-be-trained classification network comprises a backbone layer, a 1x1 convolution layer, and a first classification layer; constructing a discrimination network; wherein the discrimination network comprises a second classification layer; constructing an alignment network; wherein the alignment network comprises a position mapping layer; the position mapping layer comprises a 1x1 convolution layer, a tanh activation layer, and an average pooling layer; connecting the second classification layer with the 1x1 convolution layer, and connecting the position mapping layer with the backbone layer; setting a loss function of the to-be-trained perturbation reconstruction learning network; inputting an input image into the to-be-trained perturbation reconstruction learning network for end-to-end training, specifically comprising: processing the input image based on the backbone layer to obtain an image backbone feature; inputting the image backbone feature into the 1x1 convolution layer for processing to determine a classification feature vector corresponding to the input image, and inputting the image backbone feature into a position mapping layer to determine predicted coordinate information corresponding to each sample sub-region of the input image; inputting the classification feature vector into the first classification layer for processing to determine a classification result corresponding to the input image, and inputting the classification feature vector into a second classification layer to determine whether the input image is a perturbed image.

Citation Information

Patent Citations

  • Vehicle fine-grained classification method and device

    CN111461181A

  • Fine-grained image classification method based on destructive reconstruction learning and GoogLeNet

    CN111950525A