Picture recognition model training and picture recognition method, system, device and medium
By employing a multi-branch, multi-interval training method and utilizing feature extraction and binary classification network optimization strategies, the problem of insufficient recognition performance in cross-domain face recognition was solved, achieving efficient recognition under different image types.
Patent Information
- Application Number
- CN202310219392.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2043-03-01
AI Technical Summary
Existing technologies suffer from insufficient facial recognition performance in cross-domain facial recognition, especially when comparing images taken from different angles and with varying resolutions, which greatly increases the difficulty of recognition.
A multi-branch, multi-interval training method is adopted. The feature extraction network is used to obtain the features of the target image, and a binary classification network is used to determine the image type. The processing strategy is determined according to the type. The preset network and the multi-classification network are used for feature transformation and adjustment, and the loss function interval is optimized to improve the recognition performance.
It improves the flexibility and performance of the face recognition model, enhances the accuracy and generalization ability of cross-domain face recognition, and is suitable for different business scenarios.
Smart Images

Figure CN116363450B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a picture recognition model training method and a picture recognition method, system, device and medium. BACKGROUND
[0002] At present, there are many cross-domain face comparison service requirements in actual business scenarios. For example, in a subway scenario, it is necessary to compare the photos taken by the security check and the photos taken by the subway camera. The security check photo is a high-definition front face photo, and the photo taken by the camera is a low-resolution and low-identifiable photo. In the gate scenario, it is necessary to compare the photos taken by the gate with the reference photos in the gate database. The photo taken by the gate is a low-resolution photo, and the photo in the gate database is a high-resolution front face photo uploaded by the user. In these business scenarios, the difficulty of face comparison is greatly increased, and therefore some methods need to be used to improve the performance of the cross-domain face recognition model during model training.
[0003] Some cross-domain model training methods have appeared in the field of face recognition in the prior art. A common method is feature decomposition. Feature decomposition refers to decomposing the face features extracted by the model during training into identity-related components and other components, such as shooting angles, and using only the identity-related feature components for face recognition. This method also has some defects. For example, the identity-related components and other components are not in an orthogonal relationship, and if forced to be orthogonal to ensure that the two components are independent, the identity-related components may be damaged, thereby affecting the performance of face recognition.
[0004] Therefore, how to improve the performance of face recognition is a technical problem to be solved by those skilled in the art. SUMMARY
[0005] To solve the above problems, the present application provides a picture recognition model training method and a picture recognition method, system, device and medium to improve the performance of face recognition.
[0006] To solve the above problems, the technical scheme provided by the embodiments of the present application is as follows:
[0007] The first aspect of the present application provides a picture recognition model training method, comprising:
[0008] obtaining a target picture;
[0009] performing feature extraction on the target picture based on a feature extraction network to obtain target features of the target picture;
[0010] judging the picture type of the target picture based on a binary classification network and the target features;
[0011] Determine a processing strategy for the target feature according to the determined picture type.
[0012] Optionally, the determining the processing strategy for the target feature according to the determined picture type comprises:
[0013] When the target picture is a first image, the processing strategy for the target feature at least comprises processing the target feature by using a preset network and inputting the processed target feature into a multi-classification network; the first image is an image meeting a training benchmark condition, and the preset network is used to perform feature conversion on the target feature according to a category feature distribution variance of the first image and a second image, so that the target feature and a feature distribution of the second image reach a preset similarity, and the second image is an image not meeting the training benchmark condition;
[0014] When the target picture is a second image, the processing strategy for the target feature at least comprises inputting the target feature into the multi-classification network.
[0015] Optionally, after the inputting the processed target feature into the multi-classification network, the method further comprises:
[0016] Moving the target feature to a class center based on a first interval of a loss function in the multi-classification network.
[0017] Optionally, after the inputting the processed target feature into the multi-classification network, the method further comprises:
[0018] Moving the target feature to a target position indicated by the loss function based on a second interval of the loss function in the multi-classification network.
[0019] Optionally, the moving the target feature to the target position indicated by the loss function based on the second interval of the loss function in the multi-classification network comprises:
[0020] Obtaining a benchmark feature located at a preset class center;
[0021] When a similarity or a distance between the target feature and the benchmark feature meets a preset standard, moving the target feature to a preset range of the benchmark feature by using the second interval of the loss function.
[0022] The second aspect of the application provides a picture recognition method, which adopts an image recognition model obtained by using the training method of the image recognition model according to any one of the first aspect, and comprises:
[0023] Determining a picture to be recognized;
[0024] Inputting the picture to be recognized into the trained picture recognition model to obtain a recognition result of the picture to be recognized by using different processing strategies.
[0025] The third aspect of the present application provides a picture recognition model training system, the system comprising:
[0026] an acquisition unit, configured to acquire a target picture,
[0027] a feature extraction unit, configured to perform feature extraction on the target picture based on a feature extraction network to obtain target features of the target picture;
[0028] a picture type judgment unit, configured to judge a picture type of the target picture based on a binary classification network and the target features;
[0029] a processing strategy determination unit, configured to determine a processing strategy for the target features according to the picture type obtained through judgment.
[0030] The fourth aspect of the present application provides a picture recognition system, which adopts an image recognition model obtained by the training method of the image recognition model according to any one of the first aspect, and the recognition system comprises:
[0031] a picture determination unit, configured to determine a picture to be recognized;
[0032] a picture recognition unit, configured to input the picture to be recognized into the trained picture recognition model to obtain a recognition result of the picture to be recognized through different processing strategies.
[0033] The fifth aspect of the present application provides 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 picture recognition model training method or the picture recognition method according to any one of the first aspect is implemented.
[0034] The sixth aspect of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the picture recognition model training method or the picture recognition method according to any one of the first aspect.
[0035] Compared with the prior art, the present application has the following beneficial effects:
[0036] Obtaining a target picture, performing feature extraction on the target picture based on a feature extraction network to obtain target features of the target picture, judging a picture type of the target picture based on a binary classification network and the target features, and determining a processing strategy for the target features according to the picture type obtained by the judgment. That is, after feature extraction is performed on the target picture, the extracted target features are classified, and different processing strategies are adopted for different picture types. Compared with the prior art of decomposing the extracted face features, the technical solution provided in the present application allows the extracted features to be associated with the binary classification network, so that a suitable processing strategy can be generated in the case of different picture types, the flexibility of face recognition model training is improved, and the performance of face recognition is improved. BRIEF DESCRIPTION OF DRAWINGS
[0037] To make the technical solution in the embodiments or prior art clearer, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0038] Figure 1 A picture recognition model training flowchart provided by the embodiments of the present application;
[0039] Figure 2 A picture recognition method flowchart provided by the embodiments of the present application;
[0040] Figure 3 A picture recognition model training system structure diagram provided by the embodiments of the present application;
[0041] Figure 4 A picture recognition system structure diagram provided by the embodiments of the present application. DETAILED DESCRIPTION
[0042] To make the technical solution in the embodiments or prior art clearer, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0043] To make the technical solution in the embodiments or prior art clearer, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0044] As described above, in actual business scenarios, there are many cross-domain face comparison service requirements. For example, in an airport scenario, it is necessary to compare the photos taken by the security check and the photos taken by the airport camera. The security check photo is a high-definition front face photo, and the photo taken by the camera is a low-quality overhead photo. In a gate scenario, it is necessary to compare the photo taken by the gate with the first image in the gate database. The photo taken by the gate is an overhead photo, and the photo in the gate database is a user-uploaded photo, which can be an ID photo or a life photo. The shooting device can be a mobile phone, a tablet or other devices. In these business scenarios, the difficulty of face comparison is greatly increased, and therefore some methods are needed to improve the performance of the cross-domain face recognition model during model training.
[0045] Some cross-domain model training methods have appeared in the field of face recognition. Common methods include image generation and feature decomposition. In the cross-domain model training process, there are often few images in a certain domain. At this time, image generation is often used to complete model training. Image generation is often achieved through a generative adversarial network. For our business scenario, we can collect a large number of images in two domains, so we do not need to generate images. Feature decomposition refers to decomposing the face features extracted by the model during training into identity-related components and other components, such as shooting angles. During face recognition, only the identity-related feature components are used. The disadvantage of this method is that the identity-related components and other components are not orthogonal. If forced to do orthogonal decomposition to ensure that the two components are independent, the identity-related components may be damaged, which will affect the accuracy of the face recognition model training to some extent, thereby affecting the performance of face recognition.
[0046] The method provided by the embodiments of the present application is executed by a background system, for example, can be executed by a background server. The background server can be a server device or a server cluster composed of multiple servers.
[0047] In order to solve the cross-domain model training problem, the application provides a multi-branch and multi-interval training method. The application provides a target picture processing method, system, device and storage medium. The target picture is obtained, the target picture is subjected to feature extraction based on a feature extraction network to obtain target features of the target picture, the picture type of the target picture is judged based on a binary classification network and the target features, and the processing strategy for the target features is determined according to the picture type obtained by the judgment. That is, after the target picture is subjected to feature extraction, the target features obtained by the extraction are classified, and different processing strategies are adopted for different picture types. Compared with the prior art of decomposing the extracted face features, the technical solution provided in the application itself allows the extracted features to be associated with the binary classification network, so that the applicable processing strategy can be generated in the case of different picture types, the flexibility of the face recognition model training is improved, and the performance of face recognition is improved. The cross-domain model trained by the scheme has greatly improved performance in the cross-domain face recognition business scenario, and has good generalization in different business scenarios.
[0048] In order to facilitate understanding of the target picture processing method provided by the application, the scene examples of the application are described below.
[0049] The target picture processing method provided by the application is described below through an embodiment. Referring to Figure 1 , the figure is a flowchart of a target picture processing method provided by an embodiment of the application, the execution subject of the method flow is a cloud server, further, the subject can be a target picture processing system in the cloud server, and the method comprises:
[0050] S101: obtaining a target picture.
[0051] The system obtains a target picture, wherein the target picture can be a photo uploaded by a user to a gate machine database, can be an ID photo or a life photo, and can be a photo that can clearly identify facial features. The shooting device can be a mobile phone, a tablet or other devices. The target picture can also be a picture captured by a shooting device when a person passes through a scene with a camera. The picture can be a low-angle shot, a side shot or a photo with poor image quality, and the clarity and recognizability are lower than the images that meet the training baseline conditions.
[0052] S102: performing feature extraction on the target picture based on a feature extraction network to obtain target features of the target picture.
[0053] The system inputs the training picture into the feature extraction network to realize feature extraction. The feature extraction network can use various convolutional neural networks to complete the feature extraction work, such as a residual neural network.
[0054] S103: judging a picture type of the target picture based on the binary classification network and the target feature.
[0055] The picture type is used to distinguish whether the definition and the recognizability of the current picture can be used as a training benchmark.
[0056] For cross-domain face recognition, the goal of the present scheme is that different second images can be compared with the registered face of the base library, that is, the distance between the second images of different angles and different qualities and the registered face of the base library is very close. In the training process of the cross-domain model, each person has both a low-recognizability snapshot picture and a high-recognizability registered picture, and the difference between the snapshot picture and the registered picture is large, thereby increasing the training difficulty. The implementation scheme is to add a binary classification network after the general feature extraction network in the above step to judge the picture type of the picture.
[0057] S104: determining a processing strategy for the target feature according to the picture type obtained by the judgment.
[0058] In a possible implementation manner, the determining the processing strategy for the target feature according to the picture type obtained by the judgment includes:
[0059] According to the picture type obtained by the judgment, different network processing is selected for the target feature in the picture recognition model training process.
[0060] According to the picture type obtained by the judgment in the above step, a corresponding processing strategy is determined. The preselected picture recognition model is trained by using the determined processing strategy until the model recognition accuracy reaches a preset threshold, and a picture recognition model is generated.
[0061] In a possible implementation manner, the determining the processing strategy for the target feature according to the picture type obtained by the judgment includes the following two cases A and B:
[0062] Case A: when the target picture is a first image uploaded by a user to the base library, the processing strategy for the target feature at least includes: processing the target feature by using a preset network, and inputting the processed target feature into a multi-classification network.
[0063] The first image is an image meeting the training benchmark condition, wherein the training benchmark condition can limit the picture size, the shooting angle, the picture pixel, the picture quality, and the like, for example, the first image can be a picture whose definition and recognizability meet the requirement of the training benchmark.
[0064] For the same person's image, the first image and the second image have large differences in shooting angle, picture quality, etc., that is, the intra-class variance is large, which increases the difficulty of training. Therefore, an additional network is needed for the first image, which can be considered as a feature transformation of the first image's features. Through this feature transformation, the feature distributions of the first image and the second image can be made consistent, so that the network can converge better. For example, the preset network can be fc (Fibre Channnel) + PRelu (Parametric Rectified Linear Unit) + batchnorm (accelerating neural network training, accelerating convergence speed and stability algorithm).
[0065] For example, the class feature distribution variance corresponding to the target picture data node is calculated by the preset network, and according to the class feature distribution mean and the class feature distribution variance of the target picture, the cross-domain feature generator is applied to calculate the class balance supplement corresponding to the feature distribution layer required by the data node. According to the current obtained class balance supplement, the target feature is processed, which makes the target feature and the feature distribution of the second image consistent, and the target feature with a feature distribution reaching a preset similarity is obtained as the processing result, that is, the processed target feature is obtained.
[0066] In some possible implementations, the preset network is a network for further processing the target feature of the first image, and other processing can also be performed on the basis of the above feature distribution adjustment, for example, the network can be set to perform intensive processing on the target feature to make it clearer, or the network can be set to label the target feature of the first image to distinguish the features corresponding to the first image and the second image during model training. The feature corresponding to the first image can be pulled to the class center. The above description of the preset network is only illustrative, and the preset network can be adjusted according to actual needs, which is not limited herein.
[0067] In actual application scenarios, after inputting the processed target feature into the multi-classification network, it further includes: moving the target feature to the class center based on the first interval of the loss function in the multi-classification network.
[0068] The key of the multi-classification network lies in the design of the loss function. Softmax (normalized exponential function) is the most common face recognition loss function, and many improved face recognition loss functions based on softmax have appeared in actual application scenarios. By normalizing the features, it can be considered that all the features are distributed on a spherical surface, and the interval penalty is increased, so that the distance between the same people is shortened and the distance between different people is lengthened in the feature space.
[0069] If it is judged that the current target picture is the first image, the processed target feature of the current first image is input into the multi-classification network, and a first interval preset in the loss function in the multi-classification network is obtained. The first interval is larger than other intervals in the loss function, that is, the interval penalty is increased, so as to pull the first image to the class center. The loss function used in the scheme can be a normalized softmax interval loss function. According to the network selected according to the processing strategy and the setting parameters in the network, the preliminary picture recognition model is adjusted to obtain a picture recognition model with precision meeting the preset standard.
[0070] Case B: When the target picture is the second image, the processing strategy for the target feature is determined to at least include inputting the target feature into the multi-classification network.
[0071] The second image is an image that does not meet the training benchmark condition. The second image is a picture whose definition and recognizability do not meet the requirement of being a training benchmark.
[0072] When it is judged that the current target picture is the second image, the target feature of the current target picture does not need to be converted, that is, the target feature obtained at present can be directly used as a picture feature. The target feature is input into the multi-classification network.
[0073] In actual application scenarios, after the target feature is input into the multi-classification network, it further includes moving the target feature to a target position guided by the loss function in the multi-classification network based on a second interval of the loss function.
[0074] The second interval is a smaller interval value than the first interval preset by the system. Based on the multi-classification network, the target feature is moved to the benchmark feature of the face corresponding to the current target feature, that is, the loss function combines the similarity between the current target feature and the existing benchmark feature, and the target feature is moved to the vicinity of the corresponding benchmark feature.
[0075] In actual application scenarios, the target feature is moved to the target position guided by the loss function in the multi-classification network based on the second interval of the loss function, which specifically includes steps B110-B111:
[0076] Step B110: Obtain a benchmark feature located at a preset class center.
[0077] The preset class center is set according to the features of the first image. Each class center has a benchmark feature, and each class center has a certain distance to reduce the feature confusion caused by the close distance between class centers.
[0078] Step B111: When the similarity or distance of the target feature to the reference feature meets the preset standard, the target feature is moved to a preset range of the reference feature by using a second interval of the loss function.
[0079] The face recognition model is to encode the face picture, that is, to map the features of the face picture to a feature space, in which the features of the same person are very small, and the features of different persons are very large. In actual application, we judge whether two pictures are the same person according to the distance or similarity of the face features. The smaller the feature distance of two face pictures, the greater the similarity, and the greater the probability that they are the same person.
[0080] Obtain each reference feature located at the class center, compare the similarity of the current target feature and the reference feature, for example, set the preset standard as similarity greater than 5, and the similarity of the current target feature and the reference feature is 6, which proves that the current target feature and the reference feature are the same person, and the position of the current target feature is pulled close to the reference feature by using the loss function. Regarding the specific position of the pull, the higher the similarity of the target feature, the closer to the reference feature, for example, the feature with a similarity of 7 is closer to the reference feature than the feature with a similarity of 6. The preset range is a region where the related features are placed in advance, for example, a sector region with a distance of a-b from the reference feature. The value and shape of the region can be adjusted according to actual needs, which is not limited here.
[0081] In actual application scenarios, reference Figure 2 , Figure 2 The method flowchart for identifying the picture provided by the embodiment of the present application adopts the image recognition model obtained by using the training method of the image recognition model in the above embodiment, and the method flowchart for identifying the picture includes the following steps:
[0082] S201: Determine a picture to be identified.
[0083] The picture to be identified includes at least one image obtained by frame extraction from a video to be identified, a snapshot picture, and a clear picture uploaded by a user.
[0084] S202: Input the picture to be identified into the trained picture recognition model, and obtain the identification result of the picture to be identified through different processing strategies.
[0085] Input the picture to be identified determined in the above step into the picture recognition model, judge the picture type, adopt different processing strategies for the picture according to the picture type, and apply different networks to process the picture, so as to obtain the identification result corresponding to the current picture to be identified.
[0086] To sum up, the embodiment obtains a target picture, extracts features of the target picture based on a feature extraction network to obtain target features of the target picture, judges a picture type of the target picture based on a binary classification network and the target features, and determines a processing strategy for the target features according to the picture type obtained by the judgment. That is, after the target picture is extracted, the extracted target features are classified, and different processing strategies are adopted for different picture types. Compared with the prior art of decomposing extracted face features, the technical solution provided in the embodiment allows the extracted features to be associated with the binary classification network, a binary classification network is connected after the general feature extraction network to judge whether the picture is a first image or a second image, and it is determined whether an additional network needs to be added after the network to convert the features and how much the interval of the loss function is, thereby generating an applicable processing strategy in the case of different picture types, and the performance of face recognition is improved. The performance of the cross-domain face recognition model is greatly improved, and the generality is strong. The technical solution can be used not only for training of a face model but also for training of other recognition models. Moreover, the technical solution has strong portability and can be easily embedded into training code of a recognition model.
[0087] The above are some specific implementation manners of the picture recognition model training method provided by the embodiment of the application. Based on this, the application further provides a corresponding system for picture recognition model training. The system provided by the embodiment of the application will be introduced from the perspective of functional modularization. Figure 3 A structure diagram of a picture recognition model training system provided by the embodiment of the application.
[0088] The system comprises:
[0089] The acquisition unit 301 is configured to acquire a target picture,
[0090] The feature extraction unit 302 is configured to extract features of the target picture based on a feature extraction network to obtain target features of the target picture.
[0091] The picture type judgment unit 303 is configured to judge a picture type of the target picture based on a binary classification network and the target features.
[0092] The processing strategy determination unit 304 is configured to determine a processing strategy for the target features according to the picture type obtained by the judgment.
[0093] Optionally, the processing strategy determination unit is specifically configured to, when the target picture is a first image, determine the processing strategy for the target feature to at least include: processing the target feature by using a preset network, and inputting the processed target feature into a multi-classification network; the first image is an image meeting a training benchmark condition, the preset network is configured to perform feature conversion on the target feature according to a category feature distribution variance of the first image and a second image, so that the target feature and a feature distribution of the second image reach a preset similarity, the second image is an image not meeting the training benchmark condition; and when the target picture is the second image, determine the processing strategy for the target feature to at least include: inputting the target feature into the multi-classification network.
[0094] Optionally, after the target feature is input into the multi-classification network, the method further includes:
[0095] moving the target feature to a class center based on a first interval of a loss function in the multi-classification network.
[0096] Optionally, after the processed target feature is input into the multi-classification network, the method further includes:
[0097] moving the target feature to a target position indicated by the loss function based on a second interval of the loss function in the multi-classification network.
[0098] Optionally, the moving the target feature to the target position indicated by the loss function based on the second interval of the loss function in the multi-classification network includes:
[0099] a benchmark feature acquisition unit configured to acquire a benchmark feature located at a preset class center;
[0100] a pulling unit configured to, when a similarity or a distance between the target feature and the benchmark feature meets a preset standard, move the target feature to a preset range of the benchmark feature by using the second interval of the loss function.
[0101] Figure 4 a picture recognition system structure diagram provided by an embodiment of the present application.
[0102] The system includes:
[0103] a picture determination unit 401 configured to determine a picture to be recognized;
[0104] a picture recognition unit 402 configured to input the picture to be recognized into a picture recognition model trained to obtain a recognition result of the picture to be recognized by using different processing strategies.
[0105] The embodiments of the present application further provide a corresponding device and a computer storage medium, for implementing the target picture processing method provided by the embodiments of the present application.
[0106] The device comprises a memory and a processor, the memory is used for storing instructions or codes, and the processor is used for executing the instructions or codes, so that the device executes the target picture processing method provided by any of the embodiments of the present application.
[0107] The computer storage medium stores codes, when the codes are executed, the device executing the codes implements the target picture processing method provided by any of the embodiments of the present application.
[0108] It should be noted that the embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts of each embodiment can be referred to each other.
[0109] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c, can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0110] It should also be noted that in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0111] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM, flash memory, ROM, electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The exemplary storage media are coupled to the processor such the processor can read information from, and write information to, the storage media.
[0112] The above description of disclosed embodiments is intended to be illustrative and not restrictive. Many embodiments of the application will be apparent to those of skill in the art upon reviewing the above description. The scope of the application should, therefore, be determined not with reference to the above description, but instead with reference to the appended claims, along with their full scope of equivalents.
Claims
1. A method for training a picture recognition model, the method comprising: The method comprises the following steps: acquiring a target picture; performing feature extraction on the target picture based on a feature extraction network to obtain target features of the target picture; judging a picture type of the target picture based on a binary classification network and the target features; determining a processing strategy for the target features according to the picture type obtained through the judgment; the determining of the processing strategy for the target features according to the picture type obtained through the judgment comprises: when the target picture is a first image, the processing strategy for the target features at least comprises: processing the target features by using a preset network and inputting the processed target features into a multi-classification network; the first image is an image meeting a training benchmark condition, and the preset network is used to perform feature conversion on the target features according to a category feature distribution variance of the first image and a second image, so that the target features and the feature distribution of the second image reach a preset similarity; the second image is an image not meeting the training benchmark condition; when the target picture is a second image, the processing strategy for the target features at least comprises: inputting the target features into the multi-classification network.
2. The method of claim 1, wherein, after the inputting of the processed target features into the multi-classification network, the method further comprises: moving the target features to a class center based on a first interval of a loss function in the multi-classification network.
3. The method of claim 1, wherein, after the inputting of the processed target features into the multi-classification network, the method further comprises: moving the target features to a target position indicated by the loss function based on a second interval of the loss function in the multi-classification network.
4. The method of claim 3, wherein, the moving of the target features to the target position indicated by the loss function based on the second interval of the loss function in the multi-classification network comprises: acquiring a benchmark feature located at a preset class center; when a similarity or a distance between the target features and the benchmark feature meets a preset standard, moving the target features to a preset range of the benchmark feature by using the second interval of the loss function.
5. A picture recognition method characterized by, The picture recognition model is obtained by using the training method of the picture recognition model according to any one of claims 1-4, and the recognition method comprises: determining a picture to be recognized; inputting the picture to be recognized into the picture recognition model obtained through training to obtain a recognition result of the picture to be recognized through different processing strategies.
6. An image recognition model training system, comprising: The system comprises: an acquisition unit configured to acquire a target picture, a feature extraction unit configured to perform feature extraction on the target picture based on a feature extraction network to obtain target features of the target picture; a picture type judgment unit configured to judge a picture type of the target picture based on a binary classification network and the target features; and a processing strategy determination unit configured to determine a processing strategy for the target features according to the picture type obtained through the judgment. The processing strategy determination unit is configured to determine a processing strategy for the target feature according to the determined picture type, and the determination of the processing strategy for the target feature according to the determined picture type comprises: when the target picture is a first image, the processing strategy for the target feature at least comprises: processing the target feature by using a preset network, and inputting the processed target feature into a multi-classification network; the first image is an image meeting a training benchmark condition, the preset network is configured to perform feature conversion on the target feature according to a category feature distribution variance of the first image and a second image, so that the target feature and a feature distribution of the second image reach a preset similarity, and the second image is an image not meeting the training benchmark condition; and when the target picture is the second image, the processing strategy for the target feature at least comprises: inputting the target feature into the multi-classification network.
7. A picture recognition system characterized by The picture recognition model is obtained by using the training method of the picture recognition model in any one of claims 1-4, and the recognition system comprises: a picture determination unit configured to determine a to-be-recognized picture; a picture recognition unit configured to input the to-be-recognized picture into the trained picture recognition model to obtain a recognition result of the to-be-recognized picture through different processing strategies.
8. An electronic device, comprising: comprise: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the picture recognition model training method according to any one of claims 1-4 or the picture recognition method according to claim 5 is implemented.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, and when the instructions run on the terminal device, the terminal device executes the picture recognition model training method according to any one of claims 1-4 or the picture recognition method according to claim 5.
Citation Information
Patent Citations
A pedestrian rerecognition method based on multi-view image feature decomposition
CN109543602A
Image processing method and related equipment
CN111144240A