Training method and device of target detection model, target detection method and device

By using cascaded subnetworks and loss function adjustment, the problem of insufficient processing of low-level spatial features in existing target detection models is solved, thereby improving the accuracy of small target detection.

CN114782680BActive Publication Date: 2026-03-17BEIJING HORIZON INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing object detection models do not distinguish between the computational requirements of classification and detection tasks, resulting in insufficient processing of underlying spatial features, especially inadequate accuracy for small object detection.

Method used

The backbone network consists of at least two cascaded subnetworks arranged in order of data processing volume. The lower subnetworks process more data to extract fine-grained features, and the model parameters are adjusted by the detection network and loss function.

Benefits of technology

It improves the accuracy of target detection, especially the accuracy of small target detection. Through step-by-step feature extraction and detection, it enhances the model's ability to acquire fine-grained features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782680B_ABST
    Figure CN114782680B_ABST
Patent Text Reader

Abstract

This disclosure provides a training method and apparatus for an object detection model, an object detection method and apparatus, a computer-readable storage medium, and an electronic device. The training method for the object detection model includes: using a backbone network composed of at least two sub-networks within the object detection model to be trained, performing step-by-step feature extraction on a sample image to obtain feature data, wherein the at least two sub-networks are arranged in order of data processing volume; using the detection network within the object detection model to be trained, obtaining the detection result of the target object in the sample image; determining a loss value representing the error between the detection result and pre-annotated information for the target object; and adjusting the parameters of the object detection model to be trained based on the loss value. This disclosure helps to more accurately detect target objects from images because the lower-level sub-networks can acquire finer-grained features from the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a training method and apparatus for an object detection model, an object detection method and apparatus, a computer-readable storage medium, and an electronic device. Background Technology

[0002] The network structure of an object detection model typically includes a backbone, a neck, and a head. The backbone receives the image as input and uses stacked convolutional layers and downsampling to obtain feature data at different scales, which is then input to the neck. The neck further analyzes the input feature data to obtain data for object detection, which is then input to the head. The head finally outputs the desired detection bounding box and confidence score, among other information.

[0003] Existing object detection models typically use classification networks as their backbone, such as ResNet, MobileNet, ShuffleNet, and EfficientNet. However, classification and detection tasks differ, and the network architecture requirements for computational complexity vary. For example, classification tasks require higher-level networks to process richer features for classification, while detection tasks, especially small object detection, require more low-level spatial features. Existing object detection models do not allocate computational resources to the backbone network specifically for the detection task, thus affecting the model's detection accuracy. Summary of the Invention

[0004] Embodiments of this disclosure provide a method, apparatus, computer-readable storage medium, and electronic device for training an object detection model.

[0005] Embodiments of this disclosure provide a training method for an object detection model. The method includes: using a backbone network consisting of at least two cascaded sub-networks included in the object detection model to be trained, performing step-by-step feature extraction on a sample image to obtain feature data, wherein the at least two sub-networks are arranged in order of data processing volume; using a detection network included in the object detection model to be trained, detecting the feature data to obtain a detection result of the target object in the sample image; determining a loss value representing the error between the detection result and pre-annotated information of the target object based on a preset loss function; and adjusting the parameters of the object detection model to be trained based on the loss value.

[0006] According to another aspect of the present disclosure, a target detection method is provided, the method comprising: acquiring an image to be detected; extracting features from the image to be detected using a backbone network included in a pre-trained target detection model to obtain feature data; and detecting the feature data using a detection network included in the target detection model to obtain a detection result of a target object in the image to be detected.

[0007] According to another aspect of the present disclosure, a training apparatus for an object detection model is provided. The apparatus includes: a first extraction module, configured to extract features from a sample image step by step using a backbone network consisting of at least two cascaded sub-networks included in the object detection model to be trained, to obtain feature data, wherein the at least two sub-networks are arranged in order of data processing volume; a first detection module, configured to detect the feature data using a detection network included in the object detection model to be trained, to obtain a detection result of a target object in the sample image; a determination module, configured to determine a loss value representing the error between the detection result and pre-annotated labeling information of the target object based on a preset loss function; and an adjustment module, configured to adjust the parameters of the object detection model to be trained based on the loss value.

[0008] According to another aspect of the present disclosure, a target detection apparatus is provided, the apparatus comprising: an acquisition module for acquiring an image to be detected; a second extraction module for extracting features from the image to be detected using a backbone network included in a pre-trained target detection model to obtain feature data; and a second detection module for detecting the feature data using a detection network included in the target detection model to obtain a detection result of a target object in the image to be detected.

[0009] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which stores a computer program for performing the training method or object detection method of the object detection model described above.

[0010] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; and a processor for reading executable instructions from the memory and executing the instructions to implement the training method or object detection method of the object detection model described above.

[0011] Based on the target detection model training method and apparatus, target detection method and apparatus, computer-readable storage medium and electronic device provided in the above embodiments of this disclosure, feature data is obtained by using the backbone network of the target detection model to be trained, which consists of at least two cascaded sub-networks, to extract features from sample images step by step. Then, the detection network of the target detection model to be trained is used to detect the feature data to obtain the detection result. The loss value is then calculated based on the detection result and the annotation information. Finally, the parameters of the target detection model to be trained are adjusted based on the loss value to obtain a target detection model that meets the functional requirements. Since the at least two sub-networks of the backbone network are arranged in order of data processing volume, that is, the bottom sub-networks of the backbone network (i.e., the sub-networks arranged in the first position) process more data, the bottom sub-networks can obtain more fine-grained features in the image, which helps to detect target objects from the image more accurately, especially for small target detection tasks, the detection accuracy is further improved.

[0012] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0013] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0014] Figure 1 This is the system diagram to which this disclosure applies.

[0015] Figure 2 This is a flowchart illustrating a training method for an object detection model provided in an exemplary embodiment of this disclosure.

[0016] Figure 3 This is a flowchart illustrating a training method for an object detection model provided in another exemplary embodiment of this disclosure.

[0017] Figure 4 This is a flowchart illustrating a training method for an object detection model provided in another exemplary embodiment of this disclosure.

[0018] Figure 5A This is an exemplary structural diagram of a downsampling unit provided in an embodiment of this disclosure.

[0019] Figure 5B This is an exemplary structural diagram of a feature extraction unit provided in an embodiment of this disclosure.

[0020] Figure 6This is a flowchart illustrating a training method for an object detection model provided in another exemplary embodiment of this disclosure.

[0021] Figure 7 This is a flowchart illustrating an exemplary embodiment of the target detection method provided in this disclosure.

[0022] Figure 8 This is a schematic diagram of the structure of a training device for an object detection model provided in an exemplary embodiment of this disclosure.

[0023] Figure 9 This is a schematic diagram of the structure of a training device for a target detection model provided in another exemplary embodiment of this disclosure.

[0024] Figure 10 This is a schematic flowchart of a target detection apparatus provided in an exemplary embodiment of the present disclosure.

[0025] Figure 11 This is a structural diagram of an electronic device provided in an exemplary embodiment of this disclosure. Detailed Implementation

[0026] Hereinafter, exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present disclosure, and not all embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described herein.

[0027] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0028] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.

[0029] It should also be understood that in the embodiments disclosed herein, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.

[0030] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.

[0031] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship.

[0032] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0033] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0034] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0035] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0036] 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 discussed further in subsequent figures.

[0037] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0038] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0039] Application Overview

[0040] Existing object detection models fail to differentiate between classification and detection tasks. For example, classification tasks require higher-level networks (i.e., networks located later in the hierarchy) to process richer features for classification, while detection tasks, especially small object detection, demand more low-level spatial features, requiring lower-level networks (i.e., sub-networks located earlier in the hierarchy) to handle more computation. The backbone of existing object detection models typically uses classification networks directly. Classification networks are characterized by higher-level networks undertaking more computation to extract more abstract features. Therefore, existing object detection models do not adequately process low-level spatial features, resulting in insufficient accuracy, particularly for small object detection.

[0041] Exemplary System

[0042] Figure 1 An exemplary system architecture 100 for training a target detection model to which embodiments of the present disclosure may be applied is shown.

[0043] like Figure 1 As shown, system architecture 100 may include terminal device 101, network 102, and server 103. Network 102 is used as a medium to provide a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0044] Users can use terminal device 101 to interact with server 103 via network 102 to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as image processing applications, video surveillance applications, search applications, web browser applications, etc.

[0045] Terminal device 101 can be various electronic devices, including but not limited to mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers.

[0046] Server 103 can be a server that provides various services, such as a background model training server that uses sample images uploaded by terminal device 101 to train an object detection model, or a background object detection server that performs object detection on images to be detected uploaded by terminal device 101.

[0047] It should be noted that the training method or object detection method of the object detection model provided in the embodiments of this disclosure can be executed by the server 103 or by the terminal device 101. Accordingly, the training device or object detection device of the object detection model can be set in the server 103 or in the terminal device 101.

[0048] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included. If the sample image or the image to be detected does not need to be acquired remotely, the above system architecture may exclude the network and only include servers or terminal devices.

[0049] Exemplary methods

[0050] Figure 2 This is a schematic flowchart illustrating a training method for an object detection model provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices (such as...). Figure 1 On the terminal device 101 or server 103 shown, such as Figure 2 As shown, the method includes the following steps:

[0051] Step 201: Using the backbone network of the target detection model to be trained, which consists of at least two cascaded sub-networks, feature extraction is performed on the sample image step by step to obtain feature data.

[0052] In this embodiment, the electronic device can utilize the backbone network of the target detection model to be trained, which consists of at least two cascaded sub-networks, to extract features from the sample image step by step, thereby obtaining feature data. The at least two sub-networks are arranged in order of data processing volume.

[0053] Typically, in order to enable the lower-level sub-networks (i.e., the sub-networks in the earlier positions) in at least two sub-networks to handle more data processing and extract more fine-grained features from the image, more network units can be stacked in the lower-level sub-networks, or the input sample image can be downsampled step by step by each sub-network, thereby gradually reducing the scale of the feature data processed by each sub-network.

[0054] Step 202: Use the detection network included in the target detection model to be trained to detect the feature data and obtain the detection results of the target object in the sample image.

[0055] In this embodiment, the electronic device can use the detection network included in the target detection model to be trained to detect feature data and obtain the detection result of the target object in the sample image.

[0056] Typically, object detection models include a backbone network, a neck network, and a head network. The neck network fuses the feature data extracted by the backbone network to obtain more diverse feature data. This diverse feature data is then passed to the subsequent head network for detection, thereby improving the performance of the object detection model. In this embodiment, the detection network can include both the neck and head networks, or only the head network. The feature data generated by the backbone network can be input into the detection network, which performs location detection and classification of target objects in the sample image. Typically, the head network can include a classification subnetwork and a regression subnetwork, used to detect the category and location of the target object, respectively.

[0057] The detection results can include predicted location information and predicted category information. Predicted location information indicates the position of the target object in the sample image. For example, based on the predicted location information, a bounding box of a preset shape (e.g., a rectangle) can be drawn in the sample image; the area contained within this bounding box represents the location of the target object. Predicted category information indicates the category of the target object. For example, the category of the target object could be human, face, vehicle, obstacle, etc. Typically, predicted category information can include the confidence level that the target object belongs to a certain category.

[0058] Step 203: Based on a preset loss function, determine the loss value that represents the error between the detection result and the pre-annotated information of the target object.

[0059] In this embodiment, the electronic device can determine a loss value representing the error between the detection result and the pre-annotated information of the target object based on a preset loss function.

[0060] The annotation information can include annotation location information and annotation category information, which are used to represent the actual location and actual category of the target object in the sample image, respectively. The preset loss function can be an existing loss function used to train the object detection model. Generally, the loss function used to train the object detection model can include a classification loss function and a regression loss function, as shown in equation (1) below:

[0061] L=α1L reg +α2L class (1)

[0062] Where α1 and α2 are the set weights, L reg For the regression loss function, L class This is the classification loss function.

[0063] The regression loss function is used to determine the error between the location information detected by the object detection model (e.g., the detection box containing the target object) and the labeled location information; the classification loss function is used to represent the error between the category information of the detected target object (e.g., the probability of belonging to a certain category) and the labeled category information. For example, the classification loss function can be the cross-entropy loss function, and the regression loss function can be the L1 loss function.

[0064] Step 204: Adjust the parameters of the target detection model to be trained based on the loss value.

[0065] In this embodiment, the electronic device can adjust the parameters of the target detection model to be trained based on the loss value. The training process of the target detection model is an optimal solution-finding process, where the optimal solution is given through data annotation, specifically the annotation information mentioned above in this embodiment. The process of fitting the model to the optimal solution is mainly carried out iteratively by minimizing the error. For an input sample image, the difference between the actual output of the model (i.e., the detection result) and the expected output (i.e., the annotation information) can be calculated using the preset loss function. This difference is then propagated to the connections between each neuron in the neural network using the backpropagation algorithm. The difference signal propagated to each connection represents the contribution rate of that connection to the overall error. Then, the gradient descent algorithm is used to update and modify the original model parameters (including the parameters of the backbone network and the detection network), gradually reducing the loss value calculated during the iterative training process.

[0066] By repeatedly executing steps 201-204, i.e., iteratively training the model using multiple sets of training samples (including sample images and corresponding annotation information), the model after each iteration becomes the target detection model to be trained in the next iteration. When the target detection model after parameter adjustment meets the training termination condition, the current target detection model is the trained target detection model. The training termination condition may include, but is not limited to, at least one of the following: the loss value of the aforementioned loss function converges, the training time exceeds a preset duration, and the number of training iterations exceeds a preset number.

[0067] The method provided in the above embodiments of this disclosure utilizes a backbone network consisting of at least two cascaded sub-networks within the target detection model to be trained. This backbone network extracts features from sample images step-by-step to obtain feature data. Then, the detection network within the target detection model is used to detect these feature data, yielding detection results. A loss value is calculated based on the detection results and annotation information. Finally, the parameters of the target detection model are adjusted based on the loss value, ultimately resulting in a target detection model that meets functional requirements. Since the at least two sub-networks within the backbone network are arranged in order of data processing volume—that is, the lower-level sub-networks (those at the beginning) process more data—they can acquire finer-grained features from the image, thus helping to detect target objects more accurately, especially for small target detection tasks, further improving detection accuracy.

[0068] In some alternative implementations, such as Figure 3 As shown, step 201 may include:

[0069] Step 2011: Determine the position of the currently running target subnetwork in the backbone network within at least two subnetwork layers.

[0070] The position of the target subnetwork within the backbone network is its hierarchical level.

[0071] Step 2012: The data processing unit corresponding to the location included in the target sub-network processes the data input to the target sub-network to obtain the sub-feature data corresponding to the target sub-network.

[0072] Specifically, different levels of sub-networks contain different numbers and types of data processing units, and different types of data processing units output different types of sub-feature data after data processing. For example, the backbone network may include five sub-networks, and the data processing units in each layer may include feature extraction units and / or downsampling units. The feature extraction unit can perform feature extraction processing on the input data to obtain intermediate feature data, and the downsampling unit can perform downsampling processing on the input data to obtain downsampled feature data with a smaller scale.

[0073] Step 2013: Based on the sub-feature data, generate the feature data corresponding to the backbone network.

[0074] Specifically, since the above-mentioned at least two sub-networks process data sequentially, if the currently running target sub-network is located in the last layer, the sub-feature data generated by the target sub-network can be determined as the feature data corresponding to the backbone network, and this feature data will subsequently be input into the detection network for detection. If the currently running target sub-network is not located in the last layer, the sub-feature data generated by the target sub-network can be input into the next layer of sub-networks for data processing.

[0075] This embodiment determines the position of the currently running target subnetwork within the backbone network. Based on different positions, different data processing units are used for data processing. This enables the setting of corresponding data processing units for subnetworks at different levels, making the data processing process of each subnetwork more targeted. This helps to obtain feature data that represents richer image features and improves the target detection accuracy of the model.

[0076] In some alternative implementations, such as Figure 4 As shown, step 2012 includes:

[0077] Step 20121: In response to determining that the target sub-network includes a downsampling unit as a corresponding data processing unit, the data input to the downsampling unit is downsampled using at least one data processing branch included in the downsampling unit to obtain at least one set of data to be merged.

[0078] The input data for each data processing branch can be the same. For example... Figure 5A The diagram illustrates an exemplary structure of a downsampling unit, which comprises six convolutional sub-units, denoted as 501, 502, 503, 504, 505, and 506. Convolutional sub-units 501 and 502 form data processing branch P1, convolutional sub-units 503 and 504 form data processing branch P2, and convolutional sub-unit 505 forms data processing branch P3. Input feature data is simultaneously fed into all three data processing branches P1, P2, and P3. Figure 5A It can be seen that the convolution sub-unit 502 included in P1, the convolution sub-unit 504 included in P2, and the convolution sub-unit 505 included in P3 each output a set of data to be merged.

[0079] Step 20122: Generate downsampled feature data based on at least one set of data to be merged.

[0080] like Figure 5A As shown, the two sets of data to be merged output by P1 and P2 are merged and then processed by convolution subunit 506. The data to be merged output by convolution subunit 506 and the data to be merged output by convolution subunit 505 are merged into downsampled feature data.

[0081] Step 20123: Based on the downsampled feature data, determine the sub-feature data corresponding to the target sub-network.

[0082] Specifically, downsampled feature data can be determined as sub-feature data, or downsampled feature data can be determined as sub-feature data after processing (e.g., scaling).

[0083] This embodiment incorporates downsampling units within the subnetworks of the backbone network, enabling the backbone network to progressively downsample the input data, thus gradually reducing the data processing load of each subnetwork. Furthermore, by including at least one data processing branch within each downsampling unit, the loss of feature information during downsampling is effectively reduced, improving the accuracy of the feature data output by the backbone network and consequently enhancing the precision of target detection.

[0084] In some alternative implementations, step 20121 above can be performed as follows:

[0085] Using at least one data processing branch consisting of at least one set of convolutional sub-units and at least one pointwise convolutional sub-unit in the downsampling unit, the data input to the downsampling unit is downsampled to obtain at least one set of data to be merged.

[0086] The downsampling unit may include at least one group convolution subunit and at least one pointwise convolution (i.e., 1×1 convolution) subunit. For example... Figure 5A As shown, in each convolutional sub-unit 501-506, `group conv` represents a group convolutional sub-unit. Within each group convolutional sub-unit, `kernel_size` represents the size of the convolutional kernel, such as 3×3 or 5×5, `stride` represents the stride of the convolutional kernel, and `factor` represents the ratio of the output channels to the input channels of that group convolutional sub-unit. `1×1conv` represents a pointwise convolutional sub-unit. In a group convolutional sub-unit, the convolutional kernel is divided into different groups, each group responsible for the operation of a two-dimensional convolution with a certain depth. Pointwise convolution can merge feature data from multiple channels into a single channel.

[0087] This embodiment enables parallel convolution operations by setting group convolution sub-units in the downsampling unit, which also reduces the number of network parameters, lowers the risk of overfitting, and thus improves the efficiency of model training and prediction. Pointwise convolution sub-units can merge feature data from multiple channels into one channel, achieving dimensionality reduction of the feature data and enabling information exchange between channels, which helps improve the model's detection accuracy.

[0088] In some alternative implementations, such as Figure 6 As shown, step 2012 above includes:

[0089] Step 20124: In response to determining that the target sub-network includes a location-corresponding data processing unit including a feature extraction unit, feature extraction processing is performed on the data input to the feature extraction unit to obtain intermediate feature data.

[0090] The feature extraction unit can be at least one convolutional subunit. For example... Figure 5B The diagram illustrates an exemplary structure of a feature extraction unit. This feature extraction unit includes two convolutional subunits, 507 and 508. Input feature data is processed by convolutional subunits 507 and 508 to obtain intermediate feature data.

[0091] Step 20125: Based on the intermediate feature data, determine the sub-feature data corresponding to the target sub-network.

[0092] Specifically, intermediate feature data can be identified as sub-feature data, or intermediate feature data can be identified as sub-feature data after processing (e.g., scaling).

[0093] The method provided in this embodiment can set a corresponding number of feature extraction units in each sub-network layer according to actual needs, thereby flexibly configuring the structure of each sub-network layer, which helps to improve the training efficiency of the target detection model.

[0094] In some alternative implementations, step 20124 above can be performed as follows:

[0095] The feature extraction unit uses at least one group convolutional subunit and at least one point-by-point convolutional subunit to perform feature extraction processing on the data input to the feature extraction unit, and uses the shortcut branch in the feature extraction unit to perform cross-layer processing on the data to obtain intermediate feature data.

[0096] like Figure 5B As shown, the meanings of the symbols in convolution subunits 507 and 508 are the same as those described above. Figure 5A Similarly, the technical effects that grouped convolutional subunits and pointwise convolutional subunits can achieve are the same as those mentioned above. Figure 5A The corresponding embodiments are basically the same, and will not be described again here. Figure 5B As shown, after the input feature data is processed by the pointwise convolutional subunit 509 included in a shortcut branch, the resulting data is combined with the data output by the convolutional subunit 508 to form intermediate feature data.

[0097] The method provided in this embodiment, in addition to achieving the same results as described above... Figure 5A In addition to achieving the same technical effects as the corresponding embodiments, the loss of feature information during convolution operations can be reduced by setting shortcut branches, thereby further improving the accuracy of generating intermediate feature data.

[0098] In some alternative implementations, step 20121 can be performed as follows:

[0099] The target subnetwork includes a location-corresponding data processing unit, which includes a feature extraction unit and a downsampling unit. The downsampling unit is located before the feature extraction unit. The feature extraction unit performs feature extraction processing on the downsampled feature data output by the downsampling unit to obtain intermediate feature data.

[0100] Specifically, each sub-network in the backbone network consists of at least one feature extraction unit and / or at least one downsampling unit. If a sub-network includes both a feature extraction unit and a downsampling unit, the downsampling unit can be placed before the feature extraction unit.

[0101] The table below shows the structure of each sub-network layer included in the backbone network.

[0102]

[0103]

[0104] Where in_ch and out_ch represent the number of channels in the input and output feature maps, respectively. head_op represents the first unit of each layer, and stack_op represents the unit following head_op, which performs feature extraction without downsampling. normal and reduce represent the feature extraction and downsampling units, respectively, kN i This indicates that the size of the convolution kernel is N. i ×N i ,i=1,2,...11,12. f i This indicates the ratio of the number of channels in the output of the convolution operation to the number of channels in the input. For example, fM1 indicates that the number of channels is increased by a factor of M1. The above N... i and M i It can be set according to actual needs.

[0105] As shown in the table above, the second, fourth, and fifth sub-networks all include downsampling units and feature extraction units. In these sub-networks, the downsampling unit is located before the feature extraction unit.

[0106] This embodiment places the downsampling unit before the feature extraction unit in some sub-networks. This allows the downsampling unit to reduce the scale of the feature data first, thereby reducing the data processing load of the feature extraction unit, increasing the processing speed of feature extraction, and improving the efficiency of model training and model prediction.

[0107] In some alternative implementations, step 2013 above can be performed as follows:

[0108] In response to determining that the target subnetwork is the last subnetwork of at least two subnetworks, feature data corresponding to the backbone network is generated based on the sub-feature data corresponding to the target subnetwork.

[0109] When the target subnetwork is the last layer, the sub-feature data output by the last data processing unit in the target subnetwork can be determined as the feature data corresponding to the backbone network. For example, in the 5th layer subnetwork shown in the table above, the last data processing unit is the feature extraction unit kN. 13 fM 13 If so, the sub-feature data output by the feature extraction unit can be determined as the feature data corresponding to the backbone network. Alternatively, the sub-feature data output by the last data processing unit in the target sub-network can be further processed (e.g., scaled) to obtain the feature data corresponding to the backbone network.

[0110] In this embodiment, feature data output by the backbone network is generated based on the sub-feature data corresponding to the last sub-network of the backbone network. Since the feature data output by the backbone network is generated by progressively decreasing computational complexity, it can contain more fine-grained features, thereby further improving the accuracy of target detection.

[0111] Figure 7 This is a schematic flowchart of a target detection method provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices (such as...). Figure 1 On the terminal device 101 or server 103 shown, such as Figure 7 As shown, the method includes the following steps:

[0112] Step 701: Obtain the image to be detected.

[0113] In this embodiment, the electronic device can acquire the image to be detected either locally or remotely. The image to be detected can be an image captured by a camera of the target object.

[0114] Step 702: Use the backbone network of the pre-trained target detection model to extract features from the image to be detected, and obtain feature data.

[0115] In this embodiment, the electronic device can use the backbone network of the pre-trained target detection model to extract features from the image to be detected and obtain feature data.

[0116] The target detection model is based on the above. Figure 2 The model trained according to the corresponding embodiment. The structure and function of the object detection model can be referred to the above. Figure 2 The corresponding implementation examples will not be described in detail here.

[0117] Step 703: Utilize the detection network included in the target detection model to detect the feature data and obtain the detection result of the target object in the image to be detected.

[0118] In this embodiment, the electronic device can utilize the detection network included in the target detection model to detect feature data and obtain the detection result of the target object in the image to be detected. The detection result may include location information and category information, used to represent the location of the target object in the image to be detected and the category of the target object.

[0119] The above Figure 7 The method provided in the corresponding embodiment performs target detection on the image to be detected by a pre-trained target detection model. It takes advantage of the large data processing capacity of the lower sub-networks of the backbone network of the target detection model to extract more fine-grained features from the image, thereby improving the accuracy of target detection, especially for small target detection tasks, the detection accuracy is further improved.

[0120] Exemplary device

[0121] Figure 8 This is a schematic diagram of the structure of a training device for an object detection model provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices, such as... Figure 8 As shown, the training device for the target detection model includes: a first extraction module 801, used to extract features from the sample image step by step using the backbone network of the target detection model to be trained, which consists of at least two cascaded sub-networks, to obtain feature data, wherein the at least two sub-networks are arranged in order of data processing volume; a first detection module 802, used to detect the feature data using the detection network of the target detection model to be trained, to obtain the detection result of the target object in the sample image; a determination module 803, used to determine a loss value representing the error between the detection result and the pre-annotated information of the target object based on a preset loss function; and an adjustment module 804, used to adjust the parameters of the target detection model to be trained based on the loss value.

[0122] In this embodiment, the first extraction module 801 can utilize the backbone network of the target detection model to be trained, which consists of at least two cascaded sub-networks, to extract features from the sample image step by step to obtain feature data. The at least two sub-networks are arranged in order of data processing volume.

[0123] Typically, in order to enable the lower-level sub-networks (i.e., the sub-networks in the earlier positions) in at least two sub-networks to handle more data processing and extract more fine-grained features from the image, more network units can be stacked in the lower-level sub-networks, or the input sample image can be downsampled step by step by each sub-network, thereby gradually reducing the scale of the feature data processed by each sub-network.

[0124] In this embodiment, the first detection module 802 can use the detection network included in the target detection model to be trained to detect feature data and obtain the detection result of the target object in the sample image.

[0125] Typically, object detection models include a backbone network, a neck network, and a head network. The neck network fuses the feature data extracted by the backbone network to obtain more diverse feature data. This diverse feature data is then passed to the subsequent head network for detection, thereby improving the performance of the object detection model. In this embodiment, the detection network can include both the neck and head networks, or only the head network. The feature data generated by the backbone network can be input into the detection network, which performs location detection and classification of target objects in the sample image. Typically, the head network can include a classification subnetwork and a regression subnetwork, used to detect the category and location of the target object, respectively.

[0126] The detection results can include predicted location information and predicted category information. Predicted location information indicates the position of the target object in the sample image. For example, based on the predicted location information, a bounding box of a preset shape (e.g., a rectangle) can be drawn in the sample image; the area contained within this bounding box represents the location of the target object. Predicted category information indicates the category of the target object. For example, the category of the target object could be human, face, vehicle, obstacle, etc. Typically, predicted category information can include the confidence level that the target object belongs to a certain category.

[0127] In this embodiment, the determining module 803 can determine a loss value representing the error between the detection result and the pre-annotated information of the target object based on a preset loss function.

[0128] The annotation information can include annotation location information and annotation category information, which represent the actual location and category of the target object in the sample image, respectively. The preset loss function can be an existing loss function used to train an object detection model. Typically, the loss function used to train an object detection model can include a classification loss function and a regression loss function. The regression loss function is used to determine the error between the location information detected by the object detection model (e.g., the detection box containing the target object) and the annotation location information; the classification loss function is used to represent the error between the category information of the detected target object (e.g., the probability of belonging to a certain category) and the annotation category information. For example, the classification loss function can be the cross-entropy loss function, and the regression loss function can be the L1 loss function.

[0129] In this embodiment, the adjustment module 804 can adjust the parameters of the target detection model to be trained based on the loss value. The training process of the target detection model is an optimal solution-finding process, where the optimal solution is given through data annotation, specifically the annotation information mentioned above in this embodiment. The process of fitting the model to the optimal solution is mainly carried out iteratively by minimizing the error. For an input sample image, the difference between the actual output of the model (i.e., the detection result) and the expected output (i.e., the annotation information) can be calculated using the preset loss function. This difference is then propagated to the connections between each neuron in the neural network using the backpropagation algorithm. The difference signal propagated to each connection represents the contribution rate of that connection to the overall error. Then, the gradient descent algorithm is used to update and modify the original model parameters (including the parameters of the backbone network and the detection network), gradually reducing the loss value calculated during iterative training.

[0130] The model is iteratively trained using multiple sets of training samples (including sample images and corresponding annotation information). The model after each iteration becomes the target detection model to be trained in the next iteration. When the target detection model with adjusted parameters meets the training termination condition, the current target detection model is considered the trained target detection model. The training termination condition may include, but is not limited to, at least one of the following: the loss value of the above loss function converges, the training time exceeds a preset duration, and the number of training iterations exceeds a preset number.

[0131] Reference Figure 9 , Figure 9 This is a schematic diagram of the structure of a training device for a target detection model provided in another exemplary embodiment of this disclosure.

[0132] In some optional implementations, the first extraction module 801 includes: a first determining unit 8011, used to determine the position of the currently running target subnetwork in the backbone network among at least two layers of subnetworks; a processing unit 8012, used to process the data input to the target subnetwork by the data processing unit included in the target subnetwork corresponding to the position, to obtain the sub-feature data corresponding to the target subnetwork; and a generating unit 8013, used to generate feature data corresponding to the backbone network based on the sub-feature data.

[0133] In some optional implementations, the processing unit 8012 includes: a first processing subunit 80121, configured to, in response to determining that the target subnetwork includes a data processing unit corresponding to a location, including a downsampling unit, perform downsampling processing on the data input to the downsampling unit using at least one data processing branch included in the downsampling unit to obtain at least one set of data to be merged; a first generation subunit 80122, configured to generate downsampled feature data based on the at least one set of data to be merged; and a first determination subunit 80123, configured to determine the sub-feature data corresponding to the target subnetwork based on the downsampled feature data.

[0134] In some optional implementations, the first processing subunit 80121 is further configured to: perform downsampling processing on the data input to the downsampling unit using at least one data processing branch consisting of at least one group of convolution subunits and at least one pointwise convolution subunit in the downsampling unit, to obtain at least one set of data to be merged.

[0135] In some optional implementations, the processing unit 8012 includes: a second processing subunit 80124, configured to perform feature extraction processing on the data input to the feature extraction unit in response to determining that the target subnetwork includes a location-corresponding data processing unit including a feature extraction unit, to obtain intermediate feature data; and a second determining subunit 80125, configured to determine the sub-feature data corresponding to the target subnetwork based on the intermediate feature data.

[0136] In some optional implementations, the second processing subunit 80124 is further configured to: perform feature extraction processing on the data input to the feature extraction unit using at least one group convolution subunit and at least one pointwise convolution subunit in the feature extraction unit, and perform cross-layer processing on the data using shortcut branches in the feature extraction unit to obtain intermediate feature data.

[0137] In some optional implementations, the second processing subunit 80124 is further configured to: in response to determining that the data processing unit corresponding to the position includes a feature extraction unit and a downsampling unit, and the downsampling unit is located before the feature extraction unit, the feature extraction unit performs feature extraction processing on the downsampled feature data output by the downsampling unit to obtain intermediate feature data.

[0138] In some optional implementations, the generation unit 8013 is further configured to: in response to determining that the target subnetwork is the last subnetwork of at least two subnetworks, generate feature data corresponding to the backbone network based on the sub-feature data corresponding to the target subnetwork.

[0139] The target detection model training apparatus provided in the above embodiments of this disclosure utilizes a backbone network consisting of at least two cascaded sub-networks within the target detection model to be trained. This backbone network extracts features from sample images step-by-step to obtain feature data. Then, the detection network within the target detection model is used to detect the feature data, yielding detection results. A loss value is calculated based on the detection results and annotation information. Finally, the parameters of the target detection model are adjusted based on the loss value, ultimately resulting in a target detection model that meets functional requirements. Since the at least two sub-networks within the backbone network are arranged in order of data processing volume—that is, the lower-level sub-networks (i.e., those at the beginning) process more data—they can acquire finer-grained features from the image, thus helping to detect target objects more accurately, especially for small target detection tasks, further improving detection accuracy.

[0140] Figure 10 This is a schematic diagram of the structure of a training device for an object detection model provided in an exemplary embodiment of this disclosure. This embodiment can be applied to electronic devices, such as... Figure 10 As shown, the training device for the target detection model includes: an acquisition module 1001 for acquiring an image to be detected; a second extraction module 1002 for extracting features from the image to be detected using the backbone network included in the pre-trained target detection model to obtain feature data; and a second detection module 1003 for detecting the feature data using the detection network included in the target detection model to obtain the detection result of the target object in the image to be detected.

[0141] In this embodiment, the acquisition module 1001 can acquire the image to be detected from a local location or from a remote location. The image to be detected can be an image captured by a camera of the target object.

[0142] In this embodiment, the second extraction module 1002 can use the backbone network included in the pre-trained target detection model to extract features from the image to be detected and obtain feature data.

[0143] The target detection model is based on the above. Figure 2 The model trained according to the corresponding embodiment. The structure and function of the object detection model can be referred to the above. Figure 2 The corresponding implementation examples will not be described in detail here.

[0144] In this embodiment, the second detection module 1003 can utilize the detection network included in the target detection model to detect feature data and obtain the detection result of the target object in the image to be detected. The detection result may include location information and category information, which are used to represent the location of the target object in the image to be detected and the category of the target object.

[0145] The target detection apparatus provided in the above embodiments of this disclosure performs target detection on the image to be detected by a pre-trained target detection model. It utilizes the large data processing capacity of the lower sub-networks of the backbone network of the target detection model to extract more fine-grained features from the image, thereby improving the accuracy of target detection, especially for small target detection tasks, where the detection accuracy is further improved.

[0146] Exemplary electronic devices

[0147] Below, for reference Figure 11 To describe an electronic device according to embodiments of the present disclosure. The electronic device may be as follows: Figure 1 The terminal device 101 and server 103 shown, or either one or both, or a standalone device independent of them, can communicate with the terminal device 101 and server 103 to receive the collected input signals from them.

[0148] Figure 11 A block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0149] like Figure 11 As shown, the electronic device 1100 includes one or more processors 1101 and memory 1102.

[0150] The processor 1101 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1100 to perform desired functions.

[0151] The memory 1102 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1101 may execute the program instructions to implement the training method or object detection method of the object detection model of the various embodiments of this disclosure described above, and / or other desired functions. Various contents such as sample images, images to be detected, and detection results may also be stored in the computer-readable storage medium.

[0152] In one example, the electronic device 1100 may also include an input device 1103 and an output device 1104, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0153] For example, when the electronic device is a terminal device 101 or a server 103, the input device 1103 can be a camera, mouse, keyboard, or other devices used to input sample images, images to be detected, various commands, etc. When the electronic device is a standalone device, the input device 1103 can be a communication network connector used to receive the input sample images, images to be detected, various commands, etc. from the terminal device 101 and the server 103.

[0154] The output device 1104 can output various information to the outside, including detection results. The output device 1104 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0155] Of course, for the sake of simplicity, Figure 11 Only some of the components of the electronic device 1100 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 1100 may include any other suitable components depending on the specific application.

[0156] Exemplary computer program products and computer-readable storage media

[0157] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps of the training method or object detection method for the object detection model according to various embodiments of this disclosure as described in the "Exemplary Methods" section of this specification.

[0158] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0159] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the training method or object detection method of the object detection model according to various embodiments of this disclosure as described in the "Exemplary Methods" section of this specification.

[0160] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0161] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0162] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0163] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0164] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0165] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.

[0166] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0167] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A method for training an object detection model, comprising: The target detection model to be trained includes a backbone network consisting of at least two cascaded sub-networks. The sample image is then subjected to step-by-step feature extraction to obtain feature data. The at least two sub-networks are arranged in order of data processing volume. The bottom sub-networks in the at least two sub-networks have more network units stacked in the earlier positions. Alternatively, each sub-network in the at least two sub-networks performs step-by-step downsampling on the sample image so that the bottom sub-network can extract more fine-grained features from the image. The target detection model to be trained is used to detect the feature data to obtain the detection result of the target object in the sample image. Based on a preset loss function, a loss value representing the error between the detection result and the pre-annotated information of the target object is determined; Based on the loss value, adjust the parameters of the target detection model to be trained; The step of using the target detection model to be trained, which includes a backbone network consisting of at least two cascaded sub-networks, to extract features from the sample image step by step to obtain feature data includes: The position of the currently running target subnetwork in the at least two layers of subnetworks is determined in the backbone network. The position of the target subnetwork in the backbone network is the level of the target subnetwork. The number and type of data processing units included in subnetworks at different levels are different. The data processing unit corresponding to the location included in the target sub-network processes the data input to the target sub-network to obtain the sub-feature data corresponding to the target sub-network. Based on the sub-feature data, feature data corresponding to the backbone network is generated.

2. The method according to claim 1, wherein, The data processing unit corresponding to the location, included in the target sub-network, processes the data input to the target sub-network to obtain sub-feature data corresponding to the target sub-network, including: In response to determining that the target sub-network includes a data processing unit corresponding to the location, a downsampling unit is included, and at least one data processing branch included in the downsampling unit is used to perform downsampling processing on the data input to the downsampling unit to obtain at least one set of data to be merged; Based on the at least one set of data to be merged, generate downsampled feature data; Based on the downsampled feature data, the sub-feature data corresponding to the target sub-network is determined.

3. The method according to claim 2, wherein, The downsampling unit utilizes at least one data processing branch to downsample the data input to the downsampling unit, obtaining at least one set of data to be merged, including: Using at least one data processing branch consisting of at least one group of convolutional sub-units and at least one pointwise convolutional sub-unit in the downsampling unit, the data input to the downsampling unit is downsampled to obtain at least one set of data to be merged.

4. The method according to claim 1, wherein, The data processing unit corresponding to the location, included in the target sub-network, processes the data input to the target sub-network to obtain sub-feature data corresponding to the target sub-network, including: In response to determining that the target sub-network includes a data processing unit corresponding to the location, a feature extraction unit is included, and the data input to the feature extraction unit is subjected to feature extraction processing to obtain intermediate feature data; Based on the intermediate feature data, the sub-feature data corresponding to the target sub-network is determined.

5. The method according to claim 4, wherein, The step of performing feature extraction processing on the data input to the feature extraction unit to obtain intermediate feature data includes: The feature extraction unit utilizes at least one group convolutional subunit and at least one point-by-point convolutional subunit to perform feature extraction processing on the data input to the feature extraction unit, and utilizes the shortcut branch in the feature extraction unit to perform cross-layer processing on the data to obtain intermediate feature data.

6. The method according to claim 4, wherein, The data processing unit corresponding to the location in response to determining the target sub-network includes a feature extraction unit, which performs feature extraction processing on the data input to the feature extraction unit to obtain intermediate feature data, including: The data processing unit corresponding to the determined position includes a feature extraction unit and a downsampling unit, and the downsampling unit is located before the feature extraction unit. The feature extraction unit performs feature extraction processing on the downsampled feature data output by the downsampling unit to obtain intermediate feature data.

7. The method according to any one of claims 1-6, wherein, The step of generating feature data corresponding to the backbone network based on the sub-feature data includes: In response to determining that the target subnetwork is the last subnetwork of the at least two subnetworks, feature data corresponding to the backbone network is generated based on the sub-feature data corresponding to the target subnetwork.

8. A target detection method, comprising: Acquire the image to be detected; The image to be detected is used to extract features using the backbone network of a pre-trained target detection model to obtain feature data. The backbone network includes at least two cascaded sub-networks, which are arranged in order of data processing volume. The bottom sub-networks in the at least two sub-networks have more network units stacked in the first position. Alternatively, each sub-network in the at least two sub-networks downsamples the image to be detected step by step so that the bottom sub-networks can extract more fine-grained features from the image. The feature data is detected using the detection network included in the target detection model to obtain the detection result of the target object in the image to be detected; The step of using the backbone network of a pre-trained target detection model to extract features from the image to be detected, thereby obtaining feature data, includes: The position of the currently running target subnetwork in the at least two layers of subnetworks is determined in the backbone network. The position of the target subnetwork in the backbone network is the level of the target subnetwork. The number and type of data processing units included in subnetworks at different levels are different. The data processing unit corresponding to the location included in the target sub-network processes the data input to the target sub-network to obtain the sub-feature data corresponding to the target sub-network. Based on the sub-feature data, feature data corresponding to the backbone network is generated.

9. A training device for an object detection model, comprising: The first extraction module is used to extract features from the sample image step by step using the backbone network of the target detection model to be trained, which consists of at least two cascaded sub-networks, to obtain feature data. The at least two sub-networks are arranged in order of data processing volume. The bottom sub-networks in the at least two sub-networks have more network units stacked in the front position. Alternatively, each sub-network in the at least two sub-networks performs step-by-step downsampling on the sample image so that the bottom sub-network can extract more fine-grained features from the image. The first detection module is used to detect the feature data using the detection network included in the target detection model to be trained, and to obtain the detection result of the target object in the sample image; The determination module is used to determine a loss value representing the error between the detection result and the pre-annotated labeling information of the target object based on a preset loss function; An adjustment module is used to adjust the parameters of the target detection model to be trained based on the loss value; The first extraction module is specifically used for: The position of the currently running target subnetwork in the at least two layers of subnetworks is determined in the backbone network. The position of the target subnetwork in the backbone network is the level of the target subnetwork. The number and type of data processing units included in subnetworks at different levels are different. The data processing unit corresponding to the location included in the target sub-network processes the data input to the target sub-network to obtain the sub-feature data corresponding to the target sub-network. Based on the sub-feature data, feature data corresponding to the backbone network is generated.

10. A target detection device, comprising: The acquisition module is used to acquire the image to be detected; The second extraction module is used to extract features from the image to be detected using the backbone network of the pre-trained target detection model to obtain feature data. The backbone network includes at least two cascaded sub-networks, which are arranged in order of data processing volume. The bottom sub-networks in the at least two sub-networks have more network units stacked in the first position. Alternatively, each sub-network in the at least two sub-networks performs step-by-step downsampling on the image to be detected so that the bottom sub-network can extract more fine-grained features from the image. The second detection module is used to detect the feature data using the detection network included in the target detection model, and obtain the detection result of the target object in the image to be detected; The second extraction module is specifically used for: The position of the currently running target subnetwork in the at least two layers of subnetworks is determined in the backbone network. The position of the target subnetwork in the backbone network is the level of the target subnetwork. The number and type of data processing units included in subnetworks at different levels are different. The data processing unit corresponding to the location included in the target sub-network processes the data input to the target sub-network to obtain the sub-feature data corresponding to the target sub-network. Based on the sub-feature data, feature data corresponding to the backbone network is generated.

11. A computer-readable storage medium storing a computer program for performing the method according to any one of claims 1-8.

12. An electronic device, the electronic device comprising: processor; Memory for storing the executable instructions of the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Target object recognition method and device, storage medium and equipment

    CN110647893A

  • Target object detection method and device, equipment and storage medium

    CN113762003A

  • All-weather light-weight high-real-time sea surface ship detection and tracking method

    CN114241003A