Vehicle and pedestrian target detection method, device, computer equipment and storage medium
By adding the inverted bottleneck UIB module and weighted bidirectional feature pyramid network to the RT-DETR model, the high computational cost problem of the DETR model is solved, and the real-time and robustness of vehicle and pedestrian target detection are improved.
Patent Information
- Application Number
- CN202510048589.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The existing DETR model has high computational cost and difficult deployment in vehicle-pedestrian target detection, which affects detection accuracy and real-time performance.
An inverted bottleneck UIB module is added to the backbone network of the RT-DETR model, and the feature fusion structure of the hybrid encoder is adjusted through a weighted bidirectional feature pyramid network to reduce the computational complexity and improve the feature fusion efficiency.
It significantly reduces the computational complexity and parameter quantity, improves the capture capability and detection speed of the vehicle-pedestrian target detection model in complex scenarios, and reduces latency.
Smart Images

Figure CN119992511B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and more specifically, to a vehicle and pedestrian target detection method, device, computer equipment and storage medium. Background Art
[0002] During everyday road traffic, pedestrians and cyclists can easily appear from behind vehicles on either side of the road or in blind spots obscured by trees, causing overlapping occlusions between vehicles and pedestrians. In these changing environments, existing object detection models still struggle with heavily occluded scenes. This not only increases missed detection and false detection rates, but also reduces detection accuracy, impacting traffic safety and increasing the risk of accidents. Therefore, timely detection of vehicles and pedestrians and identifying potential driving obstacles is a crucial issue in the development of autonomous driving.
[0003] In the existing art, there are two typical architectures for object detection: CNN-based object detection models and Transformer-based object detection models. CNN-based object detection models have been widely used and researched due to their excellent accuracy and processing speed. Traditional CNN object detection models, such as the YOLO series, are widely used in real-time object detection applications such as target tracking, autonomous driving, and video surveillance due to their robustness in complex scenarios and ease of training and deployment. However, two key steps, thresholding and non-maximum suppression, can reduce the robustness and speed of object detection models. To further improve detection performance, removing handcrafted components has become a key trend in the field of object detection. The DETR model uses Transformer technology to reformulate object detection as a set prediction problem. It adopts an end-to-end trainable encoder-decoder architecture to replace traditional region proposal-based methods. This eliminates many handcrafted components, such as non-maximum suppression (NMS), and eliminates the need for extensive proposal generation and post-processing steps, significantly simplifying the object detection process and achieving end-to-end object detection.
[0004] Although the DETR model performs well in object detection tasks, its high computational cost limits its effectiveness in complex environments. This high computational cost not only increases processing latency but also places high demands on hardware resources, making DETR model deployment more difficult. In this context, it is particularly important to design an improved DETR model to reduce computational cost and improve real-time performance and robustness. Summary of the Invention
[0005] 1. Technical problems to be solved
[0006] In response to the problems in the existing technology of high computational cost and difficult deployment when performing vehicle and pedestrian target detection through the DETR model, the present invention provides a vehicle and pedestrian target detection method, device, computer equipment and storage medium to further reduce the computational complexity of the algorithm and the actual deployment cost of the target detection model, and improve the target detection model's ability to capture vehicles and pedestrians in complex scenarios.
[0007] 2. Technical solution
[0008] The purpose of the present invention is achieved through the following technical solutions.
[0009] A vehicle and pedestrian target detection method includes the following steps:
[0010] Obtain and input the vehicle and pedestrian dataset, and preprocess the vehicle and pedestrian dataset;
[0011] Constructing a vehicle and pedestrian target detection model based on an improved RT-DETR; said constructing a vehicle and pedestrian target detection model based on an improved RT-DETR includes the following improvements on the basis of the original RT-DETR model:
[0012] 1) Add an inverted bottleneck UIB module to the original RT-DETR model backbone network;
[0013] 2) In the original RT-DETR model hybrid encoder, the internal feature fusion network structure of the hybrid encoder is adjusted by using a weighted bidirectional feature pyramid network;
[0014] The preprocessed vehicle and pedestrian data set is used to iteratively train the constructed vehicle and pedestrian target detection model to obtain a trained vehicle and pedestrian target detection model;
[0015] Detect vehicles and pedestrians based on the trained vehicle and pedestrian target detection model and output the detection results.
[0016] As a further improvement of the present invention, the inverted bottleneck UIB module is composed of several UIB blocks; the UIB block includes a first DW convolution layer, a first optional PW layer, a second DW convolution layer and a second optional PW layer connected in sequence, and the first optional PW layer and the second optional PW layer present an inverted bottleneck structure.
[0017] As a further improvement of the present invention, the first DW convolution layer and the second DW convolution layer include a starting depth convolution layer and an intermediate depth convolution layer; the first optional PW layer and the second optional PW layer include an extended convolution layer and a projection convolution layer.
[0018] As a further improvement of the present invention, the starting depth convolution layer performs preliminary processing on the feature map input by the backbone network, the extended convolution layer uses 1×1 convolution to increase the dimension of the feature map after preliminary processing, and increases the number of channels according to the expansion ratio to capture detail features through the intermediate depth convolution layer, and the projection convolution layer uses 1×1 convolution to reduce the feature image channels to the target number of channels to fuse the feature map information.
[0019] As a further improvement of the present invention, the hybrid encoder includes several convolutional layers, an attention-based intra-scale feature interaction module and a cross-scale feature fusion module; the cross-scale feature fusion module includes a Bi-FPN feature fusion module and a RepC3 feature processing module.
[0020] As a further improvement of the present invention, the Bi-FPN feature fusion module normalizes the weights of the feature maps input by the backbone network, traverses different feature maps, and assigns corresponding weights to them, and stacks the weighted feature maps to form a fused feature map.
[0021] As a further improvement of the present invention, in the Bi-FPN feature fusion module, fast normalization fusion is used as the feature fusion method, and weights are assigned to different feature maps input to the backbone network to determine the impact of different feature maps on the output results of the vehicle and pedestrian target detection model. The weight calculation formula is:
[0022]
[0023] Among them, Output represents the output result, i represents the index of the input feature layer, j represents the set of feature layer indexes participating in the weighted calculation, and w i represents the weight of a specific feature layer i, w j Represents the weight of the feature layer in the feature layer set, I i Represents the feature map of a specific feature layer i, ∈ represents a small value set to 0.0001 to ensure the stability of its results.
[0024] A vehicle and pedestrian target detection device, comprising:
[0025] The data processing module obtains and inputs the vehicle and pedestrian data set and preprocesses the vehicle and pedestrian data set;
[0026] The model construction module constructs a vehicle and pedestrian target detection model based on the improved RT-DETR. The construction of the vehicle and pedestrian target detection model based on the improved RT-DETR includes the following improvements on the basis of the original RT-DETR model:
[0027] 1) Add an inverted bottleneck UIB module to the original RT-DETR model backbone network;
[0028] 2) In the original RT-DETR model hybrid encoder, the internal feature fusion network structure of the hybrid encoder is adjusted by using a weighted bidirectional feature pyramid network;
[0029] The training module uses the preprocessed vehicle and pedestrian data set to iteratively train the constructed vehicle and pedestrian target detection model to obtain a trained vehicle and pedestrian target detection model;
[0030] The detection module detects vehicles and pedestrians based on the trained vehicle and pedestrian target detection model and outputs the detection results.
[0031] A computer device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements any of the above methods when executing the computer program.
[0032] A computer-readable storage medium stores a computer program, wherein the computer program executes any one of the above methods when executed by a processor.
[0033] 3. Beneficial effects
[0034] Compared with the prior art, the advantages of the present invention are:
[0035] The present invention provides a vehicle and pedestrian target detection method, device, computer equipment and storage medium, which are improved based on the RT-DETR model and further lightweighted. An inverted bottleneck UIB module is added to the backbone network, and the flexibility of space and channel mixing is introduced to enhance the selection of receiving domains, thereby reducing the computational complexity and parameter quantity of the vehicle and pedestrian target detection model. At the same time, a weighted bidirectional feature pyramid network is used to adjust the network structure of the hybrid encoder, thereby increasing the balance of the importance of features at different levels in the vehicle and pedestrian target detection model, improving the efficiency of feature fusion, and improving the vehicle and pedestrian target detection model's ability to capture small targets in overlapping situations. While ensuring that the accuracy of the algorithm is not reduced, the present invention has the characteristics of shorter delay, smaller computational complexity and parameter quantity, significantly improving the lightweight performance of the vehicle and pedestrian target detection model algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flow chart of a vehicle and pedestrian target detection method according to an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of the detection network structure according to an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of the UIB module structure according to an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of the Bi-FPN feature fusion network structure according to an embodiment of the present invention;
[0040] Figure 5 This is a training effect diagram of the vehicle and pedestrian target detection method according to an embodiment of the present invention;
[0041] Figure 6 This is a test result diagram of the vehicle-pedestrian target detection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] Example
[0044] like Figure 1 As shown, a vehicle-pedestrian target detection method provided by this embodiment includes the following steps: obtaining and inputting a vehicle-pedestrian dataset, and preprocessing the vehicle-pedestrian dataset; constructing a vehicle-pedestrian target detection model based on an improved RT-DETR; iteratively training the constructed vehicle-pedestrian target detection model using the preprocessed vehicle-pedestrian dataset to obtain a trained vehicle-pedestrian target detection model; detecting vehicles and pedestrians based on the trained vehicle-pedestrian target detection model, and outputting the detection results. It is worth noting that, in this embodiment, for constructing a vehicle-pedestrian target detection model based on an improved RT-DETR, the following improvements are made on the basis of the original RT-DETR model: 1) adding an inverted bottleneck UIB module to the original RT-DETR model backbone network; 2) adjusting the internal feature fusion network structure of the hybrid encoder in the original RT-DETR model through a weighted bidirectional feature pyramid network.
[0045] Specifically in this embodiment, first, publicly available image datasets of vehicles, pedestrians, etc. are screened and obtained from existing platforms such as roboflow and github. The obtained image dataset contains a total of 10,000 road images. Then, the vehicle and pedestrian dataset is preprocessed. In this embodiment, the preprocessing includes annotating the image dataset and dividing the annotated image dataset into a training set, a validation set, and a test set according to a certain ratio. The specific steps include: annotating the obtained image dataset using existing annotation tools, such as make sense, etc. Each set of annotations will obtain an image and a .txt format label file, and the label classes are divided into five major categories: pedestrians, non-motor vehicles, buses, cars, and driving obstacles; the images and labels in the 10,000 image dataset are divided into 7,000 training sets, 2,000 validation sets, and 1,000 test sets, creating corresponding test, train, and valid folders, and creating subfolders images and labels under each folder to store images and labels respectively.
[0046] Furthermore, a vehicle and pedestrian detection model based on the improved RT-DETR is constructed. In this embodiment, the vehicle and pedestrian detection model based on the improved RT-DETR is constructed, including the following improvements based on the original RT-DETR model: adding an inverted bottleneck UIB module to the original RT-DETR model backbone network, and adjusting the internal feature fusion network structure of the hybrid encoder of the original RT-DETR model through a weighted bidirectional feature pyramid network. Thus, a vehicle and pedestrian detection model based on the improved RT-DETR is obtained.
[0047] like Figure 2 As shown, in this embodiment, the vehicle-pedestrian target detection model based on the improved RT-DETR includes a backbone network, a hybrid encoder and a decoder.
[0048] For the backbone network, the backbone network includes a convolutional normalization layer, an inverted bottleneck UIB module, and a 1×1 convolutional layer. The convolutional normalization layer consists of a 2D convolution block, a batch normalization module, and a RELU activation function. The inverted bottleneck UIB module consists of several UIB blocks. In this embodiment, the inverted bottleneck UIB module consists of six UIB blocks. Figure 3 As shown, each UIB block includes a first DW (DepthWise) convolutional layer, a first optional PW (PointWise) layer, a second DW convolutional layer, and a second optional PW layer, which are connected in sequence. In particular, in this embodiment, the first optional PW layer and the second optional PW layer are in an inverted bottleneck structure.
[0049] In this embodiment, the first DW convolution layer and the second DW convolution layer include a starting depth convolution layer and an intermediate depth convolution layer, and the first optional PW layer and the second optional PW layer include an expansion convolution layer and a projection convolution layer. Furthermore, the starting depth convolution layer performs preliminary processing on the feature map input by the backbone network. The expansion convolution layer uses 1×1 convolution to increase the dimension of the feature map after preliminary processing, increasing the number of channels according to the expansion ratio to capture detailed features through the intermediate depth convolution layer. The projection convolution layer uses 1×1 convolution to reduce the number of feature image channels to the target number of channels, fusing the feature map information.
[0050] Therefore, in this embodiment, the backbone network includes a convolutional normalization layer, a convolutional normalization layer, a convolutional normalization layer, an inverted bottleneck UIB module, and an inverted bottleneck UIB module connected in sequence.
[0051] like Figure 2 As shown in the figure, the vehicle and pedestrian images input to the backbone network are first processed by the first convolutional normalization layer, which uses a 3×3 convolutional block with 3 input channels and 32 output channels. The image features are then fed into the second convolutional normalization layer, which has two convolutional blocks: the first 3×3 block and the second 1×1 block, with 32 input and output channels. The output of the second convolutional normalization layer serves as the first image feature input to the hybrid encoder. Meanwhile, the backbone network continues to process the image features. The third convolutional normalization layer has two convolutional blocks: the first 3×3 block with 32 input channels and 96 output channels, and the second 1×1 block with 96 input channels and 64 output channels. The output of the third convolutional normalization layer serves as the second image feature input to the hybrid encoder. Meanwhile, the backbone network continues to process the image features. Image features are fed into the first inverted bottleneck UIB module, which contains six UIB blocks. Each UIB block consists of depthwise separable convolutions and 1×1 convolutions. Image features undergo dimensionality reduction using depthwise separable convolutions, followed by dimensionality increase using convolutions. The first UIB block has 64 input channels and 96 output channels, while each of the remaining UIB blocks has 96 input and output channels. The output of the first inverted bottleneck UIB module serves as the third image feature and is fed into the hybrid encoder. Meanwhile, the backbone network continues processing image features. Image features are fed into the second inverted bottleneck UIB module, which has the same structure as the first. The first UIB block has 96 input channels and 128 output channels, while each of the remaining UIB blocks has 128 input and output channels. The output of the second inverted bottleneck UIB module serves as the fourth image feature and is fed into the hybrid encoder.
[0052] Therefore, this embodiment adds an inverted bottleneck UIB module to the backbone network, introduces the flexibility of spatial and channel mixing, enhances the receptive field selection, and reduces the computational complexity and parameter amount of the vehicle and pedestrian target detection model.
[0053] For the hybrid encoder, in this embodiment, if Figure 4 As shown in the figure, the internal feature fusion network structure of the hybrid encoder is adjusted by a weighted bidirectional feature pyramid network in the original RT-DETR model hybrid encoder. In this embodiment, the hybrid encoder includes several convolutional layers, an attention-based intra-scale feature interaction module (AIFI), and a cross-scale feature fusion module (CCFM). The CCFM module includes a Bi-FPN feature fusion module and a RepC3 feature processing module.
[0054] It should be noted that the Bi-FPN feature fusion module normalizes the weights of the feature maps input to the backbone network, traverses different feature maps, assigns corresponding weights to them, and stacks the weighted feature maps to form a fused feature map. Specifically, the weighted feature maps are stacked to form a new tensor. The stacking operation is performed along dimension 0, that is, multiple feature maps are stacked along the batch direction. All weighted stacked feature maps are summed along dimension 0 to obtain the final fused feature map for use by subsequent network modules.
[0055] In this embodiment, in the Bi-FPN feature fusion module, fast normalization fusion is used as the feature fusion method. By assigning weights to different feature maps input by the backbone network, the influence of different feature maps on the output results of the vehicle and pedestrian target detection model is judged. The weight calculation formula is:
[0056]
[0057] Among them, Output represents the output result, i represents the index of the input feature layer, j represents the set of feature layer indexes participating in the weighted calculation, and w i represents the weight of a specific feature layer i, w j Represents the weight of the feature layer in the feature layer set, I i Represents the feature map of a specific feature layer i, ∈ represents a small value set to 0.0001 to ensure the stability of the result.
[0058] Therefore, the first image feature, second image feature and third image feature output by the backbone network are respectively input into the CCFM module of the hybrid encoder through 1×1 convolutional layers. The fourth image feature is input into the AIFI module as a high-level feature through a 1×1 convolutional layer, which saves computing resources while avoiding the problem of confusion between high-level features and low-level features. Finally, the fourth image feature is input into the CCFM module through the AIFI module.
[0059] In this embodiment, the four image features output by the backbone network are imported into the 1×1 convolutional layer and fused with high-level features via the Bi-FPN feature fusion module. The weighted bidirectional feature pyramid network aggregates multi-scale features in a top-down manner. In this embodiment, taking the third and fourth image features as examples, the feature transmission paths at different scale levels within the CCFM module are as follows:
[0060]
[0061] in, represents the input features of the third image feature layer, represents the input features of the fourth image feature layer, represents the intermediate features of the third image feature layer in the top-down path, represents the output features of the third image feature layer of the bottom-up path, represents the intermediate features of the fourth image feature layer in the top-down path, Represents the output features of the fourth image feature layer in the bottom-up path, Conv represents the convolution operation used for feature processing, w1 represents the weight of the specific feature layer 1, w2 represents the weight of the specific feature layer 2, and Resize represents the upsampling or downsampling operation for resolution matching.
[0062] Therefore, in the hybrid encoder, after the CCFM module processes features at different scales, the features are output to the decoder module for decoding and fusion features. In this embodiment, by adjusting the network structure of the hybrid encoder using a weighted bidirectional feature pyramid network, the vehicle and pedestrian target detection model balances the importance of features at different levels, improves the efficiency of feature fusion, and enhances the vehicle and pedestrian target detection model's ability to capture small targets in overlapping situations.
[0063] It should be noted that in this embodiment, an experimental platform was built on a desktop window system 11, the GPU used was NVDIAGeForce RTX 4070super, the deep learning framework was Pytorch 2.2.0 version, and in the training hyperparameter settings, the initial learning rate was set to 0.0001, the batch size was set to 4, the learning rate momentum value was set to 0.9, the initial input vehicle and pedestrian image size was 640×640 pixels, the AdamW optimizer was used, the training rounds were set to 100, and the constructed vehicle and pedestrian target detection model was trained based on the training set to obtain the best.pt weight file. The vehicle and pedestrian target detection model during the training process was evaluated based on the validation set to obtain a trained vehicle and pedestrian target detection model. Figure 5 As shown in Figure 2, this is the training effect diagram of the trained vehicle and pedestrian target detection model.
[0064] Then, the best.pt weight file obtained from the training was tested on the test set, and the average accuracy MAP, model inference time influence and other results obtained from the detection were compared with the original RT-DETR target detection method. The comparison results are shown in Table 1 below.
[0065] Table 1
[0066]
[0067] As can be seen from Table 1 above, the MAP value of the vehicle-pedestrian target detection model based on the improved RT-DETR constructed in this embodiment is better than that of the original RT-DETR model. At the same time, the number of parameters is reduced by 65%, the computational complexity is reduced by 70%, and the inference time is reduced by 0.6ms, which significantly demonstrates the superior performance of the vehicle-pedestrian target detection model based on the improved RT-DETR constructed in this embodiment. Figure 6 As shown in Figure 1, the test set is input into the trained vehicle and pedestrian target detection model for detection, and the detection results are output.
[0068] This embodiment uses the vehicle-pedestrian target detection model based on the improved RT-DETR to achieve better results for vehicle-pedestrian target detection by using only lightweight detectors. Using detectors with simpler structures in the vehicle-pedestrian target detection process can greatly reduce the resources required for calculation, improve the detection speed of the vehicle-pedestrian target detection model based on the improved RT-DETR, and reduce the video memory occupancy required in the detection process, thereby avoiding unnecessary waste and effectively utilizing limited computing resources, thereby realizing the practical application of the vehicle-pedestrian target detection model based on the improved RT-DETR in vehicle-pedestrian target detection, and has strong practicality and wide applicability.
[0069] This embodiment also provides a vehicle-pedestrian target detection device, including a data processing module, a model improvement module, a training module and a detection module. The data processing module is used to obtain and input a vehicle-pedestrian data set, and pre-process the vehicle-pedestrian data set. The model construction module constructs a vehicle-pedestrian target detection model based on the improved RT-DETR. The construction of the vehicle-pedestrian target detection model based on the improved RT-DETR includes the following improvements on the basis of the original RT-DETR model: 1) adding an inverted bottleneck UIB module to the original RT-DETR model backbone network; 2) adjusting the internal feature fusion network structure of the hybrid encoder through a weighted bidirectional feature pyramid network in the original RT-DETR model hybrid encoder. The training module uses the pre-processed vehicle-pedestrian data set to iteratively train the constructed vehicle-pedestrian target detection model to obtain a trained vehicle-pedestrian target detection model. The detection module detects vehicles and pedestrians based on the trained vehicle-pedestrian target detection model and outputs the detection results. The vehicle pedestrian target detection device provided in this embodiment is capable of implementing any of the vehicle pedestrian target detection methods, and the specific working process of a vehicle pedestrian target detection device can refer to the corresponding process in the embodiment of the vehicle pedestrian target detection method. The method and device provided in this embodiment can be implemented in other ways. For example, the device embodiment described above is only schematic; for example, the division of a certain module is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. On the other hand, the mutual connection or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0070] This embodiment further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the vehicle-pedestrian target detection method when executing the computer program.
[0071] This embodiment also provides a computer-readable storage medium. A computer-readable storage medium stores a computer program that, when executed by a processor, executes the vehicle-pedestrian target detection method described in this embodiment. The computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0072] The above schematically describes the invention and its implementation methods. This description is not restrictive. Without departing from the spirit or basic features of the invention, the invention can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention. The actual structure is not limited to this. Any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it and designs a structural method and embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they should all fall within the scope of protection of the present invention. In addition, the word "including" does not exclude other elements or steps, and the word "one" before an element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. Words such as first and second are used to indicate names and do not indicate any specific order.
Claims
1. A vehicle and pedestrian target detection method, comprising the following steps: Obtain and input the vehicle and pedestrian dataset, and preprocess the vehicle and pedestrian dataset; Construct a vehicle and pedestrian target detection model based on improved RT-DETR; The vehicle and pedestrian target detection model based on the improved RT-DETR is constructed, including the following improvements on the basis of the original RT-DETR model: 1) Add an inverted bottleneck UIB module to the original RT-DETR model backbone network; 2) In the original RT-DETR model hybrid encoder, the internal feature fusion network structure of the hybrid encoder is adjusted by using a weighted bidirectional feature pyramid network; The preprocessed vehicle and pedestrian data set is used to iteratively train the constructed vehicle and pedestrian target detection model to obtain a trained vehicle and pedestrian target detection model; Detect vehicles and pedestrians based on the trained vehicle and pedestrian target detection model and output the detection results.
2. The vehicle-pedestrian target detection method according to claim 1, characterized in that: The inverted bottleneck UIB module is composed of several UIB blocks; the UIB block includes a first DW convolution layer, a first optional PW layer, a second DW convolution layer and a second optional PW layer connected in sequence, and the first optional PW layer and the second optional PW layer present an inverted bottleneck structure.
3. The vehicle-pedestrian target detection method according to claim 2, characterized in that: The first DW convolution layer and the second DW convolution layer include a starting depth convolution layer and an intermediate depth convolution layer; the first optional PW layer and the second optional PW layer include an expansion convolution layer and a projection convolution layer.
4. The vehicle-pedestrian target detection method according to claim 3, characterized in that: The starting depth convolution layer performs preliminary processing on the feature map input by the backbone network. The extended convolution layer uses 1×1 convolution to increase the dimension of the feature map after preliminary processing, and increases the number of channels according to the expansion ratio to capture detailed features through the intermediate depth convolution layer. The projection convolution layer uses 1×1 convolution to reduce the feature image channels to the target number of channels and fuse the feature map information.
5. The vehicle-pedestrian target detection method according to claim 4, characterized in that: The hybrid encoder includes several convolutional layers, an attention-based intra-scale feature interaction module and a cross-scale feature fusion module; the cross-scale feature fusion module includes a Bi-FPN feature fusion module and a RepC3 feature processing module.
6. The vehicle-pedestrian target detection method according to claim 5, characterized in that: The Bi-FPN feature fusion module normalizes the weights of the feature maps input by the backbone network, traverses different feature maps, assigns corresponding weights to them, and stacks the weighted feature maps to form a fused feature map.
7. The vehicle-pedestrian target detection method according to claim 6, characterized in that: In the Bi-FPN feature fusion module, fast normalized fusion is used as the feature fusion method. By assigning weights to different feature maps input to the backbone network, the influence of different feature maps on the output results of the vehicle and pedestrian target detection model is judged. The weight calculation formula is: Among them, Output represents the output result, i represents the index of the input feature layer, j represents the set of feature layer indexes participating in the weighted calculation, and w i represents the weight of a specific feature layer i, w j Represents the weight of the feature layer in the feature layer set, I i Represents the feature map of a specific feature layer i, ∈ represents a small value set to 0.0001 to ensure the stability of its results.
8. A vehicle and pedestrian target detection device, characterized in that: include: The data processing module obtains and inputs the vehicle and pedestrian data set and preprocesses the vehicle and pedestrian data set; Model building module, building a vehicle and pedestrian target detection model based on improved RT-DETR; The vehicle and pedestrian target detection model based on the improved RT-DETR is constructed, including the following improvements on the basis of the original RT-DETR model: 1) Add an inverted bottleneck UIB module to the original RT-DETR model backbone network; 2) In the original RT-DETR model hybrid encoder, the internal feature fusion network structure of the hybrid encoder is adjusted by using a weighted bidirectional feature pyramid network; The training module uses the preprocessed vehicle and pedestrian data set to iteratively train the constructed vehicle and pedestrian target detection model to obtain a trained vehicle and pedestrian target detection model; The detection module detects vehicles and pedestrians based on the trained vehicle and pedestrian target detection model and outputs the detection results.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.