Target detection system based on deep learning
By using a deep learning-based object detection system and techniques such as CBS residual convolutional structure, a lightweight object detection model has been achieved. This solves the problems of difficult model updates and maintenance and large memory consumption in existing technologies, improves detection efficiency and accuracy, and makes it easier for a wide range of users to use.
Patent Information
- Application Number
- CN202411071943.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-15
AI Technical Summary
Existing object detection and recognition software, due to the rapid iteration of deep learning algorithms, has neglected the encapsulation of software programs, resulting in high difficulty for non-professional users, difficulty in updating and maintaining models, and large memory consumption.
A deep learning-based target detection system is adopted, including a target type update module, a target detection module, and a historical detection data query module. Feature extraction and optimization are performed using CBS residual convolutional structure, C2f structure, SCDown structure, spatial pyramid pooling, and partial attention mechanism. Upsampling is performed by combining nearest neighbor interpolation and CBS structure, and detection analysis is performed using head network layer to achieve a lightweight model.
It improves detection efficiency and accuracy, facilitates system updates and maintenance, is suitable for a wide range of users, and reduces the number of model parameters and memory usage.
Smart Images

Figure CN118968026A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of machine learning and deep learning technology, and in particular to a target detection system based on deep learning. Background Art
[0002] Most of the existing target detection and recognition software focuses more on the accuracy and reasoning speed of target detection algorithms due to the high-speed iteration of deep learning algorithms, while the encapsulation of software programs is somewhat neglected. The user manual of the software is not detailed and comprehensive enough, making it relatively difficult for non-professional users to use it. In order to be able to identify as many objects as possible and identify small targets with high precision, the existing target detection and recognition software has a built-in network model with a large number of parameters, which makes the software program very bloated, making it difficult to update and maintain the recognition algorithm in the software, and also generates some unnecessary memory usage. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a target detection system based on deep learning, which solves the problems that the target detection model is difficult to update and maintain and occupies a large area.
[0004] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: a target detection system based on deep learning, comprising:
[0005] The target category update module is used to manage the target detection data set; the target detection model is obtained by deep learning training; wherein the target detection model includes:
[0006] The backbone network layer is used to extract features from the target detection dataset using the CBS residual convolution structure, further learn and adjust the extracted feature map using the C2f structure, downsample using the SCDown structure, and further optimize the feature representation using spatial pyramid pooling and partial attention mechanisms to obtain the target detection feature map;
[0007] The neck network layer is used to upsample the target detection dataset using the nearest neighbor interpolation method and concatenate it with the target detection feature map from the backbone network. The CBS structure and C2f structure are used to improve the quality of the concatenated feature map to obtain a high-dimensional feature map.
[0008] The head network layer is used to detect and analyze the target detection feature map and the high-dimensional feature map to obtain a target detection result;
[0009] A target detection module, used to process the target detection data set using the target detection model to obtain a target detection result;
[0010] The historical detection data query module is used to store historical target detection results and query historical detection data.
[0011] Furthermore, the target type updating module includes:
[0012] An acquisition unit, used to acquire various target detection data sets;
[0013] A training unit, used to perform deep learning training on the target detection model using the target detection data set to obtain a corresponding trained target detection model;
[0014] The management unit is used to manage the types and quantities of target detection datasets and corresponding target detection models.
[0015] Furthermore, the upsampling process includes:
[0016] src x =dst x ·(W s / W d )
[0017] src y =dst y ·(H s / H d );
[0018] Among them, src x Indicates the horizontal coordinate of a pixel on the input image, src y Indicates the vertical coordinate of a pixel on the input image, dst x Indicates the horizontal coordinate of the corresponding pixel on the output image, dst y Represents the ordinate of the corresponding pixel on the output image; W s ,H s Represents the width and height of the input image, W d ,H d Indicates the width and height of the output image.
[0019] Furthermore, the target detection module includes:
[0020] The recognition unit is used to identify the type of the current target detection data set and call the corresponding target detection model;
[0021] The detection unit is used to detect the target detection data set using the corresponding target detection model to obtain a target detection result.
[0022] Furthermore, the target detection model is obtained through training, and the expression of its loss function is:
[0023]
[0024] Among them, L(t p ,t gt ) represents the loss function result, t p Represents the model output, t gt Indicates the corresponding label, α box , α obj and α cls Respectively represent the weights of the corresponding items, represents the indicator function, L EIoU represents the EIoU loss, L obj represents the confidence loss, L cls represents the detection box classification loss, K represents the number of output feature maps, S represents the number of cells, and B represents the number of anchors on each cell.
[0025] Furthermore, the expression of the target detection model is:
[0026] F=backbone(input)output=head(F);
[0027] Among them, F represents the highest-level feature representation output by the backbone network layer, backbone represents the backbone network layer, input represents the input target detection dataset, F′ represents the feature representation after refinement by the neck network, Neck represents the neck network layer, output represents the high-precision target detection result output by the model, and head represents the head network layer.
[0028] Furthermore, the historical detection data query module includes:
[0029] A storage unit, used to store the target detection result and the corresponding detection time;
[0030] The query unit is used to compare the historical target detection results to obtain the changes of the detection targets in the historical time period.
[0031] The beneficial effects of the present invention are as follows: a target detection system based on deep learning uses a target detection model to help users complete small target detection tasks. In this way, the detection efficiency can be improved; it is convenient to update and maintain the system in a timely manner; for each target detection data set, the target detection model is adjusted in a targeted manner, which can improve the accuracy of detection and facilitate use by a wider range of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0033] Figure 1 It is a module diagram of a deep learning-based target detection system according to some embodiments of this specification. DETAILED DESCRIPTION
[0034] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0035] Example
[0036] Figure 1 It is a module diagram of a deep learning-based target detection system according to some embodiments of this specification.
[0037] In some embodiments, the deep learning-based target detection system may include a target category update module, a target detection module, and a historical detection data query module.
[0038] The target category update module is used to manage the target detection dataset; the target detection model is obtained by deep learning training.
[0039] The target detection dataset is a dataset used for target detection tasks. For example, the target detection dataset may include a PCB defect dataset, a crop pest dataset, and a tile defect dataset.
[0040] The target detection model is a neural network model used to obtain target detection results. For example, the target detection model may include YOLOv10, a convolutional neural network model, a deep neural network model, etc.
[0041] In some embodiments, the target category update module may include an acquisition unit, a training unit, and a management unit.
[0042] The acquisition unit is used to acquire various target detection data sets.
[0043] In some embodiments, the acquisition unit may acquire and update the target detection dataset based on usage requirements. For example, the acquisition unit may acquire a public dataset through the network as the target detection dataset; the acquisition unit may also update the target detection dataset based on the local dataset uploaded by the user in a certain format and the private dataset created by the annotation tool according to the user's usage requirements.
[0044] In some embodiments, the acquisition unit may label the target detection dataset according to different types to obtain multiple target detection datasets.
[0045] The training unit is used to perform deep learning training on the target detection model using the target detection data set to obtain a corresponding trained target detection model.
[0046] In some embodiments, the input of the target detection model may be a target detection dataset, and the output of the target detection model may be a target detection result.
[0047] In some embodiments, the structure of the object detection model is as follows:
[0048] The target detection model includes a backbone network layer, a neck network layer, and a head network layer. The output of the backbone network layer is used as the input of the neck network layer, the output of the backbone network layer and the output of the neck network layer are used as the input of the head network, and the output of the head network layer is used as the final output of the target detection model.
[0049] The backbone network layer is used to extract features from the target detection data set. The input of the backbone network layer may include the target detection data set, and the output may include the target detection feature map.
[0050] In some embodiments, the backbone network layer can use the CBS residual convolution structure to extract features from the target detection data set, use the C2f structure to further learn and adjust the extracted feature map, use the SCDown structure to downsample, and use spatial pyramid pooling and partial attention mechanism to further optimize the feature representation to obtain the target detection feature map.
[0051] In some embodiments, the CBS structure in the backbone network layer may be composed of a convolutional layer, a batch normalization layer, and a SiLU activation function layer, including a residual connection. After the target detection dataset passes through the CBS structure, it will be downsampled twice and features will be extracted, that is, the image size is reduced to half of the original size.
[0052] In some embodiments, the C2f structure in the backbone network layer can divide the input feature representation into two branches, one of which is directly passed to the output, and the other branch extracts features through multiple residual convolution layers, and finally the two branches are spliced before output to achieve feature fusion. The input feature map will not change the spatial size through the C2f structure, but can be changed to a specified number of channels.
[0053] In some embodiments, the SCDown structure in the backbone network layer can cascade two convolutional layers, and the convolution kernel size and step size can be set to 1, 1 and 3, 2 respectively to achieve simple downsampling with learnable parameters.
[0054] In some embodiments, the spatial pyramid pooling in the backbone network layer can use maximum pooling to layer the input feature map, then concatenate the maximum pooling outputs of each layer, and then implement feature fusion through the convolution layer. The spatial pyramid pooling operation does not change the spatial size and number of channels of the input feature map.
[0055] In some embodiments, the partial attention mechanism in the backbone network layer can divide the input feature map into two branches, one of which is directly passed to the output, and the other branch performs multi-head attention calculation to obtain a multi-head attention output, which contains residual connections. Finally, after splicing the two branches, feature fusion is achieved through convolution operations to obtain the target detection feature map. The partial attention mechanism does not change the spatial size and number of channels of the input feature map.
[0056] Through the above methods, it can be ensured that the target detection model has a lower number of model parameters and the calculation and reasoning speed of the target detection model can be improved.
[0057] The neck network layer (Neck layer) is used to analyze the target detection feature map to obtain higher-level features. The input of the neck network layer may include the target detection feature map, and the output may include a high-dimensional feature map.
[0058] In some embodiments, the neck network layer can use the nearest neighbor interpolation method to upsample the target detection data set and splice it with the target detection feature map from the backbone network, and use the CBS structure and C2f structure to improve the quality of the spliced feature map to obtain a high-dimensional feature map.
[0059] In some embodiments, the expression of the upsampled data may be:
[0060] src x =dst x ·(W s / W d )
[0061] src y =dst y ·(H s / H d );
[0062] Where src x Indicates the horizontal coordinate of a pixel on the input image, src y Indicates the vertical coordinate of a pixel on the input image, dst x Indicates the horizontal coordinate of the corresponding pixel on the output image, dst y Represents the ordinate of the corresponding pixel on the output image; W s ,H sRepresents the width and height of the input image, W d ,H d Indicates the width and height of the output image.
[0063] The head network layer (v10Detect layer) is used to detect and analyze the feature map to obtain the target detection result. The input of the head network can include the target detection feature map and the high-dimensional feature map, and the output can include the target detection result.
[0064] In some embodiments, the head network can use the detection head to integrate the output of the backbone network layer and the neck network layer as input, and obtain the target detection result through detection analysis.
[0065] In some embodiments, the target detection model can be obtained by training multiple labeled training samples. For example, multiple labeled training samples can be input into the initial target detection model, and a loss function can be constructed by using the labels and the results of the initial target detection model. The parameters of the initial target detection model can be iteratively updated based on the loss function by gradient descent or other methods. When the preset conditions are met, the model training is completed and a trained target detection model is obtained. The preset conditions can be that the loss function converges, the number of iterations reaches a threshold, etc.
[0066] In some embodiments, the training sample may include a sample target detection data set. The label may be a corresponding target detection result. The label may be annotated by a data annotation tool.
[0067] In some embodiments, the loss function may be expressed as:
[0068]
[0069] Among them, L(t p ,t gt ) represents the loss function result, t p Represents the model output, t gt Indicates the corresponding label, α box , α obj and α cls Represent the weights of the corresponding items, represents the indicator function (i.e., whether the k-th output feature map, the i-th cell, and the j-th anchor box are positive samples), L EIoU represents the EIoU loss, L obj represents the confidence loss, L cls represents the detection box classification loss, K represents the number of output feature maps, S represents the number of cells, and B represents the number of anchors on each cell.
[0070] In some embodiments, the expression of the target detection model may be:
[0071] F=backbone(input)output=head(F);
[0072] Among them, F represents the highest-level feature representation output by the backbone network layer, backbone represents the backbone network layer, input represents the input target detection dataset, F′ represents the feature representation after refinement by the neck network, Neck represents the neck network layer, output represents the high-precision target detection result output by the model, and head represents the head network layer.
[0073] The management unit is used to manage the types and quantities of target detection datasets and corresponding target detection models.
[0074] In some embodiments, the management unit may add and delete types of detection targets, and delete corresponding target detection models based on the deleted target detection training sets.
[0075] The target detection module is used to process the target detection data set using the target detection model to obtain a target detection result.
[0076] The target detection result is a high-precision detection result that reflects the category of the target detection dataset, the coordinates of the detection box, and the confidence level. For example, the target detection result may include the category of the target detection dataset, the coordinates of the upper left corner and the lower right corner of the detection box, and the confidence level of 0 to 1 given by the model to the detection box.
[0077] In some embodiments, the target detection module may include a recognition unit and a detection unit.
[0078] The recognition unit is used to identify the type of the current target detection data set and call the corresponding target detection model.
[0079] In some embodiments, the recognition unit may identify the type of the selected target detection data set and call a corresponding target detection model for processing.
[0080] The detection unit is used to detect the target detection data set using the corresponding target detection model to obtain a target detection result.
[0081] In some embodiments, the detection unit may perform statistics on the target detection results to obtain corresponding detection conditions, such as the time consumed for detection, the ratio of positive and negative samples, and low-confidence samples.
[0082] The historical detection data query module is used to store historical target detection results.
[0083] Historical target detection results are target detection results recorded over a period of time.
[0084] In some embodiments, the historical detection data query module may include a storage unit and a query unit.
[0085] The storage unit is used to store the target detection result and the corresponding detection time.
[0086] In some embodiments, the storage unit may record the output time of the target detection result, and store the target detection result and the corresponding detection time.
[0087] The query unit is used to compare the historical target detection results to obtain the changes of the detection targets in the historical time period.
[0088] In some embodiments, the query unit may manage historical target detection results and delete target detection results whose storage time exceeds a threshold.
[0089] In some embodiments, the query unit can compare and analyze historical target detection results to obtain changes in the detection target in the historical time period, detection loopholes of the target detection model, and detection deviations for certain specific types. For example, the query unit can display various indicators of historical detection results, including:
[0090]
[0091] Among them, Precision represents the proportion of samples predicted to be positive that are actually positive, TP represents the number of positive samples correctly detected, FP represents the number of negative samples detected as positive, Recall represents the proportion of samples actually positive that are predicted as positive by the model, FN represents the number of positive samples that are not detected as negative, AP represents the proportion of samples predicted correctly by the model to the total number of samples, TN represents the number of negative samples that are detected, mAP represents a performance indicator used to evaluate the average performance of a model on multiple categories in multi-category classification problems, AP represents the accuracy of each category, and C represents the number of categories.
[0092] In this way, the situation and cause of the problem can be tracked and analyzed in a timely manner.
[0093] In some embodiments of this specification, a deep learning-based target detection system uses a target detection model to help users complete small target detection tasks. In this way, the detection efficiency can be improved; it is convenient to update and maintain the system in a timely manner; for each target detection data set, the target detection model is adjusted in a targeted manner, which can improve the accuracy of detection and facilitate use by a wider range of users.
Claims
1. A target detection system based on deep learning, characterized in that: include: The target category update module is used to manage the target detection dataset; The target detection model is obtained by deep learning training; wherein the target detection model includes: The backbone network layer is used to extract features from the target detection dataset using the CBS residual convolution structure, further learn and adjust the extracted feature map using the C2f structure, downsample using the SCDown structure, and further optimize the feature representation using spatial pyramid pooling and partial attention mechanisms to obtain the target detection feature map; The neck network layer is used to upsample the target detection dataset using the nearest neighbor interpolation method and concatenate it with the target detection feature map from the backbone network. The CBS structure and C2f structure are used to improve the quality of the concatenated feature map to obtain a high-dimensional feature map. The head network layer is used to detect and analyze the target detection feature map and the high-dimensional feature map to obtain a target detection result; A target detection module, used to process the target detection data set using the target detection model to obtain a target detection result; The historical detection data query module is used to store historical target detection results and query historical detection data.
2. The deep learning-based target detection system according to claim 1, characterized in that: The target type updating module comprises: An acquisition unit, used to acquire various target detection data sets; A training unit, used to perform deep learning training on the target detection model using the target detection data set to obtain a corresponding trained target detection model; The management unit is used to manage the types and quantities of target detection datasets and corresponding target detection models.
3. The deep learning-based target detection system according to claim 1, characterized in that: The upsampling process includes: src x =dst x ·(W s / W d ) src y =dst y ·(H s / H d ); Among them, src x Indicates the horizontal coordinate of a pixel on the input image, src y Indicates the vertical coordinate of a pixel on the input image, dst x Indicates the horizontal coordinate of the corresponding pixel on the output image, dst y Represents the ordinate of the corresponding pixel on the output image; W s ,H s Represents the width and height of the input image, W d ,H d Indicates the width and height of the output image.
4. The deep learning-based target detection system according to claim 1, characterized in that: The target detection module comprises: The recognition unit is used to identify the type of the current target detection data set and call the corresponding target detection model; The detection unit is used to detect the target detection data set using the corresponding target detection model to obtain a target detection result.
5. The deep learning-based target detection system according to claim 1, characterized in that: The target detection model is obtained through training, and the expression of its loss function is: Among them, L(t p ,t gt ) represents the loss function result, t p Represents the model output, t gt Indicates the corresponding label, α box , α obj and α cls Respectively represent the weights of the corresponding items, represents the indicator function, L EIoU represents the EIoU loss, L obj represents the confidence loss, L cls represents the detection box classification loss, K represents the number of output feature maps, S represents the number of cells, and B represents the number of anchors on each cell.
6. The deep learning-based target detection system according to claim 1, characterized in that: The expression of the target detection model is: F=backbone(input)output=head(F); Among them, F represents the highest-level feature representation output by the backbone network layer, backbone represents the backbone network layer, input represents the input target detection dataset, F′ represents the feature representation after refinement by the neck network, Neck represents the neck network layer, output represents the high-precision target detection result output by the model, and head represents the head network layer.
7. The deep learning-based target detection system according to claim 1, characterized in that: The historical detection data query module includes: A storage unit, used to store the target detection result and the corresponding detection time; The query unit is used to query the historical target detection results, compare and analyze the historical target detection data, and obtain the changes of the detection targets in the historical time period.
Citation Information
Cited By
Galloping detection method and device based on power transmission line with spacer, equipment and medium
CN120198434A
