CN112990387B  Model optimization method, related device and storage medium  Google Patents
Model optimization method, related device and storage medium Download PDFInfo
 Publication number
 CN112990387B CN112990387B CN202110533449.4A CN202110533449A CN112990387B CN 112990387 B CN112990387 B CN 112990387B CN 202110533449 A CN202110533449 A CN 202110533449A CN 112990387 B CN112990387 B CN 112990387B
 Authority
 CN
 China
 Prior art keywords
 sample
 target
 candidate
 training
 learning
 Prior art date
 Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
 Active
Links
 238000005457 optimization Methods 0.000 title claims abstract description 147
 238000003860 storage Methods 0.000 title claims abstract description 32
 230000004301 light adaptation Effects 0.000 claims abstract description 57
 238000000034 method Methods 0.000 claims abstract description 44
 238000004364 calculation method Methods 0.000 claims abstract description 38
 238000009826 distribution Methods 0.000 claims abstract description 32
 230000000875 corresponding Effects 0.000 claims description 65
 238000005065 mining Methods 0.000 claims description 44
 230000000694 effects Effects 0.000 description 30
 238000004422 calculation algorithm Methods 0.000 description 20
 238000005516 engineering process Methods 0.000 description 15
 238000000605 extraction Methods 0.000 description 13
 230000002829 reduced Effects 0.000 description 12
 238000010586 diagram Methods 0.000 description 11
 238000004590 computer program Methods 0.000 description 10
 238000009412 basement excavation Methods 0.000 description 9
 238000010801 machine learning Methods 0.000 description 8
 241000282414 Homo sapiens Species 0.000 description 6
 238000002372 labelling Methods 0.000 description 6
 230000003044 adaptive Effects 0.000 description 4
 238000003062 neural network model Methods 0.000 description 4
 230000036961 partial Effects 0.000 description 3
 238000004458 analytical method Methods 0.000 description 2
 230000006399 behavior Effects 0.000 description 2
 238000011068 load Methods 0.000 description 2
 230000001537 neural Effects 0.000 description 2
 238000011176 pooling Methods 0.000 description 2
 238000003672 processing method Methods 0.000 description 2
 239000000126 substance Substances 0.000 description 2
 229920001276 Ammonium polyphosphate Polymers 0.000 description 1
 241000282326 Felis catus Species 0.000 description 1
 230000005540 biological transmission Effects 0.000 description 1
 238000004140 cleaning Methods 0.000 description 1
 238000004891 communication Methods 0.000 description 1
 230000002708 enhancing Effects 0.000 description 1
 230000002349 favourable Effects 0.000 description 1
 230000002401 inhibitory effect Effects 0.000 description 1
 230000000670 limiting Effects 0.000 description 1
 238000003058 natural language processing Methods 0.000 description 1
 238000010606 normalization Methods 0.000 description 1
 230000000750 progressive Effects 0.000 description 1
 230000002787 reinforcement Effects 0.000 description 1
 241000894007 species Species 0.000 description 1
 230000001629 suppression Effects 0.000 description 1
Classifications

 G—PHYSICS
 G06—COMPUTING; CALCULATING; COUNTING
 G06K—RECOGNITION OF DATA; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
 G06K9/00—Methods or arrangements for reading or recognising printed or written characters or for recognising patterns, e.g. fingerprints
 G06K9/62—Methods or arrangements for recognition using electronic means
 G06K9/6217—Design or setup of recognition systems and techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
 G06K9/6256—Obtaining sets of training patterns; Bootstrap methods, e.g. bagging, boosting

 G—PHYSICS
 G06—COMPUTING; CALCULATING; COUNTING
 G06N—COMPUTER SYSTEMS BASED ON SPECIFIC COMPUTATIONAL MODELS
 G06N3/00—Computer systems based on biological models
 G06N3/02—Computer systems based on biological models using neural network models
 G06N3/08—Learning methods
Abstract
The embodiment of the application discloses a model optimization method, related equipment and a storage medium, wherein the method comprises the following steps: calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image; the candidate sample set is constructed by adopting sample images in P candidate fields which are not learned in Q fields; calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image; selecting a target field matched with the target model from the P candidate fields based on the calculation result and the matching strategy; optimizing the target model by adopting the sample image in the target field so as to enable the target field to be learned by the target model; the above process is iterated until all Q fields are learned by the target model. By adopting the embodiment of the application, the generalization and the robustness of the target model can be effectively improved.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to the field of computer technologies, and in particular, to a model optimization method, a model optimization device, a computer device, and a computer storage medium.
Background
With the continuous development of internet technology, the application field of image recognition is more and more extensive. The image recognition is a technology for processing, analyzing and understanding an image by using a computer to recognize the image at a category level; in other words, the image recognition technique is a technique of performing image recognition in consideration of only a category of an object (e.g., a human image, a dog image, a cat image, etc.) regardless of a specific instance of the object (i.e., an image to be recognized), and giving a category to which the object belongs. At present, a neural network model is generally adopted to realize category identification on an image to be identified; since the accuracy of the class identification result is closely related to the performance of the neural network model, it is necessary to improve the performance of the neural network model in order to improve the accuracy of the image identification result. Based on the above, how to better improve the performance of the neural network model through model optimization training becomes a research hotspot.
Disclosure of Invention
The embodiment of the application provides a model optimization method, related equipment and a storage medium, and the generalization, robustness and other performances of a target model can be effectively improved.
In one aspect, an embodiment of the present application provides a model optimization method, where the method includes:
calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image; the target model is optimized by learning Q fields, the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields, Q is a positive integer larger than 1, and P is a positive integer smaller than or equal to Q;
calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image;
selecting a target field matched with the target model from the P candidate fields based on a calculation result and a matching strategy;
optimizing the target model by adopting the sample image in the target field so that the target field is learned by the target model;
and iterating the process until the Q fields are learned by the target model.
In another aspect, an embodiment of the present application provides a model optimization apparatus, where the apparatus includes:
the processing unit is used for calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image; the target model is optimized by learning Q fields, the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields, Q is a positive integer larger than 1, and P is a positive integer smaller than or equal to Q;
the processing unit is further used for calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image;
the processing unit is further used for selecting a target field adapted to the target model from the P candidate fields based on a calculation result and an adaptation strategy;
the optimization unit is used for optimizing the target model by adopting the sample image in the target field so as to enable the target field to be learned by the target model;
the processing unit and the optimization unit are invoked iteratively until all of the Q domains are learned by the target model.
In another aspect, an embodiment of the present application provides a computer device, where the computer device includes an input interface and an output interface, and the computer device further includes:
a processor adapted to implement one or more computer programs; and the number of the first and second groups,
a computer storage medium storing one or more computer programs adapted to be loaded by the processor and to perform the steps of:
calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image; the target model is optimized by learning Q fields, the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields, Q is a positive integer larger than 1, and P is a positive integer smaller than or equal to Q;
calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image;
selecting a target field matched with the target model from the P candidate fields based on a calculation result and a matching strategy;
optimizing the target model by adopting the sample image in the target field so that the target field is learned by the target model;
and iterating the process until the Q fields are learned by the target model.
In another aspect, an embodiment of the present application provides a computer storage medium, where one or more computer programs are stored, and the one or more computer programs are adapted to be loaded by a processor and execute the following steps:
calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image; the target model is optimized by learning Q fields, the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields, Q is a positive integer larger than 1, and P is a positive integer smaller than or equal to Q;
calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image;
selecting a target field matched with the target model from the P candidate fields based on a calculation result and a matching strategy;
optimizing the target model by adopting the sample image in the target field so that the target field is learned by the target model;
and iterating the process until the Q fields are learned by the target model.
In another aspect, embodiments of the present application provide a computer program product or a computer program, which includes computer instructions stored in a computerreadable storage medium. The processor of the computer device reads the computer instructions from the computerreadable storage medium, and the processor executes the computer instructions to cause the computer device to perform the model optimization method described above.
According to the method and the device, Q fields can be set for the target model, and the target model is subjected to multiround learning optimization through gradually learning the Q fields according to the principle of preferentially learning in the adaptive field. In each round of learning optimization, sample images under P candidate fields which are not learned in Q fields can be adopted to construct a candidate sample set. And calling a target model to identify the category of each sample image in the candidate sample set, thereby reversely calculating the learning adaptation degree of the target model and each candidate field according to the category identification result and the field distribution condition of each sample image, and improving the reliability and the accuracy of the learning adaptation degree to a certain extent. Then, based on the calculation result and the adaptation strategy, selecting a target field adapted to the target model from the P candidate fields, and enabling the target model to learn the target field preferentially; because the target field is matched with the target model, the target model can learn the target field more easily compared with other fields in P candidate fields, so that the learning time of the target model in the learning field can be effectively reduced, the model optimization efficiency is improved, and the learning effect that the generalization capability of the target model is stable and the accuracy is not reduced can be realized. After the model capability of the target model is improved by learning the target field, the process can be iterated to enable the target model to continuously learn various fields which are not learned; with gradual iterative optimization, the target model can have stronger capacity to process sample images in more complex or more difficult fields, so that the target model can fully learn and excavate effective information to adjust model parameters of the target model for Q fields, and the accuracy, the generalization, the robustness and other performances of the target model are improved. Moreover, because the sample images between each domain are not absolutely isolated, the target model can have a certain help effect on the domain of the later learning through the information acquired by the domain of the earlier learning, which is beneficial to improving the learning effect of the target model on the domain of the later learning, thereby improving the optimization effect of the target model.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1a is a schematic flow chart of a model optimization scheme provided in an embodiment of the present application;
FIG. 1b is a schematic structural diagram of a convolution block according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating a model optimization method according to an embodiment of the present disclosure;
FIG. 3a is a schematic diagram of a noisy image provided by an embodiment of the present application;
fig. 3b is a schematic diagram of a block chain according to an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram illustrating a model optimization method according to another embodiment of the present disclosure;
FIG. 5a is a schematic diagram of a weakly supervised model optimization of an object model according to an embodiment of the present application;
fig. 5b is a schematic diagram of assigning noise weights to current samples according to an embodiment of the present application;
fig. 5c is a schematic diagram of uploading an image to a server according to an embodiment of the present application;
FIG. 5d is a diagram illustrating a server output result according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a model optimization apparatus provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
With the continuous development of internet technology, Artificial Intelligence (AI) technology has also been developed better. The artificial intelligence technology refers to a theory, a method, a technology and an application system which simulate, extend and expand human intelligence by using a digital computer or a machine controlled by the digital computer, sense the environment, acquire knowledge and use the knowledge to obtain the best result. In other words, artificial intelligence is an integrated technique of computer science; the intelligent machine is mainly produced by knowing the essence of intelligence and can react in a manner similar to human intelligence, so that the intelligent machine has multiple functions of perception, reasoning, decision making and the like. Accordingly, AI technology is a comprehensive discipline, which mainly includes Computer Vision technology (CV), speech processing technology, natural language processing technology, and Machine Learning (ML)/deep Learning.
The machine learning is a multifield cross subject and relates to a plurality of subjects such as probability theory, statistics, approximation theory, convex analysis and algorithm complexity theory. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of AI, which is the basis for making computer devices intelligent; the machine learning is a multifield cross subject and relates to a plurality of subjects such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and the like; the method specially studies how computer equipment simulates or realizes human learning behaviors to acquire new knowledge or skills, and reorganizes the existing knowledge structure to continuously improve the performance of the knowledge structure. Deep learning is a technology for machine learning by using a deep neural network system; machine Learning/deep Learning may generally include various techniques such as artificial neural networks, Reinforcement Learning (RL), supervised Learning, unsupervised Learning, and so on; supervised learning refers to a processing method of performing model optimization training using training samples of known types (with labeled types), and unsupervised learning refers to a processing method of performing model optimization training using training samples of unknown types (without labeling).
Based on a machine learning/deep learning technology in an AI technology, the embodiment of the application provides a model optimization scheme based on multifield progressive so as to realize model optimization on a target model and improve the generalization and robustness of the target model. In particular implementations, the model optimization scheme may be executed by a computer device, which may be a terminal or a server; among others, the terminals mentioned herein may include but are not limited to: smart phones, tablet computers, notebook computers, desktop computers, smart watches, smart televisions, smart vehicle terminals, and the like; various clients (APPs) can be run in the terminal, such as a video playing client, a social client, a browser client, an information flow client, an education client, and the like. The server mentioned here may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
It should be noted that, in other embodiments, the model optimization scheme may also be executed by the server and the terminal together; the server and the terminal are connected via a network (e.g., a wired network, a wireless network, etc.), and the connection is not limited thereto. Moreover, the computer device mentioned in the embodiment of the present application may be located outside the blockchain network, or may be located inside the blockchain network, which is not limited to this; the blockchain network is a network formed by a peertopeer network (P2P network) and blockchains, and a blockchain is a novel application model of computer technologies such as distributed data storage, peertopeer transmission, consensus mechanism, encryption algorithm, etc., and is essentially a decentralized database, which is a string of data blocks (or called blocks) associated by using cryptography.
Referring to fig. 1a, the general principle of the model optimization proposed by the embodiment of the present application is as follows: firstly, a basic model can be constructed in advance by computer equipment, and model training is carried out on the basic model by adopting an initial training set so as to optimize model parameters of the basic model, thereby obtaining a target model. The basic model is essentially a category identification model which can identify the category of any image by carrying out category identification on the image; it will be appreciated that the object model is also a classrecognition model in nature, since only the model parameters differ between the object model and the base model, and the model structure does not change. And the base model and the target model can realize category identification in any dimension, such as a scene dimension, an image type dimension, a category dimension of each object in the image, and the like. That is, the base model and the target model may enable scenebased class identification, such as identifying whether the class to which the image belongs is an outdoor scene class or an indoor scene class. Alternatively, the base model and the object model may implement class identification based on the image type, such as identifying whether the class to which the image belongs is a landscape image class, a person image class, or an animal image class, and so on. Still alternatively, the base model and the target model may also implement speciesbased class identification, such as identifying a class to which the object in the image belongs as a character class, a puppy class, a kitten class, or the like. For convenience of illustration, the basic model and the target model are used to implement the scenebased class identification as an example.
Multifield sample collection can be carried out, and one field corresponds to one sample collection channel; that is, sample images under multiple sample collection channels may be collected in the internet, where the sample collection channels may include, but are not limited to: browser clients, video playback clients, information browsing web pages, social networking platforms, and the like. Each sample image collected under each field may be referred to as an internet sample, and the internet sample refers to: the method comprises the steps of collecting images in the modes of category labels in an internet search engine, category labels set by users of a certain social platform and the like; images acquired by searching for "park" in a browser client, images acquired by searching for "park" in a video playback client, and so on. The labels such as category labels in an internet search engine and category labels set by users of a certain social platform can be used as original category labels (hereinafter referred to as original labels) of internet samples. It should be understood that different sample collection channels may correspond to different image styles; for example, taking classroom images collected from a plurality of sample collection channels as sample images, classroom images in which the sample images are mostly of a quadratic style collected by a website a (such as an acg (collective term for animation, comic, and game) type website), classroom images in which the sample images collected by a website B tend to be of a characteroriented style, classroom images in which most of the sample images collected by a website C are of a classroom panoramic style, classroom images in which the sample images collected by a website D are generally of a style integrated in a plurality of fields, and the like.
And thirdly, after the computer equipment collects sample images in a plurality of fields, all the fields can be used as candidate fields which are not learned. The computer equipment can carry out multifield sample mining on the candidate fields which are not learned through the target model, and sample images which are easy to learn of the target model in each field are mined to serve as training samples in each field; and a learning target of the target model is formulated according to the multifield sample mining result, and particularly, a target field which is easy to learn by the target model can be determined as the learning target of the target model in an unlearned candidate field according to the multifield sample mining result. And fifthly, the computer equipment can adopt each sample image indicated by the multifield sample mining result to carry out model optimization training on the target model. And sixthly, carrying out sample mining on the sample images which are not learned in the target field through the target model, and carrying out model optimization training on the target model by adopting the mined training samples. And seventhly, iteratively executing the step sixth until no sample image which can be used for optimizing the target model exists in the target field, and finishing the mining and learning of the target model to the target field. After the target model finishes excavating and learning the target field, judging whether candidate fields which are not learned exist in the plurality of fields; ninthly, if yes, redetermining the candidate field which is not learned, and repeatedly executing the step (iv) the step (viii) so as to realize sample mining and model updating on the remaining candidate field which is not learned; if no, outputting the optimized target model in the last step.
From the above description it follows that: according to the model optimization scheme provided by the embodiment of the application, after a target model can be learned through a small amount of labeled samples and multifield sample collection is carried out, multiround excavation and unbalanced multifield learning are carried out on internet samples; and the field which is easy to learn is taken as the target field which is preferentially learned each time, and the sample image which is easy to learn is taken from the target field each time and is gradually added into the learning process of the target model, so as to train and optimize the target model. It should be noted that the foregoing merely illustrates the general principles of the model optimization scheme, and does not limit the same. For example, in the above flow, after the computer device formulates the learning target through the step (iv), it may learn a sample image that is easier in multiple fields by performing the step (iv) to optimize the model parameters of the target model; however, in other embodiments, the computer device may not execute the fifth step, directly execute the sixth step, and so on after formulating the learning objective through the fourth step.
Practice shows that the model optimization scheme provided by the embodiment of the application has at least the following beneficial effects:
the first point is as follows: because the image styles corresponding to different sample collecting channels are usually different, the comprehensiveness of the sample images can be effectively improved by carrying out sample collection in multiple fields, so that the target model can learn relatively comprehensive effective information when learning each sample image, and the optimization of the model performance is facilitated. And a second point: the learning time of the target model in the learning field can be effectively reduced, and the model optimization efficiency is improved; and ensuring that the target model keeps the generalization ability stable and the accuracy rate is not reduced. And a third point: with gradual iterative optimization, the target model can have stronger capacity to process sample images in more complex or more difficult fields, so that the target model can fully learn and excavate effective information to adjust model parameters of the target model for each field, and the accuracy, the generalization, the robustness and other performances of the target model are improved. A fourth point: because the sample images among all the domains are not absolutely isolated, the target model can have a certain help function for the later learning domain through the information acquired by the first learning domain, and is beneficial to improving the learning effect of the target model on the later learning domain, thereby improving the optimization effect of the target model; for example, the sample image collected through the website D also contains a certain degree of twodimensional style classroom image related to the website a, and if the website C is learned by the target model before the website a, the target model has a certain discrimination capability on the sample image in the website a after learning the website C, which is beneficial to subsequently learning the twodimensional style sample image in the website a.
Based on the above description of the model optimization scheme, the following further elaborates the basic model mentioned in the model optimization scheme, and the specific training process how to train the reference model to obtain the target model:
1) the network structure is as follows: the reference model may be a class identification model for performing class identification on the image based on deep learning, and may specifically include a feature extraction module shown in table 1 and a class identification module shown in table 2:
TABLE 1
Referring to table 1, the feature extraction module in the target model may use a basic feature network, such as ResNet101 (a residual network), as a feature extraction network, and use the output result as a data feature; that is, the feature extraction module may include at least a multilayer convolution layer (conv). In table 1, "Layer name" represents a network Layer name, "Output size" represents a size (or called a size) of an Output result of the network Layer, "stride" represents a step size, "max pool" represents a maximum pooling, and one block (or called a convolution block) includes 3 convolution layers. For example, for a "Conv 2_ x" network layer, the specific structure of one block included therein can be seen in fig. 1 b; that is, one block in the "Conv 2_ x" network layer includes: a first convolutional layer with a convolution kernel of 1 × 1 and a channel number of 64, a second convolutional layer with a convolution kernel of 3 × 3 and a channel number of 64, and a third convolutional layer with a convolution kernel of 1 × 1 and a channel number of 256.
TABLE 2
Layer name  Output size  Layer 
Pool_cr  1×2048  max pool 
Fc_cr  1×N  full connetction 
Referring to table 2, the class identification module may include at least a class identification layer (Fc _ cr) and a pooling layer (pool _ cr). The output result of the Fc _ cr layer in table 2 is data of 1 × N, N is the number of preset categories to be learned, and N is a positive integer greater than 1; "full connectivity" means a full connectivity layer.
2) Feature extraction: the embedding can be used as a data feature during feature extraction, wherein the embedding is the data feature used for similarity calculation and data retrieval.
3) Initializing model parameters: conv1Conv5 uses pretrained network parameters (e.g., pretrained network parameters on ImageNet (a large universal object recognition open source data set)) to reduce the amount of computation in subsequent model optimization; in this case, for the trained network parameters (such as the network parameters of each convolutional layer in table 1), it can be determined whether to optimize these network parameters again according to the requirement. For a newly added network layer (such as an Fc _ cr layer) in the target model, a gaussian distribution with a variance of 0.01 and a mean of 0 may be used for initialization; and for the network parameters of the Fc _ cr layer in table 2, iterative optimization is required, i.e. the goal of learning is to obtain the correct Fc _ cr. That is, the model parameters to be learned in the target model may include at least the network parameters of the Fc _ cr layer; optionally, the network parameters of the convolutional layer and other network layers may also be included.
4) The training process for obtaining the target model through the basic model specifically comprises the following steps a to c:
a, constructing an initial training set: constructing an initial training set by adopting a target number of labeled samples, wherein the labeled samples refer to: after being labeled by professional labeling personnel, the images with labeled categories are obtained; that is, any annotated sample has a class annotation label.
b, forward model: and setting all model parameters or part of model parameters of the basic model to be in a state needing learning, and during model optimization training, carrying out forward calculation on the labeled samples in the input initial training set by the basic model to obtain a class identification result, wherein the class identification result at least comprises a target class to which the identified labeled samples belong. Then, the target class in the class identification result (output result of Fc _ cluster) may be compared with the class indicated by the class label of the corresponding labeled sample to calculate a model loss value (classification loss) of the base model generated by the labeled sample.
c, optimizing model parameters: and c, transmitting the model loss value obtained in the step b back to the network of the basic model, and updating the model parameters of the basic model by a gradient descent method, thereby realizing primary model optimization. Specifically, a gradient descent algorithm can be adopted to perform gradient backward calculation according to the model loss value obtained in the step b to obtain an updated value of each model parameter to be learned, and the updated value is adopted to update the model parameters of the optimized basic model; gradient descent algorithms herein may include, but are not limited to: SGD (Stochastic Gradient Descent) algorithm, GD (Gradient Dropping) algorithm, BGD (Batch Gradient Descent) algorithm, and the like.
It should be noted that, the embodiment of the present application only exemplarily illustrates the model structure of the basic model, and does not limit the specific structure of the basic model; for example, the abovementioned feature extraction module uses ResNet101 as a feature extraction network for feature extraction, but in other embodiments, the feature extraction module may also use other different structural networks and different pretraining model weights as a feature extraction network for basic feature extraction, such as a deep residual network, ResNet18, ResNet50, and so on.
Based on the description related to the model optimization scheme, the embodiment of the present application proposes a model optimization method, which may be executed by the aforementioned computer device, where the computer device may be a terminal or a server; alternatively, the model optimization method may be performed by both the terminal and the server. For convenience of explanation, the model optimization method executed by a computer device is described as an example; referring to fig. 2, the model optimization method may include the following steps S201 to S205:
s201, calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image.
In the embodiment of the application, the target model is optimized by learning Q fields, and a plurality of sample images can be arranged in one field; when there is no sample image that has been learned by the target model in any domain, it can be considered that the domain has not been learned by the target model, and for convenience of illustration, the domains that have not been learned are all referred to as candidate domains. In a specific implementation, the computer device may iteratively execute steps S201S205 to implement multiple rounds of learning optimization for the target model by gradually learning Q domains according to the principle of easy domainfirst learning. Before executing steps S201 to S205 each time, the computer device may determine P candidate domains that are not learned from the Q domains, and construct candidate sample images using sample images in the P candidate domains; then, the computer device calls the target model to perform class identification on each sample image in the candidate sample set through step S201 to obtain a class identification result of each sample image, and then continues to execute steps S202S205. That is, each time step S201 is executed, the relevant candidate sample set is constructed by using sample images in P candidate domains that are not learned from Q domains; wherein Q is a positive integer greater than 1, and P is a positive integer less than or equal to Q.
It should be understood that (i) when the computer device executes steps S201 to S205 for the first time, the target model in step S201 is a target model that has not been subjected to parameter optimization; when the computer device does not perform steps S201 to S205 for the first time, the target model in step S201 refers to the target model after parameter optimization through the previous steps S201 to S205. If the computer device executes step S201 for the first time, since each of the Q domains is an unlearned domain, in this case, the computer device takes the Q domains as P candidate domains, that is, the value of P is equal to Q. If the computer device does not execute step S201 for the first time, since the computer device has executed steps S201 to S205 one or more times before executing step S201 this time, the number of candidate domains determined from Q domains is smaller than Q, that is, the value of P is smaller than Q.
For example, let the value of Q be equal to 3, i.e., the target model is optimized by learning 3 fields (field a, field B, and field C), and let the original model parameters of the target model be a. Then when the computer device executes step S201 for the first time, the called target model refers to a target model with model parameters of a; since none of the 3 domains is learned, all of the domains a, B, and C can be considered as candidate domains, i.e., P =3 at this time, and the value of P is equal to Q. If the learning of the domain B is realized by performing the steps S202S205 for the first time, and the model parameters of the target model are updated from A to B by learning the domain B; then, when the computer device executes step S201 for the second time, the called target model refers to the target model with model parameter B; in this case, since only the region a and the region C are not learned, both the region a and the region C can be regarded as candidate regions, that is, P =2, and the value of P is smaller than Q. By analogy, if the learning of the domain A is realized by performing the steps S202S205 for the second time, the model parameters of the target model are updated from B to C by learning the domain A; then, when the computer device executes step S201 for the third time, the called target model refers to a target model with model parameters of C; and only the field C is not learned at this time, so that the field C can be regarded as a candidate field, that is, P =1 at this time, and the value of P is smaller than Q.
In the embodiment of the present application, as can be seen from the foregoing, the target model has N preset categories to be learned; therefore, the target model actually adopts the image multiclass identification technology to realize the class identification of any image. The image multiclass identification technology mentioned here refers to: a technique of recognizing whether an image has one or more preset categories; an image may have multiple category attributes, and a multicategory identification task is a task of determining which category labels a certain image has in which preset categories. Based on this, the specific implementation of step S201 may include: and calling a target model to extract the data characteristics of any sample image in the candidate sample set. Secondly, the confidence (or called probability) that any sample image belongs to each preset class can be predicted based on the extracted data features so as to obtain a class identification result of any sample image; the class identification result of any sample image may include at least: a target class and a corresponding class confidence for the any one sample image. Wherein, the object type of any sample image is: the preset category corresponding to the maximum confidence degree of any sample image; the category confidence of any sample image is: a confidence that the any sample image belongs to the target class of the any sample image. Optionally, the result of identifying the category of any sample image may further include: the candidate category and the corresponding candidate confidence of any sample image; the candidate categories for any sample image are: a preset category of the N preset categories except for the target category of any sample image; the candidate confidence of any sample image is: a confidence that the any sample image belongs to the candidate class of the any sample image. Based on the principle, the computer equipment processes each sample image in the candidate sample set, so that the category identification result of each sample image in the candidate sample set can be obtained.
It should be noted that the object categories of different sample images may be the same, may be different, and are not limited thereto. For example, let a total of 4 preset categories: class a, class b, class c, and class d; if the probability that the sample image a belongs to each preset category is identified by calling the target model is as follows in sequence: 0.96, 0.85, 0.5 and 0.3, the probabilities of identifying that the sample image b belongs to each preset category are as follows in sequence: 0.86, 0.5, 0.67 and 0.2, and the probabilities of identifying that the sample image c belongs to each preset category are in turn: 0.2, 0.85, 0.32, and 0.67. Then, the target category of the sample image a is category a, the target category of the sample image b is category a, and the target category of the sample image c is category b; it can be seen that the object class of the sample image a is the same as that of the sample image b, but the object class of the sample image a is different from that of the sample image c, and the object class of the sample image b is different from that of the sample image c.
S202, calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image.
As can be seen from the foregoing, the class identification result of any sample image may include: class confidence of the target class of any sample image. The research shows that, for any sample image, the higher the class confidence of the sample image obtained by the target model is, the stronger the learning ability of the target model on the sample image is, the easier the target model learns the sample image, and thus the more the target model is adapted to the sample image. It can be further determined that, for any candidate domain, the more sample images in the candidate domain have a greater class confidence, which may indicate that the stronger the learning capability of the target model for the candidate domain, the easier the target model learns the candidate domain, and thus may indicate that the target model is more suitable for the candidate domain. Based on the research result, the computer device may calculate the learning adaptation degree of the target model to each candidate domain according to the class recognition result of each sample image and the domain distribution condition of each sample image after obtaining the class recognition result of each sample image in the candidate sample set through step S201. Wherein the domain distribution is used for indicating the candidate domain to which each sample image belongs.
In a specific implementation of step S202, the computer device may first perform sample mining on P candidate domains according to a class confidence in a class recognition result of each sample image to obtain one or more first training samples, where a first training sample refers to a sample image in a candidate sample set whose class confidence is greater than or equal to a first confidence threshold. Secondly, the number of samples of the first training sample in each candidate domain can be determined based on the domain distribution condition of each sample image. Then, the learning fitness of the target model and each candidate domain can be calculated according to the number of samples corresponding to each candidate domain. For any candidate domain, the learning adaptation degree of the target model and the candidate domain may be in direct proportion to the number of samples corresponding to the candidate domain; alternatively, the learning fitness of the target model and the any one of the candidate domains may be proportional to a ratio of the number of samples of the first training sample in the any one of the candidate domains to the total number of sample images in the any one of the candidate domains.
In another specific implementation of step S202, the computer device may also determine the sample image in each candidate domain according to the domain distribution of each sample image. Secondly, according to the class confidence coefficient in the class recognition result of each sample image in each candidate field, sample mining is carried out on each candidate field to obtain a first training sample in each candidate field and the corresponding sample number. Then, the learning adaptation degree of the target model and each candidate field is calculated according to the number of samples corresponding to each candidate field.
S203, selecting a target field matched with the target model from the P candidate fields based on the calculation result and the matching strategy.
Wherein, the calculation result includes: learning adaptation degree of the target model and each candidate field; since the learning adaptation degree of the target model and any candidate domain can be used to indicate the adaptation degree between the target model and any candidate domain, the greater the learning adaptation degree, the easier the target model learns any candidate domain. Therefore, the computer device may select the maximum learning suitability in the calculation result when performing step S203; taking the candidate field corresponding to the maximum learning adaptation degree in the P candidate fields as a target field adapted to the target model; by the implementation method, the candidate field which is easiest to learn by the target model can be selected from the P candidate fields to serve as the target field, so that the learning time of the subsequent target model is shortened, and the model optimization efficiency is improved.
Alternatively, an adaptation threshold value may be preset; in this case, when the computer device executes step S203, the computer device may first use each learning fitness greater than the fitness threshold in the computer result as a candidate learning fitness; and randomly selecting one candidate learning adaptation degree from all candidate learning adaptation degrees as a target learning adaptation degree, and taking the candidate field corresponding to the target learning adaptation degree in the P candidate fields as a target field adapted to the target model. Because each candidate learning adaptation degree is larger than the adaptation degree threshold value, the candidate field corresponding to any candidate learning adaptation degree is easy to learn for the target model; therefore, through the implementation mode, the candidate field which is easy to learn by the target model can be selected from the P candidate fields to serve as the target field, so that the learning time of the subsequent target model is shortened, and the model optimization efficiency is improved.
And S204, optimizing the target model by adopting the sample image in the target field so as to enable the target field to be learned by the target model.
In one particular implementation, the computer device may perform model training on the target model using all sample images in the target domain to optimize model parameters of the target model until the target model converges by passing through the target domain. Wherein, the convergence of the target model through the target field means: the model parameters of the target model are not changed any more, or the change amplitude of the model parameters is smaller than a threshold value; or the target model reaches convergence means that: the loss value of the target model is not reduced any more, or the reduction amplitude of the loss value of the target model is smaller than a threshold value; or, each sample image in the target field is learned by the target model, and the like.
In another specific implementation, considering that the distribution of each sample image in the target field may be complex, some sample images are easy to be better learned by the target model, and some sample images are not easy to be better learned by the target model. When the target model is optimized by adopting the sample image which cannot be easily learned by the target model, the target model takes more learning time and has poorer learning effect; based on the above, when the computer device optimizes the target model by using the sample images in the target field, the computer device may perform one or more rounds of sample mining on the target field in a sample mining manner, mine a part of sample images which are easy to learn by the target model from the sample images which are not learned in the target field each time, and perform model optimization on the target model by using the mined sample images until no sample images which are not easy to learn by the target model exist in the target field or until no sample images which are easy to learn by the target model exist in the sample images which are not learned in the target field. Through the specific implementation mode, the sample images used for model optimization at each time can be ensured to be the sample images which are easy to learn by the target model, the learning time of the target model can be effectively saved, and the learning effect is improved.
As can be seen from the foregoing, the sample image mentioned in the embodiments of the present application is an internet sample, and the internet sample generally has an original label; in any of the above implementations, the specific way for the computer device to train the target model using a certain sample image in the target domain is as follows: firstly, determining the original category of any sample image in the target field according to the original label of any sample image in the target field; and calling a target model to perform category identification on any sample image to obtain the target category of any sample image. Then, a loss value generated by the target model through any sample image is calculated according to the difference between the original class and the target class of the sample image. Finally, optimizing the model parameters of the target model according to the direction of reducing the loss value; specifically, the gradient back calculation may be performed according to the loss value by using a gradient descent algorithm in the direction of reducing the loss value to obtain an updated value of the model parameter of the target model, and the model parameter of the target model is updated to the updated value to optimize the target model. The reference to "in the direction of reducing the loss value" in the embodiments of the present application means: a model optimization direction with a minimum loss value as a target; and performing model optimization through the direction, so that the loss value generated by the target model after each optimization is smaller than the loss value generated by the target model before optimization. For example, if the loss value of the objective model obtained by the calculation is 0.85, the loss value generated by optimizing the objective model after optimizing the objective model in the direction of reducing the loss value should be less than 0.85.
Further, considering that the sample image in the target field may be a noise sample (or referred to as a noisy sample), the socalled noise sample refers to a sample image whose original label is inaccurate due to various factors. Specifically, the noise sample may be a sample image with an error in the original label due to human error of a user; as shown in fig. 3a, since the two sample images are both "classrooms" in the category indicated by their original labels, but the real category of the two sample images is not "classrooms", both sample images shown in fig. 3a are noise samples. Alternatively, the noise sample may also be a sample image in which the true category and the original category indicated by the original label do not match due to unclear concept; such as a sample image that actually has 2 classes but only one original label due to the partial overlap of concepts between the two classes), etc. The loss value generated by the target model through any sample image is calculated according to the difference between the original class and the target class of any sample image; therefore, when noise exists in any sample image of the target model, the accuracy of the original category can be influenced to a certain extent, so that the accuracy of the loss value is influenced, and the optimization effect of the target model is further influenced. Based on this, when the computer device optimizes the target model by using the sample image in the target field in step S204, the target number of labeled samples may also be added, so as to implement the weakly supervised model optimization of the mixed sample of the target model by using the target number of labeled samples and the sample image in the target field. The marked sample mentioned here is an image with a marked label, and the target model can be guided to learn more information to a certain extent by adding the marked sample, so that the optimization effect of the target model is improved, and the generalization and robustness of the target model are further improved.
Optionally, before executing step S204, the computer device may also optimize the target model by using all or part of the sample images in the P candidate fields to improve the generalization of the target model; then, step S204 is executed, so that the target model can better learn the target field, and the learning effect of the target model on the target field is improved, thereby improving the optimization effect of the target model. When the target model is optimized by adopting partial sample images in the P candidate fields, the computer equipment can randomly select a batch of sample images from all sample images in the P candidate fields to optimize the target model. Alternatively, if the computer device performs sample mining on P candidate domains while performing step S202, the target model may be optimized by using each first training sample in the P candidate domains because each mined first training sample is relatively easy to learn about the target model; through the implementation mode, the learning effect of the target model on the target field can be improved, and the learning efficiency of the target model can also be improved. Furthermore, when the target model is optimized by adopting each first training sample in the P candidate fields, a target number of labeled samples can be added, so that the target model is optimized by adopting the target number of labeled samples and each first training sample, and the generalization and robustness of the target model are further improved.
And S205, iterating the process until the Q fields are learned by the target model.
Wherein, iterating the above process means: step S201step S204 are executed in an iteration mode; that is, one iterative process may include: the redetermination of the target domain achieved by steps S201 to S203, and the optimization update of the target model achieved by step S204 by learning the redetermined target domain. After Q fields are learned by the target model through iteration of the process, the target model with more perfect performance can be obtained; the target model with more perfect performance is as follows: and optimizing the updated target model by learning the last field. For example, the target model is optimized by learning 3 fields (field a, field B, and field C), and the original model parameters of the target model are set as a; if the optimization logic of the target model by iterating the above process is as follows: executing the steps S201S204 for the first time to realize the learning of the target model to the field B, thereby optimizing the model parameters of the target model from A to B; step S201S204 are executed in a second iteration mode, learning of the target model to the field A is achieved, and therefore model parameters of the target model are updated from B to C; and step S201S204 are executed in the third iteration, so that the target model learns the field C, and the model parameters of the target model are updated from C to D. Then, the finally obtained target model with more perfect performance means: and optimizing the updated target model through the learning field C, namely the target model with the model parameter D.
Optionally, after the target model with the better performance is obtained, the target model with the better performance may be uploaded to and stored in a block chain of a block chain network, so as to prevent the target model with the better performance from being maliciously tampered. Wherein the blockchain is composed of a plurality of blocks, as shown in fig. 3 b; the starting block comprises a block head and a block main body, wherein the block head stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured. Based on this, the specific implementation of storing the target model with more complete performance into the blockchain of the blockchain network may be:
if the computer equipment is a node in the block chain network, the target model with more perfect performance can be added into the block main body of the target block, and the hash operation is carried out on the target model in the block main body to obtain the Mercker hash value. Secondly, a random number can be generated by adopting a random algorithm, and the calculated merkel hash value, the random number, the version number, the last block hash value, the current timestamp and the current difficulty value form the block head of the target block. The version number refers to version information of a related block protocol in a block chain; the last block hash value refers to a characteristic value of a block header of the last block; the current timestamp refers to the system time when the block header is composed; the current difficulty value refers to a calculated difficulty value that is constant over a fixed time period and is determined again after the fixed time period is exceeded. Then, a characteristic value algorithm (such as the SHA256 algorithm) can be adopted to perform one or more times of hash operation on the content contained in the block head to obtain a characteristic value of the block head of the target block; the number of hash operations can be determined according to the calculation difficulty, and the larger the calculation difficulty is, the more the number of hash operations is. After the target block is obtained based on the steps, the target block can be broadcasted to all the consensus nodes in the block chain network for consensus processing; after passing the consensus process, the target block is added to the block chain. It should be understood that if the computer device is a device outside the blockchain network, the target model with better performance may be sent to any consensus node in the blockchain network, and the above steps are performed by the any consensus node to store the target model with better performance into the blockchain.
According to the method and the device, Q fields can be set for the target model, and the target model is subjected to multiround learning optimization through gradually learning the Q fields according to the principle of preferentially learning in the adaptive field. In each round of learning optimization, sample images under P candidate fields which are not learned in Q fields can be adopted to construct a candidate sample set. And calling a target model to identify the category of each sample image in the candidate sample set, thereby reversely calculating the learning adaptation degree of the target model and each candidate field according to the category identification result and the field distribution condition of each sample image, and improving the reliability and the accuracy of the learning adaptation degree to a certain extent. Then, based on the calculation result and the adaptation strategy, selecting a target field adapted to the target model from the P candidate fields, and enabling the target model to learn the target field preferentially; because the target field is matched with the target model, the target model can learn the target field more easily compared with other fields in P candidate fields, so that the learning time of the target model in the learning field can be effectively reduced, the model optimization efficiency is improved, and the learning effect that the generalization capability of the target model is stable and the accuracy is not reduced can be realized. After the model capability of the target model is improved by learning the target field, the process can be iterated to enable the target model to continuously learn various fields which are not learned; with gradual iterative optimization, the target model can have stronger capacity to process sample images in more complex or more difficult fields, so that the target model can fully learn and excavate effective information to adjust model parameters of the target model for Q fields, and the accuracy, the generalization, the robustness and other performances of the target model are improved. Moreover, because the sample images between each domain are not absolutely isolated, the target model can have a certain help effect on the domain of the later learning through the information acquired by the domain of the earlier learning, which is beneficial to improving the learning effect of the target model on the domain of the later learning, thereby improving the optimization effect of the target model.
Please refer to fig. 4, which is a flowchart illustrating another model optimization method according to an embodiment of the present disclosure. The model optimization method may be performed by the above mentioned computer device, which may be a terminal or a server; alternatively, the model optimization method may be performed by both the terminal and the server. For convenience of explanation, the model optimization method executed by a computer device is described as an example; referring to fig. 4, the model optimization method may include the following steps S401 to S409:
s401, calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image.
The target model is optimized by learning Q fields, the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields, Q is a positive integer larger than 1, and P is a positive integer smaller than or equal to Q. Also, the class identification result of any sample image may include a target class and a corresponding class confidence of that any sample image.
S402, according to the class confidence coefficient in the class recognition result of each sample image, sample mining is carried out on the P candidate fields to obtain one or more first training samples.
The first training sample refers to a sample image of which the confidence of the category in the candidate sample set is greater than or equal to a first confidence threshold. The first confidence threshold may be a fixed threshold set according to business requirements or empirical values, for example, the first confidence threshold may be set to 0.9, 0.85, etc. according to business requirements. Or the first confidence threshold may be a dynamic threshold calculated according to the category confidence of each sample image in the candidate sample set; for example, a mean value of the class confidence of each sample image in the candidate sample set may be calculated, and the calculated mean value is used as a first confidence threshold; for another example, if the computer device needs to select a specified number of sample images from the candidate sample set as the first training sample according to the order of the class confidence levels from high to low, the class confidence level of the last selected sample image may be used as the first confidence level threshold, and so on.
S403, acquiring an original label of each first training sample in the corresponding candidate field, and adding each first training sample and the corresponding original label to a first training set; and acquiring the labeling samples of the target quantity, and adding each labeling sample and the corresponding labeling label to the first training set.
And S404, performing weak supervision model optimization on the target model by adopting the first training set.
Wherein, the weak supervision model optimization means: according to the noise weight of the sample, when the target model learns the sample, the optimization mode of normal learning (nonnoise sample) of the positive sample (sample without noise) and inhibition learning of the negative sample (sample with noise) can be performed. The specific implementation of step S404 is similar to the specific implementation of the step "adopt the second training set to perform weak supervised model optimization on the target model" mentioned in step S408 below, and details are not repeated here.
S405, determining the number of samples of the first training sample in each candidate domain based on the domain distribution condition of each sample image.
Since the domain distribution indicates the candidate domain to which each sample image in the candidate sample set belongs, and the first training sample is also a sample image in the candidate sample set, the domain distribution may also indicate the candidate domain to which each first training sample belongs. Specifically, a sample count may be initialized for each candidate domain, and the initial value of the sample count of each candidate domain is 0; and traversing each first training sample, determining the candidate field to which the currently traversed first training sample belongs according to the field distribution condition, and then performing addition processing on the current value of the sample count of the determined candidate field. When each first training sample is traversed, the final value of the sample count of each candidate domain can be obtained, and the final value of the sample count of each candidate domain is used as the number of the first training samples in each candidate domain.
And S406, calculating the learning adaptation degree of the target model and each candidate field according to the number of samples corresponding to each candidate field.
In one embodiment, the computer device may directly use the number of samples corresponding to each candidate domain as the learning fitness of the target model and each candidate domain; that is, in this embodiment, the learning fitness of the target model and each candidate domain is proportional to the number of samples corresponding to each candidate domain. In another embodiment, it is considered that the total number of sample images in different candidate areas may be the same or different; if the learning fitness of the target model and each candidate domain is measured only according to the number of samples of the first training sample in each candidate domain, the learning fitness may be less accurate. For example, let 50 first training samples be respectively mined from the candidate field j and the candidate field k through the target model; and the total number of sample images under the candidate domain j is 100, and the total number of sample images under the candidate domain k is 1000. If the learning fitness is measured only according to the number of the first training samples, the learning fitness of the target model for the candidate domain j and the candidate domain k can be considered to be the same. However, since the total number of sample images in the candidate domain k is much larger than the total number of sample images in the candidate domain j, the number of samples of the first training sample mined by the target model in the candidate domain k should be larger than the number of samples of the first training sample mined by the target model in the candidate domain j. However, in practice, the target model only excavates the same number of first training samples of the candidate field j in the candidate field k, so that it can be seen that the learning ability of the target model for the candidate field j is stronger, that is, the learning adaptability of the target model for the candidate field j is higher.
Based on this, the computer device may further comprehensively measure the learning suitability of the target model and each candidate domain according to the number of samples of the first training sample in each candidate domain and the total number of sample images in each candidate domain. Specifically, the computer equipment can count the total number of sample images in the pth candidate field, and P belongs to [1, P ]; and calculating the sample mining proportion of the pth candidate field by adopting the total number and the number of samples corresponding to the pth candidate field. Specifically, the ratio between the number of samples (represented by x) corresponding to the pth candidate domain and the total number (represented by y) may be used as the sample mining ratio of the pth candidate domain (i.e., the sample mining ratio is equal to x/y). After the sample mining proportion of the pth candidate field is obtained, the learning adaptation degree of the target model and the pth candidate field can be calculated according to the sample mining proportion. Specifically, the sample mining proportion can be directly used as the learning adaptation degree of the target model and the pth candidate field; alternatively, the learning suitability corresponding to the sample mining ratio of the pth candidate domain may be determined in accordance with the correspondence between the sample mining ratio and the learning suitability, and the determined learning suitability may be used as the learning suitability of the target model and the pth candidate domain, and so on.
S407, selecting a target field matched with the target model from the P candidate fields based on the calculation result and the matching strategy.
It should be noted that, for a specific implementation of the step S407, reference may be made to a specific implementation of the step S203 in the foregoing method embodiment, and details are not described here again. The execution sequence of the steps S403 to S404 and the steps S405 to S407 is not limited in the embodiment of the present application. For example, the computer device may first perform the weakly supervised model optimization on the target model by performing steps S403S404; and then, the selection of the target field is realized by executing the steps S405 to S407. For another example, the computer device may also first implement the selection of the target field by executing steps S405 to S407; and then, the weak supervision model optimization of the target model is realized by executing the steps S403S404. For another example, the computer device may further perform steps S403 to S404 and steps S405 to S407 simultaneously, so as to perform weak supervision model optimization on the target model and target domain selection simultaneously, and so on.
And S408, optimizing the target model by adopting the sample images in the target field so that the target field is learned by the target model.
In a specific implementation process, the specific implementation of step S408 may include: and (3) iteratively executing one or more optimization processes on the target model by adopting the sample image in the target field. Wherein any suboptimal process is as follows: selecting an unlearned sample image as a target sample from all sample images in the target field; and calling a target model to perform class identification on each target sample to obtain the target class and the corresponding class confidence of each target sample. Then, sample mining can be carried out on the target field according to the class confidence of each target sample; and if one or more second training samples are excavated, optimizing the target model by adopting the excavated second training samples and the corresponding target classes. Specifically, if one or more second training samples are mined, acquiring original labels of the mined second training samples in the target field, and adding the second training samples and the corresponding original labels to a second training set; and adding the target number of labeled samples and the labeled labels of each labeled sample to the second training set. And then, carrying out weak supervision model optimization on the target model by adopting a second training set. The second training sample is a target sample with the category confidence coefficient being greater than or equal to a second confidence coefficient threshold value in the target field; the second confidence threshold may be a fixed threshold set according to the service requirement or an empirical value, or may be a dynamic threshold calculated according to the category confidence of each target sample, and a specific calculation manner is similar to that of the first confidence threshold, which is not described herein again. And if the second training sample is not mined, stopping the learning of the target model to the target field.
The specific process of performing the weak supervision model optimization on the target model by adopting the second training set may include the following steps s11s 16:
s11, traversing each sample in the second training set, and obtaining the sample label of the current sample traversed currently; and if the current sample is the second training sample, the sample label is the original label, and if the current sample is the labeled sample, the sample label is the labeled label.
s12, calling the target model to perform class identification on the current sample to obtain a class identification result of the current sample; the class identification result of the current sample may include: n preset categories and confidence levels of the current sample belonging to the preset categories. The preset category corresponding to the maximum confidence level of the current sample can be used as the target category of the current sample, and the preset category corresponding to each confidence level of the current sample except the maximum confidence level can be used as the candidate category of the current sample.
And s13, calculating an initial loss value generated by the target model through the current sample according to the class identification result of the current sample and the sample label.
In one embodiment, the computer device may calculate an initial loss value of the target model generated by the current sample according to the class identification result of the current sample and the sample label by using the following formula 1.1：
Formula 1.1
Wherein the content of the first and second substances,a weighting factor representing an nth preset category; if the class indicated by the sample label of the current sample comprises the nth preset class, the method comprises the following stepsIs equal to 1; otherwise, thenIs equal to 0;class identification representing current sampleThe difference result includes the confidence that the current sample belongs to the nth preset class.
Optionally, practice shows that: when the initial loss value of the target model generated by the current sample is calculated by equation 1.1, the weighting coefficient of any preset class is either 1 or 0, which easily causes the target model to excessively trust some preset classes (e.g. the preset class with the weighting coefficient of 1), and thus the generalization of the target model is low. Therefore, in another embodiment, the computer device may perform tag normalization processing on each preset category through formula 1.2, so as to calculate an initial loss value through the normalized weighting coefficient of each preset category to enhance the generalization of the target model:
formula 1.2
Wherein the content of the first and second substances,can be set according to actual requirements or empirical values;means that the nth preset category has not only for itself (i.e., the nth preset category)Also for all N preset classesThe weight of (c).
s14, the noise weight of the current sample is obtained.
In a first embodiment: corresponding noise weights can be set for each of the Q fields in advance according to empirical values; for example, if a sample image in which a domain a of the Q domains usually has much noise is found based on empirical values, a relatively large noise weight may be set for the domain a; if, from empirical values, it is found that field B of the Q fields generally has a sample image with less noise, a smaller noise weight may be set for field B. Based on this, when executing step s14, the computer device may use the noise weight corresponding to the target domain to which the current sample belongs as the noise weight of the current sample.
In a second embodiment: the noise prediction can be performed on the current sample based on the data characteristics of the current sample and the sample label to obtain a noise prediction result. In a specific implementation, the second training set may have H cluster centers; a cluster center has a center class, H being a positive integer greater than 1. Based on the method, the computer equipment can search the center category matched with the category indicated by the sample label in the center categories of the H clustering centers; specifically, the computer device may calculate a matching degree between the center category of each cluster center and the category indicated by the sample label, and if there is a center category having a matching degree greater than a threshold matching degree (e.g., 0.99, 0.98, etc.), determine the existing center category as the center category matching the category indicated by the sample label. Secondly, the cluster center corresponding to the found center category can be used as the original cluster center of the current sample; and may calculate a first distance value between the current sample and the original cluster center based on the data characteristics of the current sample and the data characteristics of the original cluster center. And calculating second distance values between the current sample and each of the clustering centers respectively according to the data features of the current sample and the data features of each of the clustering centers, specifically, calculating a first distance value based on the data features of the current sample and the data features of the original clustering centers by using a distance calculation algorithm (such as a cosinesimilarity algorithm, an euclidean distance algorithm, etc.), and calculating the second distance values based on the data features of the current sample and the data features of each of the clustering centers. Then, the cluster center corresponding to the maximum second distance value can be used as the reference cluster center of the current sample; if the maximum second distance value is smaller than the first distance value and the center type of the original clustering center is different from that of the reference clustering center, it indicates that the current sample is most likely to belong to other types rather than the type indicated by the sample label; thus, it may be determined that the sample label is erroneous, at which time a noise prediction is generated indicating that the current sample is noisy; otherwise, a noise prediction result indicating that no noise exists in the current sample is generated.
After the noise prediction result is obtained, a noise weight may be assigned to the current sample according to the noise prediction result. Specifically, if the noise prediction result indicates that the current sample has noise, calculating the noise weight of the current sample according to the maximum second distance value and the first distance value; and if the noise prediction result indicates that the current sample has no noise, determining a preset value as the noise weight of the current sample. The preset value can be set according to an empirical value or an actual requirement, such as setting the preset value to 1. The calculation formula for calculating the noise weight according to the maximum second distance value and the first distance value may also be set according to empirical values or actual requirements, for example, d1 is used to represent the first distance value, d2 is used to represent the maximum second distance value, w1 is used to represent the noise weight of the current sample, and then w1= d 2/(d 1 × 2). By adopting the calculation formula to calculate the noise weight of the current sample, the following effects can be achieved under the condition that the noise exists in the current sample: when d2 is far smaller than d1, it indicates that the probability that the current sample belongs to the category indicated by the sample label is extremely low, and at this time, the calculated noise weight of the current sample can be made extremely small, so that the learning contribution of the current sample to the target model is controlled to be small, the target model is prevented from being misled by the sample label of the current sample, and the learning accuracy of the target model can be effectively improved; when d2 approaches d1, indicating that the current sample is likely to belong to the class indicated by the sample label, the learning contribution of the current sample to the target model can be improved, but the noise weight does not exceed 0.5 at most. It should be understood that the embodiments of the present application only illustrate the calculation formula of the noise weight, and are not exhaustive; for example, in other embodiments, the formula for calculating the noise weight of the current sample may also be: w1= d2/d1, w1= d 2/(d 1 × 3), and so on.
In the second embodiment of step s14, the H cluster centers of the second training set are obtained by clustering the second training set in advance; that is, the computer device may perform clustering processing on all or part of the samples in the second training set in advance to obtain H clustering centers; a cluster center has a center class, H being a positive integer greater than 1. The computer equipment can effectively reduce the data amount participating in clustering by clustering partial samples in the second training set to obtain H clustering centers, so that processing resources are saved, and the clustering efficiency is improved. Specifically, the specific implementation of the computer device clustering a part of samples in the second training set to obtain H clustering centers may include the following steps a to D:
and step A, selecting a reference sample set from the second training set, and calling a target model to extract the data characteristics of each reference sample in the reference sample set. In one embodiment, a plurality of samples may be randomly selected from the second training set as reference samples to be added to the reference sample set according to a certain ratio. Due to the random selection of the reference samples, the class distribution of the reference samples in the reference sample set may be unbalanced, thereby affecting the accuracy of the clustering center obtained by the subsequent clustering process. Therefore, in another embodiment, the computer device may also choose the reference samples according to categories to ensure the category distribution of the reference samples to be balanced to some extent. Specifically, the computer device may divide the second training set into N data clusters of preset categories according to the target category of each second training sample in the second training set and the label category of each label sample, select a desired number of samples from each data cluster of the preset categories as reference samples, and add the reference samples to a sample group under each preset category, thereby obtaining a reference sample set.
That is, in this embodiment, the reference sample set includes: each sample group under the preset category in the N preset categories comprises: a desired number of reference samples in any preset category. The expected number mentioned herein may be set according to actual requirements or empirical values, for example, the expected number is set to K × 50, where K is the number of preset clustering centers in each preset category; by adopting 50 times, enough reference samples can be selected, so that the accuracy of the clustering center obtained by subsequent clustering processing is improved. It should be understood that the embodiments of the present application are merely exemplary to illustrate that the desired number may be K × 50, and are not limited thereto; for example, the desired number may also be K40, K80, or 10000, etc. The embodiment of the application is explained by taking the same expected number of each preset category as an example, that is, the ratio of the expected number of each preset category is 1: 1: 1 …; however, in other embodiments, the desired number of each preset category may also be different; for example, the ratio between the numbers of samples in the data clusters of the respective preset categories (e.g., 2: 1: 5 …) may be used as the ratio between the desired numbers of the respective preset categories (i.e., 2: 1: 5 …). ③ K may be any positive integer, such as 1, 2 …; or K may be a positive integer greater than 1, and under this condition, multicenter category expression can be performed on each preset category through K clustering centers under each preset category, so that various forms of category expression are provided, and excessive blurring caused by average feature of singlecenter noise category information is avoided, which is not favorable for relatively accurate prediction of subsequent noise.
And step B, clustering the reference sample set based on the data characteristics of each reference sample to obtain H clustering centers, wherein one clustering center corresponds to one sample cluster. When the reference sample set is randomly selected from the second training set according to a certain proportion, the computer equipment can directly perform clustering processing on the reference sample set to obtain H clustering centers. When the reference sample set comprises sample groups in each of the N preset categories, the computer device may perform clustering on each sample group to obtain K clustering centers of each sample group, thereby obtaining H clustering centers, where H is equal to N × K. Specifically, the computer device may traverse each sample group in the reference sample set, determine a current sample group currently traversed, and extract data features of each reference sample in the current sample group through the target model. Then, the computer equipment can perform clustering processing on the current sample group based on the data characteristics of each reference sample in the current sample group to obtain K clustering centers of the current sample group; after each sample group is traversed, H cluster centers may be obtained, including K cluster centers for each sample group.
The specific implementation of the step of performing clustering processing on the current sample group based on the data characteristics of each reference sample in the current sample group to obtain K clustering centers of the current sample group may be: selecting a reference sample from the input current sample group at random as a first initial clustering center. Calculating the distance D (x) between each reference sample and the nearest initial clustering center (namely the selected initial clustering center) according to the data characteristics of each reference sample and the data characteristics of the existing initial clustering centers for each reference sample in the current sample group. Randomly selecting a new reference sample as a new initial clustering center according to the distance calculation result, wherein the selection principle is as follows: and D (x) selecting a larger reference sample as a new initial clustering center with a higher probability, then randomly generating a random number, and taking the reference sample corresponding to the probability greater than the random number as the new initial clustering center. For example, assuming that the probability of the reference sample a is 0.7 and the probability of the reference sample B is 0.3, a random number x between 0 and 1 is randomly generated, and if x <0.7, the reference sample a is selected as a new initial clustering center, otherwise, B is selected as a new initial clustering center. And fourthly, repeating the step III to the step III until K initial clustering centers are selected. Running a standard Kmeans algorithm (a clustering algorithm) by using the K initial clustering centers; the general principle of the kmeans algorithm is as follows: and (3) clustering the current sample group based on the K initial clustering centers to obtain K sample clusters, calculating the average coordinate of each sample cluster to obtain a new clustering center, and iterating the steps to obtain the final K clustering centers and the sample cluster of each clustering center.
It should be understood that the embodiment of the present application only exemplifies a Kmena algorithm, and describes a specific implementation manner of how to obtain K clustering centers of a current sample group, which is not exhaustive; in other embodiments, other methods may be used for clustering, so as to obtain K cluster centers of the current sample group. For example, a density calculation method based on curicumum net (i.e., curicumum network, curicumum is a weak supervised learning algorithm) is adopted, and the approximate principle of the method is as follows: and regarding each reference sample in the current sample group, taking the average value of the distances between the reference sample and the nearest other samples accounting for 60% of the total number as the sample density of each reference sample, and selecting the K reference samples with the highest sample density as the K clustering centers. Or, using a DensityBased Clustering of Application with Noise (DensityBased Spatial Clustering Application) algorithm DBSCAN to cluster the current sample group to obtain K cluster centers, and so on.
And C, selecting reference samples with the similarity meeting preset conditions from the h sample cluster according to the similarity between each reference sample in the h sample cluster and the h cluster center. The method comprises the following steps that (1) an H sample cluster is a sample cluster corresponding to an H clustering center, and H belongs to [1, H ]; the similarity between any reference sample in the hth sample cluster and the hth clustering center can be reflected by a distance value between the any reference sample and the hth clustering center, and the smaller the distance value, the greater the similarity is. In one embodiment, a preset number of reference samples can be selected from the hth sample cluster according to the sequence of similarity from high to low; by the method, the nearest preset number of reference samples can be selected at the periphery of the hth clustering center according to the sequence of the distance values from small to large. In another embodiment, a reference sample with a similarity greater than a similarity threshold may also be selected from the hth sample cluster.
And D, distributing a center type for the hth clustering center according to the target type of each selected reference sample. Specifically, the categories to which most of the selected reference samples belong can be determined according to the target categories of the selected reference samples, and the determined categories are used as the center categories of the hth clustering center. For example, suppose that the computer device selects the nearest 10 reference samples around the hth cluster center, and the target categories of the 10 reference samples are: "campus scene", "outdoor scene", "campus scene", "scenic spot scene", "campus scene", "outdoor scene", and "campus scene"; then, it can be known that most of the 10 reference samples belong to the "campus scenario", and thus the center class of the hth cluster center can be determined as the "campus scenario".
And s15, weighting the initial loss value by using the noise weight to obtain a target loss value generated by the target model through the current sample. Specifically, adoptRepresenting the target loss value generated by the target model from the current sample, then(ii) a Wherein w1 is a preset value (e.g. the value "1"), or a value calculated according to the first distance value d1 and the maximum second distance value d 2.
s16, optimizing the model parameters of the objective model in a direction to reduce the objective loss value.
It should be noted that, for a specific implementation of step S16, refer to the specific implementation of "optimizing the model parameters of the target model according to the direction of reducing the loss value" mentioned in step S204 in the foregoing method embodiment, and details are not repeated herein. Optionally, if the noise weight of the current sample is smaller than a preset weight threshold (e.g., 0.2), manual labeling and correction may be performed on the current sample, so that a relatively clean set of training data set is obtained in combination with other samples with larger noise weights.
Based on the above description, the following describes in further detail the implementation principle of "performing weakly supervised model optimization with the second training set on the target model" mentioned in step S408 with a complete flow in conjunction with fig. 5 a5 b:
(1) firstly, a reference sample set is selected from the second training set, and the number of reference samples in the sample group under each preset category in the reference sample set is greater than K x 50.
(2) And calling the target model to perform forward calculation on each reference sample in the reference sample set so as to extract the data characteristics of each reference sample, wherein the data characteristics can be output by a Max pool layer of the resnet101 in the target model.
(3) And calculating the class center expression of each sample group according to the data characteristics of each reference sample, wherein the class center expression of each sample group can comprise K clustering centers obtained by clustering each sample group, the weight of each clustering center can be wk, and finally, N × K clustering centers (namely H clustering centers) are obtained. Recording the center category of each cluster center, wherein the center category is used for indicating the real scene category represented by the cluster center; for example, if most of the 10 reference samples closest to the periphery of the cluster center 1 belong to a campus scenario, the cluster center 1 may represent the campus scenario, that is, the center category of the cluster center 1 is "campus scenario".
(4) And calling a target model to perform feature extraction on each sample in the second training set to obtain the data feature of each sample in the second training set.
(5) Traversing each sample in the second training set, and determining an original cluster center of a currently traversed current sample: and searching a center class matched with the class indicated by the sample label of the current sample in the center classes of the H cluster centers, taking the cluster center corresponding to the searched center class as the original cluster center of the current sample, and recording the center class of the original cluster center as class 1. Based on the data features of the current sample and the data features of the original cluster center, a first distance value (denoted by d 1) between the current sample and the original cluster center is calculated.
(6) Determining a reference cluster center of a current sample of a current traversal: and calculating N x K cosine distance values (namely second distance values) according to the data characteristics (one data characteristic is a vector with dimensions of 1 x 2048) of the N x K cluster centers and the data characteristics (1 x 2048 vector) of the current sample, selecting the cluster center corresponding to the maximum cosine distance value (represented by d 2) as a reference cluster center of the current sample, and recording the center category of the reference cluster center as class 2.
(7) Calculating the noise weight for the current sample: comparing d1 with d2, if d2 is less than d1 and class2 is different from class, then it indicates that the current sample is most likely to belong to another class than the class indicated by the sample label; the noise weight of the current sample may now be calculated as: w1= d 2/(d 1 × 2). Otherwise, the noise weight of the current sample is determined to be a preset value (e.g., a value of 1).
(8) Calculating a target loss value generated by the target model through the current sample according to the noise weight of the current sample; and optimizing the model parameters of the target model according to the direction of reducing the target loss value.
(9) And (5) repeatedly executing the steps (5) to (8) to complete the loss value calculation and model updating optimization of each sample in the second training set.
And S409, iterating the process until the Q fields are learned by the target model.
Wherein, iterating the above process means: iteratively executing steps S401S408; that is, one iterative process may include: the optimization of the target model is realized through a first training sample obtained by a multifield mining task (namely, a task of performing undifferentiated mining and learning on all candidate fields through the current model capability of the target model); and the weak supervision model optimization of the target model is realized through a second training sample obtained by a singledomain mining task of the target domain (namely, a task for mining and learning the target domain through the current model capability of the target model).
To better understand the execution logic of steps S401 to S409 in the embodiment of the present application, a specific example is schematically illustrated below:
1. searching a large number of sample images from the internet of 4 fields, such as a sample image in the field A, a sample image in the field B, a sample image in the field C, and a sample image in the field D;
2. taking 4 fields as candidate fields, carrying out sample mining on the 4 candidate fields, selecting a sample image with a category confidence coefficient higher than a first confidence coefficient in the 4 candidate fields as a newlyadded first training sample, and carrying out weak supervision model optimization on a target model through the first training sample;
3. determining a prior learning domain B according to the sample mining proportion of each candidate domain in the 4 candidate domains, and taking the domain B as a target domain; and (3) performing iteration: performing singlefield excavation on the field B to excavate a second training sample from the field B, and performing weak supervision model optimization on the target model through the second training sample until the excavation of the field B is completed;
4. taking the remaining 3 fields (field A, field C and field D) as candidate fields, carrying out sample mining on the 3 candidate fields, and carrying out weak supervision model optimization on a target model through a first training sample mined from the 3 candidate fields;
5. determining a prior learning domain C according to the sample mining proportion of each candidate domain in the 3 candidate domains, and taking the domain C as a target domain; and (3) performing iteration: performing singlefield excavation on the field C, and performing weak supervision model optimization on the target model according to a second training sample excavated from the field C until the excavation of the field C is completed;
6. taking the remaining 2 fields (field A and field D) as candidate fields, carrying out sample mining on the 2 candidate fields, and carrying out weak supervision model optimization on a target model through a first training sample mined from the 2 candidate fields;
7. determining a prior learning domain D according to the sample mining proportion of each candidate domain in the 2 candidate domains, and taking the domain D as a target domain; and (3) performing iteration: performing singlefield excavation on the field D, and performing weak supervision model optimization on the target model according to a second training sample excavated from the field D until the excavation of the field D is completed;
8. taking the remaining 1 field (field A) as a candidate field, carrying out sample mining on the 1 candidate field, and carrying out weak supervision model optimization on a target model through a first training sample mined from the 1 candidate field;
9. determining a prior learning field A according to the sample mining proportion of each candidate field in the 1 candidate field, and taking the field A as a target field; and (3) performing iteration: performing singlefield excavation on the field A, and performing weak supervision model optimization on the target model according to a second training sample excavated from the field A until the excavation of the field A is completed;
10. and finishing all field mining and model learning, collecting all training samples for optimizing the target model, and finally outputting the target model.
In addition, as can be seen from the above description of steps S401 to S409, when performing the weakly supervised model optimization on the target model, the noise prediction of the sample may be involved, so as to calculate the target loss value according to the noise weight to optimize the target model; such an optimization method can finally obtain an object model with the capacity of noisy recognition, wherein the noisy recognition refers to: a class identification task performed on the noisy image. Optionally, after the target model with the noise identification capability is obtained through steps S401 to S409 in the embodiment of the present application, the target model may be further mounted in any device (e.g., any server, any terminal), so that any device may provide the category identification service based on the target model. Taking the example of the target model being installed in the server, when the front end a (e.g. a client in the terminal or a web page) receives a certain image input by a certain user, the image can be uploaded to the server, as shown in fig. 5 c. After receiving the image, the server can call a target model to identify the category of the image, so as to obtain the category identification result of the image; the class identification result of the image may then be output to the front end B, as shown in fig. 5 d; or a series of postprocessing is performed on the result of the image classification recognition, and the postprocessed result is output to the front end B. It should be noted that, the front end B and the front end a mentioned herein may be located in the same terminal or may be located in different terminals, and this is not limited thereto.
The embodiment of the application can set Q fields for the target model, and utilizes the learning mode that multiple fields are from simple to difficult and samples are from simple to difficult, so that the target model can be optimized by learning Q fields step by step in a multiround learning mode, the learning efficiency of the target model can be effectively improved, and the learning ability and the generalization ability of the model are gradually enhanced. By selectively mining field by field and alternately carrying out weak supervised learning, the effects that the target model gradually gets good in each field and the model generalization effect gradually gets good under a multifield sample can be realized. When the first training set and the second training set are used for carrying out weak supervision model optimization on the target model, the first training samples in the first training set and the second training samples in the second training set do not need to be marked manually, so that the labor input can be effectively reduced, and the model learning efficiency under largescale data is improved. In the weak supervision model optimization process, the smoothness of the weak supervision label is realized through noise weight, so that the problem that some samples with other types of information cannot be effectively utilized due to direct noise suppression is solved, and the generalization capability of a target model to actual types is improved.
Based on the description of the related embodiments of the model optimization method, the present application also provides a model optimization apparatus, which may be a computer program (including program code) running in a computer device. The model optimization apparatus may perform the model optimization method shown in fig. 2 or fig. 4; referring to fig. 6, the model optimization apparatus may operate as follows:
the processing unit 601 is configured to invoke a target model to perform category identification on each sample image in the candidate sample set, so as to obtain a category identification result of each sample image; the target model is optimized by learning Q fields, the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields, Q is a positive integer larger than 1, and P is a positive integer smaller than or equal to Q;
the processing unit 601 is further configured to calculate a learning adaptation degree of the target model and each candidate domain according to the class identification result of each sample image and the domain distribution condition of each sample image;
the processing unit 601 is further configured to select a target domain adapted to the target model from the P candidate domains based on a calculation result and an adaptation strategy;
an optimizing unit 602, configured to optimize the target model by using the sample image in the target domain, so that the target domain is learned by the target model;
the processing unit 601 and the optimization unit 602 are invoked iteratively until the Q domains are all learned by the target model.
In one embodiment, the class identification result of any sample image includes: a class confidence of a target class of the any sample image; the domain distribution case is used for indicating a candidate domain to which each sample image belongs; correspondingly, when the processing unit 601 is configured to calculate the learning adaptation degree of the target model and each candidate domain according to the class identification result of each sample image and the domain distribution condition of each sample image, it may specifically be configured to:
according to the class confidence in the class recognition result of each sample image, carrying out sample mining on the P candidate fields to obtain one or more first training samples, wherein the first training samples refer to sample images of which the class confidence in the candidate sample set is greater than or equal to a first confidence threshold;
determining the number of samples of a first training sample in each candidate domain based on the domain distribution condition of each sample image;
and calculating the learning adaptation degree of the target model and each candidate field according to the number of samples corresponding to each candidate field.
In another embodiment, when the processing unit 601 is configured to calculate the learning adaptation degree of the target model and the each candidate domain according to the number of samples corresponding to the each candidate domain, it may specifically be configured to:
counting the total number of sample images in the Pth candidate field, wherein P belongs to [1, P ];
calculating the sample mining proportion of the pth candidate field by adopting the total number and the number of samples corresponding to the pth candidate field;
and calculating the learning adaptation degree of the target model and the pth candidate field according to the sample mining proportion.
In another embodiment, before optimizing the target model by using the sample image in the target domain, the optimizing unit 602 may further be configured to:
acquiring an original label of each first training sample in the corresponding candidate field, and adding each first training sample and the corresponding original label to a first training set;
acquiring target quantity of marking samples, wherein the marking samples refer to images with marking labels; adding each labeled sample and the corresponding labeled label to the first training set;
and performing weak supervision model optimization on the target model by adopting the first training set.
In another embodiment, the calculation result includes: learning fitness of the target model and each candidate domain; correspondingly, when the processing unit 601 is configured to select the target domain adapted to the target model from the P candidate domains based on the calculation result and the adaptation policy, the processing unit may specifically be configured to:
selecting the maximum learning adaptation degree from the calculation result;
and taking the candidate field corresponding to the maximum learning adaptation degree in the P candidate fields as the target field adapted to the target model.
In another embodiment, when the optimizing unit 602 is configured to optimize the target model by using the sample image in the target domain, it may specifically be configured to: iteratively executing one or more optimization processes on the target model by adopting the sample image in the target field; wherein any suboptimal process is as follows:
selecting an unlearned sample image as a target sample from all sample images in the target field;
calling the target model to perform category identification on each target sample to obtain a target category and a corresponding category confidence of each target sample;
according to the category confidence of each target sample, carrying out sample mining on the target field;
if one or more second training samples are excavated, optimizing the target model by adopting the excavated second training samples and corresponding target classes, wherein the second training samples refer to target samples with class confidence degrees larger than or equal to a second confidence degree threshold value in the target field;
stopping the learning of the target model for the target domain if the second training sample is not mined.
In another embodiment, the optimizing unit 602, when configured to, if one or more second training samples are mined, optimize the object model by using the mined second training samples and corresponding object classes, may specifically be configured to:
if one or more second training samples are excavated, acquiring original labels of the excavated second training samples in the target field, and adding each second training sample and the corresponding original label to a second training set; adding a target number of labeled samples and the label of each labeled sample to the second training set;
and performing weak supervision model optimization on the target model by adopting the second training set.
In another embodiment, when the optimization unit 602 uses the second training set to perform weak supervised model optimization on the target model, it may specifically be configured to:
traversing each sample in the second training set, and obtaining a sample label of a currently traversed current sample; if the current sample is a second training sample, the sample label is an original label, and if the current sample is an labeled sample, the sample label is an labeled label;
calling the target model to perform category identification on the current sample to obtain a category identification result of the current sample;
calculating an initial loss value generated by the target model through the current sample according to the class identification result of the current sample and the sample label;
acquiring the noise weight of the current sample, and performing weighting processing on the initial loss value by adopting the noise weight to obtain a target loss value generated by the target model through the current sample;
and optimizing the model parameters of the target model according to the direction of reducing the target loss value.
In another embodiment, when the optimization unit 602 is configured to obtain the noise weight of the current sample, it may specifically be configured to:
performing noise prediction on the current sample based on the data characteristics of the current sample and the sample label to obtain a noise prediction result;
and distributing noise weight to the current sample according to the noise prediction result.
In another embodiment, the second training set has H cluster centers, one cluster center has one center class, and H is a positive integer greater than 1; correspondingly, when the optimization unit 602 is configured to perform noise prediction on the current sample based on the data feature of the current sample and the sample label to obtain a noise prediction result, it may specifically be configured to:
searching a center class matched with the class indicated by the sample label in the center classes of the H clustering centers, and taking the clustering center corresponding to the searched center class as the original clustering center of the current sample;
calculating a first distance value between the current sample and the original clustering center based on the data characteristics of the current sample and the data characteristics of the original clustering center;
respectively calculating second distance values between the current sample and each clustering center according to the data characteristics of the current sample and the data characteristics of each clustering center, and taking the clustering center corresponding to the maximum second distance value as a reference clustering center of the current sample;
if the maximum second distance value is smaller than the first distance value and the center type of the original clustering center is different from that of the reference clustering center, generating a noise prediction result for indicating that the current sample has noise; otherwise, a noise prediction result indicating that no noise exists in the current sample is generated.
In another embodiment, the optimizing unit 602 may further be configured to:
selecting a reference sample set from the second training set, and calling the target model to extract the data characteristics of each reference sample in the reference sample set;
clustering the reference sample set based on the data characteristics of each reference sample to obtain H clustering centers, wherein one clustering center corresponds to one sample cluster;
selecting reference samples with similarity meeting preset conditions from the h sample cluster according to the similarity between each reference sample in the h sample cluster and the h clustering center; the H sample cluster is a sample cluster corresponding to the H clustering center, and H belongs to [1, H ];
and according to the target category of each selected reference sample, allocating a center category for the hth clustering center.
In another embodiment, the reference sample set includes: each sample group under the preset category in the N preset categories comprises: n is a positive integer greater than 1 for the reference samples of the expected number in any preset category; correspondingly, the optimizing unit 602 may specifically be configured to, when performing clustering processing on the reference sample set based on the data feature of each reference sample to obtain H clustering centers:
traversing each sample group in the reference sample set, and determining a currently traversed current sample group;
based on the data characteristics of each reference sample in the current sample group, carrying out clustering processing on the current sample group to obtain K clustering centers of the current sample group, wherein K is a positive integer greater than 1;
and obtaining H clustering centers after all the sample groups are traversed, wherein the H clustering centers comprise K clustering centers of each sample group.
In another embodiment, when the optimization unit 602 is configured to assign a noise weight to the current sample according to the noise prediction result, it may specifically be configured to:
if the noise prediction result indicates that the current sample has noise, calculating the noise weight of the current sample according to the maximum second distance value and the first distance value;
and if the noise prediction result indicates that the current sample has no noise, determining a preset numerical value as the noise weight of the current sample.
According to an embodiment of the present application, each step involved in the method shown in fig. 2 or fig. 4 may be performed by each unit in the model optimization apparatus shown in fig. 6. For example, steps S201 to S203 shown in fig. 2 may all be performed by the processing unit 601 shown in fig. 6, and step S204 may be performed by the optimization unit 602 shown in fig. 6. As another example, steps S401 to S403 shown in fig. 4, and steps S405 to S407 may be performed by the processing unit 601 shown in fig. 6, steps S404 and S408 may be performed by the optimization unit 602 shown in fig. 6, and so on.
According to another embodiment of the present application, each unit in the model optimization apparatus shown in fig. 6 may be respectively or entirely combined into one or several other units to form the model optimization apparatus, or some unit(s) therein may be further split into multiple functionally smaller units to form the model optimization apparatus, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the modelbased optimization apparatus may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of a plurality of units.
According to another embodiment of the present application, the model optimization apparatus device as shown in fig. 6 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the respective methods as shown in fig. 2 or fig. 4 on a generalpurpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a readonly storage medium (ROM), and a storage element, and the model optimization method of the embodiment of the present application may be implemented. The computer program may be recorded on a computerreadable recording medium, for example, and loaded and executed in the abovedescribed computing apparatus via the computerreadable recording medium.
According to the method and the device, Q fields can be set for the target model, and the target model is subjected to multiround learning optimization through gradually learning the Q fields according to the principle of preferentially learning in the adaptive field. In each round of learning optimization, sample images under P candidate fields which are not learned in Q fields can be adopted to construct a candidate sample set. And calling a target model to identify the category of each sample image in the candidate sample set, thereby reversely calculating the learning adaptation degree of the target model and each candidate field according to the category identification result and the field distribution condition of each sample image, and improving the reliability and the accuracy of the learning adaptation degree to a certain extent. Then, based on the calculation result and the adaptation strategy, selecting a target field adapted to the target model from the P candidate fields, and enabling the target model to learn the target field preferentially; because the target field is matched with the target model, the target model can learn the target field more easily compared with other fields in P candidate fields, so that the learning time of the target model in the learning field can be effectively reduced, the model optimization efficiency is improved, and the learning effect that the generalization capability of the target model is stable and the accuracy is not reduced can be realized. After the model capability of the target model is improved by learning the target field, the process can be iterated to enable the target model to continuously learn various fields which are not learned; with gradual iterative optimization, the target model can have stronger capacity to process sample images in more complex or more difficult fields, so that the target model can fully learn and excavate effective information to adjust model parameters of the target model for Q fields, and the accuracy, the generalization, the robustness and other performances of the target model are improved. Moreover, because the sample images between each domain are not absolutely isolated, the target model can have a certain help effect on the domain of the later learning through the information acquired by the domain of the earlier learning, which is beneficial to improving the learning effect of the target model on the domain of the later learning, thereby improving the optimization effect of the target model.
Based on the description of the method embodiment and the device embodiment, the embodiment of the application further provides a computer device. Referring to fig. 7, the computer device includes at least a processor 701, an input interface 702, an output interface 703, and a computer storage medium 704. The processor 701, the input interface 702, the output interface 703, and the computer storage medium 704 in the computer device may be connected by a bus or other means.
A computer storage medium 704 may be stored in the memory of the computer device, the computer storage medium 704 being used to store a computer program comprising program instructions, the processor 701 being used to execute the program instructions stored by the computer storage medium 704. The processor 701 (or CPU) is a computing core and a control core of the computer device, and is adapted to implement one or more instructions, and specifically, adapted to load and execute the one or more instructions so as to implement a corresponding method flow or a corresponding function; in an embodiment, the processor 701 according to the embodiment of the present application may be configured to perform a series of model optimization processes, specifically including: calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image; the target model is optimized by learning Q fields, and the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields; calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image; selecting a target field matched with the target model from the P candidate fields based on a calculation result and a matching strategy; optimizing the target model by adopting the sample image in the target field so that the target field is learned by the target model; and iterating the process until the Q fields are learned by the target model, taking the clustering result when the target model is converged as the target clustering result of the target data set, and the like.
An embodiment of the present application further provides a computer storage medium (Memory), which is a Memory device in a computer device and is used to store programs and data. It is understood that the computer storage medium herein may include both builtin storage media in the computer device and, of course, extended storage media supported by the computer device. Computer storage media provide storage space that stores an operating system for a computer device. Also stored in the memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by the processor. The computer storage medium may be a highspeed RAM memory, or may be a nonvolatile memory (nonvolatile memory), such as at least one disk memory; and optionally at least one computer storage medium located remotely from the processor. In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by a processor to perform the method steps described above with respect to the embodiments of the model optimization method illustrated in FIG. 2 or FIG. 4.
According to the method and the device, Q fields can be set for the target model, and the target model is subjected to multiround learning optimization through gradually learning the Q fields according to the principle of preferentially learning in the adaptive field. In each round of learning optimization, sample images under P candidate fields which are not learned in Q fields can be adopted to construct a candidate sample set. And calling a target model to identify the category of each sample image in the candidate sample set, thereby reversely calculating the learning adaptation degree of the target model and each candidate field according to the category identification result and the field distribution condition of each sample image, and improving the reliability and the accuracy of the learning adaptation degree to a certain extent. Then, based on the calculation result and the adaptation strategy, selecting a target field adapted to the target model from the P candidate fields, and enabling the target model to learn the target field preferentially; because the target field is matched with the target model, the target model can learn the target field more easily compared with other fields in P candidate fields, so that the learning time of the target model in the learning field can be effectively reduced, the model optimization efficiency is improved, and the learning effect that the generalization capability of the target model is stable and the accuracy is not reduced can be realized. After the model capability of the target model is improved by learning the target field, the process can be iterated to enable the target model to continuously learn various fields which are not learned; with gradual iterative optimization, the target model can have stronger capacity to process sample images in more complex or more difficult fields, so that the target model can fully learn and excavate effective information to adjust model parameters of the target model for Q fields, and the accuracy, the generalization, the robustness and other performances of the target model are improved. Moreover, because the sample images between each domain are not absolutely isolated, the target model can have a certain help effect on the domain of the later learning through the information acquired by the domain of the earlier learning, which is beneficial to improving the learning effect of the target model on the domain of the later learning, thereby improving the optimization effect of the target model.
It should be noted that according to an aspect of the present application, a computer program product or a computer program is also provided, and the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer readable storage medium. The computer instructions are read by a processor of a computer device from a computerreadable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the method provided in the various alternatives in the aspects of the model optimization method embodiment shown in FIG. 2 or FIG. 4 described above.
It should be understood that the abovedescribed embodiments are merely illustrative of the preferred embodiments of the present invention, which should not be taken as limiting the scope of the invention, but rather the scope of the invention is defined by the appended claims.
Claims (15)
1. A method of model optimization, comprising:
calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image; the target model is optimized by learning Q fields, the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields, Q is a positive integer larger than 1, and P is a positive integer smaller than or equal to Q; one field corresponds to one sample collection channel, and different sample collection channels correspond to different image styles;
calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image;
selecting a target field matched with the target model from the P candidate fields based on a calculation result and a matching strategy;
optimizing the target model by adopting the sample image in the target field so that the target field is learned by the target model;
and iterating the process until the Q fields are learned by the target model.
2. The method of claim 1, wherein the class identification result of any sample image comprises: a class confidence of a target class of the any sample image; the domain distribution case is used for indicating a candidate domain to which each sample image belongs;
the calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image comprises the following steps:
according to the class confidence in the class recognition result of each sample image, carrying out sample mining on the P candidate fields to obtain one or more first training samples, wherein the first training samples refer to sample images of which the class confidence in the candidate sample set is greater than or equal to a first confidence threshold;
determining the number of samples of a first training sample in each candidate domain based on the domain distribution condition of each sample image;
and calculating the learning adaptation degree of the target model and each candidate field according to the number of samples corresponding to each candidate field.
3. The method of claim 2, wherein the calculating the learning fitness of the target model and the each candidate domain according to the number of samples corresponding to the each candidate domain comprises:
counting the total number of sample images in the Pth candidate field, wherein P belongs to [1, P ];
calculating the sample mining proportion of the pth candidate field by adopting the total number and the number of samples corresponding to the pth candidate field;
and calculating the learning adaptation degree of the target model and the pth candidate field according to the sample mining proportion.
4. The method of claim 2 or 3, wherein prior to optimizing the object model using the sample image in the object domain, the method further comprises:
acquiring an original label of each first training sample in the corresponding candidate field, and adding each first training sample and the corresponding original label to a first training set;
acquiring target quantity of marking samples, wherein the marking samples refer to images with marking labels; adding each labeled sample and the corresponding labeled label to the first training set;
and performing weak supervision model optimization on the target model by adopting the first training set.
5. The method of any one of claims 13, wherein the calculation comprises: learning fitness of the target model and each candidate domain; selecting a target field adapted to the target model from the P candidate fields based on the calculation result and the adaptation strategy, wherein the selecting comprises the following steps:
selecting the maximum learning adaptation degree from the calculation result;
and taking the candidate field corresponding to the maximum learning adaptation degree in the P candidate fields as the target field adapted to the target model.
6. The method of any one of claims 13, wherein the optimizing the target model using the sample image under the target domain comprises: iteratively executing one or more optimization processes on the target model by adopting the sample image in the target field; wherein any suboptimal process is as follows:
selecting an unlearned sample image as a target sample from all sample images in the target field;
calling the target model to perform category identification on each target sample to obtain a target category and a corresponding category confidence of each target sample;
according to the category confidence of each target sample, carrying out sample mining on the target field;
if one or more second training samples are excavated, optimizing the target model by adopting the excavated second training samples and corresponding target classes, wherein the second training samples refer to target samples with class confidence degrees larger than or equal to a second confidence degree threshold value in the target field;
stopping the learning of the target model for the target domain if the second training sample is not mined.
7. The method of claim 6, wherein the optimizing the object model using the mined second training samples and corresponding object classes if one or more second training samples are mined comprises:
if one or more second training samples are excavated, acquiring original labels of the excavated second training samples in the target field, and adding each second training sample and the corresponding original label to a second training set; adding a target number of labeled samples and the label of each labeled sample to the second training set;
and performing weak supervision model optimization on the target model by adopting the second training set.
8. The method of claim 7, wherein said weakly supervised model optimization of said target model using said second training set comprises:
traversing each sample in the second training set, and obtaining a sample label of a currently traversed current sample; if the current sample is a second training sample, the sample label is an original label, and if the current sample is an labeled sample, the sample label is an labeled label;
calling the target model to perform category identification on the current sample to obtain a category identification result of the current sample;
calculating an initial loss value generated by the target model through the current sample according to the class identification result of the current sample and the sample label;
acquiring the noise weight of the current sample, and performing weighting processing on the initial loss value by adopting the noise weight to obtain a target loss value generated by the target model through the current sample;
and optimizing the model parameters of the target model according to the direction of reducing the target loss value.
9. The method of claim 8, wherein the obtaining the noise weight for the current sample comprises:
performing noise prediction on the current sample based on the data characteristics of the current sample and the sample label to obtain a noise prediction result;
and distributing noise weight to the current sample according to the noise prediction result.
10. The method of claim 9, wherein the second training set has H cluster centers, one cluster center having one center class, H being a positive integer greater than 1; the performing noise prediction on the current sample based on the data characteristics of the current sample and the sample label to obtain a noise prediction result, including:
searching a center class matched with the class indicated by the sample label in the center classes of the H clustering centers, and taking the clustering center corresponding to the searched center class as the original clustering center of the current sample;
calculating a first distance value between the current sample and the original clustering center based on the data characteristics of the current sample and the data characteristics of the original clustering center;
respectively calculating second distance values between the current sample and each clustering center according to the data characteristics of the current sample and the data characteristics of each clustering center, and taking the clustering center corresponding to the maximum second distance value as a reference clustering center of the current sample;
if the maximum second distance value is smaller than the first distance value and the center type of the original clustering center is different from that of the reference clustering center, generating a noise prediction result for indicating that the current sample has noise; otherwise, a noise prediction result indicating that no noise exists in the current sample is generated.
11. The method of claim 10, wherein the method further comprises:
selecting a reference sample set from the second training set, and calling the target model to extract the data characteristics of each reference sample in the reference sample set;
clustering the reference sample set based on the data characteristics of each reference sample to obtain H clustering centers, wherein one clustering center corresponds to one sample cluster;
selecting reference samples with similarity meeting preset conditions from the h sample cluster according to the similarity between each reference sample in the h sample cluster and the h clustering center; the H sample cluster is a sample cluster corresponding to the H clustering center, and H belongs to [1, H ];
and according to the target category of each selected reference sample, allocating a center category for the hth clustering center.
12. The method of claim 11, wherein the reference sample set comprises: each sample group under the preset category in the N preset categories comprises: n is a positive integer greater than 1 for the reference samples of the expected number in any preset category;
the clustering processing is performed on the reference sample set based on the data characteristics of each reference sample to obtain H clustering centers, and the clustering processing comprises the following steps:
traversing each sample group in the reference sample set, and determining a currently traversed current sample group;
based on the data characteristics of each reference sample in the current sample group, carrying out clustering processing on the current sample group to obtain K clustering centers of the current sample group, wherein K is a positive integer greater than 1;
and obtaining H clustering centers after all the sample groups are traversed, wherein the H clustering centers comprise K clustering centers of each sample group.
13. The method of claim 10, wherein said assigning a noise weight to the current sample based on the noise prediction result comprises:
if the noise prediction result indicates that the current sample has noise, calculating the noise weight of the current sample according to the maximum second distance value and the first distance value;
and if the noise prediction result indicates that the current sample has no noise, determining a preset numerical value as the noise weight of the current sample.
14. A model optimization apparatus, comprising:
the processing unit is used for calling a target model to perform category identification on each sample image in the candidate sample set to obtain a category identification result of each sample image; the target model is optimized by learning Q fields, the candidate sample set is constructed by sample images in P candidate fields which are not learned in the Q fields, Q is a positive integer larger than 1, and P is a positive integer smaller than or equal to Q; one field corresponds to one sample collection channel, and different sample collection channels correspond to different image styles;
the processing unit is further used for calculating the learning adaptation degree of the target model and each candidate field according to the class identification result of each sample image and the field distribution condition of each sample image;
the processing unit is further used for selecting a target field adapted to the target model from the P candidate fields based on a calculation result and an adaptation strategy;
the optimization unit is used for optimizing the target model by adopting the sample image in the target field so as to enable the target field to be learned by the target model;
the processing unit and the optimization unit are invoked iteratively until all of the Q domains are learned by the target model.
15. A computer storage medium, characterized in that the computer storage medium stores one or more computer programs adapted to be loaded by a processor and to perform the model optimization method according to any one of claims 113.
Priority Applications (1)
Application Number  Priority Date  Filing Date  Title 

CN202110533449.4A CN112990387B (en)  20210517  20210517  Model optimization method, related device and storage medium 
Applications Claiming Priority (1)
Application Number  Priority Date  Filing Date  Title 

CN202110533449.4A CN112990387B (en)  20210517  20210517  Model optimization method, related device and storage medium 
Publications (2)
Publication Number  Publication Date 

CN112990387A CN112990387A (en)  20210618 
CN112990387B true CN112990387B (en)  20210720 
Family
ID=76336615
Family Applications (1)
Application Number  Title  Priority Date  Filing Date 

CN202110533449.4A Active CN112990387B (en)  20210517  20210517  Model optimization method, related device and storage medium 
Country Status (1)
Country  Link 

CN (1)  CN112990387B (en) 
Citations (8)
Publication number  Priority date  Publication date  Assignee  Title 

CN103745233A (en) *  20140123  20140423  西安电子科技大学  Hyperspectral image classifying method based on spatial information transfer 
CN106874296A (en) *  20151214  20170620  阿里巴巴集团控股有限公司  A kind of style recognition methods of commodity and device 
CN108256561A (en) *  20171229  20180706  中山大学  A kind of multisource domain adaptive migration method and system based on confrontation study 
CN109829456A (en) *  20171123  20190531  腾讯科技（深圳）有限公司  Imagerecognizing method, device and terminal 
CN110135579A (en) *  20190408  20190816  上海交通大学  Unsupervised field adaptive method, system and medium based on confrontation study 
CN111125422A (en) *  20191213  20200508  北京达佳互联信息技术有限公司  Image classification method and device, electronic equipment and storage medium 
CN112699892A (en) *  20210108  20210423  北京工业大学  Unsupervised field selfadaptive semantic segmentation method 
CN112733970A (en) *  20210331  20210430  腾讯科技（深圳）有限公司  Image classification model processing method, image classification method and device 

2021
 20210517 CN CN202110533449.4A patent/CN112990387B/en active Active
Patent Citations (8)
Publication number  Priority date  Publication date  Assignee  Title 

CN103745233A (en) *  20140123  20140423  西安电子科技大学  Hyperspectral image classifying method based on spatial information transfer 
CN106874296A (en) *  20151214  20170620  阿里巴巴集团控股有限公司  A kind of style recognition methods of commodity and device 
CN109829456A (en) *  20171123  20190531  腾讯科技（深圳）有限公司  Imagerecognizing method, device and terminal 
CN108256561A (en) *  20171229  20180706  中山大学  A kind of multisource domain adaptive migration method and system based on confrontation study 
CN110135579A (en) *  20190408  20190816  上海交通大学  Unsupervised field adaptive method, system and medium based on confrontation study 
CN111125422A (en) *  20191213  20200508  北京达佳互联信息技术有限公司  Image classification method and device, electronic equipment and storage medium 
CN112699892A (en) *  20210108  20210423  北京工业大学  Unsupervised field selfadaptive semantic segmentation method 
CN112733970A (en) *  20210331  20210430  腾讯科技（深圳）有限公司  Image classification model processing method, image classification method and device 
NonPatent Citations (4)
Title 

Domain Adaptation for Convolutional Neural NetworksBased Remote Sensing Scene Classification;Shaoyue Song et al.;《IEEE GEOSCIENCE AND REMOTE SENSING LETTERS》;20190831;第16卷(第8期);全文 * 
Generalization of Fitness Exercise Recognition from Doppler Measurements;Biying Fu et al.;《ICPR 2020 Workshops》;20210331;全文 * 
基于图像识别的无监督领域自适应方法研究;方存亮;《中国优秀硕士学位论文全文数据库 信息科技辑》;20200215(第02期);全文 * 
基于域间相似度序数的迁移学习源领域的选择;孙俏 等;《科学技术与工程》;20200718;第20卷(第20期);全文 * 
Also Published As
Publication number  Publication date 

CN112990387A (en)  20210618 
Similar Documents
Publication  Publication Date  Title 

Sarkhel et al.  A multiobjective approach towards cost effective isolated handwritten Bangla character and digit recognition  
CN109919316B (en)  Method, device and equipment for acquiring network representation learning vector and storage medium  
CN110866190A (en)  Method and device for training neural network model for representing knowledge graph  
CN110728317A (en)  Training method and system of decision tree model, storage medium and prediction method  
EP1903479A1 (en)  Method and system for data classification using a selforganizing map  
CN111382868A (en)  Neural network structure search method and neural network structure search device  
CN110636445A (en)  WIFIbased indoor positioning method, device, equipment and medium  
CN110570111A (en)  Enterprise risk prediction method, model training method, device and equipment  
CN111597374B (en)  Image classification method and device and electronic equipment  
CN111242948B (en)  Image processing method, image processing device, model training method, model training device, image processing equipment and storage medium  
CN112990387B (en)  Model optimization method, related device and storage medium  
CN106940726B (en)  Creative automatic generation method and terminal based on knowledge network  
CN112380435A (en)  Literature recommendation method and recommendation system based on heterogeneous graph neural network  
CN111914156A (en)  Crossmodal retrieval method and system for selfadaptive label perception graph convolution network  
US20150262037A1 (en)  Visual recognition using social links  
US20190228297A1 (en)  Artificial Intelligence Modelling Engine  
CN108132968B (en)  Weak supervision learning method for associated semantic elements in web texts and images  
CN112800253B (en)  Data clustering method, related device and storage medium  
Khellatkihel et al.  Hybrid Bioinspired Approach for Feature Subset Selection  
CN111523621B (en)  Image recognition method and device, computer equipment and storage medium  
CN112990378B (en)  Scene recognition method and device based on artificial intelligence and electronic equipment  
CN112949620B (en)  Scene classification method and device based on artificial intelligence and electronic equipment  
CN113158554A (en)  Model optimization method and device, computer equipment and storage medium  
CN112819023A (en)  Sample set acquisition method and device, computer equipment and storage medium  
Dackander  A comparative study on a practical use case for image clustering based on common shareability and metadata 
Legal Events
Date  Code  Title  Description 

PB01  Publication  
PB01  Publication  
SE01  Entry into force of request for substantive examination  
SE01  Entry into force of request for substantive examination  
GR01  Patent grant  
GR01  Patent grant 