Target detection and tracking method under shielding influence
By introducing the SE attention mechanism and CBR module into the YOLOv8 object detection model, and combining the DeepSort object tracking model, the problem of low object detection and tracking accuracy under occlusion situations is solved, and more efficient object detection and tracking effects are achieved.
Patent Information
- Application Number
- CN202411909417.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-15
AI Technical Summary
The existing multi-objective tracking methods have poor target detection and tracking effects in occlusion, making it difficult to improve accuracy.
The improved object detection model YOLOv8 is adopted, and the CBS module in the SPPF module at the end of the backbone network is replaced as a CBR module, and the SE attention mechanism is introduced after the CBR module. Combined with the DeepSort target tracking model, Kalman filtering and Hungarian algorithm are used for target matching and tracking.
In the case of occlusion, the accuracy of object detection and tracking is significantly improved, and the stability of the model's capture and tracking of target features is enhanced.
Smart Images

Figure CN119832477A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and more particularly to a target detection and tracking method under the influence of occlusion. Background Art
[0002] In recent years, multi-target tracking has become a hot topic in the field of computer vision research, especially in the fields of video monitoring, assisted driving, human-computer interaction, etc. The continuous development of multi-target tracking technology has provided strong support for the innovation of these applications. Generally, multi-target tracking algorithms rely on target detection as a basis, which means that target detection is performed first, and then target tracking is performed. This two-stage processing flow enables the system to track multiple targets in the video more effectively, laying the foundation for realizing smarter and more accurate computer vision applications.
[0003] Multi-target tracking methods can be divided into two categories in the field of deep learning. One is the multi-target tracking method that uses a joint single-target tracker, which corresponds the tracker and the tracked target to each other. This method makes full use of the advanced technology in the field of single-target tracking and greatly improves the accuracy of multi-target tracking. The other is a multi-target tracking method that combines the advantages of both the target detection algorithm and the data association optimization algorithm, and this method is the mainstream algorithm in the direction of multi-target tracking based on deep learning. The powerful feature extraction and expression capabilities of deep learning are used to extract the depth information of visual features, and finally the target is detected and classified, which provides a technical basis for the multi-target tracking algorithm. Therefore, the effect of multi-target tracking depends to a large extent on the detection performance of the target detection algorithm and its ability to distinguish target features. However, the current multi-target tracking method does not perform well in target detection and tracking under occlusion.
[0004] Therefore, how to improve the accuracy of target detection and tracking under occlusion conditions is a problem that technical personnel in this field need to solve urgently. Summary of the invention
[0005] In view of the above problems, the present invention provides a method for detecting and tracking a target under the influence of occlusion, so as to at least solve some of the technical problems mentioned in the above background technology.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A method for detecting and tracking a target under occlusion, characterized in that it comprises the following steps:
[0008] The trained improved target detection model is used to detect the video in the detection area and output the multi-object detection results in each frame of the image;
[0009] The trained DeepSort target tracking model is used to read the multi-object detection results in each frame of the image, so as to track the same target object between consecutive frames in the video.
[0010] The improved target detection model is based on the YOLOv8 framework, replaces the CBS module in the SPPF module at the end of the backbone network with a CBR module, and introduces the SE attention mechanism after the CBR module.
[0011] Furthermore, the CBS module in the SPPF module in the backbone network is replaced with a CBR module, and the specific operation is: replacing the activation function SiLU in the CBS module with the activation function ReLU to form a CBR module.
[0012] Furthermore, the improved target detection model replaces the C2f modules in the backbone network and the neck network with C2f-DCNv3 modules based on the YOLOv8 framework. The specific operations are as follows:
[0013] The DCNv3 module is used to replace the second convolutional layer of the Bottleneck module in the C2f module to form a C2f-DCNv3 module.
[0014] Furthermore, the improved target detection model embeds an EMA multi-scale attention mechanism before the detection head based on the YOLOv8 framework.
[0015] Furthermore, the improved target detection model adopts SIoU loss function to replace CIoU loss function based on the YOLOv8 framework.
[0016] Furthermore, for the tracked target object, the DeepSort target tracking model uses Kalman filtering to identify the position and size of the target object in the next frame.
[0017] Furthermore, the DeepSort target tracking model uses the Hungarian algorithm to match the multi-object detection results newly detected by the improved target detection model with the target object tracked in the current frame. If the match is successful, the unique identifier of the target object continues to be retained.
[0018] Furthermore, the training steps of the improved target detection model and the DeepSort target tracking model include:
[0019] Acquire multi-target video images corresponding to multiple expected targets in multiple scenes and perform preprocessing;
[0020] Mark each expected target in the preprocessed multi-target video image and delete duplicate frames;
[0021] Taking multi-target video images as input and images with labeled content as output, the improved target detection model and DeepSort target tracking model are trained in multiple rounds in batches, and the value of the loss function is calculated after each round to optimize the model.
[0022] Furthermore, the preprocessing specifically includes: removing black edges of the image, reducing the image size, adjusting the resolution of the video, performing spatial transformation on the image to achieve data enhancement, and adjusting the brightness of the image.
[0023] Furthermore, marking each expected target in the preprocessed multi-target video image includes:
[0024] Use LabelImg to annotate the bounding box, position, and range of the expected target in each frame, and assign a category label to each bounding box.
[0025] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method for detecting and tracking a target under the influence of occlusion, which has the following beneficial effects:
[0026] The present invention combines the target detection model YOLOv8 and the target tracking model DeepSort to achieve target detection and tracking under occlusion.
[0027] The present invention uses a modified YOLOv8 as the target detection model, and replaces the activation function of the framework, introduces SE attention, changes the network structure, etc. to improve the target detection accuracy under occlusion.
[0028] The present invention embeds a multi-scale attention mechanism before the detection head to reduce the impact of occlusion.
[0029] The present invention uses an extended Kalman filter to improve DeepSort and enhance the target tracking accuracy.
[0030] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0032] Figure 1 A schematic flow chart of a method for detecting and tracking a target under occlusion provided in an embodiment of the present invention.
[0033] Figure 2 A schematic diagram of the YOLOv8 network structure provided for related prior art.
[0034] Figure 3 A schematic diagram of the improved SPPF network structure provided by an embodiment of the present invention.
[0035] Figure 4 A schematic diagram of the C2f-DCNv3 structure provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] The embodiment of the present invention discloses a method for detecting and tracking a target under the influence of occlusion, see Figure 1 As shown, it includes: detecting the video in the detection area through the trained improved target detection model, and outputting the multi-object detection results in each frame image; reading the multi-object detection results in each frame image through the DeepSort target tracking model, and realizing the tracking of the same target object between consecutive frames in the video.
[0038] Next, the above contents will be described in detail.
[0039] 1. Improve the structure of the target detection model
[0040] In the embodiment of the present invention, a new network is designed based on YOLOv8 to build an improved target detection model. The original YOLOv8 network structure diagram is as follows Figure 2As shown in the figure, it includes four parts: Input, Backbone, Neck and Head. Among them, the Mosaic data enhancement method is used in the Input to enrich the data set and improve the generalization ability and robustness of the model. In the Backbone network, the idea of the cross-stage local network CSP module is adopted, and the new C2f module is used to replace the C3 module in YOLOv5, thereby achieving further lightweight. It continues the SPPF module in YOLOv5 and fine-tunes the models of different scales, thereby significantly improving the model performance. In the feature fusion Neck, the semantic expression and positioning capabilities at multiple scales are enhanced by adopting the FPN+PAN structure. The Head part adopts the decoupled head structure to separate the classification and detection heads. The Anchor-Free method is used to improve the detection speed. In terms of loss function Loss calculation, YOLOv8 uses VFL Loss as the classification loss, and uses CIOU Loss and DFL Loss as the regression loss.
[0041] The working principle of the original YOLOv8 network is as follows: the input end Input pre-processes the data and then passes it to the backbone network Backbone to extract feature maps at different scales; the neck network Neck adopts a multi-level feature fusion method to fuse feature maps at different levels to generate a more representative feature map, and the detection head structure Head at the output end fuses the prediction results from feature layers of different scales to generate the final detection result.
[0042] In the embodiment of the present invention, the improved target detection model is modified as follows based on the YOLOv8 framework:
[0043] (1) Figure 3 As shown in the figure, based on the YOLOv8 framework, the improved target detection model replaces the activation function SiLU in the CBS module in the SPPF module at the end of the backbone network with the activation function ReLU to form a CBR module, replaces the CBS module with a CBR module, and introduces the SE attention mechanism after the CBR module. Among them:
[0044] The activation function SiLU of the CBS module is replaced with the activation function ReLU to generate the CBR module, so that the negative value of the input is set to zero and the positive value remains unchanged. The replaced activation function ReLU abandons complex calculations, effectively avoids unnecessary information interference, and further speeds up the training speed of the model;
[0045] The SE attention mechanism is embedded after the CBR module, which only focuses on channel attention and adaptively recalibrates the weights of different channels in the input feature map to effectively extract feature information and enhance the attention of dense target areas, making feature extraction more and more accurate.
[0046] For example, given a local feature X∈R H′*W′*C′ is the input feature map, after F tr , F tr It can be regarded as a standard convolution operator to generate a new feature map U, where U∈R H*W*C . The formula is defined as follows:
[0047]
[0048] Among them, u C Indicates F tr The output feature map of ; C′ represents the number of channels of the input feature map; s represents the number of single channels; v represents a set of learned filter kernels; v c represents the parameters of the filter associated with the Cth channel, Represents a 2D spatial kernel; * represents a convolution operation. s Indicates that v C Corresponding channels; the convolution operator formula indicates that each layer of the input feature map X undergoes a convolution with a 2D spatial kernel to finally obtain C output feature maps, forming the feature map U.
[0049] F sq It uses global average pooling of channels. In order to solve the problem of using channel dependency, the global spatial information is compressed into a channel descriptor, that is, the global average pooling of channels is used to directly compress the W×H×C feature map containing global information into a 1×1×C feature vector Z. The channel features of C feature maps are compressed into a value, so that the generated channel-level statistics Z contain context information, alleviating the problem of channel dependency. The formula is as follows:
[0050]
[0051] Among them, z c Represents the element of the Cth channel of the feature vector Z. W represents the width of the feature map; H represents the height of the feature map; (i, j) represents the coordinate point;
[0052] In order to utilize the information gathered in the compression operation, the function must be able to learn the nonlinear interaction between channels and learn a non-mutually exclusive relationship. Because the one-hot activation is the opposite, multiple channels are allowed to be emphasized here. The gate mechanism consists of two layers of full connection. The first fully connected layer compresses C channels into C / r channels to reduce the amount of calculation, and then passes through a ReLU nonlinear activation layer. The second fully connected layer restores the number of channels back to C channels, and then obtains the weight p through Sigmoid activation. The dimension of the final p is 1×1×C, which is used to characterize the weights of the C feature maps in the feature map U. r refers to the compression ratio. The formula is as follows:
[0053] p=F_ex(z,ω)=σ(g(z,ω))=σ(ω2δ(ω1z))
[0054] Among them, p represents the output weight; F_ex(z,ω) represents the forward propagation function of the network; ω represents the weight of the network; z represents the input data; σ represents the activation function of the output layer; g(z,ω) represents the output of the hidden layer; ω1 and ω2 represent the weight matrices from the input layer to the hidden layer and from the hidden layer to the output layer; δ represents the activation function of the hidden layer;
[0055] The last step is the Scale operation, which weights the attention weights obtained above to the features of each channel. Each feature map in the feature map U is multiplied by the corresponding weight to obtain the final output of the SE attention mechanism. It is expressed as:
[0056]
[0057] Among them, F scale represents the scaling function; s c represents the scaling factor;
[0058] (2) Figure 4 As shown in the figure, based on the YOLOv8 framework, the improved target detection model replaces the C2f module in the backbone network and the neck network with the C2f-DCNv3 module. The specific operation is: use the DCNv3 module to replace the second convolutional layer in the Bottleneck module to form a Bottleneck-DCNv3 module; then use the Bottleneck-DCNv3 module to replace the Bottleneck module in the C2f module to form a C2f-DCNv3 module, that is, use the DCNv3 module to replace the second convolutional layer of the Bottleneck module in the C2f module to form a C2f-DCNv3 module.
[0059] Here, in order to improve the problem of weak image feature extraction capability under occluded background, the embodiment of the present invention improves the feature extraction network and adds deformable convolution DCNv3 to the network to adjust the receptive field in real time, so as to better extract the key features of the target image. Deformable convolution combined with offset can generate non-fixed shape areas to sample feature maps, thereby realizing real-time adjustment of the receptive field. Using standard convolution for feature extraction limits the flexibility of the receptive field, while deformable convolution adds an adaptable offset feature to the standard convolution, so that the convolution can be closer to the shape of the garbage object when sampling, thereby improving the flexibility of the receptive field.
[0060] (3) Improved target detection model Based on the YOLOv8 framework, the EMA multi-scale attention mechanism is embedded in front of the detection head; specifically:
[0061] In order to improve the performance of the output detection head, solve the problems of crowding and mutual occlusion of various targets in the image, and increase the amount of target feature capture, the embodiment of the present invention embeds an EMA efficient multi-scale attention mechanism in front of the detection head. Through the attention mechanism, the impact of occlusion is reduced, and the attention distribution is adaptively adjusted according to different behaviors, thereby improving the perception and discrimination ability of the model and enhancing the accuracy of target detection.
[0062] When the detection head locates and classifies the target, some detailed information may be lost, resulting in missed detection and false detection. The embedded EMA multi-scale attention mechanism uses a parallel substructure to evenly distribute spatial semantic features in each feature group, aggregates multi-scale spatial structural information through cross-space learning methods, avoids performance degradation caused by complex sequential processing and deep convolution, effectively captures the pixel-level attention feature values of the target, and establishes dependencies between dimensions. The learned attention weights are used to enhance the important areas in each sub-feature to generate accurate target positioning information.
[0063] For example, for the input feature map X∈R C*H*W , the EMA multi-scale attention mechanism divides G sub-feature groups X=[X0,X i ,...,X G-1]. The learned attention weights can be used to enhance the sub-feature representations of all attentions. The EMA multi-scale attention mechanism extracts attention weights through three paths. The first two paths use 1×1 convolutions, and the third path uses 3×3 convolutions. In the 1×1 convolution branch, an average pooling operation is added to encode in the direction of the channel; in the 3×3 convolution branch, the normalization and average pooling operations are omitted to extract multi-scale feature representations. The EMA multi-scale attention mechanism extracts the dependencies between the three paths through a cross-spatial information aggregation method. Specifically, EMA introduces two tensors, which are the outputs of the 1×1 and 3×3 convolution branches, and uses global average pooling to encode the global spatial information output by the 1×1 branch.
[0064] (4) Improved target detection model Based on the YOLOv8 framework, the SIoU loss function is used to replace the CIoU loss function. The SIoU loss function is an area-based loss function, and its value is only related to the area of the target box. It is not affected by the change of the bounding box, which can make the training process more stable. In addition, the SIoU loss function does not involve complex distance measurement and division operations, and its calculation is simpler. At the same time, by considering the matching direction, it can help the prediction box move quickly to the nearest axis, thereby improving the training speed.
[0065] 2. DeepSort target tracking model
[0066] The DeepSort target tracking model in the embodiment of the present invention may use a DeepSort tracker, which includes the following steps in specific application:
[0067] (1) Load the DeepSort configuration file, which contains the parameters of maximum distance (MAX_DIST), minimum confidence (MIN_CONFIDENCE), maximum overlap rate of non-maximum suppression (NMS_MAX_OVERLAP), maximum IOU distance (MAX_IOU_DISTANCE), maximum age (MAX_AGE), number of initializations (N_INIT), and neural network budget (NN_BUDGET);
[0068] (2) Initialize the DeepSort tracker according to the loaded configuration file, and the tracker reads the information output by the improved target detection model;
[0069] (3) For the tracked target object, DeepSort uses the Kalman filter to predict the position and size of the target in the next frame. At the same time, DeepSort uses the Hungarian algorithm to match the newly detected multi-object detection results of the improved target detection model with the target object tracked in the current frame. Once the detected target is successfully matched with the existing tracker run, the unique identifier of the target will continue to be retained;
[0070] (4) Repeat the process of the previous step. DeepSort dynamically updates the status information of each tracked target, effectively tracks the same target in the video sequence, realizes dynamic tracking of the target, and uses a dictionary to record the detailed information of the tracked target in real time, including the target ID, center point, historical location, and draws the bounding box of each target.
[0071] The above Kalman filter provides the predicted position of each target in the next frame. The Hungarian algorithm uses the predicted position to match the target position detected in the next frame. This combination allows DeepSort to maintain stable tracking of the target when facing target movement, occlusion, etc.
[0072] Next, the Kalman filter is explained:
[0073] Generally, Kalman filtering is mainly used for state estimation of linear systems. Since there are many nonlinear factors in target tracking, the embodiment of the present invention uses extended Kalman filtering (EKF) to process. EKF expands the nonlinear function by Taylor series and discards its high-order terms, approximating the nonlinearity to a linear system, which can be expressed as:
[0074] x k =f(x k-1 )+w k
[0075] y k =g(x k )+v k
[0076] Among them, f(x k-1 ) function represents the state of the swivel chair; w k 、v k is Gaussian white noise; g(x k ) is a nonlinear function. The iterative expression is:
[0077]
[0078] in, Represents the estimated value of the k-1th frame of data; Represents the estimated value of the kth frame of data; F k-1 Represents the function x k The Jacobian matrix of Y k Represents the function y k The Jacobian matrix of .
[0079] 3. Improve the training steps of the target detection model and DeepSort target tracking model:
[0080] (1) Obtain multi-target video images corresponding to multiple expected targets in multiple scenes and perform preprocessing:
[0081] When collecting data, clarify the objectives of the data set, including the collection scene (such as shopping malls, roads), the expected detection targets (such as pedestrians, bicycles, cars, etc.), and the required video duration, including shooting and recording videos and camera storage videos.
[0082] During the preprocessing process, remove the black edges of the image to reduce the impact of non-experimental areas; reduce the image size to increase the training speed of the model; adjust the resolution of the video to maintain the clarity of the experimental area so that the model can effectively learn the characteristics of the target and improve the performance of the model; extract video key frames at a certain time interval, such as extracting an image every 2 seconds, so that the model can learn as many characteristics of the target as possible at different time points while reducing the workload of annotation; perform image enhancement on the video image file after the above processing, that is, perform spatial transformation data enhancement on the extracted image, and shift the image in the horizontal and vertical directions to simulate the scene of the target in different positions. Rotate the extracted image at different angles to generate images of the target observed from different perspectives to increase sample diversity. Adjust the brightness of the extracted image to generate images under different lighting conditions to simulate the changes in lighting in the experimental environment or the differences in shooting equipment to increase the diversity of the training data set.
[0083] (2) Mark each expected target in the preprocessed multi-target video image and delete duplicate frames; specifically:
[0084] Configure the Anaconda environment and install the LabelImg software; import the dataset into the LabelImg software; use the LabelImg annotation software to draw bounding boxes in images and videos, mark the location and range of the expected detection target, and assign a category label (such as person, bicycle, car, etc.) to each bounding box. Check whether there are duplicate images or videos in the dataset. If so, delete them to avoid data redundancy. The annotated image is a TXT file with the same name as the original image;
[0085] (3) Taking multi-target video images as input and images with labeled content as output, the improved target detection model and DeepSort target tracking model are trained in multiple rounds in batches, and the value of the loss function is calculated after each round to optimize the model. The training is repeated for multiple rounds until the expected performance is achieved. Specifically:
[0086] The number of iterations can be set to 100, the learning rate to 0.01, the batch size to 16, the size of the input image to 640, the training device to be run is GPU, and the number of working threads is 4; the labeled data set is divided into training set, validation set, and test set in a ratio of 8:1:1, and the improved target detection model is trained. After the training, the model with the best effect is saved; the trained improved target detection model is evaluated using the indicators of recall rate (ReCALL), precision rate (Precision), mean average precision mAP@0.5, and frames per second (FPS). The corresponding formulas for the corresponding indicators are:
[0087] Recall:
[0088] Accuracy:
[0089] Mean average precision:
[0090] Frames processed per second:
[0091] Among them, TP refers to the number of detection boxes that correctly detect the target; FP refers to the number of detection boxes that are falsely detected as drill rods; FN refers to the number of detection boxes that miss the target; NC is the total number of categories; AP refers to the area under the PR curve; map is the mean of all APs; Latency refers to the time from when the model receives the image to when it outputs the result.
[0092] In summary, the embodiment of the present invention discloses a method for detecting and tracking targets under occlusion. Based on YOLOv8, a target tracking network is introduced. In combination with the DeepSort algorithm, a high-performance real-time multi-target tracking model can be created. While meeting the tracking speed and accuracy requirements, it can also effectively track targets that have been occluded for a long time. The output detection results include the target bounding box, category name, coordinates of the target bounding box, confidence of the category name, and the real-time and accuracy of target tracking.
[0093] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0094] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting and tracking a target under occlusion, characterized in that: The steps include: The trained improved target detection model is used to detect the video in the detection area and output the multi-object detection results in each frame of the image; The trained DeepSort target tracking model is used to read the multi-object detection results in each frame of the image, so as to track the same target object between consecutive frames in the video. The improved target detection model is based on the YOLOv8 framework, replaces the CBS module in the SPPF module at the end of the backbone network with a CBR module, and introduces the SE attention mechanism after the CBR module.
2. The method for detecting and tracking a target under occlusion according to claim 1, characterized in that: The CBS module in the SPPF module in the backbone network is replaced with a CBR module. The specific operation is: replacing the activation function SiLU in the CBS module with the activation function ReLU to form a CBR module.
3. The method for detecting and tracking a target under occlusion according to claim 1, characterized in that: The improved target detection model replaces the C2f modules in the backbone network and the neck network with the C2f-DCNv3 modules based on the YOLOv8 framework. The specific operations are as follows: The DCNv3 module is used to replace the second convolutional layer of the Bottleneck module in the C2f module to form a C2f-DCNv3 module.
4. The method for detecting and tracking a target under occlusion according to claim 1, characterized in that: The improved target detection model is based on the YOLOv8 framework and embeds the EMA multi-scale attention mechanism before the detection head.
5. The method for detecting and tracking a target under occlusion according to claim 1, characterized in that: The improved target detection model adopts SIoU loss function to replace CIoU loss function based on the YOLOv8 framework.
6. The method for detecting and tracking a target under occlusion according to claim 1, characterized in that: For the tracked target object, the DeepSort target tracking model uses Kalman filtering to identify the position and size of the target object in the next frame.
7. The method for detecting and tracking a target under occlusion according to claim 1, characterized in that: The DeepSort target tracking model uses the Hungarian algorithm to match the multi-object detection results newly detected by the improved target detection model with the target object tracked in the current frame. If the match is successful, the unique identifier of the target object continues to be retained.
8. The method for detecting and tracking a target under occlusion according to claim 1, characterized in that: The training steps of the improved target detection model and the DeepSort target tracking model include: Acquire multi-target video images corresponding to multiple expected targets in multiple scenes and perform preprocessing; Mark each expected target in the preprocessed multi-target video image and delete duplicate frames; Taking multi-target video images as input and images with labeled content as output, the improved target detection model and DeepSort target tracking model are trained in multiple rounds in batches, and the value of the loss function is calculated after each round to optimize the model.
9. The method for detecting and tracking a target under occlusion according to claim 8, characterized in that: The preprocessing specifically includes: removing black edges of the image, reducing the image size, adjusting the resolution of the video, performing spatial transformation on the image to achieve data enhancement, and adjusting the brightness of the image.
10. The method for detecting and tracking a target under occlusion according to claim 8, characterized in that: The step of marking each expected target in the preprocessed multi-target video image comprises: Use LabelImg to annotate the bounding box, position, and range of the expected target in each frame, and assign a category label to each bounding box.