CN-115830338-B - Image recognition method, system, equipment and storage medium based on real-time characteristics
Abstract
The application provides an image recognition method, system, equipment and storage medium based on real-time characteristics, which are characterized in that sample characteristics are extracted through a neural network of an encoder according to input picture data; and obtaining an identification characteristic with unchanged class and discriminant according to the sample characteristic, and obtaining an image identification result according to the identification characteristic. The application can update each cluster feature and class proxy feature in real time, reserves the original feature distribution and the original data manifold in the feature class, finally obtains the identification feature with unchanged class and discriminant, and greatly improves the performance of the image identification model and the accuracy of the identification result.
Inventors
- MA ZHANYU
- YIN JUNHUI
- Liang Kongming
- WANG YUXUAN
Assignees
- 北京邮电大学
Dates
- Publication Date
- 20260505
- Application Date
- 20221209
Claims (7)
- 1. An image recognition method based on real-time features is characterized by comprising the following steps: According to the input picture data, extracting and obtaining sample characteristics through an encoder based on a neural network; According to the sample characteristics, aligning the sample characteristics with the category characteristics to which the sample characteristics belong, and learning the category invariant characteristics; the sample feature is close to the category agent feature to which the sample feature belongs, and the distinguishing feature is learned; Obtaining an image retrieval result according to the identification characteristics; The sample feature is aligned with the belonging category feature, and the learning class invariant feature comprises the steps of giving one feature in the sample feature, applying a sample-to-instance contrast learning process to the feature, and aligning the feature with all the belonging category features; The sample feature is close to the agent feature of the category to which the sample feature belongs, and the distinguishing feature is learned, wherein the distinguishing feature comprises the steps of giving one feature in the sample feature, and applying a sample-to-category contrast learning process to the feature to enable the feature to be close to the agent feature of the category to which the sample feature belongs.
- 2. The method of claim 1, wherein the aligning the sample feature with the category feature, learning the category-invariant feature, and the approaching the sample feature to the category-agent feature, learning the discriminant feature, further comprises, prior to: storing the sample characteristics in an instance level to obtain the category characteristics; and storing the sample characteristics in class-level characteristics to obtain the class proxy characteristics.
- 3. The method for recognizing an image based on real-time features according to any one of claims 1 to 2, wherein the extracting sample features from the inputted picture data through the encoder-based neural network comprises: pre-training the encoder model on an ImageNet dataset to obtain model weights; initializing a neural network of the encoder according to the model weight; Carrying out generalized average pooling on the feature layer extracted by the backbone network to obtain a feature vector, and carrying out standardization; And clustering all the standardized features by using a clustering algorithm, and marking the data corresponding to the features belonging to the same cluster with the same pseudo tag.
- 4. The method for identifying an image based on real-time features according to claim 2, wherein said storing the sample features in class-level features to obtain the class features comprises: Constructing a feature of all images in the example-level storage and training set, and directly replacing the corresponding feature of the example-level storage with the current feature in each iteration; And constructing a class-level storage and storing agent features of all classes obtained by a clustering algorithm in a training set, selecting a class center agent in all classes for initialization in each training period, and replacing class agent features corresponding to the class-level storage in a random sampling mode in each iteration.
- 5. An image recognition system based on real-time features, comprising: the encoder module is used for extracting sample characteristics through a neural network of the encoder according to the input picture data; The identification feature module is used for aligning the sample feature with the belonging category feature, learning the category invariant feature, approaching the sample feature to the belonging category agent feature, learning the discrimination feature, obtaining the category invariant feature and the discrimination feature, wherein the sample feature is aligned with the belonging category feature, learning the category invariant feature comprises the steps of giving one feature in the sample feature, applying a sample-to-instance contrast learning process to the feature to align the feature with all the features of the belonging category, approaching the sample feature to the belonging category agent feature, and learning the discrimination feature, wherein the step of giving one feature in the sample feature; And the image recognition module is used for obtaining an image retrieval result according to the recognition characteristics.
- 6. An image recognition apparatus comprising: A memory for storing executable instructions, and A processor for interfacing with a memory to execute executable instructions to perform the image recognition method of any one of claims 1-4.
- 7. A computer-readable storage medium, having stored thereon a computer program, the computer program being executable by a processor to implement the image recognition method of any of claims 1-4.
Description
Image recognition method, system, equipment and storage medium based on real-time characteristics Technical Field The application belongs to the technical field of computers, and particularly relates to an image recognition method, system, equipment and storage medium based on real-time characteristics. Background With the rapid development of internet technology, people have more and more demand scenes based on image processing, such as security protection, big data analysis and the like. In the field of image processing, non-parameter memory feature storage and contrast learning are commonly used image feature extraction and retrieval methods, and by taking pedestrian recognition as an example, people usually record a large number of pictures or video clips of pedestrians by means of a monitoring camera to find out appointed pedestrians, which plays an important role in the fields of security and protection systems, intelligent monitoring and the like. In an actual scene, the style, shooting angle and pedestrian posture of pictures shot between different camera equipment are different, based on the fact, a non-parameter feature storage module based on momentum update is mostly adopted at present to reserve feature information of each category, then the current feature is aligned to corresponding category features (positive samples) in a storage base based on pseudo tags, meanwhile, the corresponding category features (negative samples) are far away from other category features, and finally an efficient and perfect comparison learning frame is built for extracting distinguishing features from input images, so that pedestrian image retrieval tasks are better carried out. However, the current unsupervised identification method mainly adopts feature mean values belonging to the same class as class proxy features, and their potential assumption is that the data of each cluster is distributed in a high-dimensional spherical distribution, and if the real data is distributed in manifold rather than spherical clusters, the average feature is not accurate as the proxy feature of each class. And, using a momentum update strategy to update feature or class feature proxy points, the original feature distribution in the data is changed. These all lead to sub-optimal performance of the recognition, retrieval results. Disclosure of Invention The image recognition system, the image recognition method, the image recognition device and the storage medium based on the real-time features can update each cluster feature and each class proxy feature in real time, retain the original feature distribution and the original data manifold in the feature class, finally obtain the recognition features with unchanged class and discrimination, and greatly improve the performance of the image recognition model and the accuracy of the recognition result. According to a first aspect of the embodiment of the present application, there is provided an image recognition method based on real-time features, including the steps of: according to the input picture data, extracting to obtain sample characteristics through a neural network of an encoder; According to the sample characteristics, obtaining identification characteristics with unchanged class and discriminant; And obtaining an image recognition result according to the recognition characteristics. In some embodiments of the present application, obtaining an identification feature with class invariance and discriminant from a sample feature includes: Aligning the sample feature with the belonging category feature, learning the category invariant feature, and approaching the sample feature to the belonging category agent feature, and learning the discriminant feature; the identification characteristics with unchanged class and discrimination are obtained. In some embodiments of the application, the sample feature is aligned with the belonging category feature, the category invariant feature is learned, and the sample feature is close to the belonging category agent feature, before the discriminant feature is learned, the method further comprises: And storing the sample characteristics in class level to obtain the class proxy characteristics. In some embodiments of the present application, extracting sample features from input picture data through a neural network of an encoder includes: Pre-training the encoder model on an ImageNet dataset to obtain model weights; initializing a neural network of the encoder according to the model weight; Carrying out generalized average pooling on the feature layer extracted by the backbone network to obtain a feature vector, and carrying out standardization; And clustering all the standardized features by using a clustering algorithm, and marking the data corresponding to the features belonging to the same cluster with the same pseudo tag. In some embodiments of the present application, aligning a sample feature with a class feature, learning a class inva