CN112748941B - Method and device for updating target application program based on feedback information - Google Patents

Method and device for updating target application program based on feedback information Download PDF

Info

Publication number
CN112748941B
CN112748941B CN202010784873.1A CN202010784873A CN112748941B CN 112748941 B CN112748941 B CN 112748941B CN 202010784873 A CN202010784873 A CN 202010784873A CN 112748941 B CN112748941 B CN 112748941B
Authority
CN
China
Prior art keywords
sample
neural network
network model
scene information
information
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
Application number
CN202010784873.1A
Other languages
Chinese (zh)
Other versions
CN112748941A (en
Inventor
张维
陈卫东
暴林超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010784873.1A priority Critical patent/CN112748941B/en
Publication of CN112748941A publication Critical patent/CN112748941A/en
Application granted granted Critical
Publication of CN112748941B publication Critical patent/CN112748941B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Security & Cryptography (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method and a device for updating a target application program based on feedback information. The method comprises the following steps: acquiring actual scene information input in a target application program and result feedback information corresponding to the actual scene information; updating a target neural network model in a target application program according to actual scene information and result feedback information, wherein the target neural network model is a neural network model obtained by training a pre-training neural network model by using a training sample set, the training sample set comprises at least two groups of sample scene information, the different groups of sample scene information correspond to different actual sample recognition results of a target object, the weight corresponding to a loss function used in model training in the different groups of sample scene information is different, and the weight corresponding to the different groups of sample scene information is inversely related to the number of sample scene information in the different groups of sample scene information.

Description

Method and device for updating target application program based on feedback information
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for updating a target application based on feedback information, a storage medium, and an electronic device.
Background
Currently, in some small sample business scenarios, training is generally required in advance to obtain a model.
For training of the model, the adopted scheme is generally deployment after offline training, namely, the model is trained by using marked data, and parameters of the model are fixed after formally deploying the model on line. However, for small sample business scenes, the number of usable training samples is small, and the samples are unevenly distributed, so that the classification effect of the model obtained by the small sample business scenes is poor.
Aiming at the problems of poor classification effect of a model obtained by training in a small sample service scene due to the fact that the number of training samples is small and the sample distribution is uneven in the small sample service scene in the related technology, an effective solution is not proposed yet.
Disclosure of Invention
The embodiment of the invention provides a method and a device for updating a target application program based on feedback information, a storage medium and electronic equipment, which are used for at least solving the technical problem that in the related technology, a model obtained through training in a small sample service scene has poor classification effect due to the fact that the number of training samples is small and the sample distribution is uneven in the small sample service scene.
According to an aspect of the embodiment of the present invention, there is provided a method for updating a target application program based on feedback information, including: acquiring actual scene information input in the target application program and result feedback information corresponding to the actual scene information, wherein the target application program uses a target neural network model, the result feedback information is feedback information of an actual recognition result output by the target neural network model, and the actual recognition result is a predicted recognition result of the target object output by the target neural network model according to the actual scene information; updating the target neural network model in the target application program according to the actual scene information and the result feedback information; the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used in model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of sample scene information in the different groups of sample scene information.
According to another aspect of the embodiment of the present invention, there is also provided an apparatus for updating a target application program based on feedback information, including: a first obtaining unit, configured to obtain actual scene information input in a target application program and result feedback information corresponding to the actual scene information, where the target application program uses a target neural network model, the result feedback information is feedback information of an actual recognition result output by the target neural network model, and the actual recognition result is a predicted recognition result of the target object output by the target neural network model according to the actual scene information; the first processing unit is used for updating the target neural network model in the target application program according to the actual scene information and the result feedback information; the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used in model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of sample scene information in the different groups of sample scene information.
According to an aspect of an embodiment of the present invention, there is provided an image recognition method based on a target application, including: inputting image information to a target application program, wherein the target application program uses a target neural network model; the image information is identified through the target neural network model, and an image identification result is obtained, wherein the image identification result is a predicted identification result of a target object output by the target neural network model according to the image information; the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
According to another aspect of the embodiment of the present invention, there is also provided an image recognition apparatus based on a target application, including: an input unit configured to input image information to a target application program using a target neural network model; the second processing unit is used for identifying the image information through the target neural network model to obtain an image identification result, wherein the image identification result is a predicted identification result of a target object output by the target neural network model according to the image information; the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
According to yet another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the computer device to perform the method provided in various alternative implementations of the method of updating a target application based on feedback information described above.
According to still another aspect of the embodiment of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the method for updating the target application program based on the feedback information through the computer program.
According to the application, a target neural network model is required to be trained in advance, a pre-training neural network model suitable for identifying a target object is firstly obtained according to scene information, the pre-training neural network model can output a pre-estimated identification result of the target object according to the input scene information, then the pre-training neural network model is subjected to model training by using a training sample set to obtain the target neural network model, wherein the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information are in one-to-one correspondence with at least two groups of actual sample identification results, the different groups of sample scene information correspond to different actual sample identification results of the target object, the weight corresponding to the different groups of sample scene information is different from the number of sample scene information in the different groups of sample scene information, then the actual scene information and the result feedback information corresponding to the actual scene information can be input in a target application program using the target neural network model, the result feedback information is the actual recognition result of the target neural network according to the actual identification result of the output by the target neural network, and the weight corresponding to the actual recognition result of the actual neural network is different from the actual neural network; and finally, online updating the target neural network model in the target application program through the actual scene information and the result feedback information. By adopting the scheme, the weight of the loss function used in model training in different groups of sample scene information is different, so that the different groups of sample scene information can be distributed in an equalizing way, the recognition effect of the different groups of sample scene information is improved, the target neural network model in the target application program is updated through the real actual scene information and the result feedback information, training samples can be enriched, the target neural network model can be more accurate, and the recognition accuracy of the target neural network model can be improved. Under a small sample service scene, the weights of samples of different categories of the small sample are adjusted through the loss function, so that the samples of different categories of the small sample are uniformly distributed, and the effect of improving the classification and identification of the corresponding model under the small sample service scene is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic illustration of an application environment of a method for updating a target application based on feedback information according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method for updating a target application based on feedback information according to an embodiment of the application;
FIG. 3 is a schematic flow chart of an alternative update target neural network model according to an embodiment of the present application;
FIG. 4 is a flow chart of an alternative update target neural network model according to an embodiment of the application;
FIG. 5 is a flow chart of yet another alternative update target neural network model, according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of an alternative preprocessing of a picture according to an embodiment of the present application;
FIG. 7 is a flow chart of an alternative target application-based image recognition method according to an embodiment of the present application;
FIG. 8 is a schematic flow chart of an alternative optical disc identification based feedback in accordance with an embodiment of the present application;
FIG. 9 is a schematic diagram of an alternative user feedback information according to an embodiment of the invention;
FIG. 10 is a flow diagram of an alternative feedback information based target application in accordance with an embodiment of the present invention;
FIG. 11 is a schematic diagram of an alternative update apparatus for a target application based on feedback information according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of an alternative target application-based image recognition device in accordance with an embodiment of the present invention;
fig. 13 is a schematic structural view of an alternative electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Technical terms related to the embodiment of the invention include:
1. neural Networks (NN) are complex network systems formed by a large number of simple processing units (called neurons) widely interconnected, reflecting many basic features of human brain function, and are a highly complex nonlinear power learning system. Neural networks have massively parallel, distributed storage and processing, self-organizing, adaptive, and self-learning capabilities, and are particularly suited to address imprecise and ambiguous information processing issues that require consideration of many factors and conditions simultaneously. For example, a convolutional neural network (Convolutional Neural Network, abbreviated as CNN) is a feedforward neural network with a convolutional calculation and a depth structure, and its artificial neurons can respond to a part of surrounding units in a coverage area, so that the convolutional neural network has excellent performance for large-scale image processing.
2. Long mantissa data: the labels in the data are unevenly distributed, most of the data are concentrated under a small part of the labels, and the deep learning model has poor effect on long-tail data; for example, one image sample is 500, the image sample includes three types of samples, the three types of samples are that the tray in the image is empty (the sample number is 110), the tray in the image is non-empty (the sample number is 90), the tray in the image is not empty (the sample number is 400), correspondingly, the recognition result of the deep learning model on the image sample, and the label corresponding to the recognition result also includes three types, the recognition result is that the tray in the image is non-empty, and the corresponding label is 1; the identification result is that the tray in the image is empty, and the corresponding label is 2; the identification result is that no tray exists in the image, and the corresponding label is 3. In this case, since the labels 1, 2 and 3 are unevenly distributed, the recognition accuracy of the deep learning model for the label 3 is high, and the recognition accuracy for the labels 1 and 2 is low, so that the effect of the deep learning model on long tail data is poor.
3. Pre-training model: after the model is trained on a larger task, the feature extraction capability of the model can be migrated to other tasks. For example, the model developed for task A is reused in the process of developing the model for task B, taking the model developed for task A as an initial point. For example, a pre-training model on ImageNet can be used as a pre-training neural network model in the method for updating the target application program based on feedback information, and the capability of the training neural network model for image recognition can be generalized into the target neural network model according to the embodiment of the application.
4. Image dataset (A Large-Scale Hierarchical Image Database, imageNet for short): a large visual database is used for visual target recognition software research, is the database with the largest image recognition in the world, and can recognize objects from pictures.
According to an aspect of the embodiment of the application, a method for updating a target application program based on feedback information is provided. Alternatively, the method for updating the target application program based on the feedback information may be applied to an application environment as shown in fig. 1, but is not limited to the method. As shown in fig. 1, the terminal device 102 acquires actual scene information input in a target application program and result feedback information corresponding to the actual scene information, wherein the target application program uses a target neural network model, the result feedback information is feedback information of an actual recognition result output by the target neural network model, the actual recognition result is a predicted recognition result of the target object output by the target neural network model according to the actual scene information, and the terminal device 102 updates the target neural network model in the target application program according to the actual scene information and the result feedback information; the server 104 needs to train a target neural network model in advance, where the target neural network model is a network model obtained by training a pre-train neural network model with a training sample set, where the pre-train neural network model is configured to output a predicted recognition result of a target object according to input scene information, the training sample set includes at least two sets of sample scene information, the at least two sets of sample scene information have a one-to-one correspondence with at least two sets of actual sample recognition results, different sets of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during training the model in the different sets of sample scene information are different, and the weights corresponding to the different sets of sample scene information are inversely related to the number of sample scene information in the different sets of sample scene information. The above is merely an example, and embodiments of the present application are not limited in this respect.
Alternatively, the method may be applied to a business scenario of image recognition, such as a scenario of recognizing whether a dish is an empty dish, recognizing a specific object (e.g., a person, an animal) in an image, etc., which is not limited in this embodiment.
The updating of the target application program based on the feedback information in the embodiment of the invention can involve artificial intelligence, machine learning and other technologies, wherein:
artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Machine Learning (ML) is a multi-domain interdisciplinary, involving multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, confidence networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like.
Alternatively, in the present embodiment, the above-mentioned terminal device may be a terminal device configured with a target client, and may include, but is not limited to, at least one of the following: a mobile phone (e.g., an Android mobile phone, iOS mobile phone, etc.), a notebook computer, a tablet computer, a palm computer, a MID (Mobile Internet Devices, mobile internet device), a PAD, a desktop computer, a smart television, etc. The target client may be a video client, an instant messaging client, a browser client, an educational client, and the like. The network may include, but is not limited to: a wired network, a wireless network, wherein the wired network comprises: local area networks, metropolitan area networks, and wide area networks, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communications. The server may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and the present embodiment is not limited thereto.
Alternatively, in this embodiment, as an optional implementation manner, the method may be performed by a server, may be performed by a terminal device, or may be performed by the server and the terminal device together, and in this embodiment, the description is given by way of example by the server (for example, the server 104 described above). As shown in fig. 2, the flow of the method for updating the target application program based on the feedback information may include the steps of:
step S202, obtaining actual scene information input in a target application program and result feedback information corresponding to the actual scene information, wherein the target application program uses a target neural network model, the result feedback information is feedback information of an actual recognition result output by the target neural network model, and the actual recognition result is a predicted recognition result of the target object output by the target neural network model according to the actual scene information.
Step S204, updating the target neural network model in the target application program according to the actual scene information and the result feedback information.
The target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used in model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of sample scene information in the different groups of sample scene information.
Optionally, before the target application program formally issues online, a target neural network model used by the target application program needs to be trained in advance, and the method further includes: acquiring the pre-training neural network model, wherein the pre-training neural network model is used for outputting a pre-estimated recognition result of a target object according to input scene information; and performing model training on the pre-training neural network model by using the training sample set to obtain the target neural network model.
The target application program may be a sort program, such as an optical disc recognition applet (to recognize whether or not the tableware is empty), an animal recognition program, a flower and grass recognition program, a clothing recognition program, etc., which is not limited herein.
In general, the number of training samples of the target application program is deficient, and the generalization capability of a model obtained by adopting a direct training mode is far insufficient. The pretraining model on the ImageNet can be used as the pretraining neural network model, and the generalizing capability of the algorithm can be greatly improved by using the pretraining neural network model, so that a more ideal effect can be obtained by less fine tuning times. Through the pre-training neural network model, the estimated recognition result of the target object (such as tableware, flowers and plants, clothes, animals and the like) can be output according to the input scene information (such as images and the like).
And performing model training on the pre-training neural network model by using the training sample set to obtain a target neural network model.
The training sample set includes at least two groups of sample scene information, the at least two groups of sample scene information and at least two groups of actual sample recognition results have a one-to-one correspondence, and different groups of sample scene information correspond to different actual sample recognition results of a target object, for example, for optical disc recognition, the actual sample recognition result corresponding to one group of sample scene information (picture) is a tray where the current sample scene information is empty, the actual sample recognition result corresponding to one group of sample scene information (picture) is a tray where the current sample scene information is non-empty, and the actual sample recognition result corresponding to one group of sample scene information (picture) is a tray where no tray exists in the current sample scene information.
A loss function is used in model training, where weights corresponding to different sets of sample scene information are different, and the weights corresponding to different sets of sample scene information are inversely related to the number of sample scene information in different sets of sample scene information, for example, the fewer the number of sample scene information in different sets of sample scene information is, the larger the weights corresponding to different sets of sample scene information is, and the more the number of sample scene information in different sets of sample scene information is, the smaller the weights corresponding to different sets of sample scene information is.
After the target neural network model is obtained in the above manner, the target neural network model can be applied to the target application program after the target application program is formally released on line in an internal test stage of the target application program or other special conditions, and through the target application program, the actual scene information and the result feedback information corresponding to the actual scene information can be obtained.
The target application program uses the target neural network model, the result feedback information is feedback information of an actual recognition result output by the target neural network model, the actual recognition result is a predicted recognition result of the target object output by the target neural network model according to the actual scene information, in other words, the result feedback information is information fed back by a user according to the actual scene information, and the actual recognition result is a predicted recognition result of the target neural network model.
Because the recognition result of the target neural network model may have errors, and the reliability of the real result feedback information fed back by the user is relatively high, the target neural network model in the target application program can be updated online based on the actual scene information and the result feedback information. That is, by updating the target neural network model based on the actual result feedback information of the user feedback, the recognition effect of the target neural network model can be more accurate, and the recognition accuracy can be improved.
According to the embodiment, a target neural network model is required to be trained in advance, a pre-training neural network model suitable for identifying a target object is firstly obtained according to scene information, the pre-training neural network model can output estimated identification results of the target object according to input scene information, then a training sample set is used for carrying out model training on the pre-training neural network model to obtain the target neural network model, wherein the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information are in one-to-one correspondence with at least two groups of actual sample identification results, different groups of sample scene information correspond to different actual sample identification results of the target object, weights corresponding to the different groups of sample scene information in the model training are different, the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information, then actual scene information and result feedback information corresponding to the actual scene information can be input in a target application program using the target neural network model, the result feedback information is the actual recognition result of the target neural network according to the estimated actual neural network identification result of the target neural network; and finally, online updating the target neural network model in the target application program through the actual scene information and the result feedback information. By adopting the scheme, the weight of the loss function used in model training in different groups of sample scene information is different, so that the different groups of sample scene information can be distributed in an equalizing way, the recognition effect of the different groups of sample scene information is improved, the target neural network model in the target application program is updated through the real actual scene information and the result feedback information, training samples can be enriched, the target neural network model can be more accurate, and the recognition accuracy of the target neural network model can be improved. Under a small sample service scene, the weights of samples of different categories of the small sample are adjusted through the loss function, so that the samples of different categories of the small sample are uniformly distributed, and the effect of improving the classification and identification of the corresponding model under the small sample service scene is achieved.
Optionally, in this embodiment, the updating the target neural network model in the target application includes: and updating the target neural network model in the target application program according to a preset time interval.
Alternatively, the target neural network model in the target application may be updated at preset time intervals (e.g., every other day).
According to the embodiment, along with continuous transformation of the user demands, the target neural network model is updated according to the preset time interval, so that the target neural network model can closely follow the client demands, user experience is improved, and the target neural network model is more accurate.
Optionally, in this embodiment, the acquiring actual scene information input in the target application and result feedback information corresponding to the actual scene information includes: acquiring a group of information pairs from an information pair set, wherein each information pair in the information pair set comprises actual scene information and result feedback information which are input in the target application program and have a corresponding relation; acquiring a group of sample scene information from the training sample set, and acquiring a group of actual sample recognition results with a one-to-one correspondence with the group of sample scene information; the updating the target neural network model in the target application program according to the actual scene information and the result feedback information includes: and updating the target neural network model in the target application program according to the set of information pairs, the set of sample scene information and the set of actual sample recognition results.
Alternatively, the above set of information pairs may be understood as a database for storing actual scene information and result feedback information. Wherein, each information pair in the information pair set comprises the actual scene information and the result feedback information which are input in the target application program and have the corresponding relation.
And acquiring a group of information pairs from the information pair set, acquiring a group of sample scene information from the training sample set, and acquiring a group of actual sample recognition results with a one-to-one correspondence with the group of sample scene information.
And then, combining a set of information pairs fed back by the user, the set of sample scene information and the set of actual sample recognition results to update the target neural network model in the target application program together.
According to the method, the target neural network model is updated by combining the set of information pairs fed back by the user, the set of sample scene information and the set of actual sample recognition results, so that the target neural network model can be updated based on the real-time feedback information of the user, the problem of poor model training effect due to the fact that the number of training samples is small in a traditional mode is avoided, and various parameters of the target neural network model can be more accurate by the aid of the mode of updating the information based on the user feedback, and accordingly good recognition effects of the target neural network model are achieved.
Optionally, in this embodiment, the acquiring a set of information pairs from the set of information pairs includes: acquiring a first group of information pairs from the information pair set; the obtaining a set of sample scene information from the training sample set includes: acquiring a first group of sample scene information from the training sample set; wherein the first number of pairs of information in the first set of pairs of information is less than the second number of pairs of sample scene information in the first set of sample scene information; or, the ratio between the first number and the target total number is smaller than a predetermined ratio threshold, wherein the target total number is the sum of the first number and the second number.
Optionally, the set of information pairs may be information actually fed back by the user, in an actual scenario, a situation in which the user may maliciously feed back may exist, and in order to avoid this, when the first set of information pairs is acquired from the set of information pairs, and when the first set of sample scenario information is acquired from the set of training samples, the following manner may be adopted:
for example, the first number of pairs of information in the first set of pairs of information may be made smaller than the second number of pairs of sample scene information in the first set of sample scene information; or,
The ratio between the first number and a target total number, which is the sum of the first number and the second number, may be made smaller than a predetermined ratio threshold.
By the embodiment, if the result of the malicious feedback of the user exists in the information pair set, the updating effect of the target neural network model may be deteriorated, and by limiting the number or proportion of the first group of information pairs fed back by the user, the adverse result caused by the malicious feedback of the user can be reduced to a certain extent,
optionally, in this embodiment, as shown in fig. 3, a method for updating a target neural network model is provided in this embodiment, which specifically includes the following steps:
step S302, inputting the actual scene information into the target neural network model to obtain a predicted recognition result corresponding to the actual scene information, which is output by the target neural network model.
After the target application program formally releases online, the actual scene information input by the user can be acquired in real time, the actual scene information can be input into the target neural network model, the target neural network model predicts and identifies the actual scene information, and a predicted identification result corresponding to the actual scene information is obtained.
Step S304, inputting the estimated recognition result corresponding to the actual scene information and the result feedback information into the loss function to obtain a first loss value, wherein the loss function comprises a balance factor, and the balance factor is used for adjusting weights corresponding to different scene information in the actual scene information.
And then inputting the estimated recognition result and the real result feedback information fed back by the user into a loss function, and obtaining a first loss value through the loss function.
In the process of updating the target neural network model, if the number of different scene information contained in the actual scene information is different, the obtained first loss value may be larger, and at this time, the weight corresponding to the different scene information in the actual scene information can be adjusted by adjusting the balance factor in the loss function, so as to adjust the magnitude of the first loss value.
Step S306, determining that the updating of the target neural network model is completed when the first loss value is less than or equal to a first preset threshold value, and obtaining the updated target neural network model.
And continuously adjusting the balance factor in the loss function until the first loss value is smaller than or equal to a first preset threshold value, and indicating that the updating of the target neural network model is completed, wherein the updated target neural network model can be obtained.
According to the method, the device and the system for identifying the target neural network model, the balance factors in the loss function are adjusted, so that scene information with different quantities can be balanced relatively, the problem of poor identification effect caused by unbalanced quantity of the scene information is avoided, and the identification precision of the target neural network model is improved.
Optionally, in this embodiment, as shown in fig. 4, another method for updating the target neural network model is further provided in this embodiment, and specific steps are as follows:
step S402, inputting the actual scene information in the set of information pairs into the target neural network model, to obtain a first set of estimated recognition results corresponding to the actual scene information in the set of information pairs output by the target neural network model.
Optionally, after the target application program formally issues online, inputting the obtained actual scene information in a set of information pairs into the target neural network model, predicting the actual scene information through the target neural network model, and outputting a first set of estimated recognition results corresponding to the actual scene information in the set of information pairs.
Step S404, inputting the set of sample scene information into the target neural network model to obtain a second set of estimated recognition results corresponding to the set of sample scene information output by the target neural network model.
Optionally, inputting the obtained set of sample scene information into the target neural network model, predicting the set of sample scene information through the target neural network model, and outputting a second set of estimated recognition results corresponding to the set of sample scene information.
Step S406, inputting the first set of estimated recognition results and the result feedback information in the set of information pairs into the loss function to obtain a second loss value, where the loss function includes a balance factor, and the balance factor is used to adjust weights corresponding to different scene information in the actual scene information.
And then, inputting the first group of estimated recognition results and the result feedback information in a real group of information pairs fed back by the user into a loss function, and obtaining a second loss value through the loss function.
In the process of updating the target neural network model, if the number of different scene information contained in the actual scene information is different, the obtained second loss value may be larger, and at this time, the weight corresponding to the different scene information in the actual scene information can be adjusted by adjusting the balance factor in the loss function, so as to adjust the magnitude of the second loss value.
Step S408, inputting the second set of estimated recognition results and the set of actual sample recognition results into the loss function to obtain a third loss value.
And inputting the second group of estimated recognition results and a group of actual sample recognition results with a one-to-one correspondence with the group of sample scene information into a loss function, and obtaining a third loss value through the loss function.
Step S410, determining a fourth loss value corresponding to the target neural network model according to the second loss value and the third loss value.
And then adding the second loss value and the third loss value to obtain a fourth loss value corresponding to the target neural network model, or carrying out weighted summation on the second loss value and the third loss value to obtain a fourth loss value corresponding to the target neural network model.
And step S412, determining that the updating of the target neural network model is completed and obtaining the updated target neural network model when the fourth loss value is smaller than or equal to a second preset threshold value.
And continuously adjusting the balance factor in the loss function until the fourth loss value is smaller than or equal to the second preset threshold value, and indicating that the updating of the target neural network model is completed, wherein the updated target neural network model can be obtained.
According to the method, the device and the system for identifying the target neural network model, the balance factors in the loss function are adjusted, so that scene information with different quantities can be balanced relatively, the problem of poor identification effect caused by unbalanced quantity of the scene information is avoided, and the identification precision of the target neural network model is improved.
Optionally, as shown in fig. 5, in this embodiment, a method for training a target neural network model is provided, which specifically includes the following steps:
step S502, inputting the at least two sets of sample scene information into the pre-training neural network model to obtain at least two sets of estimated sample recognition results corresponding to the at least two sets of sample scene information output by the pre-training neural network model.
Optionally, at least two sets of sample scene information are input into a pre-training neural network model, the at least two sets of sample scene information are predicted through the pre-training neural network model, and at least two sets of estimated sample recognition results corresponding to the at least two sets of sample scene information are output.
Step S504, inputting the at least two groups of estimated sample recognition results and the at least two groups of actual sample recognition results into the loss function to obtain a fifth loss value, wherein the loss function comprises a balance factor, and the balance factor is used for adjusting weights corresponding to the at least two groups of sample scene information.
Optionally, at least two groups of estimated sample recognition results and at least two groups of actual sample recognition results with a one-to-one correspondence with at least two groups of sample scene information are input into a loss function, and a fifth loss value can be obtained through the loss function.
In the process of updating the target neural network model, if the number of different scene information in at least two sets of sample scene information is different, the obtained fifth loss value may be larger, and at this time, the weight corresponding to the different scene information in at least two sets of sample scene information can be adjusted by adjusting the balance factor in the loss function, so as to adjust the magnitude of the fifth loss value.
And step S506, determining that the training of the pre-training neural network model is completed under the condition that the fifth loss value is smaller than or equal to a third preset threshold value, and obtaining the target neural network model.
The target neural network model may be obtained by continuously adjusting the balance factor in the loss function until the fifth loss value is less than or equal to the third preset threshold value, indicating that training of the target neural network model is completed.
According to the method, the device and the system for identifying the target neural network model, the balance factors in the loss function are adjusted, so that at least two groups of sample scene information with different numbers can be balanced relatively, the problem of poor identification effect caused by unbalanced number of the scene information is avoided, and the identification accuracy of the target neural network model is improved.
Optionally, in this embodiment, the inputting the at least two sets of estimated sample recognition results and the at least two sets of actual sample recognition results into the loss function to obtain a fifth loss value includes: the fifth loss value is determined according to the following formula: wherein the Loss is the fifth Loss value, and the at least two groups of estimated sample identification junctionsThe number of the results and the at least two groups of actual sample identification results is N, the N is a natural number, and the p k For one of the at least two sets of actual sample recognition results, q is the same as the actual sample recognition result k And (3) identifying the result of one estimated sample in at least two groups of estimated sample identification results, wherein gamma is the balance factor.
Optionally, assuming that the number of at least two sets of estimated sample recognition results and the number of the at least two sets of actual sample recognition results are both N, where N is a natural number, the at least two sets of estimated sample recognition results and the at least two sets of actual sample recognition results may be input into the following formula to obtain the fifth loss value:
wherein the Loss is the fifth Loss value, and p is k For one of the at least two sets of actual sample recognition results, q is the same as the actual sample recognition result k And (3) identifying the result of one estimated sample in at least two groups of estimated sample identification results, wherein gamma is the balance factor.
It can be understood that, for the calculation manners of the first loss value, the second loss value, and the third loss value, reference may be made to the calculation manner of the fifth loss value, which is not described herein.
According to the embodiment, the fifth loss value can be accurately calculated by adopting the formula, and whether the pre-training neural network model is trained or not is further evaluated through the fifth loss value, so that the training accuracy of the pre-training neural network model is improved.
Optionally, in this embodiment, in a case where the fifth loss value is greater than a third preset threshold, the method further includes: increasing the balance factor in the loss function; training the pre-training neural network model by using the training sample set until the fifth loss value is smaller than or equal to the third preset threshold value, and determining that the training of the pre-training neural network model is completed, thereby obtaining the target neural network model.
Optionally, if the obtained fifth loss value is greater than a third preset threshold, the balance factor in the loss function may be increased, and the training sample set is used to train the pre-trained neural network model until the fifth loss value is less than or equal to the third preset threshold, and it is determined that the training of the pre-trained neural network model is completed, so as to obtain the target neural network model.
Optionally, in this embodiment, before performing model training on the pre-trained neural network model by using the training sample set to obtain the target neural network model, the method further includes: determining the size of the short side of each image in the image set to be processed as a first size to obtain a first image set; intercepting each image in the first image set by taking the height as a second size and the width as a third size to obtain a second image set, and determining the second image set as the training sample set; or turning over the first probability image in the second image set to obtain a third image set, and determining the third image set as the training sample set; or rotating the image with the second probability in the third image set in a preset angle range to obtain a fourth image set, and determining the fourth image set as the training sample set.
Optionally, before model training of the pre-trained neural network model is started, a training sample set needs to be obtained, for example, by preprocessing a set of images to be processed.
It should be noted that each image to be processed in the set of images to be processed may be an RGB image.
Specifically, the size of the short side of each image in the image set to be processed is determined as a first size (e.g., 256), resulting in a first image set.
Then, each image in the first image set is cut with a second size (224) in height and a third size (224) in width to obtain a second image set, and the second image set is determined to be the training sample set. The method of interception is random interception, and any area in each image can be intercepted, so long as the height is ensured to be the second size, and the width is ensured to be the third size.
Alternatively, the training sample set may be obtained as follows:
and (3) turning over the images with the first probability (such as 0.5, 0.6 and the like) in the second image set to obtain a third image set, and determining the third image set as the training sample set. For example, half of the images in the second image set are arbitrarily selected to be turned over from the front side to the back side, so as to obtain a third image set, and the third image set is determined as the training sample set.
Alternatively, the training sample set may be obtained as follows:
and rotating the images with the second probability (such as 0.5, 0.6 and the like) in the third image set in a preset angle range to obtain a fourth image set, and determining the fourth image set as the training sample set. For example, half of the images in the third image set are arbitrarily selected to rotate within the range of [ -45, 45] degrees to obtain a fourth image set, and the fourth image set is determined as the training sample set.
In one possible embodiment, as shown in fig. 6, the method for preprocessing the image set to be processed specifically includes the following steps:
step S601, inputting RGB pictures.
In step S602, the size of the short side of each RGB picture in the image set to be processed is normalized to 256.
Step S603, randomly intercepting each RGB picture in the normalized image set to be processed with 224×224 size.
Step S604, randomly flipping the 224 x 224 size pictures with a probability of 0.5.
Step S605, performing [ -45, 45] degree random rotation on the flipped 224 x 224 size picture with a probability of 0.5.
The pictures passing through the steps S601 to S605 are determined as the training sample set.
It will be appreciated that the above is only an example, and the present embodiment is not limited in any way herein.
Through the embodiment, the image to be processed can be expanded by carrying out standardization, turnover operation and rotation operation on the image in the image to be processed, so that the obtained training sample set is richer, and the sample diversity of the training sample set is improved.
After the target application program is formally released and online in the above manner, the image can be identified by using the target application program, and in the embodiment of the present invention, an image identification method based on the target application program is provided, as shown in fig. 7, and specific steps are as follows:
step S702, inputting image information to a target application program, wherein the target application program uses a target neural network model;
step S704, recognizing the image information through the target neural network model to obtain an image recognition result, wherein the image recognition result is a predicted recognition result of the target object output by the target neural network model according to the image information;
the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
Optionally, the target neural network model needs to be trained in advance, and the specific training manner of the target neural network model is described in detail in the foregoing embodiments and will not be described herein.
After the target neural network model is trained, the target neural network model can be used in a target application program, a user can use the target application program to input image information into the target application program, and the target neural network model in the target application program identifies the image information to obtain a corresponding image identification result.
For example, taking the target application program as an example of a program for identifying a tray, the user inputs an image without a tray to the target application program, so that an image identification result of "no tray identified" can be obtained, the user inputs an image without a tray empty to the target application program, so that an image identification result of "tray empty" can be obtained, and the user inputs an image without a tray empty to the target application program, so that an image identification result of "tray not empty" can be obtained.
It will be appreciated that the above is only an example, and the present embodiment is not limited in any way herein.
Optionally, the user may feed back the user feedback result corresponding to the image information through the target application program according to the accuracy of the image recognition result, so that the target application program may use the image information and the corresponding user feedback result as a sample for updating the target application program, to improve the recognition rate of the target application program.
According to the embodiment, the target neural network model which is trained in advance is used in the target application program, and the target neural network model can be updated in real time according to user feedback, so that the identification accuracy of the target neural network model is more and more accurate, the identification accuracy page of the target application program on the image information is more accurate, and the identification accuracy of the target application program is improved.
It should be noted that, the current deep learning scheme is generally deployed after offline training, that is, the model is trained by using already-marked data, and parameters of the model are fixed after formally deploying online.
The above solution has the following drawbacks:
1. for small amounts of sample data, the case of uneven sample distribution is poor.
2. Because the parameters of the model are fixed after formally deploying the model online, errors in the operation of the deep learning model cannot be perceived.
In order to solve the drawbacks of the above-described scheme, the flow of the update method of the target application program based on the feedback information is described below in conjunction with an alternative example.
Optionally, the general idea of the embodiment of the application is that on the existing data, a scheme of transfer learning is adopted, a pre-training neural network model is used as an initial parameter, a sample weight is dynamically adjusted aiming at long tail distribution, and the pre-training neural network model is trained to obtain a target neural network model; after the target neural network model is formally deployed and online, providing a user feedback interface, collecting feedback information (such as the actual scene information and the result feedback information) of the user through the interface as a tag, using data fed back by the user as training data, and training and updating the target neural network model online in the background, so as to improve the recognition effect of the target neural network model. By adopting the technical scheme of the application, the problems of insufficient data and long tail distribution in a deep learning scene can be relieved by effectively utilizing the transfer learning and the online feedback of the user.
Taking the optical disc identification in the application scene as the AI public welfare applet as an example, the convolutional neural network CNN is used for judging the current picture input into the AI public welfare applet by a user, which is a three-classification problem, such as whether a disc in the current picture is an optical disc or not, and the specific judging result is as follows: a tray with a target category of 1 and empty current picture; the target category is 2, and the tray in the current picture is not empty; the target category is 3, and no pan exists in the current picture.
As shown in fig. 7, the user uploads the RGB picture, the server inputs the RGB picture uploaded by the user to the CNN, the CNN returns the recognition result, and the recognition result is fed back to the user through the server.
The problem of the optical disc identification in the AI public welfare applet is that the existing training data are very deficient, the samples of each category are less than 500, the scene is very limited, most of the dishes are photos taken by a certain specific canteen, the kinds of the dishes are single, and the generalization of the algorithm model is seriously influenced. In the embodiment, the generalization capability of the model is improved and the effect of the model is obviously improved by introducing methods of transfer learning and user feedback.
The method for updating the target application program based on the feedback information mainly comprises the following steps:
Step one, use of a pre-trained neural network model.
In consideration of the limitation of data distribution and the lack of sample quantity, the generalization capability of the model obtained by direct training is far insufficient, a pre-training neural network model on an ImageNet can be used as an initialization model, the use of the pre-training neural network model can greatly improve the generalization capability of an algorithm, and the ideal effect can be obtained only by less fine tuning times.
And step two, preprocessing data.
Alternatively, the data preprocessing may refer to the method shown in fig. 6, and will not be described herein.
And thirdly, a weight self-adaptive cross entropy function.
Optionally, in the training samples, the different categories are distributed in an extremely unbalanced manner, a few categories contain most of pictures in the sample set, a weight self-adaptive cross entropy function can be set, and the problem of unbalance between the categories is relieved.
Where p in the above formula is the correct label, q is the predicted value, and q can be understood as the result of the softmax function processing. By increasing the loss weight of the error sample, the model is more focused on the sample difficult to classify during training, so that the phenomenon of sample imbalance is relieved.
And step four, updating the model online.
1. User feedback information is collected.
After the optical disc recognition software in the AI public welfare applet is formally deployed and online, as shown in fig. 8, a feedback window may be provided for the user, if the user considers that the current optical disc recognition software is classified incorrectly, the user may feed back the error and simultaneously give a correct label, and meanwhile, the optical disc recognition software background may collect the picture and the label given by the user, and store the picture label pair in an Images Pool (such as ImageNet database).
2. And (5) training on line.
At fixed time intervals, the target neural network model can extract pictures from the original training set and Images Pool to train the target neural network model, and update parameters of the target neural network model. However, as shown in fig. 9, considering that the user may maliciously feedback, i.e. feedback a large number of wrong labels, thereby causing online training errors, as shown in fig. 10, the influence of maliciously feeding back labels by the user can be reduced by restricting the proportion of samples in Images Pool in one batch (a group of samples) during training. The loss used in training is a normal cross entropy loss, and the model is generally trained on line every 1 day.
Through the embodiment, firstly, the user feedback interface can be used for collecting feedback information of the user, the user feedback information is used as a correct label, the model is updated online, the occurrence of errors again is reduced, secondly, the problem of insufficient training data can be effectively relieved by combining user feedback with transfer learning, the generalization capability of the model is improved, and furthermore, the effect of an algorithm on long tail data (sample imbalance) can be effectively improved through dynamic adjustment of sample weights, so that the recognition effect of the model is extremely low.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
According to still another aspect of the embodiment of the present invention, there is further provided an apparatus for updating a target application program based on feedback information, as shown in fig. 11, the apparatus including:
A first obtaining unit 1002, configured to obtain actual scene information input in a target application program and result feedback information corresponding to the actual scene information, where the target application program uses a target neural network model, the result feedback information is feedback information of an actual recognition result output by the target neural network model, and the actual recognition result is a predicted recognition result of the target object output by the target neural network model according to the actual scene information;
a first processing unit 1004, configured to update the target neural network model in the target application according to the actual scene information and the result feedback information;
the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used in model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of sample scene information in the different groups of sample scene information.
According to the embodiment, a target neural network model is required to be trained in advance, a pre-training neural network model suitable for identifying a target object is firstly obtained according to scene information, the pre-training neural network model can output estimated identification results of the target object according to input scene information, then a training sample set is used for carrying out model training on the pre-training neural network model to obtain the target neural network model, wherein the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information are in one-to-one correspondence with at least two groups of actual sample identification results, different groups of sample scene information correspond to different actual sample identification results of the target object, weights corresponding to the different groups of sample scene information in the model training are different, the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information, then actual scene information and result feedback information corresponding to the actual scene information can be input in a target application program using the target neural network model, the result feedback information is the actual recognition result of the target neural network according to the estimated actual neural network identification result of the target neural network; and finally, online updating the target neural network model in the target application program through the actual scene information and the result feedback information. By adopting the scheme, the weight of the loss function used in model training in different groups of sample scene information is different, so that the different groups of sample scene information can be distributed in an equalizing way, the recognition effect of the different groups of sample scene information is improved, the target neural network model in the target application program is updated through the real actual scene information and the result feedback information, training samples can be enriched, the target neural network model can be more accurate, and the recognition accuracy of the target neural network model can be improved. Under a small sample service scene, the weights of samples of different categories of the small sample are adjusted through the loss function, so that the samples of different categories of the small sample are uniformly distributed, and the effect of improving the classification and identification of the corresponding model under the small sample service scene is achieved.
As an optional technical solution, the first obtaining unit is further configured to obtain a set of information pairs from a set of information pairs, where each information pair in the set of information pairs includes actual scene information and result feedback information with a corresponding relationship, which are input in the target application program; acquiring a group of sample scene information from the training sample set, and acquiring a group of actual sample recognition results with a one-to-one correspondence with the group of sample scene information; the first processing unit is further configured to update the target neural network model in the target application program according to the set of information pairs, the set of sample scene information, and the set of actual sample recognition results.
As an optional technical solution, the first obtaining unit is further configured to obtain a first group of information pairs from the set of information pairs; the first obtaining unit is further configured to obtain a first set of sample scene information from the training sample set; wherein the first number of pairs of information in the first set of pairs of information is less than the second number of pairs of sample scene information in the first set of sample scene information; or, the ratio between the first number and the target total number is smaller than a predetermined ratio threshold, wherein the target total number is the sum of the first number and the second number.
As an optional solution, the first processing unit is: comprising the following steps: the first processing module is used for inputting the actual scene information into the target neural network model to obtain a predicted recognition result which is output by the target neural network model and corresponds to the actual scene information; the second processing module is used for inputting the estimated recognition result corresponding to the actual scene information and the result feedback information into the loss function to obtain a first loss value, wherein the loss function comprises a balance factor, and the balance factor is used for adjusting weights corresponding to different scene information in the actual scene information; and the first determining module is used for determining that the updating of the target neural network model is completed under the condition that the first loss value is smaller than or equal to a first preset threshold value, and obtaining the updated target neural network model.
As an optional solution, the first processing unit includes: the third processing module is used for inputting the actual scene information in the set of information pairs into the target neural network model to obtain a first set of estimated recognition results which are output by the target neural network model and correspond to the actual scene information in the set of information pairs; the fourth processing module is used for inputting the set of sample scene information into the target neural network model to obtain a second set of estimated recognition results which are output by the target neural network model and correspond to the set of sample scene information; a fifth processing module, configured to input the first set of estimated recognition results and the result feedback information in the set of information pairs to the loss function to obtain a second loss value, where the loss function includes a balance factor, and the balance factor is used to adjust weights corresponding to different scene information in the actual scene information; a sixth processing module, configured to input the second set of estimated recognition results and the set of actual sample recognition results to the loss function, to obtain a third loss value; the second determining module is used for determining a fourth loss value corresponding to the target neural network model according to the second loss value and the third loss value; and the third determining module is used for determining that the updating of the target neural network model is completed and obtaining the updated target neural network model under the condition that the fourth loss value is smaller than or equal to a second preset threshold value.
As an optional technical solution, the apparatus further includes: the second acquisition unit is used for acquiring the pre-training neural network model, wherein the pre-training neural network model is used for outputting a pre-estimated recognition result of the target object according to the input scene information; a third processing unit for performing model training on the pre-training neural network model by using the training sample set to obtain the target neural network model
As an optional solution, the first processing unit includes: the seventh processing module is used for inputting the at least two groups of sample scene information into the pre-training neural network model to obtain at least two groups of estimated sample recognition results corresponding to the at least two groups of sample scene information output by the pre-training neural network model; the eighth processing module is configured to input the at least two sets of estimated sample recognition results and the at least two sets of actual sample recognition results to the loss function to obtain a fifth loss value, where the loss function includes a balance factor, and the balance factor is used to adjust weights corresponding to the at least two sets of sample scene information; and the fourth determining module is used for determining that the training of the pre-training neural network model is completed under the condition that the fifth loss value is smaller than or equal to a third preset threshold value, and obtaining the target neural network model.
As an optional solution, the eighth processing module is further configured to determine the fifth loss value according to the following formula:wherein the Loss is the fifth Loss value, the number of the at least two groups of estimated sample recognition results and the at least two groups of actual sample recognition results is N, the N is a natural number, and the p k For one of the at least two sets of actual sample recognition results, q is the same as the actual sample recognition result k And (3) identifying the result of one estimated sample in at least two groups of estimated sample identification results, wherein gamma is the balance factor.
As an optional technical solution, the apparatus further includes: a ninth processing module, configured to increase the balance factor in the loss function when the fifth loss value is greater than a third preset threshold; training the pre-training neural network model by using the training sample set until the fifth loss value is smaller than or equal to the third preset threshold value, and determining that the training of the pre-training neural network model is completed, thereby obtaining the target neural network model.
As an optional technical solution, the apparatus further includes: a first determining unit, configured to determine a size of a short side of each image in the image set to be processed as a first size, to obtain a first image set; a second determining unit, configured to intercept each image in the first image set with a height being a second size and a width being a third size, to obtain a second image set, and determine the second image set as the training sample set; or, a third determining unit, configured to invert the first probability image in the second image set to obtain a third image set, and determine the third image set as the training sample set; or, a fourth determining unit, configured to rotate the second probability image in the third image set by a preset angle range to obtain a fourth image set, and determine the fourth image set as the training sample set.
As an optional technical solution, the first processing unit is further configured to update the target neural network model in the target application program according to a preset time interval.
According to still another aspect of the embodiment of the present invention, there is further provided an apparatus for updating a target application program based on feedback information, as shown in fig. 12, the apparatus including:
an input unit 1102 for inputting image information to a target application program, wherein the target application program uses a target neural network model;
a second processing unit 1104, configured to identify the image information by using the target neural network model, and obtain an image identification result, where the image identification result is a predicted identification result of the target object output by the target neural network model according to the image information;
the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
According to a further aspect of embodiments of the present invention there is also provided a storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, inputting image information to a target application program, wherein the target application program uses a target neural network model;
s2, identifying the image information through the target neural network model to obtain an image identification result, wherein the image identification result is a predicted identification result of a target object output by the target neural network model according to the image information;
the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM (Read-Only Memory), RAM (Random Access Memory ), magnetic or optical disk, and the like.
According to still another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the method for updating a target application program based on feedback information as described above, where the electronic device may be a terminal device or a server as shown in fig. 1. The present embodiment is described taking the electronic device as a server as an example. As shown in fig. 13, the electronic device comprises a memory 1202 and a processor 1204, the memory 1202 having stored therein a computer program, the processor 1204 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, inputting image information to a target application program, wherein the target application program uses a target neural network model;
S2, identifying the image information through the target neural network model to obtain an image identification result, wherein the image identification result is a predicted identification result of a target object output by the target neural network model according to the image information;
the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
Alternatively, it will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 13 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 13, or have a different configuration than shown in FIG. 13.
The memory 1202 may be used for storing software programs and modules, such as program commands/modules corresponding to the method and apparatus for updating a target application program based on feedback information in the embodiment of the present invention, and the processor 1204 executes the software programs and modules stored in the memory 1202 to perform various functional applications and data processing, that is, to implement the method for updating a target application program based on feedback information. Memory 1202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1202 may further include memory located remotely from the processor 1204, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. As an example, as shown in fig. 13, the memory 1202 may be, but not limited to, a first acquisition unit 1002, a first processing unit 1004, or the memory 1202 may be, but not limited to, an input unit 1102, a second processing unit 1104, in an update apparatus including the target application program based on the feedback information, or an image recognition apparatus including the target application program based on the target application program. In addition, other module units in the updating device of the target application program based on the feedback information may be included, but not limited to, or other module units in the image recognition device of the target application program based on the feedback information may be included, but not limited to, which are not described in detail in this example.
Optionally, the transmission device 1206 is configured to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission means 1206 comprises a network adapter (Network Interface Controller, NIC) that can be connected to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 1206 is a Radio Frequency (RF) module for communicating wirelessly with the internet.
In addition, the electronic device further includes: a connection bus 1208 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, the nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, etc., may become a node in the blockchain system by joining the Peer-To-Peer network.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several commands for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to execute all or part of the steps of the above-described method of the various embodiments of the present invention.
Alternatively, in this embodiment, the computer software product or software product may perform the following steps:
s1, inputting image information to a target application program, wherein the target application program uses a target neural network model;
s2, identifying the image information through the target neural network model to obtain an image identification result, wherein the image identification result is a predicted identification result of a target object output by the target neural network model according to the image information;
the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the above, is merely a logical function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, and such changes and modifications are intended to be included within the scope of the invention.

Claims (26)

1. A method for updating a target application based on feedback information, comprising:
acquiring a group of information pairs from an information pair set, wherein each information pair in the information pair set comprises actual scene information with a corresponding relation and result feedback information which are input in the target application program, wherein the target application program uses a target neural network model, the result feedback information is feedback information of an actual recognition result output by the target neural network model, and the actual recognition result is a predicted recognition result of the target object output by the target neural network model according to the actual scene information;
Updating the target neural network model in the target application program according to the actual scene information and the result feedback information;
the target neural network model is a network model obtained by training a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, the weight corresponding to a loss function used in model training in the different groups of sample scene information is different, and the weight corresponding to the different groups of sample scene information is in negative correlation with the number of sample scene information in the different groups of sample scene information.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the updating the target neural network model in the target application program according to the actual scene information and the result feedback information comprises the following steps: after a set of sample scene information is obtained from the training sample set and a set of actual sample recognition results with a one-to-one correspondence to the set of sample scene information is obtained, updating the target neural network model in the target application program according to the set of information pairs, the set of sample scene information and the set of actual sample recognition results.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the obtaining a group of information pairs from the information pair set includes: acquiring a first group of information pairs from the information pair set;
the obtaining a set of sample scene information from the training sample set includes: acquiring a first group of sample scene information from the training sample set;
wherein a first number of pairs of information in the first set of pairs of information is less than a second number of sample scene information in the first set of sample scene information; alternatively, the ratio between the first number and a target total is less than a predetermined ratio threshold, wherein the target total is a sum of the first number and the second number.
4. The method of claim 1, wherein updating the target neural network model in the target application based on the actual scene information and the resultant feedback information comprises:
inputting the actual scene information into the target neural network model to obtain a pre-estimated recognition result which is output by the target neural network model and corresponds to the actual scene information;
inputting the estimated recognition result corresponding to the actual scene information and the result feedback information into the loss function to obtain a first loss value, wherein the loss function comprises a balance factor, and the balance factor is used for adjusting weights corresponding to different scene information in the actual scene information;
And under the condition that the first loss value is smaller than or equal to a first preset threshold value, determining that the updating of the target neural network model is completed, and obtaining the updated target neural network model.
5. The method of claim 2, wherein updating the target neural network model in the target application based on the set of information pairs, the set of sample scene information, and the set of actual sample recognition results comprises:
inputting the actual scene information in the set of information pairs into the target neural network model to obtain a first set of estimated recognition results corresponding to the actual scene information in the set of information pairs, which are output by the target neural network model;
inputting the set of sample scene information into the target neural network model to obtain a second set of estimated recognition results which are output by the target neural network model and correspond to the set of sample scene information;
inputting the first set of estimated recognition results and the result feedback information in the set of information pairs into the loss function to obtain a second loss value, wherein the loss function comprises balance factors, and the balance factors are used for adjusting weights corresponding to different scene information in the actual scene information;
Inputting the second set of estimated recognition results and the set of actual sample recognition results into the loss function to obtain a third loss value;
determining a fourth loss value corresponding to the target neural network model according to the second loss value and the third loss value;
and under the condition that the fourth loss value is smaller than or equal to a second preset threshold value, determining that the updating of the target neural network model is completed, and obtaining the updated target neural network model.
6. The method according to claim 1, wherein the method further comprises:
the pre-training neural network model is obtained, wherein the pre-training neural network model is used for outputting a pre-estimated recognition result of a target object according to input scene information;
and performing model training on the pre-training neural network model by using the training sample set to obtain the target neural network model.
7. The method of claim 6, wherein model training the pre-trained neural network model using a set of training samples to obtain a target neural network model, comprising:
inputting the at least two groups of sample scene information into the pre-training neural network model to obtain at least two groups of estimated sample recognition results corresponding to the at least two groups of sample scene information output by the pre-training neural network model;
Inputting the at least two groups of estimated sample recognition results and the at least two groups of actual sample recognition results into the loss function to obtain a fifth loss value, wherein the loss function comprises balance factors, and the balance factors are used for adjusting weights corresponding to the at least two groups of sample scene information;
and under the condition that the fifth loss value is smaller than or equal to a third preset threshold value, determining that training of the pre-training neural network model is completed, and obtaining the target neural network model.
8. The method of claim 7, wherein inputting the at least two sets of pre-estimated sample recognition results and the at least two sets of actual sample recognition results to the loss function yields a fifth loss value, comprising:
determining the fifth loss value according to the following formula:
wherein the Loss is the fifth Loss value, the number of the at least two groups of estimated sample recognition results and the at least two groups of actual sample recognition results is N, the N is a natural number, and the p k For one of the at least two sets of actual sample recognition results, q k And (3) predicting a sample recognition result for one of at least two groups of predicted sample recognition results, wherein gamma is the balance factor.
9. The method of claim 7, wherein in the event that the fifth loss value is greater than a third preset threshold, the method further comprises:
increasing the balance factor in the loss function;
training the pre-training neural network model by using the training sample set until the fifth loss value is smaller than or equal to the third preset threshold value, and determining that the training of the pre-training neural network model is completed, so as to obtain the target neural network model.
10. The method according to any one of claims 1 to 9, wherein before model training the pre-trained neural network model using the set of training samples to obtain a target neural network model, the method further comprises:
determining the size of the short side of each image in the image set to be processed as a first size to obtain a first image set;
intercepting each image in the first image set by taking the height as a second size and the width as a third size to obtain a second image set, and determining the second image set as the training sample set; or alternatively
Turning over the first probability image in the second image set to obtain a third image set, and determining the third image set as the training sample set; or alternatively
And rotating the image with the second probability in the third image set in a preset angle range to obtain a fourth image set, and determining the fourth image set as the training sample set.
11. The method according to any one of claims 1 to 9, wherein said updating the target neural network model in the target application program comprises:
and updating the target neural network model in the target application program according to a preset time interval.
12. An image recognition method based on a target application program, comprising:
inputting image information to a target application program, wherein the target application program uses a target neural network model, the target neural network model is updated according to actual scene information and result feedback information, the actual scene information and the result feedback information come from an information pair set, and each information pair in the information pair set comprises the actual scene information and the result feedback information which are input in the target application program and have a corresponding relation;
identifying the image information through the target neural network model to obtain an image identification result, wherein the image identification result is a predicted identification result of a target object output by the target neural network model according to the image information;
The target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
13. An apparatus for updating a target application based on feedback information, comprising:
a first obtaining unit, configured to obtain a set of information pairs from a set of information pairs, where each information pair in the set of information pairs includes actual scene information and result feedback information that are input in the target application program and have a corresponding relationship, where the target application program uses a target neural network model, and the result feedback information is feedback information of an actual recognition result output by the target neural network model, where the actual recognition result is a predicted recognition result of the target object output by the target neural network model according to the actual scene information;
The first processing unit is used for updating the target neural network model in the target application program according to the actual scene information and the result feedback information;
the target neural network model is a network model obtained by training a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, the weight corresponding to a loss function used in model training in the different groups of sample scene information is different, and the weight corresponding to the different groups of sample scene information is in negative correlation with the number of sample scene information in the different groups of sample scene information.
14. The apparatus of claim 13, wherein the device comprises a plurality of sensors,
the first processing unit is further configured to update the target neural network model in the target application program according to the set of information pairs, the set of sample scene information and the set of actual sample recognition results after acquiring a set of sample scene information from the training sample set and acquiring a set of actual sample recognition results having a one-to-one correspondence with the set of sample scene information.
15. The apparatus of claim 14, wherein the device comprises a plurality of sensors,
the first acquisition unit is further used for acquiring a first group of information pairs from the information pair set; acquiring a first group of sample scene information from the training sample set; wherein a first number of pairs of information in the first set of pairs of information is less than a second number of sample scene information in the first set of sample scene information; alternatively, the ratio between the first number and a target total is less than a predetermined ratio threshold, wherein the target total is a sum of the first number and the second number.
16. The apparatus of claim 13, wherein the device comprises a plurality of sensors,
the first processing unit includes: the first processing module is used for inputting the actual scene information into the target neural network model to obtain a predicted recognition result which is output by the target neural network model and corresponds to the actual scene information; the second processing module is used for inputting the estimated recognition result corresponding to the actual scene information and the result feedback information into the loss function to obtain a first loss value, wherein the loss function comprises a balance factor, and the balance factor is used for adjusting weights corresponding to different scene information in the actual scene information; and the first determining module is used for determining that the target neural network model is updated under the condition that the first loss value is smaller than or equal to a first preset threshold value, and obtaining the updated target neural network model.
17. The apparatus of claim 14, wherein the device comprises a plurality of sensors,
the first processing unit includes: the third processing module is used for inputting the actual scene information in the group of information pairs into the target neural network model to obtain a first group of estimated recognition results which are output by the target neural network model and correspond to the actual scene information in the group of information pairs; the fourth processing module is used for inputting the set of sample scene information into the target neural network model to obtain a second set of estimated recognition results which are output by the target neural network model and correspond to the set of sample scene information; a fifth processing module, configured to input the first set of estimated recognition results and the result feedback information in the set of information pairs to the loss function, to obtain a second loss value, where the loss function includes a balance factor, and the balance factor is used to adjust weights corresponding to different scene information in the actual scene information; the sixth processing module is used for inputting the second group of estimated recognition results and the group of actual sample recognition results into the loss function to obtain a third loss value; the second determining module is used for determining a fourth loss value corresponding to the target neural network model according to the second loss value and the third loss value; and the third determining module is used for determining that the updating of the target neural network model is completed and obtaining the updated target neural network model under the condition that the fourth loss value is smaller than or equal to a second preset threshold value.
18. The apparatus of claim 13, wherein the apparatus further comprises:
the second acquisition unit is used for acquiring the pre-training neural network model, wherein the pre-training neural network model is used for outputting a pre-estimated recognition result of the target object according to the input scene information; and the third processing unit is used for carrying out model training on the pre-training neural network model by using the training sample set to obtain the target neural network model.
19. The apparatus of claim 18, wherein the device comprises a plurality of sensors,
the first processing unit includes: a seventh processing module, configured to input the at least two sets of sample scene information to the pre-training neural network model, and obtain at least two sets of estimated sample recognition results corresponding to the at least two sets of sample scene information output by the pre-training neural network model; an eighth processing module, configured to input the at least two sets of estimated sample recognition results and the at least two sets of actual sample recognition results to the loss function, to obtain a fifth loss value, where the loss function includes a balance factor, and the balance factor is used to adjust weights corresponding to the at least two sets of sample scene information; and the fourth determining module is used for determining that the training of the pre-training neural network model is completed and obtaining the target neural network model under the condition that the fifth loss value is smaller than or equal to a third preset threshold value.
20. The apparatus of claim 19, wherein the eighth processing module is further configured to determine the fifth loss value according to the following equation:
wherein the Loss is the fifth Loss value, the number of the at least two groups of estimated sample recognition results and the at least two groups of actual sample recognition results is N, the N is a natural number, and the p k For one of the at least two sets of actual sample recognition results, q k And (3) predicting a sample recognition result for one of at least two groups of predicted sample recognition results, wherein gamma is the balance factor.
21. The apparatus of claim 19, wherein the apparatus further comprises:
a ninth processing module, configured to increase the balance factor in the loss function when the fifth loss value is greater than a third preset threshold; training the pre-training neural network model by using the training sample set until the fifth loss value is smaller than or equal to the third preset threshold value, and determining that the training of the pre-training neural network model is completed, so as to obtain the target neural network model.
22. The apparatus according to any one of claims 13 to 21, further comprising:
A first determining unit, configured to determine a size of a short side of each image in the image set to be processed as a first size, to obtain a first image set; a second determining unit, configured to intercept each image in the first image set with a height being a second size and a width being a third size, to obtain a second image set, and determine the second image set as the training sample set; or, a third determining unit, configured to invert the first probability image in the second image set to obtain a third image set, and determine the third image set as the training sample set; or a fourth determining unit, configured to rotate the image with the second probability in the third image set in a preset angle range to obtain a fourth image set, and determine the fourth image set as the training sample set.
23. The device according to any one of claims 13 to 21, wherein,
the first processing unit is further configured to update the target neural network model in the target application program according to a preset time interval.
24. An image recognition apparatus based on a target application program, comprising:
An input unit configured to input image information to a target application program, where the target application program uses a target neural network model, the target neural network model is updated according to actual scene information and result feedback information, the actual scene information and the result feedback information are from an information pair set, and each information pair in the information pair set includes the actual scene information and the result feedback information that have a correspondence and are input in the target application program;
the second processing unit is used for identifying the image information through the target neural network model to obtain an image identification result, wherein the image identification result is a predicted identification result of a target object output by the target neural network model according to the image information; the target neural network model is a network model obtained by model training of a pre-training neural network model by using a training sample set, wherein the pre-training neural network model is used for outputting a predicted recognition result of a target object according to input scene information, the training sample set is a set obtained by preprocessing an image set to be processed, the training sample set comprises at least two groups of sample scene information, the at least two groups of sample scene information and the at least two groups of actual sample recognition results have a one-to-one correspondence, different groups of sample scene information correspond to different actual sample recognition results of the target object, weights corresponding to a loss function used during model training in the different groups of sample scene information are different, and the weights corresponding to the different groups of sample scene information are in negative correlation with the number of the sample scene information in the different groups of sample scene information.
25. A computer readable storage medium comprising a stored program, wherein the program when run performs the method of any one of claims 1 to 11, or claim 12.
26. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of the claims 1 to 11, or of claim 12, by means of the computer program.
CN202010784873.1A 2020-08-06 2020-08-06 Method and device for updating target application program based on feedback information Active CN112748941B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010784873.1A CN112748941B (en) 2020-08-06 2020-08-06 Method and device for updating target application program based on feedback information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010784873.1A CN112748941B (en) 2020-08-06 2020-08-06 Method and device for updating target application program based on feedback information

Publications (2)

Publication Number Publication Date
CN112748941A CN112748941A (en) 2021-05-04
CN112748941B true CN112748941B (en) 2023-12-12

Family

ID=75645358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010784873.1A Active CN112748941B (en) 2020-08-06 2020-08-06 Method and device for updating target application program based on feedback information

Country Status (1)

Country Link
CN (1) CN112748941B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113902898A (en) * 2021-09-29 2022-01-07 北京百度网讯科技有限公司 Training of target detection model, target detection method, device, equipment and medium
WO2023105277A1 (en) * 2021-12-09 2023-06-15 Sensetime International Pte. Ltd. Data sampling method and apparatus, and storage medium
CN115408031B (en) * 2022-09-29 2023-09-05 北京亚控科技发展有限公司 Application updating method and related equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548210A (en) * 2016-10-31 2017-03-29 腾讯科技(深圳)有限公司 Machine learning model training method and device
CN106610970A (en) * 2015-10-21 2017-05-03 上海文广互动电视有限公司 Collaborative filtering-based content recommendation system and method
WO2019062413A1 (en) * 2017-09-30 2019-04-04 Oppo广东移动通信有限公司 Method and apparatus for managing and controlling application program, storage medium, and electronic device
CN110033332A (en) * 2019-04-23 2019-07-19 杭州智趣智能信息技术有限公司 A kind of face identification method, system and electronic equipment and storage medium
CN110827253A (en) * 2019-10-30 2020-02-21 北京达佳互联信息技术有限公司 Training method and device of target detection model and electronic equipment
CN110866140A (en) * 2019-11-26 2020-03-06 腾讯科技(深圳)有限公司 Image feature extraction model training method, image searching method and computer equipment
CN110991652A (en) * 2019-12-02 2020-04-10 北京迈格威科技有限公司 Neural network model training method and device and electronic equipment
CN111062495A (en) * 2019-11-28 2020-04-24 深圳市华尊科技股份有限公司 Machine learning method and related device
CN111177507A (en) * 2019-12-31 2020-05-19 支付宝(杭州)信息技术有限公司 Method and device for processing multi-label service

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106610970A (en) * 2015-10-21 2017-05-03 上海文广互动电视有限公司 Collaborative filtering-based content recommendation system and method
CN106548210A (en) * 2016-10-31 2017-03-29 腾讯科技(深圳)有限公司 Machine learning model training method and device
WO2019062413A1 (en) * 2017-09-30 2019-04-04 Oppo广东移动通信有限公司 Method and apparatus for managing and controlling application program, storage medium, and electronic device
CN110033332A (en) * 2019-04-23 2019-07-19 杭州智趣智能信息技术有限公司 A kind of face identification method, system and electronic equipment and storage medium
CN110827253A (en) * 2019-10-30 2020-02-21 北京达佳互联信息技术有限公司 Training method and device of target detection model and electronic equipment
CN110866140A (en) * 2019-11-26 2020-03-06 腾讯科技(深圳)有限公司 Image feature extraction model training method, image searching method and computer equipment
CN111062495A (en) * 2019-11-28 2020-04-24 深圳市华尊科技股份有限公司 Machine learning method and related device
CN110991652A (en) * 2019-12-02 2020-04-10 北京迈格威科技有限公司 Neural network model training method and device and electronic equipment
CN111177507A (en) * 2019-12-31 2020-05-19 支付宝(杭州)信息技术有限公司 Method and device for processing multi-label service

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Confusion Weighted Loss for Ambiguous Classification;Yu Lei 等;《2018 IEEE Visual Communications and Image Processing》;1-4 *
基于深度学习的个性化草图检索系统的研究与实现;霍启明;《中国优秀硕士学位论文全文数据库 信息科技辑》;I138-911 *

Also Published As

Publication number Publication date
CN112748941A (en) 2021-05-04

Similar Documents

Publication Publication Date Title
CN112748941B (en) Method and device for updating target application program based on feedback information
Yan et al. Automatic virtual network embedding: A deep reinforcement learning approach with graph convolutional networks
CN110263921A (en) A kind of training method and device of federation's learning model
US20200065673A1 (en) Pre-training system for self-learning agent in virtualized environment
CN111523621A (en) Image recognition method and device, computer equipment and storage medium
Li et al. Online federated multitask learning
CN107463958A (en) Insect identifies method for early warning and system
CN110349082A (en) Method of cutting out and device, the storage medium and electronic device of image-region
US20220237917A1 (en) Video comparison method and apparatus, computer device, and storage medium
CN114331829A (en) Countermeasure sample generation method, device, equipment and readable storage medium
CN110321956B (en) Grass pest control method and device based on artificial intelligence
CN113807399A (en) Neural network training method, neural network detection method and neural network detection device
CN109086653A (en) Handwriting model training method, hand-written character recognizing method, device, equipment and medium
US20200394448A1 (en) Methods for more effectively moderating one or more images and devices thereof
CN115761529B (en) Image processing method and electronic device
CN109615058A (en) A kind of training method of neural network model
CN113987236B (en) Unsupervised training method and unsupervised training device for visual retrieval model based on graph convolution network
CN115344883A (en) Personalized federal learning method and device for processing unbalanced data
CN108197594A (en) The method and apparatus for determining pupil position
CN112087444B (en) Account identification method and device, storage medium and electronic equipment
CN106529456A (en) Information matching and information transmitting/receiving method, device and target object finding system
CN110795558B (en) Label acquisition method and device, storage medium and electronic device
CN115580450A (en) Method and device for detecting flow, electronic equipment and computer readable storage medium
CN112819152B (en) Neural network training method and device
CN110866866B (en) Image color imitation processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40043852

Country of ref document: HK

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