CN111753911A - Method and apparatus for fusing models - Google Patents

Method and apparatus for fusing models Download PDF

Info

Publication number
CN111753911A
CN111753911A CN202010594541.7A CN202010594541A CN111753911A CN 111753911 A CN111753911 A CN 111753911A CN 202010594541 A CN202010594541 A CN 202010594541A CN 111753911 A CN111753911 A CN 111753911A
Authority
CN
China
Prior art keywords
models
model
samples
fusing
candidate sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010594541.7A
Other languages
Chinese (zh)
Inventor
崔程
杨敏
魏凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010594541.7A priority Critical patent/CN111753911A/en
Publication of CN111753911A publication Critical patent/CN111753911A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

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

Abstract

The application discloses a method and a device for model fusion, and relates to the field of artificial intelligence deep learning and image processing. The specific implementation scheme is as follows: obtaining at least 2 models; acquiring a preset sample set; randomly deleting the sample set to obtain at least 2 different candidate sample sets; for each model in at least 2 models, performing model training by using one candidate sample set in at least 2 different candidate sample sets to obtain a trained model; and fusing the models trained by different candidate sample sets to obtain a fused model. The method and the device can accelerate the model training speed and improve the accuracy of image recognition.

Description

Method and apparatus for fusing models
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to the field of artificial intelligence deep learning and image processing.
Background
The image recognition technology is a technology for extracting features of an image by means of machine learning and distinguishing different images by the extracted features. The image recognition technology is widely applied to various visual tasks, such as plant classification, dish recognition, landmark recognition and the like. In the field of image recognition, how to improve the accuracy of existing models is one of the most important points to be explored in academia and industry.
The prior art improves the accuracy of models by model fusion. The model fusion mode is obtained by training a plurality of models on a unified data set, and the data can determine the quality and the tropism of the models, so that the training of the plurality of models on the unified data set can lead the plurality of models to keep consistent tropism, and the fused result has certain tropism, so that the improvement of the result by the fusion is limited.
Disclosure of Invention
The present disclosure provides an apparatus, a device, and a storage medium for fusing models.
According to a first aspect of the present disclosure, there is provided a method for fusing models, comprising: obtaining at least 2 models; acquiring a preset sample set; randomly deleting the sample set to obtain at least 2 different candidate sample sets; for each model in at least 2 models, performing model training by using one candidate sample set in at least 2 different candidate sample sets to obtain a trained model; fusing the models trained by different candidate sample sets to obtain a fused model
According to a second aspect of the present disclosure, there is provided an apparatus for fusing models, comprising: a model acquisition unit configured to acquire at least 2 models; a sample acquisition unit configured to acquire a preset sample set; the deleting unit is configured to randomly delete the sample set to obtain at least 2 different candidate sample sets; a training unit configured to perform model training using one candidate sample set of at least 2 different candidate sample sets for each of at least 2 models, resulting in a trained model; and the fusion unit is configured to fuse the models trained by the different candidate sample sets to obtain a fused model.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the apparatus of any one of the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions, wherein the computer instructions are for causing a computer to execute the apparatus of any one of the first aspects.
According to the technology of the application, the problem that the multiple models keep consistent tropism when the multiple models are trained on a unified data set is solved, the fused result has certain tropism, and the fused result is improved. Therefore, higher identification accuracy can be achieved by using less hardware equipment, so that the accuracy and the speed of image processing are improved, the use of hardware equipment such as a GPU (graphics processing unit) is reduced, and the cost is reduced.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for fusing models, according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a method for fusing models according to the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a method for fusing models according to the present disclosure;
FIG. 5 is a schematic structural diagram of one embodiment of an apparatus for fusing models, according to the present disclosure;
FIG. 6 is a block diagram of an electronic device for implementing an apparatus for fusing models according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 illustrates an exemplary system architecture 100 of an apparatus for fusing models, to which the method for fusing models of the embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminals 101, 102, a network 103, a database server 104, and a server 105. The network 103 serves as a medium for providing communication links between the terminals 101, 102, the database server 104 and the server 105. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user 110 may use the terminals 101, 102 to interact with the server 105 over the network 103 to receive or send messages or the like. The terminals 101 and 102 may have various client applications installed thereon, such as a model training application, an image recognition application, a shopping application, a payment application, a web browser, an instant messenger, and the like.
Here, the terminals 101 and 102 may be hardware or software. When the terminals 101 and 102 are hardware, they may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio La6er III), laptop portable computers, desktop computers, and the like. When the terminals 101 and 102 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
When the terminals 101, 102 are hardware, an image capturing device may be further mounted thereon. The image acquisition device can be various devices capable of realizing the function of acquiring images, such as a camera, a sensor and the like. The user 110 may capture images using an image capture device on the terminal 101, 102.
Database server 104 may be a database server that provides various services. For example, a database server may have a sample set stored therein. The sample set contains a large number of samples. Wherein the sample may include a sample image and category label information. In this way, the user 110 may also select samples from a set of samples stored by the database server 104 via the terminals 101, 102.
The server 105 may also be a server providing various services, such as a background server providing support for various applications displayed on the terminals 101, 102. The background server may train the initial model using samples in the sample set sent by the terminals 101 and 102, and may send the training result (e.g., the generated image recognition model) to the terminals 101 and 102. In this way, the user can perform image recognition using the generated image recognition model.
Here, the database server 104 and the server 105 may be hardware or software. When they are hardware, they can be implemented as a distributed server cluster composed of a plurality of servers, or as a single server. When they are software, they may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for fusing models provided in the embodiments of the present application is generally performed by the server 105. Accordingly, the means for fusing models is also typically provided in the server 105.
It is noted that database server 104 may not be provided in system architecture 100, as server 105 may perform the relevant functions of database server 104.
It should be understood that the number of terminals, networks, database servers, and servers in fig. 1 are merely illustrative. There may be any number of terminals, networks, database servers, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for fusing models in accordance with the present application is shown. The method for fusing models may comprise the steps of:
step 201, at least 2 models are obtained.
In this embodiment, the executing agent (e.g., server 105 shown in fig. 1) of the method for fusing models may obtain at least 2 models from a third-party server. The model may be an existing variety of neural network models created based on machine learning techniques. The neural network model may have various existing neural network structures (e.g., DenseBox, VGGNet, ResNet, SegNet, etc.). At least 2 models have the same or different model structures. For example, 3 models may be obtained, where 2 models are identical in structure and 1 model is different in structure from the other 2 models. It is also possible to obtain a plurality of identical models or to obtain a plurality of models of different structures.
Even if the same model is trained by using different samples, the recognition results are different, so that the fusion of multiple models can be realized, the existing model can be effectively utilized, and the accuracy of image recognition is improved.
Step 202, a preset sample set is obtained.
In this embodiment, the execution subject of the method for fusing models (e.g., the server 105 shown in fig. 1) may obtain the sample set in a variety of ways. For example, the executing entity may obtain the existing sample set stored therein from a database server (e.g., database server 104 shown in fig. 1) via a wired connection or a wireless connection. As another example, a user may collect a sample via a terminal (e.g., terminals 101, 102 shown in FIG. 1). In this way, the executing entity may receive samples collected by the terminal and store the samples locally, thereby generating a sample set.
Here, the sample set may include at least one sample. Wherein the sample may include a sample image and feature information and category information corresponding to the sample image. The feature information here may be information for characterizing features in the image. For example, the feature information may include position information of the target in the image or target contour key point information, such as the detection frame (x,6, w, h). Wherein x represents the abscissa of the center point of the detection frame; 6 represents the vertical coordinate of the central point of the detection frame; w represents the width of the detection frame; h represents the length of the detection box. The category information refers to a category of a detection target in the detection frame, for example, a cat, a dog, a person, a tree, a car, and the like.
It is understood that the feature information and the category information may be manually set in advance, or may be obtained by executing a certain setting program by a main body or other devices. As an example, where a detection box is known, the execution subject may determine a center point location of the detection box. Then, the type of the detection target in the detection frame is determined.
In the present embodiment, the sample image generally refers to an included image. It may be a planar image or a stereoscopic image (i.e., an image containing depth information). And the sample image may be a color image (e.g., an RGB (Red, Green, Blue, Red-Green-Blue) photograph) and/or a grayscale image, etc. The format of the image is not limited in the present application, and formats such as jpg (Joint Photographic Experts Group, a picture format), BMP (Bitmap, an image file format), or RAW (RAW image format) are only required as long as subject reading and recognition can be performed.
Step 203, randomly deleting the sample set to obtain at least 2 different candidate sample sets.
In the embodiment, a part of the sample set is randomly deleted, the deleted data is not too much, too much data can affect the result of the single model, and generally, the data of 1/50-1/20 is randomly deleted. Every time a part is randomly deleted, a candidate sample set can be obtained. Eventually, the same number of candidate sample sets as the models need to be obtained. That is, each model requires a sample set.
In some optional implementations of this embodiment, the samples in the sample set are grouped by category; for each set of samples, samples are randomly deleted from the set of samples. Each model is a classifier that can identify objects of the same class, but also objects of different classes. The samples used to train the model are of multiple classes. Such as cats, dogs, cars, trees, etc. Samples may be grouped, grouped into a group, of the same class. And randomly deleting samples from each group, so that the samples of each type can not be over-sampled or under-sampled, and the recognizable types of each model can not be reduced.
And 204, performing model training on each model in the at least 2 models by using one candidate sample set in the at least 2 different candidate sample sets to obtain a trained model.
In this embodiment, a single model is trained by a sample set with a part of samples deleted, and then such a process is performed for each model, so that the trained models have different tendencies, and the fused result is more robust. Supervised training may be performed with sample images in the sample as input and feature information and category information as desired output. The training process of the model is prior art, and therefore is not described in detail.
And step 205, fusing the models trained by different candidate sample sets to obtain a fused model.
In the present embodiment, the method of model fusion is not limited to the following 2: the first is direct to full connectivity layer fusion. The second is to vote on the results generated by each model in the target dataset, with minority subject to majority. Regardless of the fusion mode, the training data for each model is consistent. The full-connection layer is fused on the model layer, so that more information can be reserved, and the identification accuracy is higher. The result voting fusion is to vote the identification result of each model, the number of votes is large and the votes are used as the final result, the models can be flexibly matched, the cutting is carried out according to the requirement, and the use efficiency is improved.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for fusing models according to the present embodiment. In the application scenario of fig. 3, samples in the original sample set are randomly deleted. And constructing a corresponding number of new sample sets according to the number of models needing to be fused. For example, if 10 models participate in the fusion, the original sample set may be randomly deleted 10 times to obtain 10 new sample sets, and then the 10 sample sets are input into the 10 models respectively for training. Finally, model fusion is carried out after 10 trained models are obtained. When the fused model is predicted again, a more accurate result can be obtained.
The method provided by the above-mentioned embodiments of the present disclosure is different from existing solutions, and the model-fused solution has its unique characteristic for each single model. Even if two same models are used for training two data sets of random deletion data, the results are not consistent, the accuracy of each type is different, the correlation of the results of the obtained multiple models is lower, and the fusion effect is better. The training set of the application is smaller than the training set of the model fusion training single model in the past, and the training speed of the model is faster. Previous model fusion schemes typically fused multiple different models because the same model trained the same data and the results were very similar. In the scheme, the training data are different, so that the results of a plurality of same models can be fused, the existing models can be greatly utilized, and the results are improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for fusing models is shown. The process 400 of the method for fusing models includes the steps of:
step 401, at least 2 models are obtained.
Step 402, a preset sample set is obtained.
The steps 401-402 are substantially the same as the steps 201-202, and therefore will not be described again.
In step 403, the samples in the sample set are grouped by category.
In this embodiment, each model is a classifier that can identify the same kind of object, and can also identify different kinds of objects. The samples used to train the model are of multiple classes. Such as cats, dogs, cars, trees, etc. Samples may be grouped, grouped into a group, of the same class.
And step 404, sorting the samples in each group from large to small.
In this embodiment, the number of samples in each group of samples is counted and then sorted. For example, cats (1 million), dogs (8 thousand), cars (7800), trees (5600).
And 405, randomly deleting the samples from each group of sorted samples in sequence according to the deletion proportion from large to small.
In this embodiment, the deletion ratio is not fixed, and the larger the number of samples, the larger the deletion ratio. For example, cats (1 million, delete 20%), dogs (8 thousand, delete 15%), cars (7800, delete 10%), trees (5600, delete 5%). To ensure that the number of samples of each type reaches a minimum threshold, thus ensuring that the model is able to adequately learn features from the samples.
And 406, performing model training on each model of the at least 2 models by using one candidate sample set of the at least 2 different candidate sample sets to obtain a trained model.
And step 407, fusing the models trained by different candidate sample sets to obtain a fused model.
Step 406-407 is substantially the same as step 204-205, and therefore, the description thereof is omitted.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for fusing models in this embodiment represents the step of deleting by sample category. Therefore, the scheme described in the embodiment can avoid the situation that the number of samples of certain categories is insufficient and the learning cannot be fully realized.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of an apparatus for fusing models, which corresponds to the embodiment of the method shown in fig. 2, and which can be applied in various electronic devices.
As shown in fig. 5, the apparatus 500 for fusing models of the present embodiment includes: a model acquisition unit 501, a sample acquisition unit 502, a deletion unit 503, a training unit 504, and a fusion unit 505. Wherein, the model obtaining unit 501 is configured to obtain at least 2 models; a sample acquiring unit 502 configured to acquire a preset sample set; a deleting unit 503 configured to randomly delete the sample set, so as to obtain at least 2 different candidate sample sets; a training unit 504 configured to perform model training on each of the at least 2 models by using one candidate sample set of at least 2 different candidate sample sets, so as to obtain a trained model; and a fusion unit 505 configured to fuse the models trained by the different candidate sample sets to obtain a fused model.
In this embodiment, the specific processes of the model obtaining unit 501, the sample obtaining unit 502, the deleting unit 503, the training unit 504 and the fusing unit 505 of the apparatus 500 for fusing models may refer to step 201, step 202, step 203 and step 204 in the corresponding embodiment of fig. 2.
In some optional implementations of this embodiment, the deleting unit 503 is further configured to: grouping the samples in the sample set by category; for each set of samples, samples are randomly deleted from the set of samples.
In some optional implementations of this embodiment, the deleting unit 503 is further configured to: sorting the samples in each group from large to small; and randomly deleting the samples from each group of sorted samples in sequence according to the deletion proportion from large to small.
In some optional implementations of this embodiment, the fusion unit 505 is further configured to: and carrying out model level fusion on the fully connected layers of the models trained by different candidate sample sets.
In some optional implementations of this embodiment, the fusion unit 505 is further configured to: and voting and fusing the results generated by each model trained by different candidate sample sets in the target data set.
In some alternative implementations of this embodiment, at least 2 models have the same or different model structures.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 6 is a block diagram of an electronic device for an apparatus for fusing models according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the apparatus for fusing models provided herein. A non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to execute an apparatus for fusing models provided herein.
The memory 602, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the apparatus for fusing models in the embodiments of the present application (for example, the model obtaining unit 501, the sample obtaining unit 502, the deleting unit 503, the training unit 504, and the fusing unit 505 shown in fig. 5). The processor 601 executes various functional applications of the server and data processing by executing non-transitory software programs, instructions and modules stored in the memory 602, that is, implements the apparatus for fusing models in the above-described apparatus embodiments.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the electronic device for fusing models, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 602 optionally includes memory located remotely from processor 601, which may be connected to electronics for fusing models over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the apparatus for fusing models may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic device for fusing models, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick, or other input device. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, one of the main advantages is that the result of multi-model fusion is simply and effectively improved. The reason for this is that the engineer can easily integrate and improve the existing model fusion because no other new technology is introduced in the solution. The effective reason is that the training sets of a plurality of models are inconsistent, the correlation of the results is lower, and the fusion result is more effective. The training set of the technology is smaller than that of the traditional model fusion training single model, and the training speed of the model is higher. Previous model fusion schemes typically fused multiple different models because the same model trained the same data and the results were very similar. In the scheme, the training data are different, so that the results of a plurality of same models can be fused, the existing models can be greatly utilized, and the results are improved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (14)

1. A method for fusing models, comprising:
obtaining at least 2 models;
acquiring a preset sample set;
randomly deleting the sample set to obtain at least 2 different candidate sample sets;
for each model in the at least 2 models, performing model training by using one candidate sample set in the at least 2 different candidate sample sets to obtain a trained model;
and fusing the models trained by different candidate sample sets to obtain a fused model.
2. The method of claim 1, wherein the randomly deleting the sample set comprises:
grouping samples in the sample set by category;
for each set of samples, samples are randomly deleted from the set of samples.
3. The method of claim 2, wherein the randomly deleting samples from each set of samples comprises, for each set of samples:
sorting the samples in each group from large to small;
and randomly deleting the samples from each group of sorted samples in sequence according to the deletion proportion from large to small.
4. The method of claim 1, wherein the fusing the models trained from different candidate sample sets to obtain a fused model comprises:
and carrying out model level fusion on the fully connected layers of the models trained by different candidate sample sets.
5. The method of claim 1, wherein the fusing the models trained from different candidate sample sets to obtain a fused model comprises:
and voting and fusing the results generated by each model trained by different candidate sample sets in the target data set.
6. The method of any of claims 1-5, wherein the at least 2 models have the same or different model structures.
7. An apparatus for fusing models, comprising:
a model acquisition unit configured to acquire at least 2 models;
a sample acquisition unit configured to acquire a preset sample set;
a deleting unit configured to randomly delete the sample set, resulting in at least 2 different candidate sample sets;
a training unit configured to perform model training using one candidate sample set of the at least 2 different candidate sample sets for each model of the at least 2 models, resulting in a trained model;
and the fusion unit is configured to fuse the models trained by the different candidate sample sets to obtain a fused model.
8. The apparatus of claim 7, wherein the deletion unit is further configured to:
grouping samples in the sample set by category;
for each set of samples, samples are randomly deleted from the set of samples.
9. The apparatus of claim 8, wherein the deletion unit is further configured to:
sorting the samples in each group from large to small;
and randomly deleting the samples from each group of sorted samples in sequence according to the deletion proportion from large to small.
10. The apparatus of claim 7, wherein the fusion unit is further configured to:
and carrying out model level fusion on the fully connected layers of the models trained by different candidate sample sets.
11. The apparatus of claim 7, wherein the fusion unit is further configured to:
and voting and fusing the results generated by each model trained by different candidate sample sets in the target data set.
12. The apparatus according to one of claims 7 to 11, wherein the at least 2 models have the same or different model structures.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the apparatus of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to execute the apparatus of any one of claims 1-6.
CN202010594541.7A 2020-06-28 2020-06-28 Method and apparatus for fusing models Pending CN111753911A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010594541.7A CN111753911A (en) 2020-06-28 2020-06-28 Method and apparatus for fusing models

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010594541.7A CN111753911A (en) 2020-06-28 2020-06-28 Method and apparatus for fusing models

Publications (1)

Publication Number Publication Date
CN111753911A true CN111753911A (en) 2020-10-09

Family

ID=72677404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010594541.7A Pending CN111753911A (en) 2020-06-28 2020-06-28 Method and apparatus for fusing models

Country Status (1)

Country Link
CN (1) CN111753911A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784778A (en) * 2021-01-28 2021-05-11 北京百度网讯科技有限公司 Method, apparatus, device and medium for generating model and identifying age and gender
CN113706390A (en) * 2021-10-29 2021-11-26 苏州浪潮智能科技有限公司 Image conversion model training method, image conversion method, device and medium
CN114529768A (en) * 2022-02-18 2022-05-24 阿波罗智联(北京)科技有限公司 Method and device for determining object class, electronic equipment and storage medium
WO2024014728A1 (en) * 2022-07-11 2024-01-18 Samsung Electronics Co., Ltd. Method and system for optimizing neural networks (nn) for on-device deployment in an electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250911A (en) * 2016-07-20 2016-12-21 南京邮电大学 A kind of picture classification method based on convolutional neural networks
CN107609074A (en) * 2017-09-02 2018-01-19 西安电子科技大学 The unbalanced data method of sampling based on fusion Boost models
CN107944635A (en) * 2017-12-13 2018-04-20 福州大学 A kind of information propagation forecast model and method for merging the topic factor
CN108090558A (en) * 2018-01-03 2018-05-29 华南理工大学 A kind of automatic complementing method of time series missing values based on shot and long term memory network
CN108304873A (en) * 2018-01-30 2018-07-20 深圳市国脉畅行科技股份有限公司 Object detection method based on high-resolution optical satellite remote-sensing image and its system
CN109448005A (en) * 2018-10-31 2019-03-08 数坤(北京)网络科技有限公司 One kind being used for network model dividing method coronarius and equipment
CN110675243A (en) * 2019-08-30 2020-01-10 北京银联金卡科技有限公司 Machine learning-fused credit prediction overdue method and system
CN111222575A (en) * 2020-01-07 2020-06-02 北京联合大学 KLXS multi-model fusion method and system based on HRRP target recognition
CN111260201A (en) * 2020-01-13 2020-06-09 北京科技大学 Variable importance analysis method based on hierarchical random forest

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250911A (en) * 2016-07-20 2016-12-21 南京邮电大学 A kind of picture classification method based on convolutional neural networks
CN107609074A (en) * 2017-09-02 2018-01-19 西安电子科技大学 The unbalanced data method of sampling based on fusion Boost models
CN107944635A (en) * 2017-12-13 2018-04-20 福州大学 A kind of information propagation forecast model and method for merging the topic factor
CN108090558A (en) * 2018-01-03 2018-05-29 华南理工大学 A kind of automatic complementing method of time series missing values based on shot and long term memory network
CN108304873A (en) * 2018-01-30 2018-07-20 深圳市国脉畅行科技股份有限公司 Object detection method based on high-resolution optical satellite remote-sensing image and its system
CN109448005A (en) * 2018-10-31 2019-03-08 数坤(北京)网络科技有限公司 One kind being used for network model dividing method coronarius and equipment
CN110675243A (en) * 2019-08-30 2020-01-10 北京银联金卡科技有限公司 Machine learning-fused credit prediction overdue method and system
CN111222575A (en) * 2020-01-07 2020-06-02 北京联合大学 KLXS multi-model fusion method and system based on HRRP target recognition
CN111260201A (en) * 2020-01-13 2020-06-09 北京科技大学 Variable importance analysis method based on hierarchical random forest

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784778A (en) * 2021-01-28 2021-05-11 北京百度网讯科技有限公司 Method, apparatus, device and medium for generating model and identifying age and gender
CN112784778B (en) * 2021-01-28 2024-04-09 北京百度网讯科技有限公司 Method, apparatus, device and medium for generating model and identifying age and sex
CN113706390A (en) * 2021-10-29 2021-11-26 苏州浪潮智能科技有限公司 Image conversion model training method, image conversion method, device and medium
CN114529768A (en) * 2022-02-18 2022-05-24 阿波罗智联(北京)科技有限公司 Method and device for determining object class, electronic equipment and storage medium
WO2024014728A1 (en) * 2022-07-11 2024-01-18 Samsung Electronics Co., Ltd. Method and system for optimizing neural networks (nn) for on-device deployment in an electronic device

Similar Documents

Publication Publication Date Title
CN111860506B (en) Method and device for recognizing characters
CN111598164B (en) Method, device, electronic equipment and storage medium for identifying attribute of target object
CN111753911A (en) Method and apparatus for fusing models
CN111626202B (en) Method and device for identifying video
CN111931591B (en) Method, device, electronic equipment and readable storage medium for constructing key point learning model
CN111753727A (en) Method, device, equipment and readable storage medium for extracting structured information
CN112241764A (en) Image recognition method and device, electronic equipment and storage medium
CN112668586B (en) Model training method, picture processing device, storage medium, and program product
CN112507090B (en) Method, apparatus, device and storage medium for outputting information
CN106663196A (en) Computerized prominent person recognition in videos
CN111783645A (en) Character recognition method and device, electronic equipment and computer readable storage medium
CN111488821B (en) Method and device for identifying countdown information of traffic signal lamp
CN112149637A (en) Method and apparatus for generating an object re-recognition model and for object re-recognition
CN113239807B (en) Method and device for training bill identification model and bill identification
CN113361603A (en) Training method, class recognition device, electronic device and storage medium
CN111783427B (en) Method, device, equipment and storage medium for training model and outputting information
CN111444819B (en) Cut frame determining method, network training method, device, equipment and storage medium
CN112507832A (en) Canine detection method and device in monitoring scene, electronic equipment and storage medium
CN111563541B (en) Training method and device of image detection model
CN114418124A (en) Method, device, equipment and storage medium for generating graph neural network model
CN111918073B (en) Live broadcast room management method and device
CN112560854A (en) Method, apparatus, device and storage medium for processing image
CN112529181A (en) Method and apparatus for model distillation
CN111738325A (en) Image recognition method, device, equipment and storage medium
CN111768007B (en) Method and device for mining data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination