Image processing method, device, storage medium and processor
By using dynamic supervised learning and alternating between hard and soft label training modes, the training model on mixed datasets is optimized, which solves the problem of poor model recognition performance under static supervision and achieves higher recall and accuracy.
Patent Information
- Application Number
- CN202110171596.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-08
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-02-08
AI Technical Summary
During training on mixed datasets, existing technologies using static supervision methods struggle to simultaneously achieve high recall and high accuracy in models generated from mixed datasets.
By acquiring multiple categories in the target image and utilizing the anomaly feedback from the pre-defined model, a mixed dataset is obtained for dynamic supervised learning to generate a target detection model. The model is trained using alternating hard and soft label modes to optimize the quality of the supervision information and gradually improve the model's recall and accuracy.
It improves the recognition performance of the target detection model, increases the recall and accuracy of the recognition results, and solves the problem of poor model recognition performance under static supervision.
Smart Images

Figure CN114913387B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and more specifically, to an image processing method, apparatus, storage medium, and processor. Background Technology
[0002] General object detection algorithms employ supervised learning, where each labeled dataset defines the capability boundary of the trained detection model. If you want to enhance the detection capability for unlabeled categories in the original dataset, relabeling the original dataset is an option, but this is time-consuming and labor-intensive, and these costs increase with frequent changes in requirements. Therefore, hybrid dataset training has become an increasingly popular choice. This involves combining multiple differently labeled datasets during training to obtain the detection capability for all categories contained in those datasets. This approach eliminates the need to relabel any datasets, allowing for flexible combinations of existing datasets, making it an economical and feasible solution.
[0003] During training on mixed datasets, object detection faces the challenge of sampling positive and negative samples. Therefore, it's necessary to generate corresponding supervisory information for the missing annotations in each dataset to prevent a decrease in the model's sensitivity to targets of interest. Existing methods employ static supervision, which generates supervisory information based on the detection results of a single model, making it difficult to simultaneously achieve high recall and high accuracy.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides an image processing method, apparatus, storage medium, and processor to at least solve the technical problem in the prior art where static supervision is used to generate models during mixed dataset training, resulting in poor recognition performance of the models.
[0006] According to one aspect of the present invention, an image processing method is provided, comprising: acquiring a target image, wherein the target image includes multiple categories to be identified; using a preset model to identify the target image; if a recognition anomaly feedback is received from the preset model, acquiring a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; performing dynamic supervised learning through the mixed data set to generate a target detection model; and using the target detection model to identify the target image to obtain a recognition result.
[0007] Furthermore, the hybrid dataset includes multiple datasets, each containing different annotation information. Dynamic supervised learning is performed using the hybrid dataset to generate an object detection model, including: supplementing the annotation information in each dataset based on the annotation information in the multiple datasets to obtain a first dataset set; training the model based on the first dataset set to obtain a first detection model; supplementing the annotation information in each dataset using the first detection model to obtain a second dataset set; and training the model based on the second dataset set to obtain an object detection model.
[0008] Furthermore, the first detection model is obtained by learning and training based on the first dataset set, including: learning and training the first dataset set using a hard-label training mode; the object detection model is obtained by learning and training based on the second dataset set, including: learning and training the second dataset set using a soft-label training mode.
[0009] Furthermore, the second dataset is trained using a soft-label training mode to obtain the object detection model, which includes: training the second dataset using a soft-label training mode to obtain the second detection model; filtering the labeled information in each dataset using the second detection model to obtain the third dataset; and training the third dataset to obtain the object detection model.
[0010] Furthermore, the multiple datasets include: a first dataset and a second dataset, wherein the first dataset and the second dataset contain different annotation information. The annotation information in each dataset is supplemented based on the annotation information in the multiple datasets to obtain the first dataset set, including: learning and training based on the first dataset to obtain detection model one; learning and training based on the second dataset to obtain detection model two; using detection model one to identify the second dataset to supplement the annotation information in the second dataset; using detection model two to identify the first dataset to supplement the annotation information in the first dataset; and using the first dataset with supplemented annotation information and the second dataset with supplemented annotation information as the first dataset set.
[0011] Furthermore, the method also includes: training the first dataset after supplementing the annotation information using a hard-label training mode to obtain detection model three; training the second dataset after supplementing the annotation information using a hard-label training mode to obtain detection model four; identifying the second dataset based on detection model three to supplement the annotation information in the second dataset again; identifying the first dataset based on detection model four to supplement the annotation information in the first dataset again; and using the first dataset after supplementing the annotation information again and the second dataset after supplementing the annotation information again as the second dataset set.
[0012] Furthermore, the method also includes: training the first dataset after re-annotation using a soft-label training mode to obtain detection model five; training the second dataset after re-annotation using a soft-label training mode to obtain detection model six; using detection model five to identify the annotation information in the second dataset to filter the annotation information in the second dataset; using detection model six to identify the annotation information in the first dataset to filter the annotation information in the first dataset; and using the first dataset after filtering the annotation information and the second dataset after filtering the annotation information as a third dataset set.
[0013] Furthermore, the recognition anomaly feedback indicates that the recognition of the target image has failed.
[0014] According to another aspect of the present invention, an image processing method is also provided, comprising: receiving a service call request sent by a client, wherein the service call request carries a target image, wherein the target image includes multiple categories to be identified; responding to the service call request, performing recognition of the target image in a server using a preset model; if receiving recognition anomaly feedback output by the preset model, acquiring a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; performing dynamic supervised learning through the mixed data set to generate a target detection model; performing recognition of the target image through the target detection model to obtain a recognition result; and outputting the recognition result of the target image.
[0015] According to another aspect of the present invention, an image processing method is also provided, comprising: acquiring multiple frames of target images from a playing video, wherein the target images include multiple categories to be identified; identifying the target images using a preset model; identifying the target images using the preset model, and if receiving identification anomaly feedback from the preset model, obtaining a mixed data set, wherein the mixed data set includes a dataset of labeled categories to be identified in the target images; performing dynamic supervised learning based on the mixed data set to generate a target detection model; and identifying the target images using the target detection model to obtain a recognition result.
[0016] According to another aspect of the present invention, an image processing apparatus is also provided, comprising: a first acquisition unit, configured to acquire a target image, wherein the target image includes multiple categories to be identified; a second acquisition unit, configured to identify the target image using a preset model, and if a recognition anomaly feedback is received from the preset model, to acquire a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; a first generation unit, configured to perform dynamic supervised learning through the mixed data set to generate a target detection model; and a first recognition unit, configured to recognize the target image through the target detection model to obtain a recognition result.
[0017] Furthermore, the hybrid dataset includes multiple datasets, each containing different annotation information. The first generation unit further includes: a first supplementary subunit, used to supplement the annotation information in each dataset based on the annotation information in the multiple datasets to obtain a first dataset set; a first training subunit, used to learn and train based on the first dataset set to obtain a first detection model; a second supplementary subunit, used to supplement the annotation information in each dataset using the first detection model to obtain a second dataset set; and a second training subunit, used to learn and train based on the second dataset set to obtain an object detection model.
[0018] Furthermore, the first training subunit also includes: a first training module, used to learn and train the first dataset set using a hard-label training mode to obtain a first detection model; the second training subunit also includes: a second training module, used to learn and train the second dataset set using a soft-label training mode to obtain an object detection model.
[0019] Furthermore, the second training module also includes: a first training submodule, used to learn and train the second dataset set using a soft-label training mode to obtain a second detection model; a first filtering submodule, used to filter the labeled information in each dataset through the second detection model to obtain a third dataset set; and a second training submodule, used to learn and train the third dataset set to obtain an object detection model.
[0020] Furthermore, the multiple datasets include: a first dataset and a second dataset, wherein the first dataset and the second dataset contain different annotation information. The first supplementary subunit also includes: a third training module, used for learning and training based on the first dataset to obtain detection model one; a fourth training module, used for learning and training based on the second dataset to obtain detection model two; a first recognition module, used for recognizing the second dataset based on detection model one to supplement the annotation information in the second dataset; a second recognition module, used for recognizing the first dataset based on detection model two to supplement the annotation information in the first dataset; and a first acquisition module, used to take the first dataset with supplemented annotation information and the second dataset with supplemented annotation information as the first dataset set.
[0021] Furthermore, the device also includes: a first training unit, used to train the first dataset after supplementing the annotation information using a hard-label training mode to obtain detection model three; a second training unit, used to train the second dataset after supplementing the annotation information using a hard-label training mode to obtain detection model four; a second recognition unit, used to recognize the second dataset based on detection model three to further supplement the annotation information in the second dataset; a third recognition unit, used to recognize the first dataset based on detection model four to further supplement the annotation information in the first dataset; and a second acquisition unit, used to take the first dataset after further annotation and the second dataset after further supplementing the annotation information as a second dataset set.
[0022] Furthermore, the device also includes: a third training unit, used to train the first dataset after re-annotation using a soft-label training mode to obtain detection model five; a fourth training unit, used to train the second dataset after re-annotation using a soft-label training mode to obtain detection model six; a fourth recognition unit, used to recognize the annotation information in the second dataset using detection model five to filter the annotation information in the second dataset; a fifth recognition unit, used to recognize the annotation information in the first dataset using detection model six to filter the annotation information in the first dataset; and a third acquisition unit, used to combine the first dataset after filtering the annotation information and the second dataset after filtering the annotation information into a third dataset set.
[0023] According to another aspect of the present invention, an image processing apparatus is also provided, comprising: a first receiving unit, configured to receive a service call request sent by a client, wherein the service call request carries a target image, wherein the target image includes multiple categories to be identified; a first responding unit, configured to respond to the service call request, perform recognition of the target image in a server using a preset model, and if a recognition anomaly feedback is received from the preset model, acquire a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; perform dynamic supervised learning through the mixed data set to generate a target detection model; perform recognition of the target image through the target detection model to obtain a recognition result; and a first output unit, configured to output the recognition result of the target image.
[0024] According to another aspect of the present invention, an image processing apparatus is also provided, comprising: a first acquisition unit, configured to acquire multiple frames of target images from a playing video, wherein the target images include multiple categories to be identified; a sixth recognition unit, configured to recognize the target images using a preset model; a fourth acquisition unit, configured to recognize the target images using the preset model, and if receiving recognition anomaly feedback output by the preset model, acquire a mixed data set, wherein the mixed data set includes a dataset of categories to be identified labeled in the target images; a second generation unit, configured to perform dynamic supervised learning based on the mixed data set to generate a target detection model; and a seventh recognition unit, configured to recognize the target images using the target detection model to obtain recognition results.
[0025] According to another aspect of the present invention, a storage medium is also provided, the storage medium including a stored program, wherein the program controls the device where the storage medium is located to execute any of the above-described image processing methods when it is running.
[0026] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, executes any of the above-described image processing methods.
[0027] In this embodiment of the invention, a dynamic supervised learning approach using a hybrid dataset is employed. This involves acquiring a target image, which includes multiple categories to be identified; using a preset model to identify the target image; if an anomaly feedback is received from the preset model, a hybrid dataset is acquired, which includes a dataset labeled with the categories to be identified in the target image; dynamic supervised learning is performed on the hybrid dataset to generate a target detection model; and the target image is identified using the target detection model to obtain the identification result. This achieves the goal of improving the recall and accuracy of the target detection model, thus realizing the technical effect of improving the identification result by using a target detection model to identify target images. Furthermore, it solves the technical problem in the prior art where static supervision is used to generate the model during the training process of a hybrid dataset, resulting in poor model recognition performance. Attached Figure Description
[0028] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0029] Figure 1 This is a hardware structure block diagram of a computer terminal according to an embodiment of the present invention;
[0030] Figure 2 This is a flowchart of an image processing method provided according to Embodiment 1 of the present invention;
[0031] Figure 3 This is a flowchart of the image processing method provided in Embodiment 2 of the present invention;
[0032] Figure 4 This is a flowchart of the image processing method provided in Embodiment 3 of the present invention;
[0033] Figure 5 This is a schematic diagram of an image processing apparatus provided according to Embodiment 4 of the present invention;
[0034] Figure 6 This is a schematic diagram of an image processing apparatus provided according to Embodiment 5 of the present invention;
[0035] Figure 7 This is a schematic diagram of an image processing apparatus provided according to Embodiment Six of the present invention; and
[0036] Figure 8 This is a structural block diagram of an optional computer terminal according to an embodiment of the present invention. Detailed Implementation
[0037] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0039] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0040] Object detection is a branch of computer science closely related to computer vision and image processing. Its goal is to detect specific semantic target entities in digital images and videos, such as people, buildings, and cars, and output a bounding box that tightly encloses the target entity. Object detection has applications in many computer vision fields, such as image retrieval, video object detection, and video surveillance.
[0041] Deep Learning: Deep learning is a branch of machine learning that attempts to use algorithms that employ complex structures or multiple processing layers composed of multiple nonlinear transformations to perform high-level abstractions of data. Deep learning is a representation learning method within machine learning. Observations (such as an image) can be represented in various ways, such as a vector of intensity values for each pixel, or more abstractly as a series of edges, regions of a specific shape, etc. Using certain specific representations makes it easier to learn tasks from instances. The advantage of deep learning is that it replaces manual feature acquisition with efficient algorithms for unsupervised or semi-supervised feature learning and hierarchical feature extraction.
[0042] Supervised learning is a method of machine learning that learns or builds a pattern (function / learning model) from training data and uses this pattern to predict new instances. Training data consists of inputs (usually vectors) and expected outputs. The output of the function can be a continuous value (called regression analysis) or predict a classification label (called classification). A supervised learner's task is to predict the function's output for any possible input after observing some pre-labeled training examples (inputs and expected outputs). To achieve this, the learner must generalize from the existing data to unobserved situations in a "reasonable" way.
[0043] Cross-dataset training: For supervised learning tasks, "data-driven" is a key characteristic. However, each labeled dataset defines the capability boundary of the trained model. For example, a model trained on a dataset labeled for people and cars cannot recognize the animal category of dogs. When it is necessary to expand this capability boundary, training can be performed on multiple datasets with different labels to achieve this goal. Cross-dataset training refers to a training method that uses multiple datasets with different labels together to obtain a larger capability boundary.
[0044] Example 1
[0045] According to an embodiment of the present invention, an image processing method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0046] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing an image processing method is shown. Figure 1As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0047] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0048] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the image processing method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the image processing method of the aforementioned application. The memory 104 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 instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0049] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0050] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0051] Under the aforementioned operating environment, this application provides the following: Figure 2 The image processing method shown. Figure 2 This is a flowchart of an image processing method according to Embodiment 1 of the present invention, including the following steps:
[0052] Step S201: Obtain the target image, wherein the target image includes multiple categories to be identified.
[0053] For example, the acquired target image may include categories such as cars, cats, dogs, and monkeys, which need to be identified. The categories to be identified can be considered as object detection.
[0054] Step S202: Use a preset model to identify the target image. If an abnormal identification feedback is received from the preset model, obtain a mixed data set, which includes a dataset of the categories to be identified in the labeled target image.
[0055] The aforementioned preset model may be a model trained using datasets labeled with human and vehicle categories. Therefore, this preset model cannot identify cats, dogs, or monkeys in the target image. This leads to the preset model failing to identify the category to be identified in the target image. In this case, this application obtains datasets labeled with human and vehicle categories, as well as datasets labeled with cat, dog, and monkey categories, as the aforementioned hybrid dataset. Using this hybrid dataset avoids relabeling the original datasets, as relabeling is time-consuming and labor-intensive, and these costs will increase with frequent changes in requirements.
[0056] The recognition anomaly feedback output by the aforementioned preset model is used to indicate that the recognition of the target image has failed.
[0057] Step S203: Dynamic supervised learning is performed using a hybrid dataset to generate an object detection model.
[0058] This application employs a dynamic supervision method, which continuously optimizes the quality of supervision information by generating and updating it multiple times, thereby gradually improving the recall and accuracy of the supervision information and thus obtaining a better target detection model.
[0059] Step S204: The target image is identified using the target detection model to obtain the identification result.
[0060] The object detection model obtained through the aforementioned dynamically supervised deep learning can be used to identify target images, such as cars, cats, dogs, and monkeys. Furthermore, since the object detection model is obtained through dynamically supervised learning, using it to identify target images can improve the recall and accuracy of the recognition results.
[0061] Optionally, in the image processing method according to Embodiment 1 of the present invention, the hybrid dataset includes multiple datasets, each dataset containing different annotation information. Dynamic supervised learning is performed using the hybrid dataset to generate a target detection model, comprising: supplementing the annotation information in each dataset based on the annotation information in the multiple datasets to obtain a first dataset set; training the model based on the first dataset set to obtain a first detection model; supplementing the annotation information in each dataset using the first detection model to obtain a second dataset set; and training the model based on the second dataset set to obtain a target detection model.
[0062] For example, in the aforementioned datasets, dataset A includes annotations for a1, a2, and a3, and dataset B includes annotations for b1, b2, and b3. Based on the annotations for a1, a2, and a3 in dataset A and b1, b2, and b3 in dataset B, we annotate the possible b1, b2, and b3 in dataset A, and annotate the possible a1, a2, and a3 in dataset B, thus obtaining supplemented datasets A and B. The process of supplementing the annotations can be as follows: we use dataset A with annotations for a1, a2, and a3 to train a model A, and then use model A to identify dataset B, recognizing either a1, a2, or a3 in dataset B, thereby supplementing the dataset B with either a1, a2, or a3. A dataset B containing labeled information (b1, b2, b3) is used for training to obtain model B. Model B is then used to identify dataset A, recognizing either b1, b2, or b3, thus supplementing the data with the previously included b1, b2, or b3. The supplemented dataset A and dataset B form the first dataset set. A first detection model is obtained by training on this first dataset set. The first detection model is then used to supplement the labeled information in each dataset to obtain a second dataset set. Finally, a second dataset set is used for training to obtain the object detection model. By repeatedly generating and updating supervisory information, the quality of the supervisory information is continuously optimized, gradually improving the recall and accuracy of the supervisory information, thereby obtaining a better object detection model.
[0063] Optionally, in the image processing method according to Embodiment 1 of the present invention, learning and training based on a first dataset to obtain a first detection model includes: learning and training the first dataset using a hard-label training mode to obtain a first detection model; learning and training based on a second dataset to obtain a target detection model includes: learning and training the second dataset using a soft-label training mode to obtain a target detection model.
[0064] In this application, the model trained by the hard-label-training mode can output supervision information with high recall, while the supervision information output by the model trained by the soft-label-training mode has higher accuracy.
[0065] Optionally, in the image processing method according to Embodiment 1 of the present invention, the process of learning and training the second dataset set using a soft-label training mode to obtain the target detection model includes: learning and training the second dataset set using a soft-label training mode to obtain a second detection model; filtering the annotation information in each dataset using the second detection model to obtain a third dataset set; and learning and training the third dataset set to obtain the target detection model.
[0066] For example, in the second dataset set mentioned above, dataset A includes the annotation information for a1, a2, a3, b1, b2, and b3. The second detection model, trained using a soft-label training mode, identifies the location information of a1, a2, and a3 in dataset B. For instance, if dataset B contains 12 instances of a1, and the second detection model trained on dataset A using the soft-label training mode identifies 10 instances of a1 in dataset B, then 9 of these instances have an IoU (Intersection over Union) greater than a preset threshold of 60% with the original annotations of a1 in dataset B. Therefore, these 9 annotations of a1 in dataset B are retained, and the remaining 3 non-matching annotations of a1 are deleted. The dataset after filtering the annotation information is used as the third dataset set, and then the third dataset set is used for training to obtain the object detection model, thus ensuring the accuracy of the object detection model.
[0067] Optionally, in the image processing method according to Embodiment 1 of the present invention, the multiple datasets include: a first dataset and a second dataset, wherein the first dataset and the second dataset have different annotation information. The annotation information in each dataset is supplemented based on the annotation information in the multiple datasets to obtain a first dataset set, including: learning and training based on the first dataset to obtain a detection model one; learning and training based on the second dataset to obtain a detection model two; identifying the second dataset based on the detection model one to supplement the annotation information in the second dataset; identifying the first dataset based on the detection model two to supplement the annotation information in the first dataset; and using the first dataset with supplemented annotation information and the second dataset with supplemented annotation information as the first dataset set.
[0068] For example, dataset 1 includes annotations for A1, A2, and A3, while dataset 2 includes annotations for B1, B2, and B3. Based on the annotations for A1, A2, and A3 in dataset 1 and B1, B2, and B3 in dataset 2, possible B1, B2, and B3 values in dataset A are annotated, and possible A1, A2, and A3 values in dataset 2 are annotated, thus obtaining supplemented dataset 1 and dataset 2. The process of supplementing the annotation information described above can be as follows: dataset 1 with annotations for A1, A2, and A3 is used for learning and training to obtain model A; model A is then used to identify dataset 2, identifying either A1, A2, or A3 values included in dataset 2, thereby supplementing the dataset 2 with either A1, A2, or A3 values. Model B is trained using dataset two, which includes labeled information for B1, B2, and B3. Model B is then used to identify B1, B2, or B3 in dataset one, thus supplementing dataset one with the previously included B1, B2, or B3. The supplemented dataset one and dataset two are then combined to form the first dataset set. The first detection model is trained on this first dataset set. The first detection model is then used to supplement the labeled information in each dataset again, resulting in a second dataset set. Finally, the second dataset set is trained to obtain the object detection model. By repeatedly generating and updating supervisory information, the quality of the supervisory information is continuously optimized, gradually improving the recall and accuracy of the supervisory information, thereby obtaining a better object detection model.
[0069] Optionally, in the image processing method according to Embodiment 1 of the present invention, the method further includes: training the first dataset after supplementing the annotation information using a hard label training mode to obtain detection model three; training the second dataset after supplementing the annotation information using a hard label training mode to obtain detection model four; identifying the second dataset based on detection model three to supplement the annotation information in the second dataset again; identifying the first dataset based on detection model four to supplement the annotation information in the first dataset again; and using the first dataset after supplementing the annotation information again and the second dataset after supplementing the annotation information again as the second dataset set.
[0070] For example, dataset 1 with supplemented annotation information is trained using a hard-label training mode to obtain detection model 3; dataset 2 with supplemented annotation information is trained using a hard-label training mode to obtain detection model 4; dataset 2 with supplemented annotation information is identified based on detection model 3 to supplement the annotation information in dataset 2 again; dataset 1 with supplemented annotation information is identified based on detection model 4 to supplement the annotation information in the first dataset again; dataset 1 with supplemented annotation information and dataset 2 with supplemented annotation information are used as the second dataset set.
[0071] Optionally, in the image processing method according to Embodiment 1 of the present invention, the method further includes: training the first dataset after re-annotation using a soft-label training mode to obtain detection model five; training the second dataset after re-annotation using a soft-label training mode to obtain detection model six; identifying the annotation information in the second dataset using detection model five to filter the annotation information in the second dataset; identifying the annotation information in the first dataset using detection model six to filter the annotation information in the first dataset; and using the first dataset after filtering the annotation information and the second dataset after filtering the annotation information as a third dataset set.
[0072] In the above scheme, the overlap of existing labeled information (corresponding to the first and second datasets after re-labeling) and newly generated labeled information (labels identified by the model trained on the re-labeled dataset using a soft-label training mode) is calculated. Labels with an overlap greater than or equal to a preset threshold are retained, while those with an overlap less than the preset threshold are deleted. This process, known as filtering, removes many erroneous labels, thereby improving the accuracy of the labeled information. The filtered dataset is then used as a third dataset set for training, resulting in a better object detection model.
[0073] In summary, this application addresses two datasets with different annotations. First, two detection models are trained on these two datasets to generate missing annotations on the other's dataset. Then, for each dataset, the existing actual annotations and the model-generated annotations are combined using hard-label training to train two more detection models. These two models then generate annotations on the other's dataset again. Because the models are hard-label trained, these annotations will have high recall. The overlap between the newly generated annotations and existing annotations is calculated. The portion of the new annotations whose overlap with all existing annotations is less than a threshold is retained and added to the annotation information. This process, called augmentation, adds correct labels, improving the recall of the annotation information. After augmentation, the two models are trained using soft-label training to generate annotations on the other's dataset. Because the models are soft-label trained, these annotations will have high accuracy. The newly generated and existing labeled information are compared to calculate their overlap. The portion of the existing and newly generated labeled information with an overlap greater than a threshold is retained; this process, known as filtering, removes many erroneous labels, thus improving the accuracy of the labeled information. The final labeled dataset is then used for training to obtain a better object detection model. Given the characteristics of hard label training and soft label training, it is proposed that hard label training be used to improve the recall of supervised information, while soft label training is used to improve its accuracy. Through dynamic supervised learning, combining these two different training methods, an object detection model is obtained. By dynamically updating the model, the quality of the supervised information is gradually improved, thereby enhancing the detection performance of the resulting object detection model.
[0074] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0075] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0076] Example 2
[0077] Under the operating environment of the above-described Embodiment 2, this application provides the following: Figure 3 The image processing method shown. Figure 3 This is a flowchart of an image processing method according to Embodiment 2 of the present invention, including the following steps:
[0078] Step S301: Receive a service call request sent by the client, wherein the service call request carries a target image, and the target image includes multiple categories to be identified.
[0079] Step S302: In response to the service call request, the target image is identified using a preset model on the server. If an abnormal identification feedback is received from the preset model, a mixed data set is obtained, which includes a dataset of the categories to be identified in the target image that has been labeled. Dynamic supervised learning is performed through the mixed data set to generate a target detection model. The target image is identified using the target detection model to obtain the identification result.
[0080] By using a preset model to identify the target image on the server, if an abnormal identification feedback is received from the preset model, a mixed dataset is obtained. A target detection model is obtained by performing dynamic supervised learning on the mixed dataset. The target detection model is then used to identify the target image. Since the target detection model is obtained through dynamic supervised learning, using the target detection model to identify the target image can improve the recall and accuracy of the identification results. At the same time, performing this process on the server can also ensure that the identification results are obtained quickly.
[0081] Step S303: Output the recognition result of the target image.
[0082] This application employs a dynamic supervision method on the server. By repeatedly generating and updating supervision information, the quality of the supervision information is continuously optimized, gradually improving the recall and accuracy of the supervision information. This results in a better object detection model, which is then used to identify target images, quickly and accurately obtaining recognition results. This solves the technical problem in existing technologies where static supervision is used to generate models during mixed dataset training, leading to poor model recognition performance.
[0083] Optionally, in the image processing method according to Embodiment 2 of the present invention, the hybrid dataset includes multiple datasets, each dataset containing different annotation information. Dynamic supervised learning is performed using the hybrid dataset to generate a target detection model, comprising: supplementing the annotation information in each dataset based on the annotation information in the multiple datasets to obtain a first dataset set; training the model based on the first dataset set to obtain a first detection model; supplementing the annotation information in each dataset using the first detection model to obtain a second dataset set; and training the model based on the second dataset set to obtain a target detection model.
[0084] For example, in the aforementioned datasets, dataset A includes annotations for a1, a2, and a3, and dataset B includes annotations for b1, b2, and b3. Based on the annotations for a1, a2, and a3 in dataset A and b1, b2, and b3 in dataset B, we annotate the possible b1, b2, and b3 in dataset A, and annotate the possible a1, a2, and a3 in dataset B, thus obtaining supplemented datasets A and B. The process of supplementing the annotations can be as follows: we use dataset A with annotations for a1, a2, and a3 to train a model A, and then use model A to identify dataset B, recognizing either a1, a2, or a3 in dataset B, thereby supplementing the dataset B with either a1, a2, or a3. A dataset B containing labeled information (b1, b2, b3) is used for training to obtain model B. Model B is then used to identify dataset A, recognizing either b1, b2, or b3, thus supplementing the data with the previously included b1, b2, or b3. The supplemented dataset A and dataset B form the first dataset set. A first detection model is obtained by training on this first dataset set. The first detection model is then used to supplement the labeled information in each dataset to obtain a second dataset set. Finally, a second dataset set is used for training to obtain the object detection model. By repeatedly generating and updating supervisory information, the quality of the supervisory information is continuously optimized, gradually improving the recall and accuracy of the supervisory information, thereby obtaining a better object detection model.
[0085] Optionally, in the image processing method according to Embodiment 2 of the present invention, learning and training based on a first dataset set to obtain a first detection model includes: learning and training the first dataset set using a hard-label training mode to obtain a first detection model; learning and training based on a second dataset set to obtain a target detection model includes: learning and training the second dataset set using a soft-label training mode to obtain a target detection model.
[0086] In this application, the model trained by the hard-label-training mode can output supervision information with high recall, while the supervision information output by the model trained by the soft-label-training mode has higher accuracy.
[0087] Optionally, in the image processing method according to Embodiment 2 of the present invention, the process of learning and training the second dataset set using a soft-label training mode to obtain the target detection model includes: learning and training the second dataset set using a soft-label training mode to obtain a second detection model; filtering the annotation information in each dataset using the second detection model to obtain a third dataset set; and learning and training the third dataset set to obtain the target detection model.
[0088] For example, in the second dataset set mentioned above, dataset A includes the annotation information for a1, a2, a3, b1, b2, and b3. The second detection model, trained using a soft-label training mode, identifies the location information of a1, a2, and a3 in dataset B. For instance, if dataset B contains 12 instances of a1, and the second detection model trained on dataset A using the soft-label training mode identifies 10 instances of a1 in dataset B, then 9 of these instances have an IoU (Intersection over Union) greater than a preset threshold of 60% with the original annotations of a1 in dataset B. Therefore, these 9 annotations of a1 in dataset B are retained, and the remaining 3 non-matching annotations of a1 are deleted. The dataset after filtering the annotation information is used as the third dataset set, and then the third dataset set is used for training to obtain the object detection model, thus ensuring the accuracy of the object detection model.
[0089] Optionally, in the image processing method according to Embodiment 2 of the present invention, the multiple datasets include: a first dataset and a second dataset, wherein the first dataset and the second dataset have different annotation information. The annotation information in each dataset is supplemented based on the annotation information in the multiple datasets to obtain a first dataset set, including: learning and training based on the first dataset to obtain a detection model one; learning and training based on the second dataset to obtain a detection model two; identifying the second dataset based on the detection model one to supplement the annotation information in the second dataset; identifying the first dataset based on the detection model two to supplement the annotation information in the first dataset; and using the first dataset with supplemented annotation information and the second dataset with supplemented annotation information as the first dataset set.
[0090] For example, dataset 1 includes annotations for A1, A2, and A3, while dataset 2 includes annotations for B1, B2, and B3. Based on the annotations for A1, A2, and A3 in dataset 1 and B1, B2, and B3 in dataset 2, possible B1, B2, and B3 values in dataset A are annotated, and possible A1, A2, and A3 values in dataset 2 are annotated, thus obtaining supplemented dataset 1 and dataset 2. The process of supplementing the annotation information described above can be as follows: dataset 1 with annotations for A1, A2, and A3 is used for learning and training to obtain model A; model A is then used to identify dataset 2, identifying either A1, A2, or A3 values included in dataset 2, thereby supplementing the dataset 2 with either A1, A2, or A3 values. Model B is trained using dataset two, which includes labeled information for B1, B2, and B3. Model B is then used to identify B1, B2, or B3 in dataset one, thus supplementing dataset one with the previously included B1, B2, or B3. The supplemented dataset one and dataset two are then combined to form the first dataset set. The first detection model is trained on this first dataset set. The first detection model is then used to supplement the labeled information in each dataset again, resulting in a second dataset set. Finally, the second dataset set is trained to obtain the object detection model. By repeatedly generating and updating supervisory information, the quality of the supervisory information is continuously optimized, gradually improving the recall and accuracy of the supervisory information, thereby obtaining a better object detection model.
[0091] Optionally, in the image processing method according to Embodiment 2 of the present invention, the method further includes: training the first dataset after supplementing the annotation information using a hard label training mode to obtain detection model 3; training the second dataset after supplementing the annotation information using a hard label training mode to obtain detection model 4; identifying the second dataset based on detection model 3 to supplement the annotation information in the second dataset again; identifying the first dataset based on detection model 4 to supplement the annotation information in the first dataset again; and using the first dataset after supplementing the annotation information again and the second dataset after supplementing the annotation information again as the second dataset set.
[0092] For example, dataset 1 with supplemented annotation information is trained using a hard-label training mode to obtain detection model 3; dataset 2 with supplemented annotation information is trained using a hard-label training mode to obtain detection model 4; dataset 2 with supplemented annotation information is identified based on detection model 3 to supplement the annotation information in dataset 2 again; dataset 1 with supplemented annotation information is identified based on detection model 4 to supplement the annotation information in the first dataset again; dataset 1 with supplemented annotation information and dataset 2 with supplemented annotation information are used as the second dataset set.
[0093] Optionally, in the image processing method according to Embodiment 2 of the present invention, the method further includes: training the first dataset after re-annotation using a soft-label training mode to obtain detection model five; training the second dataset after re-annotation using a soft-label training mode to obtain detection model six; identifying the annotation information in the second dataset using detection model five to filter the annotation information in the second dataset; identifying the annotation information in the first dataset using detection model six to filter the annotation information in the first dataset; and using the first dataset after filtering the annotation information and the second dataset after filtering the annotation information as a third dataset set.
[0094] In the above scheme, the overlap of existing labeled information (corresponding to the first and second datasets after re-labeling) and newly generated labeled information (labels identified by the model trained on the re-labeled dataset using a soft-label training mode) is calculated. Labels with an overlap greater than or equal to a preset threshold are retained, while those with an overlap less than the preset threshold are deleted. This process, known as filtering, removes many erroneous labels, thereby improving the accuracy of the labeled information. The filtered dataset is then used as a third dataset set for training, resulting in a better object detection model.
[0095] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0097] Example 3
[0098] Under the operating environment of the above-described embodiment three, this application provides the following: Figure 4 The image processing method shown. Figure 4 This is a flowchart of an image processing method according to Embodiment 3 of the present invention, including the following steps:
[0099] Step S401: Acquire multiple frames of target images from the playing video, wherein the target images include multiple categories to be identified;
[0100] Step S402: Use a preset model to identify the target image.
[0101] Step S403: Use a preset model to identify the target image. If an abnormal identification feedback is received from the preset model, obtain a mixed data set, wherein the mixed data set includes a dataset of the categories to be identified that have been labeled in the target image.
[0102] Step S404: Perform dynamic supervised learning based on the hybrid dataset to generate an object detection model.
[0103] Step S405: Use the target detection model to identify the target image and obtain the identification result.
[0104] For example, in video detection of objects on roads, existing models struggle to directly identify vehicles and license plates during playback. This application employs a dynamic supervision method, which continuously optimizes the quality of supervision information by generating and updating it multiple times, gradually improving its recall and accuracy, thus obtaining a better object detection model. The object detection model obtained through this dynamic supervision deep learning method can identify target images, such as vehicle and license plate information. This solves the technical problem in existing technologies where static supervision is used to generate models during mixed dataset training, resulting in poor recognition performance.
[0105] Optionally, in the image processing method according to Embodiment 3 of the present invention, the hybrid dataset includes multiple datasets, each dataset containing different annotation information. Dynamic supervised learning is performed using the hybrid dataset to generate a target detection model, including: supplementing the annotation information in each dataset based on the annotation information in the multiple datasets to obtain a first dataset set; training the model based on the first dataset set to obtain a first detection model; supplementing the annotation information in each dataset using the first detection model to obtain a second dataset set; and training the model based on the second dataset set to obtain a target detection model.
[0106] For example, in the aforementioned datasets, dataset A includes annotations for a1, a2, and a3, and dataset B includes annotations for b1, b2, and b3. Based on the annotations for a1, a2, and a3 in dataset A and b1, b2, and b3 in dataset B, we annotate the possible b1, b2, and b3 in dataset A, and annotate the possible a1, a2, and a3 in dataset B, thus obtaining supplemented datasets A and B. The process of supplementing the annotations can be as follows: we use dataset A with annotations for a1, a2, and a3 to train a model A, and then use model A to identify dataset B, recognizing either a1, a2, or a3 in dataset B, thereby supplementing the dataset B with either a1, a2, or a3. A dataset B containing labeled information (b1, b2, b3) is used for training to obtain model B. Model B is then used to identify dataset A, recognizing either b1, b2, or b3, thus supplementing the data with the previously included b1, b2, or b3. The supplemented dataset A and dataset B form the first dataset set. A first detection model is obtained by training on this first dataset set. The first detection model is then used to supplement the labeled information in each dataset to obtain a second dataset set. Finally, a second dataset set is used for training to obtain the object detection model. By repeatedly generating and updating supervisory information, the quality of the supervisory information is continuously optimized, gradually improving the recall and accuracy of the supervisory information, thereby obtaining a better object detection model.
[0107] Optionally, in the image processing method according to Embodiment 3 of the present invention, learning and training based on a first dataset set to obtain a first detection model includes: learning and training the first dataset set using a hard-label training mode to obtain a first detection model; learning and training based on a second dataset set to obtain a target detection model includes: learning and training the second dataset set using a soft-label training mode to obtain a target detection model.
[0108] In this application, the model trained by the hard-label-training mode can output supervision information with high recall, while the supervision information output by the model trained by the soft-label-training mode has higher accuracy.
[0109] Optionally, in the image processing method according to Embodiment 3 of the present invention, the process of learning and training the second dataset set using a soft-label training mode to obtain the target detection model includes: learning and training the second dataset set using a soft-label training mode to obtain a second detection model; filtering the annotation information in each dataset using the second detection model to obtain a third dataset set; and learning and training the third dataset set to obtain the target detection model.
[0110] For example, in the second dataset set mentioned above, dataset A includes the annotation information for a1, a2, a3, b1, b2, and b3. The second detection model, trained using a soft-label training mode, identifies the location information of a1, a2, and a3 in dataset B. For instance, if dataset B contains 12 instances of a1, and the second detection model trained on dataset A using the soft-label training mode identifies 10 instances of a1 in dataset B, then 9 of these instances have an IoU (Intersection over Union) greater than a preset threshold of 60% with the original annotations of a1 in dataset B. Therefore, these 9 annotations of a1 in dataset B are retained, and the remaining 3 non-matching annotations of a1 are deleted. The dataset after filtering the annotation information is used as the third dataset set, and then the third dataset set is used for training to obtain the object detection model, thus ensuring the accuracy of the object detection model.
[0111] Optionally, in the image processing method according to Embodiment 3 of the present invention, the multiple datasets include: a first dataset and a second dataset, wherein the first dataset and the second dataset have different annotation information. The annotation information in each dataset is supplemented based on the annotation information in the multiple datasets to obtain a first dataset set, including: learning and training based on the first dataset to obtain a detection model one; learning and training based on the second dataset to obtain a detection model two; identifying the second dataset based on the detection model one to supplement the annotation information in the second dataset; identifying the first dataset based on the detection model two to supplement the annotation information in the first dataset; and using the first dataset with supplemented annotation information and the second dataset with supplemented annotation information as the first dataset set.
[0112] For example, dataset 1 includes annotations for A1, A2, and A3, while dataset 2 includes annotations for B1, B2, and B3. Based on the annotations for A1, A2, and A3 in dataset 1 and B1, B2, and B3 in dataset 2, possible B1, B2, and B3 values in dataset A are annotated, and possible A1, A2, and A3 values in dataset 2 are annotated, thus obtaining supplemented dataset 1 and dataset 2. The process of supplementing the annotation information described above can be as follows: dataset 1 with annotations for A1, A2, and A3 is used for learning and training to obtain model A; model A is then used to identify dataset 2, identifying either A1, A2, or A3 values included in dataset 2, thereby supplementing the dataset 2 with either A1, A2, or A3 values. Model B is trained using dataset two, which includes labeled information for B1, B2, and B3. Model B is then used to identify B1, B2, or B3 in dataset one, thus supplementing dataset one with the previously included B1, B2, or B3. The supplemented dataset one and dataset two are then combined to form the first dataset set. The first detection model is trained on this first dataset set. The first detection model is then used to supplement the labeled information in each dataset again, resulting in a second dataset set. Finally, the second dataset set is trained to obtain the object detection model. By repeatedly generating and updating supervisory information, the quality of the supervisory information is continuously optimized, gradually improving the recall and accuracy of the supervisory information, thereby obtaining a better object detection model.
[0113] Optionally, in the image processing method according to Embodiment 3 of the present invention, the method further includes: training the first dataset after supplementing the annotation information using a hard label training mode to obtain detection model 3; training the second dataset after supplementing the annotation information using a hard label training mode to obtain detection model 4; identifying the second dataset based on detection model 3 to supplement the annotation information in the second dataset again; identifying the first dataset based on detection model 4 to supplement the annotation information in the first dataset again; and using the first dataset after supplementing the annotation information again and the second dataset after supplementing the annotation information again as the second dataset set.
[0114] For example, dataset 1 with supplemented annotation information is trained using a hard-label training mode to obtain detection model 3; dataset 2 with supplemented annotation information is trained using a hard-label training mode to obtain detection model 4; dataset 2 with supplemented annotation information is identified based on detection model 3 to supplement the annotation information in dataset 2 again; dataset 1 with supplemented annotation information is identified based on detection model 4 to supplement the annotation information in the first dataset again; dataset 1 with supplemented annotation information and dataset 2 with supplemented annotation information are used as the second dataset set.
[0115] Optionally, in the image processing method according to Embodiment 3 of the present invention, the method further includes: training the first dataset after re-annotation using a soft-label training mode to obtain detection model five; training the second dataset after re-annotation using a soft-label training mode to obtain detection model six; identifying the annotation information in the second dataset using detection model five to filter the annotation information in the second dataset; identifying the annotation information in the first dataset using detection model six to filter the annotation information in the first dataset; and using the first dataset after filtering the annotation information and the second dataset after filtering the annotation information as a third dataset set.
[0116] In the above scheme, the overlap of existing labeled information (corresponding to the first and second datasets after re-labeling) and newly generated labeled information (labels identified by the model trained on the re-labeled dataset using a soft-label training mode) is calculated. Labels with an overlap greater than or equal to a preset threshold are retained, while those with an overlap less than the preset threshold are deleted. This process, known as filtering, removes many erroneous labels, thereby improving the accuracy of the labeled information. The filtered dataset is then used as a third dataset set for training, resulting in a better object detection model.
[0117] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0118] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0119] Example 4
[0120] According to embodiments of the present invention, an apparatus for implementing the image processing method described in Embodiment 1 is also provided, such as... Figure 5 As shown, the device includes: a first acquisition unit 501, a second acquisition unit 502, a first generation unit 503, and a first identification unit 504.
[0121] Specifically, the first acquisition unit 501 is used to acquire a target image, wherein the target image includes multiple categories to be identified;
[0122] The second acquisition unit 502 is used to identify the target image using a preset model. If the recognition anomaly feedback is received from the preset model, a mixed data set is acquired, wherein the mixed data set includes a dataset of the categories to be identified in the target image that have been labeled.
[0123] The first generation unit 503 is used to generate an object detection model through dynamic supervised learning using a hybrid dataset.
[0124] The first recognition unit 504 is used to recognize the target image through the target detection model and obtain the recognition result.
[0125] Optionally, in the image processing apparatus according to Embodiment 4 of the present invention, the mixed dataset includes multiple datasets, each dataset containing different annotation information. The first generation unit 503 further includes: a first supplementary subunit, used to supplement the annotation information in each dataset based on the annotation information in the multiple datasets to obtain a first dataset set; a first training subunit, used to learn and train based on the first dataset set to obtain a first detection model; a second supplementary subunit, used to supplement the annotation information in each dataset through the first detection model to obtain a second dataset set; and a second training subunit, used to learn and train based on the second dataset set to obtain a target detection model.
[0126] Optionally, in the image processing apparatus according to Embodiment 4 of the present invention, the first training subunit further includes: a first training module, used to learn and train the first dataset set using a hard-label training mode to obtain a first detection model; the second training subunit further includes: a second training module, used to learn and train the second dataset set using a soft-label training mode to obtain an object detection model.
[0127] Optionally, in the image processing apparatus according to Embodiment 4 of the present invention, the second training module further includes: a first training submodule, used to learn and train the second dataset set using a soft label training mode to obtain a second detection model; a first filtering submodule, used to filter the annotation information in each dataset through the second detection model to obtain a third dataset set; and a second training submodule, used to learn and train the third dataset set to obtain an object detection model.
[0128] Optionally, in the image processing apparatus according to Embodiment 4 of the present invention, the multiple datasets include: a first dataset and a second dataset, wherein the first dataset and the second dataset contain different annotation information. The first supplementary subunit further includes: a third training module, used for learning and training based on the first dataset to obtain detection model one; a fourth training module, used for learning and training based on the second dataset to obtain detection model two; a first recognition module, used for recognizing the second dataset based on detection model one to supplement the annotation information in the second dataset; a second recognition module, used for recognizing the first dataset based on detection model two to supplement the annotation information in the first dataset; and a first acquisition module, used for taking the first dataset after supplementing the annotation information and the second dataset after supplementing the annotation information as a first dataset set.
[0129] Optionally, in the image processing apparatus according to Embodiment 4 of the present invention, the apparatus further includes: a first training unit, configured to train a first dataset with supplemented annotation information using a hard-label training mode to obtain a detection model three; a second training unit, configured to train a second dataset with supplemented annotation information using a hard-label training mode to obtain a detection model four; a second recognition unit, configured to recognize the second dataset based on the detection model three to further supplement the annotation information in the second dataset; a third recognition unit, configured to recognize the first dataset based on the detection model four to further supplement the annotation information in the first dataset; and a second acquisition unit, configured to use the first dataset with further annotation information and the second dataset with further supplemented annotation information as a second dataset set.
[0130] Optionally, in the image processing apparatus according to Embodiment 4 of the present invention, the apparatus further includes: a third training unit, configured to train the first dataset after re-annotation using a soft-label training mode to obtain a detection model five; a fourth training unit, configured to train the second dataset after re-annotation using a soft-label training mode to obtain a detection model six; a fourth recognition unit, configured to recognize the annotation information in the second dataset using the detection model five to filter the annotation information in the second dataset; a fifth recognition unit, configured to recognize the annotation information in the first dataset using the detection model six to filter the annotation information in the first dataset; and a third acquisition unit, configured to use the first dataset after filtering the annotation information and the second dataset after filtering the annotation information as a third dataset set.
[0131] Optionally, in the image processing apparatus according to Embodiment 4 of the present invention, the apparatus further includes: a first receiving unit, configured to receive a service call request sent by a client, wherein the service call request carries a target image, wherein the target image includes multiple categories to be identified; a first response unit, configured to respond to the service call request, perform recognition of the target image in the server using a preset model, and if a recognition anomaly feedback is received from the preset model, acquire a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; perform dynamic supervised learning through the mixed data set to generate a target detection model; perform recognition of the target image through the target detection model to obtain a recognition result; and a first output unit, configured to output the recognition result of the target image.
[0132] Optionally, in the image processing apparatus according to Embodiment 4 of the present invention, the apparatus further includes: a first acquisition unit, configured to acquire multiple frames of target images in a playing video, wherein the target images include multiple categories to be identified; a sixth recognition unit, configured to recognize the target images using a preset model; a fourth acquisition unit, configured to recognize the target images using the preset model, and if a recognition anomaly feedback is received from the preset model, to acquire a mixed data set, wherein the mixed data set includes a dataset of the categories to be identified labeled in the target images; a second generation unit, configured to perform dynamic supervised learning based on the mixed data set to generate a target detection model; and a seventh recognition unit, configured to recognize the target images using the target detection model to obtain recognition results.
[0133] It should be noted that the first acquisition unit 501, the second acquisition unit 502, the first generation unit 503, and the first identification unit 504 mentioned above correspond to steps S201 to S204 in Embodiment 1. The device and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above-mentioned module units, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0134] Example 5
[0135] According to embodiments of the present invention, an apparatus for implementing the image processing method described in Embodiment 2 is also provided, such as... Figure 6 As shown, the device includes: a first receiving unit 601, a first response unit 602, and a first output unit 603.
[0136] Specifically, the first receiving unit 601 is used to receive a service call request sent by the client, wherein the service call request carries a target image, and the target image includes multiple categories to be identified;
[0137] The first response unit 602 is configured to respond to the service call request, perform recognition of the target image using a preset model in the server, and if a recognition anomaly feedback is received from the preset model, acquire a mixed data set, wherein the mixed data set includes a dataset labeled with the categories to be identified in the target image; perform dynamic supervised learning through the mixed data set to generate a target detection model; and use the target detection model to recognize the target image to obtain a recognition result.
[0138] The first output unit 603 is used to output the recognition result of the target image.
[0139] This application employs a dynamic supervision method on the server. By repeatedly generating and updating supervision information, the quality of the supervision information is continuously optimized, gradually improving the recall and accuracy of the supervision information. This results in a better object detection model, which is then used to identify target images, quickly and accurately obtaining recognition results. This solves the technical problem in existing technologies where static supervision is used to generate models during mixed dataset training, leading to poor model recognition performance.
[0140] It should be noted that the first receiving unit 601, the first response unit 602, and the first output unit 603 mentioned above correspond to steps S301 to S303 in Embodiment 1. The device implements the same instances and application scenarios as the corresponding steps, but is not limited to the content disclosed in Embodiment 2. It should also be noted that the above-mentioned module units, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0141] Example 6
[0142] According to embodiments of the present invention, an apparatus for implementing the image processing method described in Embodiment 3 is also provided, such as... Figure 7 As shown, the device includes: a first acquisition unit 701, a sixth identification unit 702, a fourth acquisition unit 703, and a seventh identification unit 705.
[0143] Specifically, the first acquisition unit 701 is used to acquire multiple frames of target images in the playing video, wherein the target images include multiple categories to be identified;
[0144] The sixth recognition unit 702 is used to recognize the target image using a preset model;
[0145] The fourth acquisition unit 703 is used to identify the target image using a preset model. If an identification anomaly feedback is received from the preset model, a mixed data set is acquired, wherein the mixed data set includes a dataset of the categories to be identified that have been labeled in the target image.
[0146] The second generation unit 704 is used to perform dynamic supervised learning based on the hybrid dataset to generate a target detection model.
[0147] The seventh recognition unit 705 is used to recognize the target image using the target detection model and obtain the recognition result.
[0148] For example, in video detection of objects on roads, existing models struggle to directly identify vehicles and license plates during playback. This application employs a dynamic supervision method, which continuously optimizes the quality of supervision information by generating and updating it multiple times, gradually improving its recall and accuracy, thus obtaining a better object detection model. The object detection model obtained through this dynamic supervision deep learning method can identify target images, such as vehicle and license plate information. This solves the technical problem in existing technologies where static supervision is used to generate models during mixed dataset training, resulting in poor recognition performance.
[0149] It should be noted that the first acquisition unit 701, the sixth identification unit 702, the fourth acquisition unit 703, and the seventh identification unit 705 mentioned above correspond to steps S401 to S405 in Embodiment 3. The device and the corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in Embodiment 3. It should be noted that the above-mentioned module units, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0150] Example 7
[0151] Embodiments of the present invention can provide a computer terminal, which can be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the computer terminal can also be replaced by a mobile terminal or other terminal device.
[0152] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.
[0153] In this embodiment, the computer terminal described above can execute the program code for the following steps in the image processing method of the application: acquiring a target image, wherein the target image includes multiple categories to be identified; using a preset model to identify the target image, and if a recognition anomaly feedback is received from the preset model, acquiring a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; performing dynamic supervised learning through the mixed data set to generate a target detection model; and using the target detection model to identify the target image to obtain a recognition result.
[0154] In this embodiment, the computer terminal can also execute the program code for the following steps in the image processing method of the application: supplementing the annotation information in each dataset based on the annotation information in multiple datasets to obtain a first dataset set; learning and training based on the first dataset set to obtain a first detection model; supplementing the annotation information in each dataset through the first detection model to obtain a second dataset set; and learning and training based on the second dataset set to obtain a target detection model.
[0155] In this embodiment, the computer terminal can also execute the program code for the following steps in the image processing method of the application: learning and training a first detection model using a hard-label training mode on a first dataset set; learning and training a target detection model based on a second dataset set includes: learning and training a target detection model using a soft-label training mode on a second dataset set.
[0156] In this embodiment, the computer terminal can also execute the program code for the following steps in the image processing method of the application: learning and training the second dataset set using a soft label training mode to obtain a second detection model; filtering the annotation information in each dataset using the second detection model to obtain a third dataset set; and learning and training the third dataset set to obtain an object detection model.
[0157] In this embodiment, the computer terminal can also execute program code for the following steps in the image processing method of the application: a first dataset and a second dataset, wherein the first dataset and the second dataset have different annotation information, and the annotation information in each dataset is supplemented based on the annotation information in multiple datasets to obtain a first dataset set, including: learning and training based on the first dataset to obtain detection model one; learning and training based on the second dataset to obtain detection model two; identifying the second dataset based on detection model one to supplement the annotation information in the second dataset; identifying the first dataset based on detection model two to supplement the annotation information in the first dataset; and using the first dataset with supplemented annotation information and the second dataset with supplemented annotation information as the first dataset set.
[0158] In this embodiment, the computer terminal can also execute the program code for the following steps in the image processing method of the application: training the first dataset after supplementing the annotation information using a hard label training mode to obtain detection model three; training the second dataset after supplementing the annotation information using a hard label training mode to obtain detection model four; identifying the second dataset based on detection model three to supplement the annotation information in the second dataset again; identifying the first dataset based on detection model four to supplement the annotation information in the first dataset again; and using the first dataset after supplementing the annotation information again and the second dataset after supplementing the annotation information again as the second dataset set.
[0159] In this embodiment, the computer terminal can also execute the program code for the following steps in the image processing method of the application: training the first dataset after re-annotation using a soft-label training mode to obtain detection model five; training the second dataset after re-annotation using a soft-label training mode to obtain detection model six; identifying the annotation information in the second dataset using detection model five to filter the annotation information in the second dataset; identifying the annotation information in the first dataset using detection model six to filter the annotation information in the first dataset; and using the first dataset after filtering the annotation information and the second dataset after filtering the annotation information as a third dataset set.
[0160] In this embodiment, the computer terminal can also execute program code for the following steps in the image processing method of the application: the recognition anomaly feedback indicates that the recognition of the target image has failed.
[0161] In this embodiment, the computer terminal can also execute program code for the following steps in the image processing method of the application: receiving a service call request sent by a client, wherein the service call request carries a target image, wherein the target image includes multiple categories to be identified; responding to the service call request, using a preset model in the server to identify the target image; if receiving recognition anomaly feedback from the preset model, obtaining a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; performing dynamic supervised learning through the mixed data set to generate a target detection model; identifying the target image through the target detection model to obtain a recognition result; and outputting the recognition result of the target image.
[0162] In this embodiment, the computer terminal can also execute program code for the following steps in the image processing method of the application: acquiring multiple frames of target images from a playing video, wherein the target images include multiple categories to be identified; identifying the target images using a preset model; identifying the target images using the preset model, and if receiving recognition anomaly feedback from the preset model, obtaining a mixed data set, wherein the mixed data set includes a dataset of the categories to be identified labeled in the target images; performing dynamic supervised learning based on the mixed data set to generate a target detection model; and identifying the target images using the target detection model to obtain the recognition result.
[0163] Optionally, Figure 8 This is a structural block diagram of a computer terminal according to an embodiment of the present invention. Figure 8 As shown, the computer terminal may include: one or more ( Figure 8 (Only one is shown in the image) processor and memory.
[0164] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the image processing method and apparatus in this embodiment of the invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned image processing method. The memory 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 instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0165] The processor can access information and applications stored in the memory via a transmission device to perform the following steps: acquiring a target image, wherein the target image includes multiple categories to be identified; identifying the target image using a preset model, and if an abnormal identification feedback is received from the preset model, acquiring a mixed dataset, wherein the mixed dataset includes a dataset of categories to be identified in the target image that have been labeled; performing dynamic supervised learning through the mixed dataset to generate a target detection model; and identifying the target image using the target detection model to obtain the identification result.
[0166] Optionally, the processor may also execute program code that performs the following steps: supplementing the annotation information in each dataset based on the annotation information in multiple datasets to obtain a first dataset set; learning and training based on the first dataset set to obtain a first detection model; supplementing the annotation information in each dataset using the first detection model to obtain a second dataset set; and learning and training based on the second dataset set to obtain an object detection model.
[0167] Optionally, the processor may also execute program code for the following steps: learning and training a first detection model using a hard-label training mode on a first dataset set; learning and training a target detection model based on a second dataset set, including: learning and training a target detection model using a soft-label training mode on a second dataset set.
[0168] Optionally, the processor may also execute program code that performs the following steps: training the second dataset set using a soft-label training mode to obtain a second detection model; filtering the labeled information in each dataset using the second detection model to obtain a third dataset set; and training the third dataset set to obtain an object detection model.
[0169] Optionally, the processor may also execute program code for the following steps: a first dataset and a second dataset, wherein the first dataset and the second dataset contain different annotation information, and the annotation information in each dataset is supplemented based on the annotation information in multiple datasets to obtain a first dataset set, including: learning and training based on the first dataset to obtain detection model one; learning and training based on the second dataset to obtain detection model two; identifying the second dataset based on detection model one to supplement the annotation information in the second dataset; identifying the first dataset based on detection model two to supplement the annotation information in the first dataset; and using the first dataset with supplemented annotation information and the second dataset with supplemented annotation information as the first dataset set.
[0170] Optionally, the processor may also execute program code for the following steps: training the first dataset after supplementing the annotation information using a hard-label training mode to obtain detection model three; training the second dataset after supplementing the annotation information using a hard-label training mode to obtain detection model four; identifying the second dataset based on detection model three to supplement the annotation information in the second dataset again; identifying the first dataset based on detection model four to supplement the annotation information in the first dataset again; and using the first dataset after supplementing the annotation information again and the second dataset after supplementing the annotation information again as the second dataset set.
[0171] Optionally, the processor may also execute program code that performs the following steps: training the first dataset after re-annotation using a soft-label training mode to obtain detection model five; training the second dataset after re-annotation using a soft-label training mode to obtain detection model six; using detection model five to identify and filter the annotation information in the second dataset; using detection model six to identify and filter the annotation information in the first dataset; and combining the first dataset after filtering the annotation information and the second dataset after filtering the annotation information into a third dataset set.
[0172] Optionally, the processor may also execute program code that performs the following steps: receiving a service call request sent by a client, wherein the service call request carries a target image, wherein the target image includes multiple categories to be identified; responding to the service call request, using a preset model to identify the target image in the server, and if receiving a recognition anomaly feedback from the preset model, obtaining a mixed dataset, wherein the mixed dataset includes a dataset of categories to be identified in the target image that have been labeled; performing dynamic supervised learning through the mixed dataset to generate a target detection model; identifying the target image through the target detection model to obtain a recognition result; and outputting the recognition result of the target image.
[0173] Optionally, the processor may also execute program code for the following steps: acquiring multiple frames of target images from a playing video, wherein the target images include multiple categories to be identified; identifying the target images using a preset model; identifying the target images using the preset model, and if receiving recognition anomaly feedback from the preset model, obtaining a mixed data set, wherein the mixed data set includes a dataset of labeled categories to be identified in the target images; performing dynamic supervised learning based on the mixed data set to generate a target detection model; and identifying the target images using the target detection model to obtain the recognition result.
[0174] Optionally, the processor may also execute program code that includes the following steps: the recognition anomaly feedback indicates that the recognition of the target image has failed.
[0175] This invention provides an image processing solution. It involves acquiring a target image, which includes multiple categories to be identified; using a preset model to identify the target image; if an anomaly feedback is received from the preset model, acquiring a mixed dataset, which includes a dataset labeled with the categories to be identified in the target image; performing dynamic supervised learning on the mixed dataset to generate a target detection model; and using the target detection model to identify the target image to obtain the identification result. This achieves the goal of improving the recall and accuracy of the target detection model, thereby solving the technical problem in existing technologies where static supervision is used to generate the model during mixed dataset training, resulting in poor model recognition performance.
[0176] Those skilled in the art will understand that Figure 8 The structure shown is for illustrative purposes only. The computer terminal can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a mobile internet device (MID), a PAD, and other terminal devices. Figure 8 This does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 8 The different configurations shown.
[0177] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0178] Example 6
[0179] Embodiments of the present invention also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the image processing method provided in Embodiment 1.
[0180] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0181] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a target image, wherein the target image includes multiple categories to be identified; using a preset model to identify the target image, and if a recognition anomaly feedback is received from the preset model, acquiring a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; performing dynamic supervised learning through the mixed data set to generate a target detection model; and using the target detection model to identify the target image to obtain a recognition result.
[0182] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: supplementing the annotation information in each dataset based on the annotation information in multiple datasets to obtain a first dataset set; learning and training based on the first dataset set to obtain a first detection model; supplementing the annotation information in each dataset using the first detection model to obtain a second dataset set; and learning and training based on the second dataset set to obtain an object detection model.
[0183] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: learning and training a first detection model using a hard-label training mode on a first dataset set; learning and training a target detection model based on a second dataset set includes: learning and training a target detection model using a soft-label training mode on a second dataset set.
[0184] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: learning and training the second dataset set using a soft-label training mode to obtain a second detection model; filtering the annotation information in each dataset using the second detection model to obtain a third dataset set; and learning and training the third dataset set to obtain an object detection model.
[0185] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: a first dataset and a second dataset, wherein the first dataset and the second dataset have different annotation information, and the annotation information in each dataset is supplemented based on the annotation information in multiple datasets to obtain a first dataset set, including: learning and training based on the first dataset to obtain detection model one; learning and training based on the second dataset to obtain detection model two; identifying the second dataset based on detection model one to supplement the annotation information in the second dataset; identifying the first dataset based on detection model two to supplement the annotation information in the first dataset; and using the first dataset with supplemented annotation information and the second dataset with supplemented annotation information as the first dataset set.
[0186] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: training the first dataset after supplementing the annotation information using a hard-label training mode to obtain detection model three; training the second dataset after supplementing the annotation information using a hard-label training mode to obtain detection model four; identifying the second dataset based on detection model three to supplement the annotation information in the second dataset again; identifying the first dataset based on detection model four to supplement the annotation information in the first dataset again; and using the first dataset after supplementing the annotation information again and the second dataset after supplementing the annotation information again as the second dataset set.
[0187] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: training the first dataset after re-annotation using a soft-label training mode to obtain detection model five; training the second dataset after re-annotation using a soft-label training mode to obtain detection model six; identifying the annotation information in the second dataset using detection model five to filter the annotation information in the second dataset; identifying the annotation information in the first dataset using detection model six to filter the annotation information in the first dataset; and using the first dataset after filtering the annotation information and the second dataset after filtering the annotation information as a third dataset set.
[0188] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: the recognition anomaly feedback indicates that the recognition of the target image has failed.
[0189] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: receiving a service call request sent by a client, wherein the service call request carries a target image, wherein the target image includes multiple categories to be identified; responding to the service call request, using a preset model to identify the target image in the server, and if receiving recognition anomaly feedback from the preset model, obtaining a mixed data set, wherein the mixed data set includes a dataset of categories to be identified in the target image that have been labeled; performing dynamic supervised learning through the mixed data set to generate a target detection model; identifying the target image through the target detection model to obtain a recognition result; and outputting the recognition result of the target image.
[0190] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring multiple frames of target images from a playing video, wherein the target images include multiple categories to be identified; identifying the target images using a preset model; identifying the target images using the preset model, and if receiving recognition anomaly feedback from the preset model, obtaining a mixed data set, wherein the mixed data set includes a dataset of the categories to be identified labeled in the target images; performing dynamic supervised learning based on the mixed data set to generate a target detection model; and identifying the target images using the target detection model to obtain the recognition result.
[0191] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0192] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0193] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of units or modules may be electrical or other forms.
[0194] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0195] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0196] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0197] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An image processing method, characterized in that, include: Acquire a target image, wherein the target image includes multiple categories to be identified; The target image is identified using a preset model. If an abnormal identification feedback is received from the preset model, a mixed data set is obtained, wherein the mixed data set includes a dataset labeled with the category to be identified in the target image. A target detection model is generated through dynamic supervised learning using the hybrid dataset. The hybrid dataset includes a first dataset and a second dataset, which have different annotation information. The target detection model is trained based on the first dataset. The first dataset is obtained by supplementing the first dataset with additional annotation information and the second dataset with additional annotation information. The first dataset with additional annotation information is identified by detection model two, which is trained based on the second dataset. The second dataset with additional annotation information is identified by detection model one, which is trained based on the first dataset. The target image is identified using the target detection model to obtain the identification result.
2. The method according to claim 1, characterized in that, The hybrid dataset includes multiple datasets, each with different annotation information. Dynamic supervised learning is performed using this hybrid dataset to generate an object detection model, including: The annotation information of each dataset is supplemented based on the annotation information in the multiple datasets to obtain the first dataset set; The first detection model is obtained by learning and training based on the first dataset set; The first detection model is used to supplement the annotation information in each dataset to obtain a second dataset set; The target detection model is obtained by learning and training based on the second dataset set.
3. The method according to claim 2, characterized in that, The first detection model is obtained by learning and training based on the first dataset set. This includes: learning and training the first dataset set using a hard-label training mode to obtain the first detection model. The object detection model is obtained by learning and training based on the second dataset set by using a soft-label training mode.
4. The method according to claim 3, characterized in that, The second dataset is trained using a soft-label training mode to obtain the object detection model, which includes: The second dataset is trained using a soft-label training mode to obtain the second detection model. The annotation information in each dataset is filtered using the second detection model to obtain a third dataset set; The target detection model is obtained by learning and training using the third dataset.
5. The method according to claim 4, characterized in that, Based on the annotation information in the multiple datasets, the annotation information in each dataset is supplemented to obtain the first dataset set, including: Based on the first dataset, a detection model one is obtained through learning and training. Based on the second dataset, a second detection model is obtained through learning and training. The detection model is used to identify the second dataset to supplement the annotation information in the second dataset; The first dataset is identified based on the second detection model to supplement the annotation information in the first dataset; The first dataset after supplementing the annotation information and the second dataset after supplementing the annotation information are used as the first dataset set.
6. The method according to claim 5, characterized in that, The method further includes: The first dataset after supplementing the annotation information was trained using a hard-label training mode to obtain detection model three. The second dataset with supplemented annotation information was trained using a hard-label training mode to obtain detection model four. The second dataset is identified based on the detection model three to further supplement the annotation information in the second dataset; The first dataset is identified based on the detection model four to further supplement the annotation information in the first dataset; The first dataset after re-annotation and the second dataset after further supplementation of annotation information are combined into the second dataset set.
7. The method according to claim 6, characterized in that, The method further includes: The first dataset after the re-annotation information is trained using a soft-label training mode to obtain detection model five; The second dataset, after being re-annotated, is trained using a soft-label training mode to obtain detection model six; The fifth detection model is used to identify the labeled information in the second dataset in order to filter the labeled information in the second dataset. The detection model six is used to identify the labeled information in the first dataset in order to filter the labeled information in the first dataset; The first dataset after filtering the labeled information and the second dataset after filtering the labeled information are used as the third dataset set.
8. The method according to claim 1, characterized in that, The recognition anomaly feedback indicates that the target image recognition has failed.
9. An image processing method, characterized in that, include: Receive a service call request sent by a client, wherein the service call request carries a target image, and the target image includes multiple categories to be identified; In response to the service call request, the target image is identified using a preset model on the server. If an abnormal identification feedback is received from the preset model, a mixed data set is obtained, wherein the mixed data set includes a dataset labeled with the category to be identified in the target image. Dynamic supervised learning is performed on the mixed data set to generate a target detection model. The target image is identified using the target detection model to obtain a recognition result. The mixed data set includes a first dataset and a second dataset, wherein the first dataset and the second dataset have different annotation information. The target detection model is trained based on the first dataset set. The first dataset set is obtained based on the first dataset with supplemented annotation information and the second dataset with supplemented annotation information. The first dataset with supplemented annotation information is identified using a second detection model, which is trained based on the second dataset. The second dataset with supplemented annotation information is identified using a first detection model, which is trained based on the first dataset. Output the recognition result of the target image.
10. An image processing method, characterized in that, include: The system acquires multiple frames of target images from a playing video, wherein the target images include multiple categories to be identified. The target image is identified using a preset model; The target image is identified using a preset model. If an abnormal identification feedback is received from the preset model, a mixed data set is obtained, wherein the mixed data set includes a dataset of the categories to be identified that have been labeled in the target image. Dynamic supervised learning is performed on the hybrid dataset to generate an object detection model. The hybrid dataset includes a first dataset and a second dataset, which have different annotation information. The object detection model is trained on the first dataset. The first dataset is obtained by supplementing the first dataset with additional annotation information and the second dataset with additional annotation information. The first dataset with additional annotation information is identified by detection model two, which is trained on the second dataset. The second dataset with additional annotation information is identified by detection model one, which is trained on the first dataset. The target image is identified using the target detection model to obtain the identification result.
11. An image processing apparatus, characterized in that, include: The first acquisition unit is used to acquire a target image, wherein the target image includes multiple categories to be identified; The second acquisition unit is used to identify the target image using a preset model. If the recognition anomaly feedback is received from the preset model, a mixed data set is acquired, wherein the mixed data set includes a dataset labeled with the category to be identified in the target image. The first generation unit is used to generate an object detection model through dynamic supervised learning using the hybrid dataset. The hybrid dataset includes a first dataset and a second dataset. The first dataset and the second dataset have different annotation information. The object detection model is trained based on the first dataset. The first dataset is obtained based on the first dataset with supplemented annotation information and the second dataset with supplemented annotation information. The first dataset with supplemented annotation information is identified by detection model two. The detection model two is trained based on the second dataset. The second dataset with supplemented annotation information is identified by detection model one. The detection model one is trained based on the first dataset. The first recognition unit is used to recognize the target image through the target detection model and obtain the recognition result.
12. The apparatus according to claim 11, characterized in that, The hybrid dataset includes multiple datasets, each with different annotation information. The first generation unit further includes: The first supplementary subunit is used to supplement the annotation information in each dataset based on the annotation information in the multiple datasets to obtain a first dataset set; The first training subunit is used to learn and train based on the first dataset to obtain the first detection model; The second supplementary subunit is used to supplement the annotation information in each dataset using the first detection model to obtain a second dataset set; The second training subunit is used to learn and train based on the second dataset set to obtain the object detection model.
13. The apparatus according to claim 12, characterized in that, The first training subunit also includes: The first training module is used to learn and train the first dataset using a hard-label training mode to obtain the first detection model. The second training subunit also includes: The second training module is used to learn and train the second dataset using a soft-label training mode to obtain the object detection model.
14. The apparatus according to claim 13, characterized in that, The second training module also includes: The first training submodule is used to learn and train the second dataset using a soft-label training mode to obtain the second detection model. The first filtering submodule is used to filter the labeled information in each dataset using the second detection model to obtain a third dataset set; The second training submodule is used to learn and train the object detection model using the third dataset set.
15. The apparatus according to claim 14, characterized in that, The first supplementary subunit further includes: The third training module is used to learn and train based on the first dataset to obtain detection model one; The fourth training module is used to learn and train based on the second dataset to obtain detection model two; The first identification module is used to identify the second dataset based on the detection model to supplement the annotation information in the second dataset; The second identification module is used to identify the first dataset based on the second detection model in order to supplement the annotation information in the first dataset. The first acquisition module is used to take the first dataset after supplementing the annotation information and the second dataset after supplementing the annotation information as the first dataset set.
16. The apparatus according to claim 15, characterized in that, The device further includes: The first training unit is used to learn and train the first dataset after supplementing the annotation information using the hard label training mode to obtain the detection model three. The second training unit is used to learn and train the second dataset after supplementing the annotation information using the hard label training mode to obtain the detection model four. The second identification unit is used to identify the second dataset based on the detection model three, so as to supplement the annotation information in the second dataset again; The third identification unit is used to identify the first dataset based on the detection model four, so as to supplement the annotation information in the first dataset again; The second acquisition unit is used to take the first dataset after re-annotation and the second dataset after further supplementation of annotation information as the second dataset set.
17. The apparatus according to claim 16, characterized in that, The device further includes: The third training unit is used to learn and train the first dataset after the re-annotation information using the soft label training mode to obtain detection model five. The fourth training unit is used to learn and train the second dataset after the re-annotation information using a soft-label training mode to obtain detection model six; The fourth identification unit is used to identify the labeled information in the second dataset through the detection model five, so as to filter the labeled information in the second dataset; The fifth identification unit is used to identify the labeled information in the first dataset through the detection model six, so as to filter the labeled information in the first dataset; The third acquisition unit is used to take the first dataset after filtering the labeled information and the second dataset after filtering the labeled information as the third dataset set.
18. An image processing apparatus, characterized in that, include: The first receiving unit is configured to receive a service call request sent by a client, wherein the service call request carries a target image, and the target image includes multiple categories to be identified; A first response unit is configured to respond to the service call request, perform recognition of the target image using a preset model in the server, and if a recognition anomaly feedback is received from the preset model, acquire a mixed data set, wherein the mixed data set includes a dataset labeled with the category to be identified in the target image; perform dynamic supervised learning through the mixed data set to generate a target detection model; and use the target detection model to recognize the target image to obtain a recognition result. The mixed data set includes a first dataset and a second dataset, wherein the first dataset and the second dataset have different annotation information. The target detection model is trained based on the first dataset set. The first dataset set is obtained based on the first dataset with supplemented annotation information and the second dataset with supplemented annotation information. The first dataset with supplemented annotation information is obtained by using detection model two to recognize the first dataset. The detection model two is trained based on the second dataset. The second dataset with supplemented annotation information is obtained by using detection model one to recognize the second dataset. The detection model one is trained based on the first dataset. The first output unit is used to output the recognition result of the target image.
19. An image processing apparatus, characterized in that, include: The first acquisition unit is used to acquire multiple frames of target images from the playing video, wherein the target images include multiple categories to be identified; The sixth recognition unit is used to recognize the target image using a preset model; The fourth acquisition unit is used to identify the target image using a preset model. If an abnormal identification feedback is received from the preset model, a mixed data set is acquired, wherein the mixed data set includes a dataset of the categories to be identified that have been labeled in the target image. The second generation unit is used to perform dynamic supervised learning based on the hybrid dataset to generate an object detection model. The hybrid dataset includes a first dataset and a second dataset. The first dataset and the second dataset have different annotation information. The object detection model is trained based on the first dataset. The first dataset is obtained based on the first dataset with supplemented annotation information and the second dataset with supplemented annotation information. The first dataset with supplemented annotation information is identified by detection model two. The detection model two is trained based on the second dataset. The second dataset with supplemented annotation information is identified by detection model one. The detection model one is trained based on the first dataset. The seventh recognition unit is used to recognize the target image using the target detection model and obtain the recognition result.
20. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the storage medium to perform the image processing method according to any one of claims 1 to 10.
21. A processor, characterized in that, The processor is used to run a program, wherein the program executes the image processing method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Model training method and device
CN110046632A
Image classification model training method, image classification method and storage medium
CN111476285A
Target detection method and device, storage medium and equipment
CN111738454A