Target detection method, target detection model training method, target detection model training device and related equipment

By jointly training with the semantic segmentation network during the training phase of the target detection model, the hidden layer features of the semantic segmentation network are used to enhance the target detection model, which solves the contradiction between the improvement of the occluded target detection effect and the lightweight model, and achieves efficient occluded target detection. .

CN118657930APending Publication Date: 2024-09-17IFLYTEK CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411040055.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

When existing target detection models improve the accuracy of occluded target detection, they often increase model complexity and affect real-time performance. It is difficult to improve the occluded target detection effect while ensuring that the model is lightweight.

Method used

By jointly training with the semantic segmentation network during the target detection model training phase, the hidden layer features of the semantic segmentation network are used to enhance the target detection model, thereby improving the detection effect of occluded targets while maintaining the lightweight structure of the model.

Benefits of technology

It improves the target detection model's ability to detect occluded targets in complex scenes, especially when the background is cluttered, and improves the detection accuracy while maintaining the model's lightweight and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657930A
    Figure CN118657930A
Patent Text Reader

Abstract

The invention discloses a target detection method, a target detection model training method, a target detection model training device and related equipment, a target detection model is jointly trained with a semantic segmentation network in a training stage, and the semantic segmentation network takes hidden layer features extracted by the target detection model as input and is used for predicting a semantic segmentation result. The total loss value of the joint training comprises a target detection loss value of the target detection model and a semantic segmentation loss value of the semantic segmentation network. After the joint training strategy is adopted, the target detection model can learn semantic segmentation information while learning target detection, has the ability to describe local details, and is helpful to improve the detection effect of the occluded target. In addition, the target detection model in the application can adopt a lightweight model structure, and the detection effect of the shielded target is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of target detection technology, and more specifically, to a target detection method, a target detection model training method, a device and related equipment. Background Art

[0002] Object detection is one of the core problems in the field of computer vision. Its purpose is to identify various objects in images and determine their locations and categories.

[0003] There are still some difficulties and challenges in the current target detection field, such as: small target detection, occlusion problems, illumination changes, background interference, real-time requirements, category imbalance, data set bottlenecks, cross-domain adaptability, model generalization capabilities, multi-scale detection, etc. Among them, the detection suppression of occluded targets is a difficult and hot issue in target detection. The traditional method generally adds additional feature extraction layers to the target detection model and designs a more complex model in the hope of improving the detection accuracy of occluded targets. However, in actual business, the real-time requirements for target detection are relatively high, and an overly complex model structure will affect the real-time performance of target detection. Summary of the invention

[0004] In view of the above problems, this application is proposed to provide a target detection method, a target detection model training method, a device and related equipment to improve the detection effect of occluded targets while ensuring the model is as lightweight as possible. The specific solution is as follows:

[0005] In a first aspect, a target detection method is provided, comprising:

[0006] Acquire an image to be detected;

[0007] The image to be detected is sent to the configured target detection model to obtain the target detection result output by the model, where:

[0008] The target detection model is jointly trained with the semantic segmentation network during the training phase. The semantic segmentation network uses the hidden layer features extracted by the target detection model as input to predict the semantic segmentation results. The total loss value of the joint training includes the target detection loss value of the target detection model and the semantic segmentation loss value of the semantic segmentation network.

[0009] In a second aspect, a target detection model training method is provided, comprising:

[0010] Obtain image training samples with detection box labels and full-image semantic segmentation labels;

[0011] Input the image training sample into a configured multi-task model, wherein the multi-task model includes a first branch for performing an object detection task and a second branch for performing a semantic segmentation task, wherein the second branch uses the hidden layer features extracted by the first branch as input to predict a semantic segmentation result;

[0012] Obtaining the target detection result output by the first branch of the multi-task model and the semantic segmentation result output by the second branch;

[0013] Calculating a target detection loss value based on the target detection result and the detection box label, calculating a semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label, and calculating a total loss value of the target detection loss value and the semantic segmentation loss value;

[0014] The network parameters of the multi-task model are updated according to the total loss value until the training end condition is reached, and the first branch in the multi-task model is used as the target detection model to be deployed.

[0015] In a possible design, in another implementation of the second aspect of the embodiment of the present application, the first branch includes a backbone network for extracting image features, and a detection classification network for predicting a detection frame and category of the target;

[0016] The second branch includes a region of interest feature extraction unit and a semantic segmentation network;

[0017] The region of interest feature extraction unit is used to select a first detection frame whose confidence exceeds a first threshold from the detection frames of each target predicted by the first branch, select features aligned with the first detection frame from the features extracted by the backbone network using a regional feature alignment operation, and send the features to the semantic segmentation network to predict a semantic segmentation result;

[0018] The process of calculating the semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label includes:

[0019] A semantic segmentation loss value is calculated based on the semantic segmentation result and a local semantic segmentation label, where the local semantic segmentation label is a semantic segmentation label extracted from the full-image semantic segmentation label and aligned with the first detection box.

[0020] In a possible design, in another implementation of the second aspect of the embodiment of the present application, the first branch includes a backbone network for extracting image features, a feature pyramid network for performing multi-scale fusion of features extracted by the backbone network, and a detection classification network for predicting a detection frame and category of a target;

[0021] The second branch includes a region of interest feature extraction unit, a multi-scale feature fusion unit and a semantic segmentation network;

[0022] The region of interest feature extraction unit is used to select a first detection frame whose confidence exceeds a first threshold from the detection frames of each target predicted by the first branch, and use a regional feature alignment operation to select each scale feature aligned with the first detection frame from the different scale features fused by the feature pyramid network, and send the scale features to the multi-scale feature fusion unit for feature fusion, and send the fused features to the semantic segmentation network to predict the semantic segmentation result;

[0023] The process of calculating the semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label includes:

[0024] A semantic segmentation loss value is calculated based on the semantic segmentation result and a local semantic segmentation label, where the local semantic segmentation label is a semantic segmentation label extracted from the full-image semantic segmentation label and aligned with the first detection box.

[0025] In one possible design, in another implementation of the second aspect of the embodiments of the present application, the first threshold is a value less than 0.5.

[0026] In a possible design, in another implementation of the second aspect of the embodiment of the present application, the process of obtaining an image training sample carrying a detection box label and a full-image semantic segmentation label includes:

[0027] Obtain the original image dataset containing the occluded target;

[0028] Annotate each image in the original image dataset using the configured open word detection model to generate a detection box pseudo label;

[0029] In response to an operation of filtering images carrying detection frame pseudo labels, a first image data set after removing erroneous labels is obtained, wherein each image in the first image data set carries a detection frame label;

[0030] Input the images in the first image data set into the configured open word segmentation model to obtain semantic segmentation labels for each pixel in each detection box in the image;

[0031] Based on the semantic segmentation label of each pixel in each detection box in the image, the semantic segmentation label of the entire image corresponding to the image is generated.

[0032] In a possible design, in another implementation of the second aspect of the embodiment of the present application, the process of annotating each image in the original image dataset using the configured open word detection model to generate a detection box pseudo label includes:

[0033] For each image in the original image dataset:

[0034] Using two or more different types of configured open word detection models, respectively annotate the image to obtain a detection box pseudo-label set generated by each open word detection model;

[0035] Take the union of the detection box pseudo-label sets generated by each type of open word detection model as the detection box pseudo-label corresponding to the image.

[0036] In one possible design, in another implementation of the second aspect of the embodiments of the present application, the process of calculating the target detection loss value based on the target detection result and the detection box label includes:

[0037] Calculating a regression loss value of the detection frame based on the detection frame coordinates in the target detection result and the detection frame coordinate labels in the detection frame labels;

[0038] Calculating a classification loss value of the detection frame based on the category of the detection frame in the target detection result and the detection frame category label in the detection frame label;

[0039] The regression loss value and the classification loss value of the detection box are integrated to obtain the target detection loss value.

[0040] In a third aspect, a target detection device is provided, comprising:

[0041] An image acquisition unit, used for acquiring an image to be detected;

[0042] The target prediction unit is used to send the image to be detected into the configured target detection model to obtain the target detection result output by the model, wherein:

[0043] The target detection model is jointly trained with the semantic segmentation network during the training phase. The semantic segmentation network uses the hidden layer features extracted by the target detection model as input to predict the semantic segmentation results. The total loss value of the joint training includes the target detection loss value of the target detection model and the semantic segmentation loss value of the semantic segmentation network.

[0044] In a fourth aspect, a target detection model training device is provided, comprising:

[0045] A training data acquisition unit, used to acquire image training samples carrying detection box labels and full-image semantic segmentation labels;

[0046] A data input unit, used to input the image training sample into a configured multi-task model, wherein the multi-task model includes a first branch for performing an object detection task and a second branch for performing a semantic segmentation task, wherein the second branch uses the hidden layer features extracted by the first branch as input to predict a semantic segmentation result;

[0047] A branch result acquisition unit, used to acquire the target detection result output by the first branch of the multi-task model and the semantic segmentation result output by the second branch;

[0048] A loss calculation unit, configured to calculate a target detection loss value based on the target detection result and the detection box label, calculate a semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label, and calculate a total loss value of the target detection loss value and the semantic segmentation loss value;

[0049] A parameter updating and structure editing unit is used to update the network parameters of the multi-task model according to the total loss value until the training end condition is reached, and the first branch in the multi-task model is used as the target detection model to be deployed.

[0050] In a fifth aspect, an electronic device is provided, comprising: a memory and a processor;

[0051] The memory is used to store programs;

[0052] The processor is used to execute the program to implement the target detection method described in any one of the first aspects of the present application, or to implement the various steps of the target detection model training method described in any one of the second aspects of the present application.

[0053] In the sixth aspect, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the target detection method described in any one of the first aspects of the present application, or implements the various steps of the target detection model training method described in any one of the second aspects of the present application.

[0054] In the seventh aspect, a computer program product is provided, including a computer program. When the computer program is executed by a processor, it implements the target detection method described in any one of the first aspects of the present application, or implements the various steps of the target detection model training method described in any one of the second aspects of the present application.

[0055] By means of the above technical solution, the target detection model provided in the present application is jointly trained with the semantic segmentation network during the training phase. The semantic segmentation network uses the hidden features extracted by the target detection model as input to predict the semantic segmentation results. The total loss value of the joint training includes the target detection loss value of the target detection model and the semantic segmentation loss value of the semantic segmentation network. Since the semantic segmentation network uses the hidden features extracted by the target detection model as input, the joint training strategy enables the two branches to enhance each other, so that the target detection model can learn semantic segmentation information while learning target detection, that is, the trained target detection model also has the ability to depict local details (semantic segmentation information is pixel-level classification, which belongs to local detail information of the image), which helps to improve the target detection model's ability to understand targets in complex scenes, especially when the target is partially occluded or the background is cluttered, it can improve the detection effect of occluded targets.

[0056] In addition, the target detection model in the present application can adopt a network with a simple structure, that is, a lightweight model structure can be adopted to improve the detection effect of occluded targets. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0058] Figure 1 A flowchart of a target detection model training method provided in an embodiment of the present application;

[0059] Figure 2 A schematic diagram of the process of generating high-quality detection box labels is shown;

[0060] Figure 3 A schematic diagram of the process of generating full-image semantic segmentation labels is shown;

[0061] Figure 4 An example of a multi-task model architecture and a schematic diagram of the training process;

[0062] Figure 5 Another multi-task model architecture and training process diagram are illustrated;

[0063] Figure 6 An example of a target detection model structure diagram is shown;

[0064] Figure 7a-7d Several schematic diagrams of actual effects of mobile phone detection are illustrated respectively;

[0065] Figure 8 A schematic diagram of the structure of a target detection device provided in an embodiment of the present application;

[0066] Fig. 9 A schematic diagram of the structure of a target detection model training device provided in an embodiment of the present application;

[0067] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0069] Object detection is one of the core issues in the field of computer vision. Its purpose is to identify various objects in an image and determine their location and category. Specifically, the task of object detection can be divided into the following key points: identifying the target category and locating the target position. At present, the object detection algorithms based on deep learning can be divided into the following two categories:

[0070] (1) Two-stage object detection algorithm: This type of algorithm first generates region proposals, and then classifies and regresses these regions. For example, the R-CNN series of algorithms.

[0071] (2) Single-stage object detection algorithm: This type of algorithm directly predicts the detection box and category of the target in one step, omitting the explicit region proposal step. For example, the YOLO series and SSD algorithms. The advantages of this type of method are fast and can be implemented in practice.

[0072] In the field of target detection, the detection suppression of occluded targets is a difficult and hot issue in target detection. The usual approach is to make targeted optimization improvements in the network structure, such as adding new feature processing layers. While this method improves the accuracy of occluded target detection, it will inevitably increase the number of model parameters and reduce the model's computational efficiency. In actual business, the real-time requirements for target detection are relatively high, and an overly complex model structure will affect the real-time performance of target detection.

[0073] Therefore, the present application proposes a solution that can ensure the detection accuracy of occluded targets while ensuring the lightweight of the model. Considering that the model structure of the single-stage target detection algorithm is simpler than that of the two-stage target detection algorithm, the target detection model in the present application can adopt the single-stage target detection algorithm.

[0074] The following embodiments of the present application provide a training method for a target detection model and a target detection method, respectively. The target detection model training method provided can be applied to an electronic device. Exemplarily, the electronic device can be, for example, a server, a robot, a smart phone, a personal computer (PC), a laptop, a wireless electronic device in an industrial control, etc.

[0075] The method provided in the present application can be divided into a training phase and a reasoning phase. The training phase is the phase of training the target detection model, and the reasoning phase is the phase of using the trained target detection model to process the image to be detected and predict the target detection result. Among them, the training phase and the reasoning phase can be deployed in the same device or in different devices. For example, the training phase can be deployed in the cloud or in a server, and the reasoning phase can be deployed in an intelligent terminal, such as a mobile phone, a tablet, a smart car, a robot, a vehicle-mounted terminal, or a wearable device.

[0076] For ease of understanding, this application introduces the processes of the training phase and the reasoning phase respectively.

[0077] 1. Training Phase

[0078] See also Figure 1 , a flow chart of a training method for a target detection model provided in this application is described as follows.

[0079] It should be noted that, generally, the training process of the model can be divided into multiple iterations or multiple executions. This application exemplarily takes one of the iterations or execution processes as an example for illustrative introduction. The steps mentioned below can be repeated and will not be repeated below.

[0080] Step S100: Obtain image training samples carrying detection box labels and full-image semantic segmentation labels.

[0081] In this embodiment, a multi-task joint training strategy is used, wherein the multi-task may specifically include a target detection task and a semantic segmentation task. Therefore, it is necessary to obtain multi-task training data, which may include image training samples and sample labels. The sample labels corresponding to the target detection task may be detection box labels, and the sample labels corresponding to the semantic segmentation task may be full-image semantic segmentation labels, that is, each image training sample may carry labels for two tasks, namely, detection box labels and full-image semantic segmentation labels.

[0082] The detection frame label may include a detection frame coordinate label and a detection frame category label.

[0083] The full-image semantic segmentation label can include the semantic segmentation label of each pixel in the image training sample (also known as the instance segmentation label). Instance segmentation label refers to labeling each pixel in the image to distinguish pixels belonging to different instances (i.e., different individuals in the same category). This labeling method can not only classify each pixel (i.e., semantic segmentation), but also further distinguish different instances in the same category.

[0084] There are many ways to obtain training data in this step, such as manual labeling, obtaining from public data sets, or labeling using configured automatic labeling rules, which will be explained in detail later.

[0085] In addition, it should be noted that the image training data obtained in this step can cover one or more different scenarios, depending on the downstream tasks to which the trained target detection model is to be applied. For example, if the trained target detection model needs to be applied to a phone call recognition task in a vehicle-mounted scenario, the image training data obtained in this step should cover all types of images in the vehicle-mounted scenario as much as possible.

[0086] Of course, considering that the trained target detection model has a certain scene generalization ability, for example, after training with the image training data under scene A, it also has the ability to detect targets in scene B, where scene B is a scene different from scene A. Therefore, the image training data obtained in this step is not strictly limited to covering certain specific scenes.

[0087] Step S110: input the image training sample into the configured multi-task model, the multi-task model includes a first branch for performing the target detection task and a second branch for performing the semantic segmentation task, the second branch uses the hidden layer features extracted by the first branch as input to predict the semantic segmentation result.

[0088] Specifically, the present application adopts a joint training strategy for target detection tasks and semantic segmentation tasks. The first branch is the network branch used to perform the target detection task, and the second branch is the network branch used to perform the semantic segmentation task. The input of the second branch is the hidden layer features extracted by the first branch. The first branch and the second branch are combined into a multi-task model. The multi-task model is jointly trained with the training data obtained in the previous step, thereby achieving the purpose of using the semantic segmentation task to assist in updating the parameters of the first branch.

[0089] The first branch may adopt a model of a single-stage target detection algorithm type, and the second branch may adopt a network structure capable of achieving semantic segmentation.

[0090] Step S120, obtaining the target detection result output by the first branch of the multi-task model and the semantic segmentation result output by the second branch.

[0091] Specifically, the first branch receives an input image training sample, extracts hidden layer features, and predicts target detection results based on the extracted features, which may include detection box coordinates and categories.

[0092] The second branch takes the hidden layer features extracted by the first branch as input, and then outputs the semantic segmentation result after feature processing. The semantic segmentation result may include the instance segmentation label to which each pixel in the image belongs.

[0093] Step S130: Calculate the target detection loss value based on the target detection result and the detection box label, calculate the semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label, and calculate the total loss value.

[0094] Specifically, the calculation process of the target detection loss value may include:

[0095] Based on the detection box coordinates in the target detection result and the detection box coordinate labels in the detection box labels, the regression loss value of the detection box is calculated. Also, based on the detection box category in the target detection result and the detection box category label in the detection box labels, the classification loss value of the detection box is calculated. The regression loss value and the classification loss value of the detection box are integrated to obtain the target detection loss value.

[0096] Among them, the regression loss can adopt loss functions such as GIOU Loss, CIOU Loss, Smooth L1 Loss, etc., and the classification loss can adopt loss functions such as Quality Focal Loss, Cross-Entropy Loss, and Binary Cross-Entropy Loss.

[0097] Semantic segmentation loss can adopt cross entropy loss function, etc.

[0098] Finally, the total loss value can be calculated based on the target detection loss value and the semantic segmentation loss value. For example, the target detection loss value and the semantic segmentation loss value are weightedly added, and the result is taken as the total loss value.

[0099] In this embodiment, the total loss value takes into account both the target detection loss value and the semantic segmentation loss value, that is, the target detection task and the semantic segmentation task are jointly trained, and the model is trained using the detection box label so that the first branch has the ability to detect the required category. Furthermore, by using the semantic segmentation task to assist in training the model, the refinement detection capability of the first branch can be improved, that is, the detection capability of occluded targets can be improved.

[0100] Step S140: Update the network parameters of the multi-task model according to the total loss value until the training end condition is reached, and use the first branch in the multi-task model as the target detection model to be deployed.

[0101] The training end condition may be that the number of iterations reaches a set number, or the value of the loss function is less than a set threshold, etc.

[0102] After the training end condition is met, the first branch in the multi-task model can be used as the target detection model to be deployed, that is, the second branch in the multi-task model is removed, and the first branch is retained as the target detection model.

[0103] The training method of the target detection model provided in this embodiment does not need to change the model structure of the target detection model, and the target detection model can adopt a lightweight structure. On this basis, the multi-task joint training strategy provided in this embodiment can be used to enable the target detection model to also have refined detection capabilities under the auxiliary training of the semantic segmentation task, thereby improving the detection accuracy of occluded targets.

[0104] In some embodiments of the present application, the above step S100 is introduced to implement the process of obtaining image training samples carrying detection box labels and full-image semantic segmentation labels.

[0105] In a possible implementation, in this embodiment, image training samples carrying detection box labels and full-image semantic segmentation labels can be obtained through public data sets.

[0106] In addition, the above training data can also be obtained manually through active annotation.

[0107] This embodiment further provides a method of combining manual and automatic annotation, and the process of obtaining the above training data may specifically include the following steps:

[0108] S1. Obtain the original image dataset containing the occluded target.

[0109] Specifically, a diverse dataset of raw images is collected to ensure that a variety of occlusion situations are covered.

[0110] S2. Use the configured open word detection model to annotate each image in the original image dataset and generate detection box pseudo labels.

[0111] Among them, the open word detection model can use DetCLIP, Grounding-Dino, YOLO-World and other models. The open word detection model is trained on visible class data, and then completes the recognition and detection of invisible class data. The image is preliminarily annotated by using the open word detection model to obtain the detection box pseudo label.

[0112] In this step, the image is preliminarily annotated through the open word detection model to generate detection box pseudo labels. In subsequent steps, the pseudo labels can be screened by manual or automated methods to obtain high-quality detection box labels. Compared with the manual labeling method alone, the workload of manual labeling can be greatly reduced.

[0113] Further optional, combined Figure 2 As shown, the present application can pre-configure multiple different types of open word detection models (corresponding to Figure 2 For each image in the original image dataset, different types of open word detection models can be used to annotate the image, and a set of detection box pseudo labels generated by each open word detection model can be obtained. The union of the detection box pseudo labels generated by each type of open word detection model is further taken as the detection box pseudo label corresponding to the image.

[0114] This approach can make the detection box pseudo-labels as comprehensive as possible, reducing the workload of manually supplementing the missing detection boxes in subsequent steps.

[0115] like Figure 2 As shown, the generation process of the detection box pseudo label may include:

[0116] According to the images in the collected original image dataset and the category names to be detected, multiple different types of open word detection models are used to predict pseudo labels respectively, and according to the threshold configured for each open word detection model, the detection boxes with confidence exceeding the threshold in the prediction results are screened to obtain the target box set corresponding to each open word monitoring model. The union of each target box set is further taken, and the result is used as the detection box pseudo label corresponding to the input image.

[0117] Subsequently, it can be screened manually or automatically to obtain high-quality detection frame labels.

[0118] S3: In response to the operation of screening the images carrying the detection frame pseudo-labels, a first image data set is obtained after removing the erroneous labels.

[0119] Specifically, manual review or automated methods can be used to screen the detection box pseudo labels generated by the open word detection model, remove erroneous labels, and supplement missing labels to obtain a screened first image data set in which each image carries a high-quality detection box label.

[0120] S4. Input the image in the first image data set into the configured open word segmentation model to obtain a semantic segmentation label for each pixel in each detection box in the image.

[0121] Among them, the open word segmentation model can adopt semantic segmentation models such as the Grounded-SAM segmentation model to output instance segmentation labels, which provide more detailed target contour information.

[0122] In this step, each detection box area in the image can be sent to the open word segmentation model in turn to obtain the semantic segmentation label of each pixel in each detection box output by the model.

[0123] S5. Based on the semantic segmentation label of each pixel in each detection box in the image, generate the full-image semantic segmentation label corresponding to the image.

[0124] Combination Figure 3 As shown, for each image in the first image data set, semantic segmentation can be performed using an open word segmentation model based on the image carrying the detection box label and the category name to be detected, to obtain the semantic segmentation label of each pixel in each detection box in the image.

[0125] On this basis, a background image with the same size as the input image can be generated. The semantic segmentation labels of each pixel in each detection box are used to assign semantic segmentation labels to the corresponding pixels in the background image, and the semantic segmentation labels of the entire image are obtained (i.e. Figure 3 ). Figure 3 It can be seen that the contours of different instance targets can be distinguished in the full-image semantic segmentation label, realizing pixel-level instance target segmentation.

[0126] By adopting the method provided in this embodiment, the open word detection model can be effectively used to generate comprehensive detection box pseudo labels, and high-quality detection box labels can be screened through manual review and other means. Then, by combining high-quality detection box labels and open word segmentation models, detailed semantic segmentation labels can be generated, and finally full-image semantic segmentation labels can be produced. Compared with the method of simply manually annotating labels, the workload of manual annotation is reduced, while ensuring the accuracy of labels.

[0127] Based on the image training samples carrying detection box labels and full-image semantic segmentation labels obtained in the above embodiment, the detection box labels and full-image semantic segmentation labels can be used as supervision information to build and train a multi-task model, thereby obtaining a target detection model that can handle occluded targets and has the ability to depict local details.

[0128] Combination Figure 4 As shown, for the first branch in the multi-task model, a single-stage target detection network can be selected, and the first branch can include a backbone network (Backbone) and a detection classification network.

[0129] The backbone network is responsible for extracting the features of the input image. Usually, a pre-trained convolutional neural network can be used. In this case, a lightweight network structure can be selected, such as MobilenetV2, CSPDarknet-tiny, etc.

[0130] The detection classification network is responsible for predicting the bounding box (i.e., the detection box coordinates) and category of the target, and usually includes an anchor-based mechanism or an anchor-free mechanism.

[0131] The detection classification network predicts at least one detection box and the confidence of each detection box, and then can filter the detection boxes whose confidence exceeds the second threshold according to the pre-configured second threshold, and output them as reliable target detection boxes. The second threshold can be a value greater than 0.5, and can usually be set to a value such as 0.7, 0.8, etc.

[0132] For the detection box filtered by the detection classification network, the regression loss value L can be calculated based on the coordinates of the detection box and the detection box label. reg , calculate the classification loss value L based on the category of the detection box and the detection box label cls , the regression loss value L reg And the classification loss value L cls Added as the target detection loss value.

[0133] The second branch may include a region of interest feature extraction unit and a semantic segmentation network.

[0134] Among them, the region of interest feature extraction unit is used to select a first detection frame whose confidence exceeds a first threshold from the detection frames of each target predicted by the first branch, and use the regional feature alignment operation ROI Align to select features aligned with the first detection frame from the features extracted by the backbone network, and send them to the semantic segmentation network to predict the semantic segmentation result.

[0135] Specifically, combined Figure 4 As shown, a first detection box whose confidence exceeds a first threshold can be selected from the detection boxes predicted by the detection classification network, and a region of interest feature alignment operation is applied to select features aligned with the first detection box from the features extracted by the backbone network, and the features are sent to the semantic segmentation network.

[0136] Among them, the first threshold can generally be set to a smaller threshold, such as 0.1, 0.2, and other values ​​less than 0.5. This can ensure that the first detection frame obtained by screening contains instance targets and background information as much as possible, thereby better balancing the positive and negative examples of the semantic segmentation task.

[0137] In addition, a ROI operation can be applied to the full-image semantic segmentation label to extract a local semantic segmentation label aligned with the first detection box as a supervisory signal for the second branch.

[0138] On this basis, the loss function value of the second branch training can be specifically: based on the semantic segmentation result output by the semantic segmentation network and the local semantic segmentation label as the supervision signal, the semantic segmentation loss function value L is calculated seg .

[0139] From the above, we can see that in the joint training process of the first branch and the second branch, the total loss function value is:

[0140] L total =α×(L reg +L cls ) +(1-α) × L seg

[0141] Among them, α is the weight and can be set manually.

[0142] The multi-task model joint training process can update the entire network parameters according to the total loss function value until the set training end conditions are met.

[0143] By adopting the structure of the multi-task model and the joint training strategy provided in this embodiment, the first branch finally trained can be used as a target detection model. While learning target detection, the target detection model can also learn semantic segmentation information, that is, the target detection model also has the ability to characterize local details (semantic segmentation information is pixel-level classification, which belongs to local detail information of the image), which helps to improve the target detection model's ability to understand targets in complex scenes, especially when the target is partially occluded or in a cluttered background, and can improve the detection effect of occluded targets.

[0144] In some embodiments of the present application, Figure 5 As shown, another optional structure of the multi-task model is provided. Figure 4 In the multi-task model shown in the figure, a feature pyramid network (FPN) can be further added between the backbone network and the detection and classification network in the first branch to perform multi-scale fusion of features extracted by the backbone network to facilitate the detection of objects of different sizes. The multi-scale fusion features output by the feature pyramid network are sent to the detection and classification network for output prediction.

[0145] Among them, the structure of the backbone network and the detection and classification network is Figure 4 They can be the same. For details, please refer to the relevant introduction in the previous article, which will not be repeated here.

[0146] The second branch may include a region of interest feature extraction unit, a multi-scale feature fusion unit, and a semantic segmentation network.

[0147] Among them, the region of interest feature extraction unit is used to select the first detection frame whose confidence exceeds the first threshold from the detection frames of each target predicted by the first branch, and use the regional feature alignment operation (ROI Align) to select the scale features aligned with the first detection frame from the different scale features fused by the feature pyramid network, and send them to the multi-scale feature fusion unit for feature fusion. The fused features are sent to the semantic segmentation network to predict the semantic segmentation results.

[0148] Among them, the multi-scale feature fusion unit is used to fuse the input multi-scale features, and the multi-scale feature fusion unit may include multiple layers of convolution, upsampling and nonlinear activation functions to further refine the features. Finally, the fused features output by the multi-scale feature fusion unit are input into the semantic segmentation network to predict the semantic segmentation results.

[0149] Compared with the multi-task model in the previous embodiment, the multi-task model structure provided in this embodiment additionally adds a feature pyramid network in the first branch, which can perform multi-scale fusion of features extracted by the backbone network, thereby enhancing the detection capability of objects of different sizes.

[0150] Correspondingly, a multi-scale feature fusion unit is also added to the second branch, which is used to fuse the input scale features aligned with the first detection frame, and then send the fused features to the semantic segmentation network. Using the structure of the multi-task model and the joint training strategy provided by this embodiment, the first branch finally trained can be used as a target detection model. While learning target detection, the target detection model can also learn semantic segmentation information, which helps to improve the target detection model's ability to understand targets in complex scenes, especially when the target is partially occluded or the background is cluttered, which can improve the detection effect of the occluded target.

[0151] After the multi-task model is trained by the target detection model training method of the aforementioned embodiment, the second branch of the multi-task model can be removed and the first branch can be retained, such as Figure 6 As shown, the first branch is retained as a single-stage target detection model, which can be deployed in an online environment for reasoning to ensure the reasoning efficiency of the model while also improving the detection capability of occluded targets.

[0152] In some embodiments of the present application, another optional training strategy for the target detection model is provided. Specifically, the target detection model can be jointly trained with the semantic segmentation network, the semantic segmentation network uses the hidden layer features extracted by the target detection model as input to predict the semantic segmentation results, the target detection model is used to predict the target detection results, and the total loss value of the joint training includes the target detection loss value of the target detection model and the semantic segmentation loss value of the semantic segmentation network.

[0153] In this embodiment, the target detection model is trained jointly with the semantic segmentation network during the training process, and the target detection model is trained with the assistance of the semantic segmentation network, so that the target detection model can not only learn the ability to detect the target during the training process, but also learn the semantic segmentation information, and at the same time have the ability to characterize local details (the semantic segmentation information is pixel-level classification, which belongs to the local detail information of the image), which helps to improve the target detection model's ability to understand targets in complex scenes, especially when the target is partially occluded or in a cluttered background, and can improve the detection effect of occluded targets.

[0154] 2. Reasoning Stage

[0155] After completing the training of the target detection model, the target detection model can be deployed to the online environment for reasoning application.

[0156] This embodiment provides a target detection method:

[0157] First, an image to be detected is obtained. The image may be an image containing a partially obscured target. Of course, it may also be an image containing an unobstructed target.

[0158] Further, the image to be detected is sent to the target detection model to obtain the target detection result output by the target detection model, that is, the detection frame and category of the target. The target detection model can be a target detection model trained by any of the above-mentioned embodiments.

[0159] Since the target detection model obtained by the aforementioned training method has the ability to understand targets in complex scenes, the target detection effect can be improved by using the method of this application, especially when the target is partially occluded or the background is cluttered, the detection effect of the occluded target can be improved. At the same time, through the above introduction to the target detection model training process, it can be seen that the target detection model can adopt a lightweight network structure, so the reasoning efficiency is higher, and it can adapt to reasoning scenarios with high timeliness requirements. At the same time, the requirements for hardware device performance are reduced.

[0160] Reference Figure 7a-7d, respectively illustrate the schematic diagrams of the detection effect of an obstructed phone call using the target detection method provided in the present application in an actual smart cockpit phone call dangerous behavior detection scenario.

[0161] It can be seen that in actual scenarios, the mobile phone may be blocked in various situations. After adopting the method of this application, the blocked mobile phone can be accurately detected, thereby improving the detection effect of the blocked target.

[0162] The target detection device provided in the embodiment of the present application is described below. The target detection device described below and the target detection method described above can be referenced to each other.

[0163] See also Figure 8 , Figure 8 A schematic diagram of the structure of a target detection device disclosed in an embodiment of the present application.

[0164] like Figure 8 As shown, the device may include:

[0165] An image acquisition unit 11, used to acquire an image to be detected;

[0166] The target prediction unit 12 is used to send the image to be detected to the configured target detection model to obtain the target detection result output by the model, wherein:

[0167] The target detection model is jointly trained with the semantic segmentation network during the training phase. The semantic segmentation network uses the hidden layer features extracted by the target detection model as input to predict the semantic segmentation results. The total loss value of the joint training includes the target detection loss value of the target detection model and the semantic segmentation loss value of the semantic segmentation network.

[0168] In some embodiments of the present application, a target detection model training device is further provided. The target detection model training device described below and the target detection model training method described above can refer to each other.

[0169] See also Fig. 9 , Fig. 9 A schematic diagram of the structure of a target detection model device disclosed in an embodiment of the present application.

[0170] like Fig. 9 As shown, the device may include:

[0171] A training data acquisition unit 21 is used to acquire image training samples carrying detection box labels and full-image semantic segmentation labels;

[0172] A data input unit 22 is used to input the image training sample into a configured multi-task model, wherein the multi-task model includes a first branch for performing an object detection task and a second branch for performing a semantic segmentation task, wherein the second branch uses the hidden layer features extracted by the first branch as input to predict a semantic segmentation result;

[0173] A branch result acquisition unit 23, used to acquire the target detection result output by the first branch of the multi-task model and the semantic segmentation result output by the second branch;

[0174] A loss calculation unit 24 is used to calculate a target detection loss value based on the target detection result and the detection box label, calculate a semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label, and calculate a total loss value of the target detection loss value and the semantic segmentation loss value;

[0175] The parameter updating and structure editing unit 25 is used to update the network parameters of the multi-task model according to the total loss value until the training end condition is reached, and the first branch in the multi-task model is used as the target detection model to be deployed.

[0176] In a possible implementation, the first branch in the multi-task model includes a backbone network for extracting image features and a detection classification network for predicting a detection box and a category of a target;

[0177] The second branch includes a region of interest feature extraction unit and a semantic segmentation network;

[0178] The region of interest feature extraction unit is used to select a first detection frame whose confidence exceeds a first threshold from the detection frames of each target predicted by the first branch, select features aligned with the first detection frame from the features extracted by the backbone network using a regional feature alignment operation, and send the features to the semantic segmentation network to predict a semantic segmentation result;

[0179] The process of calculating the semantic segmentation loss value by the loss calculation unit based on the semantic segmentation result and the full-image semantic segmentation label includes:

[0180] A semantic segmentation loss value is calculated based on the semantic segmentation result and a local semantic segmentation label, where the local semantic segmentation label is a semantic segmentation label extracted from the full-image semantic segmentation label and aligned with the first detection box.

[0181] In a possible implementation, the first branch in the multi-task model includes a backbone network for extracting image features, a feature pyramid network for multi-scale fusion of features extracted by the backbone network, and a detection classification network for predicting a detection box and category of a target;

[0182] The second branch includes a region of interest feature extraction unit, a multi-scale feature fusion unit and a semantic segmentation network;

[0183] The region of interest feature extraction unit is used to select a first detection frame whose confidence exceeds a first threshold from the detection frames of each target predicted by the first branch, and use a regional feature alignment operation to select each scale feature aligned with the first detection frame from the different scale features fused by the feature pyramid network, and send the scale features to the multi-scale feature fusion unit for feature fusion, and send the fused features to the semantic segmentation network to predict the semantic segmentation result;

[0184] The process of calculating the semantic segmentation loss value by the loss calculation unit based on the semantic segmentation result and the full-image semantic segmentation label includes:

[0185] A semantic segmentation loss value is calculated based on the semantic segmentation result and a local semantic segmentation label, where the local semantic segmentation label is a semantic segmentation label extracted from the full-image semantic segmentation label and aligned with the first detection box.

[0186] In a possible implementation, the first threshold is a value less than 0.5.

[0187] In a possible implementation, the process of the training data acquisition unit acquiring the image training sample carrying the detection box label and the full-image semantic segmentation label includes:

[0188] Obtain the original image dataset containing the occluded target;

[0189] Annotate each image in the original image dataset using the configured open word detection model to generate a detection box pseudo label;

[0190] In response to an operation of filtering images carrying detection frame pseudo labels, a first image data set after removing erroneous labels is obtained, wherein each image in the first image data set carries a detection frame label;

[0191] Input the images in the first image data set into the configured open word segmentation model to obtain semantic segmentation labels for each pixel in each detection box in the image;

[0192] Based on the semantic segmentation label of each pixel in each detection box in the image, the semantic segmentation label of the entire image corresponding to the image is generated.

[0193] In a possible implementation, the training data acquisition unit uses the configured open word detection model to annotate each image in the original image data set to generate a detection box pseudo label, including:

[0194] For each image in the original image dataset:

[0195] Using two or more different types of configured open word detection models, respectively annotate the image to obtain a detection box pseudo-label set generated by each open word detection model;

[0196] Take the union of the detection box pseudo-label sets generated by each type of open word detection model as the detection box pseudo-label corresponding to the image.

[0197] In a possible implementation, the process of calculating the target detection loss value by the loss calculation unit based on the target detection result and the detection box label includes:

[0198] Calculating a regression loss value of the detection frame based on the detection frame coordinates in the target detection result and the detection frame coordinate labels in the detection frame labels;

[0199] Calculating a classification loss value of the detection frame based on the category of the detection frame in the target detection result and the detection frame category label in the detection frame label;

[0200] The regression loss value and the classification loss value of the detection box are integrated to obtain the target detection loss value.

[0201] The present application also provides an electronic device in an embodiment. Fig.10 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as servers, robots, smart phones (mobile phones), personal computers (PCs), laptops, car terminals, wearable devices, etc. Fig.10 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0202] like Fig.10 As shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603 to implement the target detection method of the aforementioned embodiment of the present application, or implement the target detection model training method of the aforementioned embodiment of the present application. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in RAM 603. The processing device 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0203] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0204] Also provided in an embodiment of the present application is a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any target detection method provided in the embodiment of the present application, or implements each step of any target detection model training method provided in the embodiment of the present application.

[0205] A computer-readable storage medium is also provided in an embodiment of the present application, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device implements any target detection method provided in the embodiment of the present application, or implements each step of any target detection model training method provided in the embodiment of the present application.

[0206] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0207] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0208] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0209] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

[0210] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

Claims

1. A target detection method, characterized in that: include: Acquire an image to be detected; The image to be detected is sent to the configured target detection model to obtain the target detection result output by the model, where: The target detection model is jointly trained with the semantic segmentation network during the training phase. The semantic segmentation network uses the hidden layer features extracted by the target detection model as input to predict the semantic segmentation results. The total loss value of the joint training includes the target detection loss value of the target detection model and the semantic segmentation loss value of the semantic segmentation network.

2. A target detection model training method, characterized in that: include: Obtain image training samples with detection box labels and full-image semantic segmentation labels; Input the image training sample into a configured multi-task model, wherein the multi-task model includes a first branch for performing an object detection task and a second branch for performing a semantic segmentation task, wherein the second branch uses the hidden layer features extracted by the first branch as input to predict a semantic segmentation result; Obtaining the target detection result output by the first branch of the multi-task model and the semantic segmentation result output by the second branch; Calculating a target detection loss value based on the target detection result and the detection box label, calculating a semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label, and calculating a total loss value of the target detection loss value and the semantic segmentation loss value; The network parameters of the multi-task model are updated according to the total loss value until the training end condition is reached, and the first branch in the multi-task model is used as the target detection model to be deployed.

3. The method according to claim 2, characterized in that The first branch includes a backbone network for extracting image features and a detection classification network for predicting a detection frame and category of a target; The second branch includes a region of interest feature extraction unit and a semantic segmentation network; The region of interest feature extraction unit is used to select a first detection frame whose confidence exceeds a first threshold from the detection frames of each target predicted by the first branch, select features aligned with the first detection frame from the features extracted by the backbone network using a regional feature alignment operation, and send the features to the semantic segmentation network to predict a semantic segmentation result; The process of calculating the semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label includes: A semantic segmentation loss value is calculated based on the semantic segmentation result and a local semantic segmentation label, where the local semantic segmentation label is a semantic segmentation label extracted from the full-image semantic segmentation label and aligned with the first detection box.

4. The method according to claim 2, characterized in that: The first branch includes a backbone network for extracting image features, a feature pyramid network for multi-scale fusion of features extracted by the backbone network, and a detection classification network for predicting a detection frame and category of a target; The second branch includes a region of interest feature extraction unit, a multi-scale feature fusion unit and a semantic segmentation network; The region of interest feature extraction unit is used to select a first detection frame whose confidence exceeds a first threshold from the detection frames of each target predicted by the first branch, and use a regional feature alignment operation to select each scale feature aligned with the first detection frame from the different scale features fused by the feature pyramid network, and send the scale features to the multi-scale feature fusion unit for feature fusion, and send the fused features to the semantic segmentation network to predict the semantic segmentation result; The process of calculating the semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label includes: A semantic segmentation loss value is calculated based on the semantic segmentation result and a local semantic segmentation label, where the local semantic segmentation label is a semantic segmentation label extracted from the full-image semantic segmentation label and aligned with the first detection box.

5. The method according to claim 3 or 4, characterized in that: The first threshold is a value less than 0.

5.

6. The method according to claim 2, characterized in that The process of obtaining image training samples with detection box labels and full-image semantic segmentation labels includes: Obtain the original image dataset containing the occluded target; Annotate each image in the original image dataset using the configured open word detection model to generate a detection box pseudo label; In response to an operation of filtering images carrying detection frame pseudo labels, a first image data set after removing erroneous labels is obtained, wherein each image in the first image data set carries a detection frame label; Input the images in the first image data set into the configured open word segmentation model to obtain semantic segmentation labels for each pixel in each detection box in the image; Based on the semantic segmentation label of each pixel in each detection box in the image, the semantic segmentation label of the entire image corresponding to the image is generated.

7. The method according to claim 6, characterized in that The process of annotating each image in the original image dataset using the configured open word detection model to generate a detection box pseudo label includes: For each image in the original image dataset: Using two or more different types of configured open word detection models, respectively annotate the image to obtain a detection box pseudo-label set generated by each open word detection model; Take the union of the detection box pseudo-label sets generated by each type of open word detection model as the detection box pseudo-label corresponding to the image.

8. The method according to claim 2, characterized in that: The process of calculating the target detection loss value based on the target detection result and the detection frame label includes: Calculating a regression loss value of the detection frame based on the detection frame coordinates in the target detection result and the detection frame coordinate labels in the detection frame labels; Calculating a classification loss value of the detection frame based on the category of the detection frame in the target detection result and the detection frame category label in the detection frame label; The regression loss value and the classification loss value of the detection box are integrated to obtain the target detection loss value.

9. A target detection device, characterized in that: include: An image acquisition unit, used for acquiring an image to be detected; The target prediction unit is used to send the image to be detected into the configured target detection model to obtain the target detection result output by the model, wherein: The target detection model is jointly trained with the semantic segmentation network during the training phase. The semantic segmentation network uses the hidden layer features extracted by the target detection model as input to predict the semantic segmentation results. The total loss value of the joint training includes the target detection loss value of the target detection model and the semantic segmentation loss value of the semantic segmentation network.

10. A target detection model training device, characterized in that: include: A training data acquisition unit, used to acquire image training samples carrying detection box labels and full-image semantic segmentation labels; A data input unit, used to input the image training sample into a configured multi-task model, wherein the multi-task model includes a first branch for performing an object detection task and a second branch for performing a semantic segmentation task, wherein the second branch uses the hidden layer features extracted by the first branch as input to predict a semantic segmentation result; A branch result acquisition unit, used to acquire the target detection result output by the first branch of the multi-task model and the semantic segmentation result output by the second branch; A loss calculation unit, configured to calculate a target detection loss value based on the target detection result and the detection box label, calculate a semantic segmentation loss value based on the semantic segmentation result and the full-image semantic segmentation label, and calculate a total loss value of the target detection loss value and the semantic segmentation loss value; A parameter updating and structure editing unit is used to update the network parameters of the multi-task model according to the total loss value until the training end condition is reached, and the first branch in the multi-task model is used as the target detection model to be deployed.

11. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the target detection method as described in claim 1, or to implement each step of the target detection model training method as described in any one of claims 2 to 8.

12. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the target detection method as described in claim 1, or implements the various steps of the target detection model training method as described in any one of claims 2 to 8.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the target detection method as described in claim 1, or implements the various steps of the target detection model training method as described in any one of claims 2 to 8.

Citation Information

Cited By

  • Lightweight neural network sensing and positioning method based on vision

    CN119478038A

  • Demonstration learning method and demonstration learning system based on visual segmentation large model

    CN120070975A