Road scene multi-category detection method and system based on improved FCOS

By adopting improved feature extraction and fusion strategies in the FCOS algorithm, combined with feature degradation and re-detection strategies, and using IOU values ​​to constrain the classification scores, the problem of insufficient multi-target detection accuracy and real-time performance of FCOS in road scenes is solved, and a better High detection accuracy and real-time performance.

CN114140757BActive Publication Date: 2024-09-06WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111447950.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2024-09-06
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

When the existing FCOS algorithm detects multiple targets in road scenes, it is difficult to extract the optimal features of each category of targets, and there is room for improvement in detection accuracy and real-time performance, especially in multi-scale target detection.

Method used

The improved FCOS method is adopted, including data set preprocessing, feature extraction and fusion, feature degradation strategy, re-detection strategy and IOU-better strategy, through the ResNet-50 network and AM-FPN algorithm to increase multi-scale expression capabilities and extract differential features. , reduce accidental errors, and constrain classification scores through IOU values ​​to improve detection accuracy and real-time performance.

Benefits of technology

It improves the detection accuracy of multi-category detection and the real-time performance of the algorithm in road scenes, enhances the detection capability of multi-scale targets, reduces accidental errors, and improves the real-time performance of the algorithm through the feature sharing strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140757B
    Figure CN114140757B
Patent Text Reader

Abstract

A multi-category detection method for road scenes based on improved FCOS includes: firstly, preprocessing the KITTI dataset to merge the original nine categories into three categories; secondly, proposing a cross-scale improvement strategy to add a P2 layer, amplify the lowest layer features, and fuse the P3 layer semantic information; then fusing the feature degradation strategy and the re-detection strategy to deepen the understanding of target features; proposing an IOU‑better strategy to use an IOU prediction network instead of a Center‑ness network on the feature map used for bounding box regression; finally, proposing a parameter sharing strategy to improve the real-time performance of the algorithm by sharing the features of some convolutional layers of the head network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing and computer vision technology, and in particular to a road scene multi-category detection method and system based on improved FCOS. Background Art

[0002] The unmanned driving system mainly includes three modules: environmental perception, decision-making and motion control. The results of environmental perception directly act on other modules and are the core of the entire system. Among them, the accuracy and real-time performance of the target detection algorithm based on road environment perception directly affect the safety performance of unmanned vehicles. However, due to the particularity of road scenes, there are targets with large scale differences in road scenes, which places higher requirements on the multi-scale expression ability of the network. At the same time, due to the large field of view in road scenes and the fuzzy target features, how to extract more significant features and improve the detection accuracy of the algorithm while maintaining the real-time performance of the detection algorithm has become a hot issue in the field of unmanned driving.

[0003] Compared with traditional image processing methods, road scene object detection algorithms based on deep learning have gradually become mainstream due to their higher detection accuracy and strong robustness. According to the generation rules of candidate boxes, object detection can be divided into two-stage object detection algorithms based on candidate regions and single-stage object detection algorithms based on target regression. Among them, the Fast R-CNN two-stage object detection algorithm needs to extract the RoI area first and then perform object detection. The complex network structure limits its real-time performance and is difficult to meet the real-time requirements of object detection in road scenes. Single-stage algorithms such as SSD, YOLO series and retinanet came into being. Since the single-stage algorithm does not need to extract the RoI area, only a single network is used to realize classification and candidate box regression functions, it has better real-time performance.

[0004] However, since the single-stage algorithm requires manual design of anchor boxes to extract local features for dense prediction, it is inevitable to introduce a large number of anchor box-related hyperparameters, which increases the complexity of the algorithm. Therefore, anchor-free boxes represented by FCOS have rapidly emerged with better anchor box expressions. FCOS proposes a method to predict the bounding box based on the center point and the distance from the center point to the four sides of the bounding box, which simplifies the generation of anchor boxes, eliminates the need to manually design hyperparameters such as anchor box size and aspect ratio, simplifies the model, and improves detection accuracy.

[0005] However, when the FCOS algorithm is applied to multi-target detection in road scenes, due to the imbalance of target samples of various types, the feature extraction network cannot extract the optimal features of each category of targets, and its detection accuracy still needs to be improved. At the same time, due to the large span of target sizes in road scenes, the multi-scale strategy in the FCOS algorithm is difficult to adapt to multi-scale target detection in road scenes. In addition, although the Center-ness subnetwork of the FCOS algorithm improves the overall running speed, due to its simple structure, the probability that the predicted center point is exactly the center point of the true value box is extremely low, which has a significant effect on eliminating low-quality candidate prediction boxes, but it cannot guarantee that the candidate prediction box with the highest IOU with the true value box has the highest center degree. Summary of the invention

[0006] In view of this, the present invention provides a road scene multi-category detection method and system based on improved FCOS.

[0007] A road scene multi-category detection method based on improved FCOS includes the following steps:

[0008] S1. Dataset preprocessing: According to the different targets to be detected in the road scene, the categories in the KITTI dataset are merged;

[0009] S2, feature extraction and fusion: Use the ResNet-50 network for feature extraction, and improve the multi-scale strategy of the feature pyramid network FPN algorithm used in the original FCOS algorithm, add a new P2 layer, amplify the lowest layer features, and fuse the P3 layer semantic information to increase the multi-scale expression ability of the network;

[0010] S3. To solve the problem of feature ambiguity between categories of road scenes and the occasional errors in detection, feature degradation strategy and re-detection strategy are used to complete the detection of the multi-task output subnetwork Head, and the target prediction bounding box (Bbox) output is obtained from the bounding box regression branch;

[0011] S4. Use the Intersection over Union (IOU) prediction value that directly represents the positioning accuracy of the prediction box instead of the Center-ness prediction value to constrain the classification score, and add the IOU prediction branch to the bounding box regression branch to form an IOU prediction subnetwork. The larger the IOU value between the prediction box and the true value box, the higher the positioning quality is considered to be.

[0012] S5. The final result is obtained by sharing the parameters of the convolutional layer and completing the post-processing operation through non-maximum suppression (NMS).

[0013] In the road scene multi-category detection method based on improved FCOS described in the present invention,

[0014] The step S1 comprises:

[0015] S11. Category merging: Merge the categories in the KITTI dataset. The merging strategy is to merge small passenger cars Car, vans Van, pickup trucks Truck, and trams into one category, recorded as Car; pedestrians Pedestrian and wheelchair-bound pedestrians Person_sitting into one category, recorded as the pedestrian category Person; pedestrians riding bicycles Cyclist form their own category; ignore Misc and DontCare, which is used to indicate that the area is not labeled.

[0016] S12, image size adjustment: adjust all images in the KITTI dataset so that the shortest side of all images is smaller than the first preset value and the longest side is smaller than the second preset value.

[0017] In the road scene multi-category detection method based on improved FCOS described in the present invention,

[0018] The step S2 comprises:

[0019] S21. For the ResNet-50 network: the ResNet-50 network is used for feature extraction. ResNet-50 adopts a residual structure, and its internal residual blocks use skip connections. For the input image, multiple convolution and downsampling operations are performed to gradually reduce the resolution of the feature map.

[0020] Step S22, cross-scale improvement strategy for feature fusion: an AM-FPN (Amplification of FPN) cross-scale improvement strategy is proposed, the number of output layers of the backbone network is increased from 3 to 4, a high-resolution C2 layer containing more features of extremely small targets is obtained, and the semantic information of the P3 layer is fused to obtain the P2 layer which is more conducive to detecting extremely small targets; the targets to be detected in the road scene are divided into 6 categories, and the targets of sizes {(0, 32], [32, 64], [64, 128], [128, 256], [256, 512], [512, +∞)} are detected on the {P2, P3, P4, P5, P6, P7} layers respectively.

[0021] In the road scene multi-category detection method based on improved FCOS described in the present invention,

[0022] The step S3 comprises:

[0023] S31, feature degradation strategy: The feature degradation strategy is to design a classification feature extraction branch for each category separately, and extract the difference features of each category through a convolution layer of H×W×256, where H refers to the channel height, W refers to the channel width, and 256 refers to the number of channels; only the corresponding category classification task is performed on each classification feature to obtain a feature layer of H×W×1, and then the classification results of each category are fused to obtain the final road scene target classification task, and obtain a feature layer of H×W×3;

[0024] S32, re-detection strategy: The re-detection strategy is to connect H×W×256 convolutional layers in parallel on the basis of the original H×W×256 convolutional layers, classify the classification features of each category multiple times, and combine the results of multiple classifications to reduce accidental errors. The calculation formula for performing two tests is:

[0025]

[0026] Where x1 and x2 are the outputs of the two classification networks in the two detection calculations, and f(x1, x2) is the category prediction result:

[0027] S33, the bounding box regression branch obtains the Bbox output: the bounding box regression branch extracts the features of each layer of AM-FPN for dense prediction, and obtains the target prediction Bbox output from the bounding box regression branch; the bounding box regression represents the bounding box through the coordinates of the center point of the bounding box and the distance from the center point to the four upper, lower, left and right sides of the bounding box.

[0028] In the road scene multi-category detection method based on improved FCOS described in the present invention,

[0029] The calculation formula for the larger the IOU value between the predicted frame and the true value frame in step S4, the higher the positioning quality is considered to be is as follows:

[0030]

[0031] In the formula, A represents the prediction box and B represents the true value box.

[0032] In the road scene multi-category detection method based on improved FCOS described in the present invention,

[0033] The step S5 comprises:

[0034] S51, sharing the features of some convolutional layers of the head network: the feature sharing strategy shares the parameters of the first i convolutional layers of the four feature extraction branches, i = 1, 2, 3, and only uses (4-i) convolutional layers to extract differential features, compensating for the real-time cost brought by the improved strategy;

[0035] S52, filtering out duplicate prediction frames through NMS post-processing operation, retaining the prediction frame with the best effect, so that only one prediction frame is obtained for each target, and obtaining the final result.

[0036] The present invention also provides a road scene multi-category detection system based on improved FCOS, which is implemented by the road scene multi-category detection based on improved FCOS as described in any one of the above items.

[0037] Beneficial technical effects: Compared with the prior art, the multi-category detection method and system for road scenes based on improved FCOS of the present invention is based on the FCOS algorithm applied to multi-target detection in road scenes. Due to the imbalance of target samples of various categories, the feature extraction network cannot extract the optimal features of targets of each category. A feature degradation structure is proposed, hoping to obtain the optimal features of targets of each category; in order to eliminate the accidental errors in the detection of the FCOS algorithm and improve the detection accuracy of the algorithm, a re-detection structure is proposed, and a more accurate and less error-prone classification result can be obtained by fusing the classification results of multiple classification sub-networks; since the multi-scale strategy in the FCOS algorithm is difficult to adapt to multi-scale target detection in road scenes, a cross-scale improvement strategy is proposed; the Center-ness strategy proposed by the FCOS algorithm cannot fully and correctly reflect the quality of the detection frame, and an IOU-better strategy is proposed, which uses an IOU prediction network to replace the Center-ness network on the feature map used for frame regression, and the IOU value is the indicator used to constrain the classification score; in order to overcome the above-mentioned FCOS improvement strategy based on road scenes that increases the complexity and computational complexity of the network, resulting in a decrease in the real-time performance of the algorithm, a parameter sharing strategy is proposed to improve the real-time performance of the algorithm by sharing the features of some convolutional layers of the head network. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flow chart of a road scene multi-category detection method based on improved FCOS provided by an embodiment of the present invention;

[0039] Figure 2 It is a schematic diagram of the framework of the improved FCOS algorithm provided by an embodiment of the present invention;

[0040] Figure 3 is a schematic diagram of a cross-scale improvement strategy provided by an embodiment of the present invention;

[0041] Figure 4 is a principle diagram of a feature degradation strategy provided by an embodiment of the present invention;

[0042] Figure 5 is a schematic diagram of a re-detection strategy provided by an embodiment of the present invention;

[0043] Figure 6 Schematic diagram of the IOU prediction subnetwork provided by an embodiment of the present invention;

[0044] Figure 7 It is a schematic diagram of a parameter sharing strategy provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The principle of the road scene multi-category detection method based on improved FCOS provided by the embodiment of the present invention is as follows: Figure 1 As shown in Figure 2 As shown in the figure. First, the dataset is preprocessed, including category merging and image resizing. Secondly, in the feature extraction and feature fusion stage, a cross-scale improvement strategy is proposed. The backbone network adds a C2 layer output containing clearer small target features, and the P3 layer semantic information is integrated to detect extremely small targets in road scenes. Road scene targets of different scales are detected on the P2 to P7 layers, which increases the algorithm's cross-scale detection performance.

[0046] Then, in the head detection stage, in order to overcome the problem of feature ambiguity between different categories of road scenes, a feature degradation strategy is proposed. A classification feature extraction branch is designed for each category to extract the difference features of each category. Only the corresponding category classification task is performed on each classification feature. After completing the classification task, the classification results of each category are fused to obtain the final road scene target classification task. At the same time, in order to deepen the network's ability to understand features, the embodiment of the present invention also proposes a re-detection strategy, which classifies the classification features of each category multiple times, and combines the results of multiple classifications to reduce accidental errors, so as to obtain more accurate classification results.

[0047] Since the Center-ness strategy in the FCOS algorithm cannot directly represent the positioning accuracy of the prediction box, the embodiment of the present invention proposes an IOU-better strategy, deletes the original Center-ness branch, adds an IOU prediction branch on the positioning feature, and uses the IOU prediction value that can directly represent the positioning accuracy of the prediction box instead of the Centerness prediction value to constrain the classification score. At the same time, since the positioning feature is used to predict the IOU value, this also increases the correlation between the classification network and the regression network.

[0048] In addition, since the above strategy adds feature layers and task branches, it brings additional hyperparameters, which reduces the real-time performance of the network. In order to solve this problem, the embodiment of the present invention also proposes a feature sharing strategy, which shares the features of each classification task and regression task, and only uses one convolution layer to extract difference features, which greatly improves the real-time performance of the algorithm.

[0049] The specific implementation steps are as follows:

[0050] Step S1: Dataset preprocessing

[0051] The KITTI dataset is selected as the target detection dataset in road scenes, the categories in the dataset are merged, and then the image size in the dataset is adjusted.

[0052] Step S11: Category merging

[0053] The KITTI dataset is selected as the target detection dataset in the road scene, and the training set is divided into 10 parts, 9 of which are used as training sets and 1 as a test set, with a total of 7481 pictures. Nine categories of targets are marked in the KITTI dataset, namely Car, Van, Truck, Pedestrian, Person_sitting, CyClist, Tram, Misc, and DontCare. According to the application scenario of the algorithm proposed in this invention, the categories in the KITTI dataset are merged, and the merging strategy is Car, Van, Truck, and Tram are combined into one category, recorded as Car; Pedestrian and Person_sitting are combined into one category, recorded as Person; Cyclist is a separate category; Misc and DontCare are ignored.

[0054] Step S12: Image resizing

[0055] All images in the KITTI dataset are resized so that their shortest side is smaller than 800 and their longest side is smaller than 1334.

[0056] The algorithm performance is measured using precision (P), recall (R) curves, average precision (AP), and mean average precision [18,34] (mAP). The higher the mAP value, the stronger the detection performance. The frame rate per second (FPS) is used as an indicator to measure the real-time performance of the algorithm.

[0057] Step S2: Feature extraction and fusion

[0058] The FCOS algorithm adopts a cross-scale strategy based on the FPN algorithm to solve the problem of detecting target scale differences to a certain extent. However, for targets in road scenes, due to the particularity of the scene, the target sizes vary greatly, and there are extremely small targets and extremely large targets. It is difficult to complete the multi-scale target detection task in this scene using the original FCOS algorithm. The embodiment of the present invention proposes (Amplification of FPN, AM-FPN) for the situation where there are extreme targets in road scenes, adds a P2 layer, amplifies the lowest layer features, and integrates the P3 layer semantic information to increase the multi-scale expression capability of the network.

[0059] Step S21 ResNet-50 network: ResNet-50 uses a residual structure, and its internal residual blocks use skip connections, which effectively suppresses the gradient vanishing problem or explosion phenomenon caused by increasing the depth in the deep neural network. The residual structure uses the ReLU activation function, making feature learning easier. For the input image, multiple convolution and downsampling operations are performed to gradually reduce the resolution of the feature map.

[0060] Step S22: Cross-scale improvement strategy for feature fusion: The embodiment of the present invention proposes (Amplification of FPN, AM-FPN) for the situation where there are extreme targets in the road scene, adds a P2 layer, amplifies the lowest layer features, and fuses the P3 layer semantic information to increase the multi-scale expression ability of the network. Figure 3 As shown. The AM-FPN strategy increases the number of output layers of the backbone network from 3 to 4, obtaining a high-resolution C2 layer containing more extremely small target features, and integrating the semantic information of the P3 layer to obtain a P2 layer that is more conducive to detecting extremely small targets. A-FPN divides road scene targets into 6 categories based on target size, and detects them on feature maps of different scales. Targets of sizes {(0, 32], [32, 64], [64, 128], [128, 256], [256, 512], [512, +∞)} are detected on the {P2, P3, P4, P5, P6, P7} layers respectively. The extremely small target is a very small target in the image. The size threshold can be set to determine whether it is an extremely small target. A target that is less than or equal to the size threshold is an extremely small target.

[0061] Step S3 Classification and regression

[0062] In the head detection stage, the improved FCOS algorithm proposes a feature degradation strategy to overcome the problem of feature ambiguity between different categories of road scenes. A classification feature extraction branch is designed for each category to extract the difference features of each category. Only the corresponding category classification task is performed on each classification feature. After completing the classification task, the classification results of each category are fused to obtain the final road scene target classification task. In the category prediction branch, R-detection is used for repeated detection, and the H×W×256 convolution layer is connected in parallel on the basis of the original H×W×256 convolution layer. The classification features of each category are classified multiple times, and the results of multiple classifications are combined to reduce accidental errors, so as to obtain more accurate classification results. At the same time, the features of each layer of AM-FPN are extracted for dense prediction, and the target prediction Bbox output is obtained from the bounding box regression branch.

[0063] Step S31: Feature degradation strategy

[0064] Considering that the targets to be detected in the road scene can be combined into three categories: Car, Person and Cyclist. Based on this, the present invention proposes a feature degradation strategy (Feature Degradation Strategy, FDS) as shown in Figure 4, and designs a classification feature extraction branch for each category to extract the difference features of each category. Only the corresponding category classification task is performed on each classification feature. After completing the classification task, the classification results of each category are fused to obtain the final road scene target classification task.

[0065] Step S32: Re-detection strategy

[0066] In the category prediction branch, R-detection is used for repeated detection. For example, two detections are performed. Figure 5 As shown. On the basis of the original H×W×256 convolutional layer, a H×W×256 convolutional layer is connected in parallel. The classification features of each category are classified multiple times, and the results of multiple classifications are combined to reduce accidental errors, so as to obtain more accurate classification results. The calculation formula for two tests is:

[0067]

[0068] Where x1 and x2 are the outputs of the two classification networks respectively, and f(x1, x2) is the category prediction result.

[0069] Step S33: Border regression branch obtains Bbox output

[0070] The bounding box is represented by the coordinates of the center point of the bounding box and the distances from the center point to the top, bottom, left, and right sides of the bounding box. Specifically, let the coordinates of the top left corner of the i-th bounding box be The coordinates of the lower right corner are Then the training objective of the bounding box regression subnetwork of FCOS is:

[0071]

[0072] Among them, l * Indicates the distance between the current center pixel and the left border of the bounding box, r * Indicates the right border distance, t * Indicates the top border distance, b * Indicates the bottom border distance.

[0073] Step S4 IOU-better strategy

[0074] Considering that the Center-ness strategy in the FCOS algorithm cannot directly represent the positioning accuracy of the prediction box, the embodiment of the present invention proposes an IOU-better strategy, deletes the original Center-ness branch, adds an IOU prediction branch to the bounding box regression, and uses the IOU prediction value that can directly represent the positioning accuracy of the prediction box instead of the Center-ness prediction value to constrain the classification score.

[0075] Step S41 IOU-better strategy replaces Center-ness network:

[0076] Use the IOU prediction network to replace the Center-ness network on the feature map used for bounding box regression, and delete the Center-ness network branch, such as Figure 6 As shown in the figure. The IOU value between the predicted box and the true box is the only indicator to measure the accuracy of the bounding box, and is also the indicator used for NMS post-processing. Therefore, the IOU value of the detection box can directly reflect the quality of the detection box. The larger the IOU value between the predicted box and the true value box, the higher the positioning quality is. The calculation formula is:

[0077]

[0078] In the formula, A represents the prediction box and B represents the true value box.

[0079] Step S42 IOU prediction branch is added to the bounding box regression branch

[0080] A new IOU prediction branch is added to the bounding box regression branch. This increases the correlation between the IOU value and the bounding box regression to a certain extent. When the IOU value is used to constrain the classification score, it also increases the correlation between the classification score and the bounding box, making the target detection structure more reasonable.

[0081] Step S5: feature sharing strategy to obtain prediction results

[0082] Although the above FCOS improvement strategy based on road scenes can improve the accuracy of target detection, the newly added feature layer and task branch will increase the complexity and computational complexity of the network, making the real-time performance of the algorithm lower. Based on this problem, the embodiment of the present invention proposes a feature sharing strategy (FSS) such as Figure 1 As shown in the figure, the real-time performance of the algorithm is improved by sharing the parameters of the convolutional layer.

[0083] Step S51 shares the features of some convolutional layers of the head network: the parameters of the first i convolutional layers of the four feature extraction branches are shared, and only the (4-i) convolutional layers are used to extract differential features. The prediction results are obtained by integrating the above improved method.

[0084] Step S52 NMS post-processing: First, sort the confidences of all boxes, select the box with the highest score and its corresponding box. Then traverse the remaining boxes, and if the IoU with the current box with the highest score is greater than the set threshold, delete the box. Finally, select the one with the highest score from the unprocessed boxes, and continue the above process until only one bbox with the highest score is retained for each class.

[0085] Based on the control variable method, the present invention verifies whether the cross-scale improvement strategy is effective in overcoming the difficulty of cross-scale target detection in road scenes, whether the feature degradation and re-detection strategy can extract and understand more significant features of each category, the impact of the IOU-better strategy on the algorithm detection performance, and the effectiveness of the shared parameter strategy in improving the real-time performance of the network when other conditions are fixed.

[0086] Furthermore, the stochastic gradient descent (SGD) optimizer was used in the training. The learning rate was set to 0.001 and the momentum of weight update was set to 0.9. The batch size was set to 1 and trained for 323184 iterations, and the learning rate was reduced to 0.0001 and 0.00001 at the 161592th and 242388th iterations. Each network temporary model was saved every 6733 iterations, and the model with the highest mAP value was selected as the final evaluation result.

[0087] Furthermore, only AM-FPN is used as the improvement strategy to verify its effectiveness. The experimental results are shown in Table 1.

[0088] Table 1 Experimental results of the improved AM-FPN algorithm

[0089]

[0090] From the analysis in Table 1, we can see that although the detection accuracy of the relatively large detection category Car in the road scene decreased by 1.4%, the detection accuracy of the smaller detection categories Person and Cyclist increased by an average of 3.05%. Finally, this strategy increased the algorithm mAP by 1.6%. Obviously, AM-FPN improved the algorithm's cross-scale detection capability. However, it can also be found that the detection speed of the algorithm decreased, and the real-time performance decreased by 10.3FPS.

[0091] Furthermore, only the feature degradation strategy is used as the improvement strategy to verify its effectiveness, as shown in Table 2.

[0092] Table 2 Experimental results of FDS improved algorithm

[0093]

[0094] From the analysis of Table 2, we can see that FDS has improved the detection accuracy of each category to varying degrees, and the final mAP has increased by 1.5%. This is because the feature degradation strategy provides more significant features for each detection category, making the detection task easier. Obviously, FDS has achieved the expected effect. At the same time, it can be found that the real-time performance of the algorithm has decreased by 4.2FPS, which is due to the hyperparameter influence brought by the newly added feature extraction branch.

[0095] Furthermore, based on FDS, the re-detection strategy is used as an improvement strategy to verify its effectiveness. The Baseline of this experiment is the FCOS algorithm with FDS applied, and the number of detections M is set to 2. The experimental results are shown in Table 3.

[0096] Table 3 Experimental results of R-detection improved algorithm

[0097]

[0098] From the analysis in Table 3, we can see that the algorithm mAP is improved by 1%, which shows that the R-detection strategy is effective. At the same time, we can find that the real-time performance of the algorithm is reduced by 0.1FPS, which is due to the loss of convolutional layer parameters caused by multiple predictions.

[0099] Furthermore, only the IOU-better strategy is used to verify the effectiveness of the improved strategy. The experimental results are shown in Table 4.

[0100] Table 4 Detection performance analysis of different constraint indicators

[0101]

[0102] From the analysis of Table 4, it can be obtained that when no constraints are used, the algorithm has the lowest detection accuracy for all categories of targets. The Center-ness strategy can significantly improve the detection accuracy of all categories by constraining the classification score, but it does not take into account the correlation between the classification score and the bounding box, and there is still room for improvement. The IOU-better strategy has the greatest improvement in target detection accuracy, and the detection accuracy of each category has been improved to the greatest extent. Compared with the Center-ness strategy, the mAP reached 88.6%, an increase of 0.7%. It is obvious that the IOU-better strategy proposed in the embodiment of the present invention is effective. At the same time, the real-time performance of the algorithm is reduced by 0.1FPS, which is caused by the loss of real-time performance caused by the convolution layer parameters that predict the Center-ness value or IOU value.

[0103] Furthermore, the effectiveness of FSS is verified based on the use of all the above improved strategies. The present invention conducts 4 groups of experiments according to the number of convolutional layers N with shared parameters, N = {0, 1, 2, 3}, where N = 0 means that FSS is not used, and the original FCOS algorithm is used as the baseline to train the detection model respectively. The experimental results are shown in Table 5.

[0104] Table 5 Experimental results of FSS improved algorithm

[0105]

[0106]

[0107] From the analysis in Table 5, we can see that FSS greatly improves the real-time performance of the algorithm at the expense of very little accuracy. Especially when N=3, although the mAP is reduced by 0.1%, its real-time performance is improved by 25.5%. Although FSS greatly improves the real-time performance of the algorithm, compared with the original FCOS algorithm, the real-time performance still needs to be improved.

[0108] Furthermore, fusion experiments are carried out on each improved algorithm to verify its effectiveness. The test results are shown in Table 6.

[0109] Table 6 Experimental results of improved algorithm fusion

[0110]

[0111] From the analysis of Table 6, it can be obtained that when FDS, R-detection and IOU-better are fused, the algorithm mAP is improved by 0.6%. AM-FPN is added to the fusion experiment. We found that the final Car detection accuracy AP is improved by 0.9%, Person detection accuracy AP is improved by 0.7%, Cyclist detection accuracy AP is improved by 1.1%, and the algorithm mAP is improved by 0.9%. Although the improvement strategy proposed in the present invention can obtain the highest detection accuracy, compared with the baseline, although the detection accuracy mAP is improved by 3.9%, the FPS is significantly reduced. Analyzing Table 6, it is obvious that AM-FPN is the reason for the significant decline in the real-time performance of the algorithm.

[0112] Furthermore, the embodiment of the present invention names the algorithm using all the improved strategies as Stronger-FCOS, and proposes Faster-FCOS, which only does not use the multi-scale strategy and uses the feature sharing strategy of N=3 on the basis of other improved strategies.

[0113] Furthermore, the Stronger-FCOS algorithm and the Faster-FCOS algorithm proposed in the embodiment of the present invention are compared and analyzed with other typical algorithms. When the same experimental parameters are set, the experimental results are shown in Table 7.

[0114] Table 7 KITTI dataset detection performance comparison

[0115]

[0116] From the analysis of Table 7, we can find that the Faster-FCOS algorithm proposed by the present invention has a detection accuracy mAP of 0.9% lower than that of the Stronger-FCOS algorithm, but its real-time performance is improved by 9.6FPS, and compared with the FCOS algorithm, the real-time performance of the algorithm is improved by 2.5FPS when the mAP is improved by 3%. The Stronger-FCOS proposed in the embodiment of the present invention obtains the highest detection accuracy of 91.8%, which is 3.9% higher than the original FCOS algorithm, and maintains a high real-time performance.

[0117] The above, including the road scene multi-category detection method and system based on improved FCOS provided in the embodiments of the present invention, are not limited to specific implementation methods. For ordinary technicians in this field, various other corresponding changes and deformations can be made based on the technical concept of the present invention, and all these changes and deformations should fall within the scope of protection of the claims of the present invention.

Claims

1. A road scene multi-category detection method based on improved FCOS, characterized in that: The steps include: S1. Dataset preprocessing: According to the different targets to be detected in the road scene, the categories in the KITTI dataset are merged; S2, feature extraction and fusion: Use the ResNet-50 network for feature extraction, and improve the multi-scale strategy of the feature pyramid network FPN algorithm used in the original FCOS algorithm, add a new P2 layer, amplify the lowest layer features, and fuse the P3 layer semantic information to increase the multi-scale expression ability of the network; S3. To solve the problem of feature ambiguity between different categories of road scenes and the accidental errors in detection, feature degradation strategy and re-detection strategy are used to complete the detection of the multi-task output subnetwork Head, and the target prediction bounding box Bbox (Bounding box) output is obtained from the bounding box regression branch; S4. Use the IOU (Intersection over Union) prediction value, which directly represents the positioning accuracy of the prediction box, instead of the center-ness prediction value to constrain the classification score, and add the IOU prediction branch to the bounding box regression branch to form an IOU prediction subnetwork. The larger the IOU value between the prediction box and the true value box, the higher the positioning quality is considered to be. S5. The final result is obtained by sharing the parameters of the convolutional layer and completing the post-processing operation through non-maximum suppression (NMS).

2. The road scene multi-category detection method based on improved FCOS as claimed in claim 1, characterized in that: The step S1 comprises: S11. Category merging: Merge the categories in the KITTI dataset. The merging strategy is to merge small passenger cars Car, vans Van, pickup trucks Truck, and trams into one category, recorded as Car; pedestrians Pedestrian and wheelchair-bound pedestrians Person_sitting into one category, recorded as the pedestrian category Person; pedestrians riding bicycles Cyclist are a separate category; ignore Misc and DontCare, which indicates that the area is not marked; S12, image size adjustment: adjust all images in the KITTI dataset so that the shortest side of all images is smaller than the first preset value and the longest side is smaller than the second preset value.

3. The road scene multi-category detection method based on improved FCOS as claimed in claim 1, characterized in that: The step S2 comprises: S21. For the ResNet-50 network: the ResNet-50 network is used for feature extraction. ResNet-50 adopts a residual structure, and its internal residual blocks use skip connections. For the input image, multiple convolution and downsampling operations are performed to gradually reduce the resolution of the feature map. Step S22, cross-scale improvement strategy for feature fusion: an AM-FPN cross-scale improvement strategy is proposed, the number of backbone network output layers is increased from 3 to 4, a high-resolution C2 layer containing more features of extremely small targets is obtained, and the semantic information of the P3 layer is fused to obtain the P2 layer which is more conducive to detecting extremely small targets; the targets to be detected in the road scene are divided into 6 categories, and the targets with sizes of {(0, 32], [32, 64], [64, 128], [128, 256], [256, 512], [512, +∞)} are detected on the {P2, P3, P4, P5, P6, P7} layers respectively.

4. The road scene multi-category detection method based on improved FCOS as claimed in claim 3, characterized in that: The step S3 comprises: S31, feature degradation strategy: The feature degradation strategy is to design a classification feature extraction branch for each category separately, and extract the difference features of each category through a convolution layer of H×W×256, where H refers to the channel height, W refers to the channel width, and 256 refers to the number of channels; only the corresponding category classification task is performed on each classification feature to obtain a feature layer of H×W×L, and then the classification results of each category are fused to obtain the final road scene target classification task, and obtain a feature layer of H×W×3; S32, re-detection strategy: The re-detection strategy is to connect H×W×256 convolutional layers in parallel on the basis of the original H×W×256 convolutional layers, classify the classification features of each category multiple times, and combine the results of multiple classifications to reduce accidental errors. The calculation formula for performing two tests is: Where x1, x2 are the outputs of the two classification networks in the two detection calculations, and f(x1, x2) is the category prediction result; S33, the bounding box regression branch obtains the Bbox output: the bounding box regression branch extracts the features of each layer of AM-FPN for dense prediction, and obtains the target prediction Bbox output from the bounding box regression branch; the bounding box regression represents the bounding box through the coordinates of the center point of the bounding box and the distance from the center point to the four upper, lower, left and right sides of the bounding box.

5. The road scene multi-category detection method based on improved FCOS as claimed in claim 3, characterized in that: The calculation formula for the larger the IOU value between the predicted frame and the true value frame in step S4, the higher the positioning quality is considered to be is as follows: In the formula, A represents the prediction box and B represents the true value box.

6. The road scene multi-category detection method based on improved FCOS as claimed in claim 4, characterized in that: The step S5 comprises: S51, sharing the features of some convolutional layers of the head network: the feature sharing strategy shares the parameters of the first i convolutional layers of the four feature extraction branches, i = 1, 2, 3, and only uses (4-i) convolutional layers to extract differential features, compensating for the real-time cost brought by the improved strategy; S52, filtering out duplicate prediction frames through NMS post-processing operation, retaining the prediction frame with the best effect, so that only one prediction frame is obtained for each target, and obtaining the final result.

7. A road scene multi-category detection system based on improved FCOS, characterized in that: The method is implemented by the road scene multi-category detection method based on improved FCOS as described in any one of claims 1 to 6.