Target detection model processing method and apparatus, and electronic device
By employing a two-stage training method, the object detection model is first trained to obtain basic classification capabilities, and then the classification branch weights are adjusted. This solves the problems of insufficient training samples and slow inference speed in existing technologies, and enables rapid identification of new categories.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI DIANZE INTELLIGENT TECH CO LTD
- Filing Date
- 2023-06-21
- Publication Date
- 2026-04-24
AI Technical Summary
Existing object detection models require a large number of labeled samples during training, and the Attention-RPN method results in slow inference speed, making it difficult to effectively identify newly added classification targets.
The two-stage training method first trains the object detection model with a large number of labeled samples to obtain basic classification ability. Then, it only adjusts the weights of the classification branches and uses a small number of new samples for the second stage of training, keeping the feature extraction network unchanged.
Without increasing model complexity, it achieves rapid identification of new categories, improving the model's recognition efficiency and accuracy.
Smart Images

Figure CN116740502B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine learning, and more specifically, to a method, apparatus, and electronic device for object detection model processing. Background Technology
[0002] In machine learning-based object detection schemes, a large number of labeled samples are typically required to train the object detection model. However, training a highly accurate object detection model relies on a large number of labeled image samples, but in practical applications, there may be a shortage of samples for certain target categories. Some schemes employ few-shot object detection methods based on Attention-RPN, but due to the inclusion of the Attention structure and the fact that the input contains two parts of data, the model's inference speed is significantly slower than that of ordinary object detection models. Summary of the Invention
[0003] To overcome the aforementioned shortcomings in the prior art, the purpose of this application is to provide a target detection model processing method, the method comprising:
[0004] Obtain an object detection model, which includes a feature extraction network and a prediction network. The prediction network includes a classification branch, a bounding box regression branch, and a foreground determination branch.
[0005] Obtain a first sample set, which includes multiple first samples. Each first sample includes a sample image and a sample label. The sample label of the first sample includes a first classification label, a first target box position label, and a first foreground label.
[0006] The target detection model is trained using the first sample to adjust the network parameters of the feature extraction network and the prediction network.
[0007] Obtain a second sample set, which includes multiple second samples, each of which includes a sample image and a sample label; the sample label of the second sample includes a second classification label.
[0008] The feature extraction network is used to extract features from the sample image of the second sample to obtain the second image features;
[0009] The second image features are input into the classification branch for processing, and the classification weight of the classification branch is adjusted according to the processing results and the second classification label of each second sample.
[0010] In one possible implementation, at least some of the second sample labels of the second samples are different from the first sample labels of each of the first samples in the first sample set.
[0011] In one possible implementation, the step of training the target detection model using the first sample to adjust the network parameters of the feature extraction network and the prediction network includes:
[0012] The feature extraction network is used to extract features from the sample image of the first sample to obtain the first image features;
[0013] The first image features are respectively input into the classification branch, the target box regression branch and the foreground determination branch for processing to obtain a first prediction result. The first prediction result includes a first classification prediction result, a first target box position prediction result and a first foreground prediction result.
[0014] The network parameters of the feature extraction network and the prediction network are adjusted based on the sample label of the first sample and the first prediction result.
[0015] In one possible implementation, the step of inputting the second image features into the classification branch for processing, and adjusting the classification weights of the classification branch based on the processing result and the second classification label of each second sample, includes:
[0016] The second image features corresponding to each second sample are input into the classification branch for processing to obtain a classification feature vector corresponding to each second sample. The classification feature vector is the feature vector input to the last layer of the classification branch.
[0017] Based on the classification feature vector of each second sample and the classification weight of the last layer of the classification branch, a new classification prediction result label is added based on the second classification label of the second sample.
[0018] In one possible implementation, the step of adjusting the classification weights of the last layer of the classification branch based on the classification feature vectors of each of the second samples includes:
[0019] For each category, calculate the mean of the feature vectors corresponding to that category among the multiple category feature vectors;
[0020] The weight matrix is composed of the mean values corresponding to each category, and the classification weights are used to replace the last layer of the category branch.
[0021] In one possible implementation, the step of obtaining the second sample set includes:
[0022] For each species, the second classification label corresponds to a classification, and images of the target under different angles, different lighting conditions, and / or different poses are obtained as the second sample images.
[0023] In one possible implementation, the step of obtaining the second sample set includes:
[0024] Obtain the set of images to be labeled;
[0025] Select a portion of images from the set of images to be labeled as sample images for the second sample, and add a second classification label to the second sample;
[0026] After the steps of inputting the second image features into the classification branch for processing and adjusting the classification weights of the classification branch based on the processing results and the second classification labels of each second sample, the method further includes:
[0027] The object detection model is used to classify and label the images in the image set other than the second sample.
[0028] Another objective of this application is to provide a target detection model processing device, the target detection model processing device comprising:
[0029] The model acquisition module is used to acquire an object detection model, which includes a feature extraction network and a prediction network. The prediction network includes a classification branch, a bounding box regression branch, and a foreground determination branch.
[0030] The first sample acquisition module is used to acquire a first sample set, which includes multiple first samples. Each first sample includes a sample image and a sample label. The sample label of the first sample includes a first classification label, a first target box position label, and a first foreground label.
[0031] The first training module is used to train the target detection model using the first sample, so as to adjust the network parameters of the feature extraction network and the prediction network.
[0032] The second sample acquisition module is used to acquire a second sample set, which includes multiple second samples. Each second sample includes a sample image and a sample label. The sample label of the second sample includes a second classification label.
[0033] The second training module is used to extract features from the sample image of the second sample through the feature extraction network to obtain second image features; input the second image features into the classification branch for processing; and adjust the classification weight of the classification branch according to the processing results and the second classification label of each second sample.
[0034] Another objective of this application is to provide an electronic device, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions, and the machine-executable instructions, when executed by the processor, implement the target detection model processing method provided in this application.
[0035] Another objective of this application is to provide a machine-readable storage medium storing machine-executable instructions that, when executed by one or more processors, implement the target detection model processing method provided in this application.
[0036] Compared with the prior art, this application has the following beneficial effects:
[0037] The object detection model processing method, apparatus, and electronic device provided in this application first train the object detection model using a large number of labeled samples from a first sample set. This enables the object detection model to recognize foreground objects while possessing a certain classification ability. Then, a second phase of training is performed using a small number of labeled samples from newly added categories. In the second phase of training, the network parameters of the feature extraction network are not adjusted; only the classification weights of the classification branches are adjusted. This allows the object detection model to be quickly adjusted to recognize newly added categories while retaining the feature extraction ability gained in the first phase of training. Thus, object detection models can be trained using small samples without employing complex model structures. Attached Figure Description
[0038] 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.
[0039] Figure 1 This is a schematic diagram of the electronic device provided in this embodiment;
[0040] Figure 2 This is a flowchart illustrating the target detection model processing method provided in this embodiment;
[0041] Figure 3 This is a schematic diagram of the target detection model provided in this embodiment;
[0042] Figure 4 This is a schematic diagram of the functional modules of the target detection model processing device provided in this embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0044] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0045] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0046] In the description of this application, it should be noted that the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0047] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0048] Please refer to Figure 1 , Figure 1 This is a block diagram of the electronic device 100. The electronic device 100 includes a target detection model processing device 110, a machine-readable storage medium 120, and a processor 130.
[0049] The machine-readable storage medium 120 and the processor 130 are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The target detection model processing device 110 includes at least one software function module that can be stored in the machine-readable storage medium 120 in the form of software or firmware or embedded in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable modules stored in the machine-readable storage medium 120, such as the software function modules and computer programs included in the target detection model processing device 110.
[0050] The machine-readable storage medium 120 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc. The machine-readable storage medium 120 is used to store programs, and the processor 130 executes these programs / executable target detection model processing methods provided in this embodiment after receiving execution instructions.
[0051] The processor 130 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.
[0052] Please refer to Figure 2 , Figure 2 For application Figure 1The flowchart of a target detection model processing method for the electronic device 100 shown is provided below, and the steps of the method will be described in detail below.
[0053] Step S110: Obtain the target detection model, which includes a feature extraction network and a prediction network. The prediction network includes a classification branch, a bounding box regression branch, and a foreground determination branch.
[0054] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of an object detection model provided in this embodiment. The object detection model includes a feature extraction network and a prediction network. Compared with a typical object detection model, the prediction network in the object detection model provided in this embodiment includes a classification branch and a bounding box regression branch, and also adds a foreground judgment branch.
[0055] The feature extraction model is used to extract features from the input image to obtain corresponding image features. The classification branch processes the image features extracted by the feature extraction model to obtain the classification of the target in the input image. The bounding box regression branch processes the image features extracted by the feature extraction model to obtain the position of the target in the input image. The foreground judgment branch processes the image features extracted by the feature extraction model to obtain a prediction structure indicating whether the target in the input image is a foreground element.
[0056] Step S120: Obtain a first sample set, which includes multiple first samples. Each first sample includes a sample image and a sample label. The sample label of the first sample includes a first classification label, a first target box position label, and a first foreground label.
[0057] In this embodiment, a conventional image sample dataset can be adjusted to form the first sample set. In one example, the labels of samples in a conventional image sample dataset only include classification labels and target box location labels. In this embodiment, an additional label "whether it is foreground" can be added to such samples. For example, the original labeling information is {"classid":3, "bbox":[10,10,200,200]}, which can be changed to {"classid":3, "bbox":[10,10,200,200], "foreground":1}, where "classid" is the first classification label, "bbox" is the first target box location label, and "foreground" is the first foreground label.
[0058] Step S130: Train the target detection model using the first sample to adjust the network parameters of the feature extraction network and the prediction network.
[0059] Specifically, in this embodiment, the feature extraction network first extracts features from the sample image of the first sample to obtain first image features. These first image features are then processed by the classification branch, the bounding box regression branch, and the foreground determination branch to obtain a first prediction result. This first prediction result includes a first classification prediction result, a first bounding box position prediction result, and a first foreground prediction result. Finally, the network parameters of the feature extraction network and the prediction network are adjusted based on the sample label of the first sample and the first prediction result.
[0060] After training in step S130, the feature extraction network of the target detection model has the ability to extract features, and the extracted features can express whether the image is a foreground target, what the target is classified as, and where the target is located in the image.
[0061] It should be noted that after training in step S130, the target detection model has a certain target recognition capability for the categories already present in the first sample set, but its recognition capability for categories not present in the first sample set may not be complete. For example, if the first sample set includes images of categories A, B, and C, but not images of category D, then after training in step S130, the target detection model can recognize categories A, B, and C well, but may not be able to recognize category D well.
[0062] Step S140: Obtain a second sample set, which includes multiple second samples, each including a sample image and a sample label. The sample label of the second sample includes a second classification label.
[0063] In this embodiment, at least some of the second sample labels of the second samples are different from the first sample labels of each of the first samples in the first sample set.
[0064] For example, the first sample set includes images of category A, category B, and category C, and the second sample set includes images of category D and category E.
[0065] Step S150: The feature extraction network is used to extract features from the sample image of the second sample to obtain second image features. These second image features are then input into the classification branch for processing. The classification weights of the classification branch are adjusted based on the processing results and the second classification labels of each second sample.
[0066] In this embodiment, the second image features corresponding to each second sample can be input into the classification branch for processing to obtain the classification feature vector corresponding to each second sample. The classification feature vector is the feature vector input to the last layer of the classification branch.
[0067] Then, based on the classification feature vector of each second sample and the classification weight of the last layer of the classification branch, a new classification prediction result label is added based on the second classification label of the second sample.
[0068] It should be noted that in step S150, only the classification weight of the classification branch is adjusted, and the network parameters of the feature extraction network and the weights of other branches of the prediction network are not adjusted.
[0069] Specifically, for each category, the mean of the feature vectors corresponding to that category among the multiple category feature vectors is calculated, and then the weight matrix composed of the mean values corresponding to each category is used to replace the classification weights of the last layer of the classification branch.
[0070] For example, the classification feature vector of the j-th second sample in the i-th category can be denoted as F. ij Then calculate the mean of each categorical feature vector. Here, E represents the expected value, and these mean vectors are then concatenated to form a weight matrix. The weights of the last layer of the classification branch are then replaced with this weight matrix.
[0071] Based on the above design, the object detection model processing method, apparatus, and electronic device provided in this application first train the object detection model using a large number of labeled samples from a first sample set. This enables the object detection model to recognize foreground targets while possessing a certain classification ability. Then, a second phase of training is performed using a small number of labeled samples from newly added categories. In the second phase of training, the network parameters of the feature extraction network are not adjusted; only the classification weights of the classification branches are adjusted. This allows the object detection model to be quickly adjusted to recognize newly added categories while retaining the feature extraction ability obtained in the first phase of training. Thus, object detection models can be trained using small samples without employing complex model structures.
[0072] In one possible implementation, in step S140, for each species corresponding to the second classification label, images of the target under different angles, different lighting conditions, and / or different poses can be obtained as the second sample images. Furthermore, for the same classification, images of different varieties can also be obtained as the second sample images.
[0073] In one possible implementation, in step S140, a set of images to be labeled can be obtained, and then a portion of the images in the set of images to be labeled can be selected as sample images for the second sample, and a second classification label can be added to the second sample. After step S150, the object detection model can then be used to classify and label the other images in the set of images to be labeled, excluding the second sample.
[0074] In other words, for a set of images to be labeled with a large number of images to be labeled, a small number of images to be labeled can be selected and labeled as the second sample. After training the target detection model with the second sample, the target detection model can be used to label the remaining images to be labeled.
[0075] Please refer to Figure 4 This embodiment also provides a target detection model processing device 110, which includes at least one functional module that can be stored in a machine-readable storage medium 120 in software form. Functionally, the target detection model processing device 110 may include a model acquisition module 111, a first sample acquisition module 112, a first training module 113, a second sample acquisition module 114, and a second training module 115.
[0076] The model acquisition module 111 is used to acquire an object detection model, which includes a feature extraction network and a prediction network. The prediction network includes a classification branch, a bounding box regression branch, and a foreground determination branch.
[0077] In this embodiment, the model acquisition module 111 can be used to perform... Figure 2 For a detailed description of the model acquisition module 111 shown in step S110, please refer to the description of step S110.
[0078] The first sample acquisition module 112 is used to acquire a first sample set, which includes multiple first samples. Each first sample includes a sample image and a sample label. The sample label of the first sample includes a first classification label, a first target box position label, and a first foreground label.
[0079] In this embodiment, the first sample acquisition module 112 can be used to perform... Figure 2 For a detailed description of the first sample acquisition module 112, see the description of step S120 shown.
[0080] The first training module 113 is used to train the target detection model using the first sample, so as to adjust the network parameters of the feature extraction network and the prediction network.
[0081] In this embodiment, the first training module 113 can be used to execute Figure 2 For a detailed description of step S130 shown, please refer to the description of step S130.
[0082] The second sample acquisition module 114 is used to acquire a second sample set, which includes multiple second samples. Each second sample includes a sample image and a sample label. The sample label of the second sample includes a second classification label.
[0083] In this embodiment, the second sample acquisition module 114 can be used to perform... Figure 2 For a detailed description of the second sample acquisition module 114, see the description of step S140 shown.
[0084] The second training module 115 is used to extract features from the sample image of the second sample through the feature extraction network to obtain second image features. The second image features are then input into the classification branch for processing, and the classification weights of the classification branch are adjusted according to the processing results and the second classification labels of each second sample.
[0085] In this embodiment, the second training module 115 can be used to execute Figure 2 For a detailed description of step S150 shown, please refer to the description of step S150 for details regarding the second training module 115.
[0086] In summary, the object detection model processing method, apparatus, and electronic device provided in this application first train the object detection model using a large number of labeled samples from a first sample set. This enables the object detection model to recognize foreground targets while possessing a certain classification ability. Then, a second phase of training is performed using a small number of labeled samples from newly added categories. In this second phase, the network parameters of the feature extraction network are not adjusted; only the classification weights of the classification branches are adjusted. This allows the object detection model to be quickly adjusted to recognize newly added categories while retaining the feature extraction capabilities gained in the first phase of training. Thus, object detection models can be trained using small samples without employing complex model structures.
[0087] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0088] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0089] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0090] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0091] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A target detection model processing method, characterized in that, The method includes: Obtain an object detection model, which includes a feature extraction network and a prediction network. The prediction network includes a classification branch, a bounding box regression branch, and a foreground determination branch. Obtain a first sample set, which includes multiple first samples. Each first sample includes a sample image and a sample label. The sample label of the first sample includes a first classification label, a first target box position label, and a first foreground label. The target detection model is trained using the first sample to adjust the network parameters of the feature extraction network and the prediction network. Obtain a second sample set, which includes multiple second samples, each of which includes a sample image and a sample label; the sample label of the second sample includes a second classification label. The feature extraction network is used to extract features from the sample image of the second sample to obtain the second image features; The second image features are input into the classification branch for processing, and the classification weight of the classification branch is adjusted according to the processing results and the second classification label of each second sample. Wherein, at least some of the second sample labels are different from the first sample labels of each of the first samples in the first sample set; The step of inputting the second image features into the classification branch for processing, and adjusting the classification weights of the classification branch based on the processing results and the second classification labels of each second sample, includes: The second image features corresponding to each second sample are input into the classification branch for processing to obtain a classification feature vector corresponding to each second sample. The classification feature vector is the feature vector input to the last layer of the classification branch. For each category, calculate the mean of the feature vectors corresponding to that category among the multiple category feature vectors; The weight matrix is composed of the mean values corresponding to each category, and the classification weights of the last layer of the replacement category branch are used; Add a new classification prediction label based on the second classification label of the second sample.
2. The method according to claim 1, characterized in that, The step of training the target detection model using the first sample to adjust the network parameters of the feature extraction network and the prediction network includes: The feature extraction network is used to extract features from the sample image of the first sample to obtain the first image features; The first image features are respectively input into the classification branch, the target box regression branch and the foreground determination branch for processing to obtain a first prediction result. The first prediction result includes a first classification prediction result, a first target box position prediction result and a first foreground prediction result. The network parameters of the feature extraction network and the prediction network are adjusted based on the sample label of the first sample and the first prediction result.
3. The method according to claim 1, characterized in that, The step of obtaining the second sample set includes: For each species, the second classification label corresponds to a classification, and images of the target under different angles, different lighting conditions, and / or different poses are obtained as the second sample images.
4. The method according to claim 1, characterized in that, The step of obtaining the second sample set includes: Obtain the set of images to be labeled; Select a portion of images from the set of images to be labeled as sample images for the second sample, and add a second classification label to the second sample; After the steps of inputting the second image features into the classification branch for processing and adjusting the classification weights of the classification branch based on the processing results and the second classification labels of each second sample, the method further includes: The object detection model is used to classify and label the images in the image set other than the second sample.
5. A target detection model processing device, characterized in that, The target detection model processing device includes: The model acquisition module is used to acquire an object detection model, which includes a feature extraction network and a prediction network. The prediction network includes a classification branch, a bounding box regression branch, and a foreground determination branch. The first sample acquisition module is used to acquire a first sample set, which includes multiple first samples. Each first sample includes a sample image and a sample label. The sample label of the first sample includes a first classification label, a first target box position label, and a first foreground label. The first training module is used to train the target detection model using the first sample, so as to adjust the network parameters of the feature extraction network and the prediction network. The second sample acquisition module is used to acquire a second sample set, which includes multiple second samples. Each second sample includes a sample image and a sample label. The sample label of the second sample includes a second classification label. The second training module is used to extract features from the sample image of the second sample through the feature extraction network to obtain second image features; input the second image features into the classification branch for processing; and adjust the classification weight of the classification branch according to the processing results and the second classification label of each second sample. Wherein, at least some of the second sample labels are different from the first sample labels of each of the first samples in the first sample set; The second training module is specifically used for: The second image features corresponding to each second sample are input into the classification branch for processing to obtain a classification feature vector corresponding to each second sample. The classification feature vector is the feature vector input to the last layer of the classification branch. For each category, calculate the mean of the feature vectors corresponding to that category among the multiple category feature vectors; The weight matrix is composed of the mean values corresponding to each category, and the classification weights of the last layer of the replacement category branch are used; Add a new classification prediction label based on the second classification label of the second sample.
6. An electronic device, characterized in that, The method includes a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions, which, when executed by the processor, implement the method according to any one of claims 1-4.
7. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions that, when executed by one or more processors, implement the method of any one of claims 1-4.
Citation Information
Patent Citations
Model training method and device, target detection method and device, equipment and storage medium
CN113920370A
Target detection model training method and device based on weak supervision, equipment and medium
CN115082752A