Training method and device based on multi-model ensemble learning, electronic equipment and readable storage medium

By employing a multi-model ensemble learning approach and optimizing the training of multiple detection models and discriminators, the problem of low accuracy and recall rates of single models in internet content review is solved, achieving more efficient identification of illegal content.

CN115359280BActive Publication Date: 2025-11-25CHENGDU ZHIZHI CHUANGYU INFORMATION TECH CO LTD
2 Cites 0 Cited by

Patent Information

Application Number
CN202211067184.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-01
Publication Date
2025-11-25
Estimated Expiration
2042-09-01

AI Technical Summary

Technical Problem

In existing technologies, single models are difficult to achieve high accuracy and recall rates in internet content review, and manual intervention is inefficient and cannot effectively handle the classification of illegal content that requires consideration from multiple perspectives.

Method used

A multi-model ensemble learning approach is adopted, which processes sample images through multiple detection models to obtain multi-faceted detection results. The discriminator is then trained to construct an objective function to optimize the network parameters and weights of the discriminator until the preset requirements are met.

Benefits of technology

This improved the model's precision and recall for image processing, enabling more efficient identification of illegal content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115359280B_ABST
    Figure CN115359280B_ABST
Patent Text Reader

Abstract

The application provides a training method and device based on multi-model ensemble learning, an electronic device and a readable storage medium. After a sample image set containing multiple sample images is obtained, each sample image is introduced into multiple different detection models to obtain detection results of the sample images by each detection model. Then, multiple detection results are introduced into a discriminator, and the discriminator is trained based on a target function constructed by a sample label of the sample image and a discrimination result of the discriminator until a preset requirement is met, and a trained discriminator is obtained. In the scheme, multiple different detection models are used for detection to process the sample images from multiple angles to obtain information of the sample images from multiple aspects, and finally the training of the discriminator is comprehensively realized based on the information from multiple aspects, so that the accuracy and recall rate of image processing by the model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine learning, in particular to a training method and device based on multi-model ensemble learning, an electronic device and a readable storage medium. BACKGROUND

[0002] In recent years, the amount of information on the Internet has grown exponentially. In order to maintain a clear Internet content environment, relying solely on traditional manual review has far failed to meet the demand in terms of efficiency. The machine review system represented by feature matching and deep learning models often has difficulty in establishing a single model with high accuracy due to the complexity of the review rules. When the content to be reviewed involves multiple considerations, the single model used in the prior art cannot accurately classify the content, resulting in defects in both accuracy and recall rate. Therefore, in the review decision-making process, the existing method also uses multiple models (such as keyword models and NLP models) to make multiple decisions on a piece of data. However, when the model decision results cannot be consistent, human prior knowledge intervention is required, which is often inefficient and blind. SUMMARY

[0003] The present application aims to, for example, provide a training method and device based on multi-model ensemble learning, an electronic device and a readable storage medium, which can process images from multiple angles to improve the accuracy and recall rate of the model.

[0004] Embodiments of the present application can be implemented as follows:

[0005] In a first aspect, the present application provides a training method based on multi-model ensemble learning, which comprises:

[0006] obtaining a sample image set, the sample image set comprising a plurality of sample images;

[0007] for each sample image, the sample image is respectively introduced into a plurality of different detection models to obtain the detection results of the sample image by each detection model;

[0008] introducing the plurality of detection results into a discriminator, and training the discriminator based on a target function constructed based on the sample labels of the sample images and the discrimination results of the discriminator until a preset requirement is met, thereby obtaining a trained discriminator.

[0009] In an optional implementation, the step of introducing the plurality of detection results into the discriminator and training the discriminator based on the target function constructed based on the sample labels of the sample images and the discrimination results of the discriminator comprises:

[0010] setting a corresponding weight value for each detection model;

[0011] The respective detection results carrying the corresponding weight values are introduced into the discriminator, and a target function constructed based on the sample label of the sample image and the discrimination result of the discriminator guides the adjustment of the network parameters of the discriminator and the adjustment of the respective weight values, so as to realize training.

[0012] In an optional implementation, the step of introducing the multiple detection results into the discriminator and training the discriminator based on a target function constructed based on the sample label of the sample image and the discrimination result of the discriminator comprises:

[0013] An image feature of the sample image is extracted by using the constructed feature extraction network;

[0014] The image feature and the multiple detection results are introduced into the discriminator, and the discriminator is trained based on a target function constructed based on the sample label of the sample image and the discrimination result of the discriminator.

[0015] In an optional implementation, the multiple detection models comprise a target detection model.

[0016] The step of introducing the sample image into the multiple different detection models respectively to obtain the detection result of the sample image by each detection model comprises:

[0017] The sample image is introduced into the target detection model for processing to identify whether the sample image contains a target object.

[0018] When the sample image contains the target object, the proportion and the position information of the target object in the sample image are output.

[0019] In an optional implementation, the multiple detection models comprise a classification model.

[0020] The step of introducing the sample image into the multiple different detection models respectively to obtain the detection result of the sample image by each detection model comprises:

[0021] The sample image is introduced into the classification model for processing to obtain a probability value of each object category in multiple object categories to which the sample image belongs.

[0022] The multiple object categories and the corresponding probability values are output.

[0023] In an optional implementation, the multiple detection models comprise a feature matching model.

[0024] The step of introducing the sample image into the feature matching model for processing to perform feature matching between the sample image and each rule image in a pre-constructed rule library, and obtaining a matching degree between the sample image and each rule image.

[0025] The sample image is introduced into the feature matching model for processing to perform feature matching between the sample image and each rule image in a pre-constructed rule library, and a matching degree between the sample image and each rule image is obtained.

[0026] A rule image with the largest matching degree with the sample image and a corresponding matching degree are obtained.

[0027] In an optional implementation, the step of introducing the plurality of detection results into the discriminator includes:

[0028] The plurality of detection results are normalized, and the normalized detection results are introduced into the discriminator.

[0029] In a second aspect, the present application provides a training device based on multi-model ensemble learning, and the device includes:

[0030] An acquisition module is configured to acquire a sample image set, and the sample image set includes a plurality of sample images.

[0031] An obtaining module is configured to introduce each sample image into a plurality of different detection models respectively, and obtain a detection result of each detection model for the sample image.

[0032] A training module is configured to introduce a plurality of detection results into a discriminator, and train the discriminator based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator until a preset requirement is met, and obtain a trained discriminator.

[0033] In a third aspect, the present application provides an electronic device including one or more storage media and one or more processors in communication with the storage media, and the one or more storage media store machine executable instructions executable by the processor. When the electronic device is running, the processor executes the machine executable instructions to perform the method steps of any one of the preceding embodiments.

[0034] In a fourth aspect, the present application provides a computer readable storage medium storing machine executable instructions, and the machine executable instructions are executed to implement the method steps of any one of the preceding embodiments.

[0035] The beneficial effects of the embodiments of the present application include, for example:

[0036] This application provides a training method based on multi-model ensemble learning. After obtaining a sample image set containing multiple sample images, each sample image is imported into multiple different detection models to obtain the detection results of each model. These multiple detection results are then imported into a discriminator. The discriminator is trained using an objective function constructed based on the sample labels of the sample images and the discriminator's discrimination results until preset requirements are met, resulting in a trained discriminator. In this scheme, multiple different detection models are first used to process the sample images from multiple perspectives, obtaining multifaceted information. Finally, the discriminator is trained based on this multifaceted information, which can improve the model's accuracy and recall in image processing. Attached Figure Description

[0037] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 A flowchart illustrating the training method based on multi-model ensemble learning provided in this application embodiment;

[0039] Figure 2 for Figure 1 One of the flowcharts for the sub-steps included in step S102;

[0040] Figure 3 for Figure 1 The second flowchart of the sub-steps included in step S102;

[0041] Figure 4 for Figure 1 The third flowchart of the sub-steps included in step S102;

[0042] Figure 5 for Figure 1 A flowchart of the sub-steps included in step S103;

[0043] Figure 6 A schematic diagram illustrating the training process principle provided in the embodiments of this application;

[0044] Figure 7 A structural block diagram of the electronic device provided in the embodiments of this application;

[0045] Figure 8 A functional block diagram of a training device based on multi-model ensemble learning provided in an embodiment of this application.

[0046] Icon: 110 - storage medium; 120 - processor; 130 - training device based on multi-model ensemble learning; 131 - acquisition module; 132 - obtaining module; 133 - training module; 140 - communication interface. DETAILED DESCRIPTION

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.

[0048] Therefore, the detailed description of the embodiments of the present application provided below in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art without making creative efforts based on the embodiments in the present application are within the scope of protection of the present application.

[0049] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0050] It should be noted that: the features in the embodiments of the present application can be combined with each other without conflict.

[0051] Please refer to Figure 1 The flowchart of the training method based on multi-model ensemble learning provided by the embodiments of the present application is shown in the drawings, and the method steps defined by the flowchart of the training method based on multi-model ensemble learning can be realized by an electronic device, for example, the electronic device can be a device such as a personal computer, a notebook computer, a server, etc. The specific flow shown in the drawings will be described in detail below. Figure 1

[0052] S101, a sample image set is acquired, and the sample image set includes multiple sample images.

[0053] S102, for each sample image, the sample image is respectively introduced into multiple different detection models, and detection results of the sample image by each detection model are obtained.

[0054] S103, multiple detection results are introduced into a discriminator, and the discriminator is trained based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator, until a preset requirement is met, and a trained discriminator is obtained.

[0055] ​In this embodiment, the obtained sample image can be an image intercepted on the Internet, including an image containing illegal content, and also including an image not containing illegal content. The illegal content can be, for example, violent content, content containing sensitive information, etc. The illegal content can be set according to requirements.

[0056] In addition, in this embodiment, in addition to training based on image-form sample and subsequent detection of images, samples in the form of text, audio and video can also be trained, so that subsequent illegal detection of objects in the form of text, audio and video can be performed.

[0057] In this embodiment, a plurality of detection models can also be trained in advance. The detection models can be different in network architecture. Each detection model can identify and detect sample images from different emphases, so as to obtain detection results of the sample images from different angles. The obtained detection results can include, for example, whether the sample image contains illegal objects, the probability of the presence of illegal objects, the probability of the sample image belonging to each classification category, and the matching degree between the sample image and each pre-stored illegal content.

[0058] On this basis, the plurality of detection results are taken as inputs of the constructed discriminator, and each sample image itself has an actual sample label. The sample label is used to identify the actual category of the sample image. For example, the actual category of the sample image can be divided into an illegal category and a non-illegal category. When the actual category of the sample image is the illegal category, the sample label can be 1. When the actual category of the sample image is the non-illegal category, the sample label can be 0.

[0059] The discriminator processes the plurality of detection results as inputs, and finally outputs a discrimination result of the discriminator for the sample image. The discrimination result is a prediction result of the discriminator for the sample image.

[0060] A target function can be constructed based on the sample label of the sample image and the discrimination result of the discriminator for the sample image. The training of the discriminator is guided based on the target function. After multiple iterations of training, when a preset requirement is met, the training can be stopped to obtain the trained discriminator.

[0061] The preset requirement can be, for example, that the target function reaches convergence, or that the number of iterations reaches a preset maximum number, or that the duration of iteration reaches a preset maximum duration.

[0062] The constructed target function can be as follows:

[0063]

[0064] wherein N represents the number of detection results, M represents the number of categories, y icis a symbol function (taking 0 or 1), taking 1 if the sample label of the sample image belongs to the class c, otherwise taking 0, p ic represents a probability value of a discriminant result output by the discriminator belonging to the class c.

[0065] The training method based on multi-model ensemble learning provided in this embodiment first detects the sample image by using multiple different detection models, so as to process the sample image from multiple angles and obtain detection information of the sample image from multiple aspects. Finally, the training of the discriminator is comprehensively realized based on the detection information from multiple aspects, which can improve the precision and recall rate of image processing of the model.

[0066] As known from the above, each detection model can process the sample image from different emphases to obtain detection results of the sample image from different angles. Among them, the multiple detection models include a target detection model, please refer to Figure 2 In a possible implementation, the step S102 can include the following sub-steps:

[0067] S1021A, the sample image is imported into the target detection model for processing to identify whether the sample image contains a target object.

[0068] S1022A, when the sample image contains a target object, output the proportion and position information of the target object in the sample image.

[0069] In this embodiment, the target object can be an object such as a rule-violating article, a rule-violating face, and a rule-violating text. The target detection model can perform image recognition processing on the sample image to determine whether the sample image contains a target object. In the case where the sample image does not contain a target object, the detection result output by the target detection model represents that the sample image does not contain a target object.

[0070] When it is detected that the sample image contains a target object, the detection result output by the target detection result can contain the proportion and position information of the target object in the sample image. Specifically, after identifying the target object in the sample image, the target detection model can frame the target object in the sample image by using a rectangular frame, which can be the smallest rectangular frame that can frame the target object.

[0071] For example, extreme points of the target object in multiple directions can be determined, for example, extreme points of the target object in the upper, lower, left, and right directions can be determined, and then a rectangular frame framing the target object is set based on the extreme points in the four directions.

[0072] In the calculation of the proportion of the target object in the sample image, the proportion can be obtained based on the ratio of the area of the rectangular frame to the area of the sample image. In addition, in the calculation of the position information of the target object in the sample image, the construction of the coordinate system can be based on the sample image, the center point of the rectangular frame is determined, and the position information of the center point in the coordinate system is obtained as the position information of the target object.

[0073] In addition, in the present embodiment, the plurality of detection models can further include a classification model capable of classifying sample images. Please refer to Figure 3 In a possible implementation, the step S102 can include the following sub-steps:

[0074] S1021B, introducing the sample image into the classification model for processing to obtain the probability value of each object category to which the sample image belongs.

[0075] S1022B, outputting the plurality of object categories and the corresponding probability values.

[0076] In the present embodiment, the object categories can be categories divided by different objects, such as categories of violent objects, categories of exposed objects, etc. Unlike the classification categories, which are classified by the presence or absence of illegal content, the object categories are specific to the specific objects under the illegal content.

[0077] In the present embodiment, a plurality of object categories can be pre-divided, and the classification model can analyze and process the sample image, and compare the features of the sample image with the object categories, so as to obtain the probability value of each object category to which the sample image can belong. Thus, the output of the classification model is the plurality of classification categories and the corresponding probability values, such as the probability value of the violent object category being 95% and the probability value of the exposed object category being 1%, etc.

[0078] In addition, in the present embodiment, the plurality of detection models can further include a feature matching model, therefore, please refer to Figure 4 In another possible implementation, the step S102 can include the following sub-steps:

[0079] S1021C, introducing the sample image into the feature matching model for processing to match the features of the sample image with each illegal image in the pre-constructed illegal library, and obtaining the matching degree between the sample image and each illegal image.

[0080] S1022C, obtaining the illegal image with the largest matching degree with the sample image and the corresponding matching degree.

[0081] In this embodiment, a rule violation library is constructed in advance, and the rule violation library includes multiple rule violation images, which can include multiple images of multiple rule violation objects, such as multiple rule violation images of violent objects, multiple rule violation images including exposed objects, and the like.

[0082] The feature matching model performs feature recognition processing on the sample image, and performs feature matching between the sample image and each rule violation image to obtain a matching degree between the sample image and each rule violation image. Finally, the rule violation image with the highest matching degree with the sample image is output, and the specific matching degree between the two is output.

[0083] In the above manner, the target detection model, the classification model, and the feature matching model are respectively used to process the sample image from different emphases, so as to obtain detection results from different angles.

[0084] It should be noted that in this embodiment, only the above three types of detection models are listed, and in actual application process, they can also be set according to requirements, and are not limited to the above three types of detection models.

[0085] In this embodiment, when the detection results of multiple detection models are input into the discriminator for training, the contribution of the detection results of each detection model to the training of the discriminator may be different. Some detection results may contribute more to the final accuracy and recall rate of the discriminator, and theoretically, the proportion of such detection results as input information should be larger, while some detection results may contribute less to the final accuracy and recall rate of the discriminator, and theoretically, the proportion of such detection results as input information should be smaller. Therefore, when the discriminator is trained based on multiple detection results, the proportion information of each detection result should be different.

[0086] The weight of each detection result can be set by artificial experience, so that each detection result is input into the discriminator for training according to different weights. However, this method completely depends on expert experience and may not be consistent with the actual scene, so please refer to Figure 5 In this embodiment, when the discriminator is trained, the following methods can be used:

[0087] S1031, setting a corresponding weight value for each detection model.

[0088] S1032, introducing each detection result carrying a corresponding weight value into the discriminator, and guiding the adjustment of the network parameters of the discriminator and the adjustment of each weight value based on the target function constructed based on the sample label of the sample image and the discrimination result of the discriminator, so as to realize training.

[0089] In this embodiment, weight values are set for each detection model, and the sum of the weight values of the plurality of detection models can be 1. The set weight value of each detection model is an initial weight value, which will be adjusted according to the training result subsequently.

[0090] When the detection results of each detection model are introduced into the discriminator for processing, each detection result will carry its corresponding weight value, so that in the process of training the discriminator according to each detection result, the contribution of each detection result to the training of the discriminator is inconsistent.

[0091] Among them, the greater the corresponding weight value of the detection result, the greater the contribution to the training of the discriminator, and the smaller the corresponding weight value of the detection result, the smaller the contribution to the training of the discriminator.

[0092] Under the guidance of the constructed objective function, the discriminator is trained, and after each iteration training is completed, the network parameters of the discriminator and the weight values of each detection model can be adjusted, and then the subsequent iteration training is continued. In this way, after the final iteration training is completed, the obtained discriminator and the weight values of each detection model are relatively optimal. Thus, the purpose of scientifically and effectively determining the weight values of each detection model is achieved.

[0093] In this embodiment, considering that the magnitudes of the detection results output by each detection model can not be the same, in the above step of introducing each detection result into the discriminator for training, the plurality of detection results can be normalized. The normalized detection results are introduced into the discriminator.

[0094] Specifically, the probability values of different scales output by each detection model can be normalized, and the position information, proportion information, etc. of the target object can also be normalized. Thus, the detection results of each detection model are attributed to a certain range.

[0095] Further, in this embodiment, considering that the discriminator is trained based on the detection results of the plurality of detection models, the detection results are the results output by the detection models, which are the processing results of the original sample images. The detection results can lack the original image information of the sample images, therefore, in order to improve the breadth of the information input into the discriminator and increase the ability of illegal content recognition, in the process of training the discriminator described above, the following methods can be used:

[0096] The image features of the sample image are extracted by using the constructed feature extraction network.

[0097] The image feature and the plurality of detection results are input into the discriminator, and the discriminator is trained based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator.

[0098] In this embodiment, the feature extraction network can only extract the image feature of the sample image, and does not perform processing such as object recognition and category classification on the sample image. The image feature extracted by the feature extraction network is input into the discriminator together with the detection results obtained by the plurality of detection models. In this way, the discriminator can obtain a final discrimination result based on the image feature and the plurality of detection results. Furthermore, the discrimination result and the sample label of the sample image are used to construct a target function, and the training of the discriminator is guided.

[0099] Referring to Figure 6 In this case, the feature extraction network can also set an initial weight value for each detection model. In the above example, when the detection model includes a target detection model, a classification model, and a feature matching model, the weight values corresponding to each detection model and the feature extraction network are w1, w2, w3, and w4, respectively.

[0100] After the feature extraction network obtains the image feature of the sample image, each detection result carrying a respective weight value and the image feature carrying a corresponding weight value are input into the discriminator for training. Thus, after training is completed, the optimal weight values corresponding to each detection model and the feature extraction network can be obtained.

[0101] In this embodiment, the sample image set can include a training sample set and a test sample set. The training of the discriminator and the weight values of each detection model and the feature extraction network can be implemented based on the sample images in the training sample set. When the training meets the preset requirements, the training can be stopped, and the trained discriminator and the weight values of each detection model and the feature extraction network can be tested and verified using the sample images in the test sample set. When the test and verification result meets the requirements, the optimized discriminator and the corresponding combination of weight values can be obtained.

[0102] On this basis, subsequent image identification processing for identifying illegal content can be performed using each detection model, the discriminator, the feature extraction network, and the optimized combination of weight values, which can achieve high accuracy and recall rate.

[0103] Referring to Figure 7An exemplary component diagram of an electronic device is provided for the embodiments of the present application. The electronic device can be a personal computer, a notebook computer, a server, etc. The electronic device can include a storage medium 110, a processor 120, a training apparatus based on multi-model ensemble learning 130, and a communication interface 140. In the present embodiment, the storage medium 110 and the processor 120 are located in the electronic device and are separately arranged. However, it should be understood that the storage medium 110 can also be independent of the electronic device, and can be accessed by the processor 120 through a bus interface. Alternatively, the storage medium 110 can also be integrated into the processor 120, for example, it can be a cache and / or a general-purpose register.

[0104] The training apparatus based on multi-model ensemble learning 130 can be understood as the above-mentioned electronic device, or the processor 120 of the electronic device, and can also be understood as a software functional module independent of the above-mentioned electronic device or the processor 120, which realizes the above-mentioned training method based on multi-model ensemble learning under the control of the electronic device.

[0105] As shown in Figure 8 The training apparatus based on multi-model ensemble learning 130 can include an acquisition module 131, an obtaining module 132, and a training module 133. The functions of each functional module of the training apparatus based on multi-model ensemble learning 130 will be described in detail below.

[0106] The acquisition module 131 is configured to acquire a sample image set, wherein the sample image set includes a plurality of sample images.

[0107] It should be understood that the acquisition module 131 can be used to perform the above-mentioned step S101, and the detailed implementation of the acquisition module 131 can refer to the above-mentioned content related to step S101.

[0108] The obtaining module 132 is configured to, for each sample image, input the sample image into a plurality of different detection models respectively, and obtain a detection result of each detection model for the sample image.

[0109] It should be understood that the obtaining module 132 can be used to perform the above-mentioned step S102, and the detailed implementation of the obtaining module 132 can refer to the above-mentioned content related to step S102.

[0110] The training module 133 is configured to input a plurality of detection results into a discriminator, and train the discriminator based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator, until a preset requirement is met, and obtain a trained discriminator.

[0111] It can be understood that the training module 133 can be used to perform the step S103 described above, and the detailed implementation of the training module 133 can refer to the content described above about the step S103.

[0112] In a possible implementation, the training module 133 described above can be configured to:

[0113] set a corresponding weight value for each detection model;

[0114] introduce each detection result carrying the corresponding weight value into a discriminator, and guide adjustment of network parameters of the discriminator and adjustment of each weight value based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator, so as to realize training.

[0115] In a possible implementation, the training module 133 described above can be configured to:

[0116] extract an image feature of the sample image by using the constructed feature extraction network;

[0117] introduce the image feature and a plurality of detection results into a discriminator, and train the discriminator based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator.

[0118] In a possible implementation, the plurality of detection models includes a target detection model, and the obtaining module 132 described above can be configured to:

[0119] introduce the sample image into the target detection model for processing, to identify whether the sample image contains a target object;

[0120] when the sample image contains the target object, output a proportion and position information of the target object in the sample image.

[0121] In a possible implementation, the plurality of detection models includes a classification model, and the obtaining module 132 described above can be configured to:

[0122] introduce the sample image into the classification model for processing, to obtain a probability value of each object category in a plurality of object categories to which the sample image belongs;

[0123] output the plurality of object categories and the corresponding probability values.

[0124] In a possible implementation, the plurality of detection models includes a feature matching model, and the obtaining module 132 described above can be configured to:

[0125] The sample image is imported into the feature matching model for processing, so as to perform feature matching between the sample image and each rule image in the pre-constructed rule library, and obtain a matching degree between the sample image and each rule image.

[0126] A rule image with the largest matching degree with the sample image is obtained, and a corresponding matching degree is obtained.

[0127] In a possible implementation, the training module 133 can be used to:

[0128] The plurality of detection results are normalized, and the normalized detection results are imported into the discriminator.

[0129] The description of the processing flow of each module in the device and the interaction flow between the modules can refer to the related description in the above method embodiments, and will not be described in detail here.

[0130] Further, the present application embodiment also provides a computer readable storage medium, the computer readable storage medium stores machine executable instructions, the machine executable instructions are executed to realize the training method based on multi-model ensemble learning provided by the above embodiment.

[0131] Specifically, the computer readable storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the computer readable storage medium is run, the above training method based on multi-model ensemble learning can be executed. For the process involved when the computer readable storage medium and its executable instructions are run, refer to the related description in the above method embodiments, which will not be described in detail here.

[0132] In summary, the training method, device, electronic equipment and readable storage medium based on multi-model ensemble learning provided by the present application embodiment, after obtaining a sample image set containing a plurality of sample images, each sample image is imported into a plurality of different detection models to obtain the detection result of each sample image by the detection model. Then, the plurality of detection results are imported into the discriminator, and the target function constructed based on the sample label of the sample image and the discrimination result of the discriminator is used to train the discriminator until the preset requirement is met, and the trained discriminator is obtained. In the present scheme, first, a plurality of different detection models are used for detection to process the sample image from multiple angles and obtain the information of the sample image from multiple aspects. Finally, the training of the discriminator is realized based on the information from multiple aspects, which can improve the accuracy and recall rate of image processing by the model.

[0133] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A training method based on multi-model ensemble learning, characterized in that, The method comprises: obtaining a sample image set comprising a plurality of sample images; for each sample image, introducing the sample image into a plurality of different detection models to obtain a detection result of each detection model on the sample image; introducing the plurality of detection results into a discriminator, and training the discriminator based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator until a preset requirement is met to obtain a trained discriminator; the step of training the discriminator comprises: setting a corresponding weight value for each detection model; introducing each detection result carrying the corresponding weight value into the discriminator, and guiding adjustment of network parameters of the discriminator and adjustment of each weight value based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator to realize training; the constructed target function can be as follows: wherein, N denotes the number of detection results, M denotes the number of classes, y ic is a symbol function taking 0 or 1, 1 if the sample label of the sample image belongs to class c, otherwise 0, p ic denotes the probability value that the discrimination result of the discriminator output belongs to class c.

2. The training method based on multi-model ensemble learning according to claim 1, characterized in that, the plurality of detection models comprise a target detection model; the step of introducing the sample image into a plurality of different detection models to obtain a detection result of each detection model on the sample image comprises: introducing the sample image into the target detection model for processing to identify whether the sample image contains a target object; when the sample image contains the target object, outputting a proportion and position information of the target object in the sample image.

3. The training method based on multi-model ensemble learning according to claim 1, characterized in that, the plurality of detection models comprise a classification model; the step of introducing the sample image into a plurality of different detection models to obtain a detection result of each detection model on the sample image comprises: introducing the sample image into the classification model for processing to obtain a probability value of each object category to which the sample image belongs in a plurality of object categories; outputting the plurality of object categories and the corresponding probability values. 4.The method of claim 1, wherein, the plurality of detection models comprise a feature matching model; the step of introducing the sample image into a plurality of different detection models to obtain a detection result of each detection model on the sample image comprises: introducing the sample image into the feature matching model for processing to perform feature matching between the sample image and each violation image in a pre-constructed violation library to obtain a matching degree between the sample image and each violation image; obtaining a violation image with the largest matching degree with the sample image and the corresponding matching degree. 5.The multi-model ensemble learning based training method of claim 1, wherein, the step of introducing the plurality of detection results into the discriminator comprises: normalizing the plurality of detection results, and introducing the normalized detection results into the discriminator.

6. A training device based on multi-model ensemble learning, characterized in that, The device is used to implement the training method based on multi-model ensemble learning according to any one of claims 1-5, and the device comprises: an obtaining module configured to obtain a sample image set comprising a plurality of sample images; an obtaining module configured to, for each sample image, introduce the sample image into a plurality of different detection models to obtain a detection result of each detection model on the sample image; an obtaining module configured to introduce the plurality of detection results into a discriminator, and train the discriminator based on a target function constructed based on a sample label of the sample image and a discrimination result of the discriminator until a preset requirement is met to obtain a trained discriminator. The training module is configured to input the multiple detection results into the discriminator, and train the discriminator based on a target function constructed based on the sample label of the sample image and a discrimination result of the discriminator until a preset requirement is met, and obtain the trained discriminator.

7. An electronic device, comprising: The electronic device comprises one or more storage media and one or more processors in communication with the storage media, and the one or more storage media store machine-executable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-executable instructions to perform the method steps of any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores machine-executable instructions, and the machine-executable instructions are executed by the processor to implement the method steps of any one of claims 1-5.

Citation Information

Patent Citations

  • Image type identification method and device, equipment, medium and product

    CN114708539A

  • Method and apparatus for determining optimized training scheme

    KR102378729B1