Football match target detection method

By introducing a triple attention mechanism and a weighted bidirectional feature pyramid network into football match target detection, the YOLOv5n_3Att_BiFPN model improves detection accuracy, solves the problem of insufficient accuracy in small target detection and occlusion situations in the existing technology, and achieves higher detection accuracy and stability.

CN118799781AInactive Publication Date: 2024-10-18HARBIN NORMAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410804519.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The accuracy of existing technology in target detection in football matches is not high, especially in small target detection and occlusion situations, and the network feature fusion capabilities of existing models are insufficient, making it difficult to effectively capture the characteristics of football at different scales.

Method used

The YOLOv5n_3Att_BiFPN model is adopted, and by introducing a triple attention mechanism and a weighted bidirectional feature pyramid network structure, the feature extraction and fusion capabilities are enhanced, and the accuracy and stability of detection are improved.

Benefits of technology

Significantly improved the accuracy of target detection in football matches, especially in small target recognition. YOLOv5n_3Att_BiFPN's overall classification accuracy increased by 5.3%, and the ball category accuracy increased by 7.8%, and performed better in comparison with YOLOv8n.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799781A_ABST
    Figure CN118799781A_ABST
Patent Text Reader

Abstract

The invention relates to the field of football match target detection methods, and provides a YOLOv5n3AttBiFPN model, by fusing YOLOv5n into a triple attention mechanism, the characterization ability of the YOLOv5n to local details is remarkably enhanced, the detection precision is remarkably improved, and in particular, in the aspect of recognition of small targets such as footballs, in addition, the detection accuracy is improved. The weighted bidirectional feature pyramid network structure provided by the invention effectively fuses feature information of different scales and depths, and further enriches the feature representation capability of the model, so that the features of the target under different scales can be captured more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of football match target detection methods. Background Art

[0002] Data analysis, tactical research, and live broadcasts are important components of professional football. Target detection in football games can help teams analyze player data, track tactics, and improve the audience's viewing experience. Detecting the ball in a football game is a very challenging problem. First of all, compared to other objects in a football game scene, the size of a football is particularly small, and it will also change drastically depending on the position: when the ball is at the far sideline, its size may be only a few pixels; on the contrary, when it is close to the near sideline, the size may expand to more than 20 pixels. In addition, the shape of the ball will also change. For example, the ball will become blurred when moving quickly, and the shape will be non-standard and circular. And it is also accompanied by the problem of occlusion with the player's body, which further increases the difficulty of detection.

[0003] In the prior art, Jacek Komorowski et al. proposed the FootAndBall detector for football match detection, but the network feature fusion capability is insufficient and its data set size is limited, resulting in poor detection accuracy. The DeepBall detector proposed later has improved accuracy, but there is still room for improvement in the accuracy of small target detection in the football category. The SoccerNet_v3_H250 dataset recently proposed by Konstantinos Moutselos et al. uses the YOLOv8n model for detection, and its all-class detection accuracy mAP50 reaches 70.2%, and mAP50-90 reaches 46.6%. Its ball detection accuracy mAP50 reaches 42.6%, and mAP50-90 reaches 17.9%. At present, the target detection algorithms based on deep learning are mainly divided into two types of methods: single-stage and dual-stage target detection. The main representative of the two-stage target detection algorithm is the R-CNN series of models, including R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN, etc. The disadvantage of this type of algorithm is that it is slow and has poor detection effect on small targets and targets with severe occlusion. The single-stage target detection algorithm does not need to generate and classify candidate areas, but directly predicts the object bounding box from the input image or video, so it usually has a faster detection speed and higher accuracy. With the development of target detection algorithms, the YOLO series has become a classic model for single-stage target detection. Based on this, in order to more accurately detect football match targets, the present invention proposes a football match target detection method. Summary of the invention

[0004] The purpose of the present invention is to provide a method for detecting a football match target to solve the problems raised in the above background technology.

[0005] To achieve the above purpose, a football match target detection method is provided, which is implemented by a YOLOv5n_3Att_BiFPN model and includes the following steps:

[0006] Step S1, converting the original input image into a multi-layer feature map, performing feature extraction through the backbone network of the model, and introducing a triple attention mechanism in the backbone network;

[0007] Step S2, fusing the multi-scale features obtained in step S1 through the feature enhancement network of the model based on BiFPN;

[0008] Step S3, integrating the features extracted in step S2 through the detection head of the model, and outputting the final detection information.

[0009] Preferably, the backbone network backbone in step S1 reduces the size of the feature map and increases the number of channels through convolutional layers and C3 modules, and uses the SPPF module to capture features of different scales and apply them to the same image.

[0010] Preferably: in step S1, the backbone network backbone adds a triple attention mechanism before the spatial pyramid pooling SPPF module, and the triple attention mechanism consists of three branches.

[0011] Preferably: The specific process of each branch of the triple attention mechanism is as follows: In the first branch, the input tensor X∈R C×H×W , establish the interaction between dimension H and dimension C, first rotate the tensor X 90° counterclockwise along the H axis to obtain a rotation tensor with a shape of (W×H×C) , then, after Z-Pool processing, the tensor shape is transformed into (2×H×C), marked as Next, the tensor passes through a standard convolutional layer with a kernel size of k×k for feature extraction and is normalized by a batch normalization layer to obtain an intermediate output of shape (1×H×C). The intermediate output then passes through a Sigmoid activation layer (σ) to generate attention weights and is finally rotated 90° clockwise along the H axis to obtain the output.

[0012] Preferably: In the second branch of the triple attention mechanism, the input tensor X∈R C×H×W , establish the interaction between the C dimension and the W dimension, first rotate the input tensor X counterclockwise along the W axis to obtain a rotated tensor with a shape of (H×C×W) Then, through the Z-Pool operation, the tensor shape is transformed into (2×C×W), marked as The tensor is then passed through a standard convolutional layer with a kernel size of k×k for feature extraction and normalized through a batch normalization layer to obtain an intermediate output of shape (1×C×W). The intermediate output is then passed to a Sigmoid activation layer (σ) to generate attention weights, and finally the tensor is rotated 90° clockwise along the W axis to obtain the output.

[0013] Preferred: In the third branch of the triple attention mechanism, the input tensor X∈R C×H×W , establish the interaction between the H dimension and the W dimension, first simplify the channel of the input tensor X through Z-Pool to obtain a simplified tensor with a shape of (2×H×W), then the simplified tensor passes through a standard convolution layer with a kernel size of k×k for feature extraction, and then the convolved tensor passes through a sigmoid activation layer (σ) to generate attention weights with a shape of (1×H×W), and finally these attention weights are applied to the original input tensor X to obtain the result tensor Finally, the outputs of the above three branches are averaged to obtain the tensor C×H×W.

[0014] Preferably: the BiFPN in step S2 adopts a fast normalization fusion method, and the fast normalization is shown in the following formula:

[0015]

[0016] In the above formula, ω i Represents a learnable weight, using the activation function ReLU to ensure that each ω i The value of is non-negative, and the calculation process is as follows: First, calculate all ω i The sum of the weights of I is then added with a small constant ε = 0.0001 to avoid numerical instability. Then, these weights are normalized. Finally, the normalized weights are used to calculate the input feature I. i The output feature O is obtained by weighting.

[0017] Preferably, in step S2, feature fusion is performed, taking the P6 layer as an example, and the calculation formula for feature fusion is:

[0018]

[0019] In formulas (8) and (9), Conv is the convolution operation, Resize is the upsampling or downsampling operation, and P i in is the input feature of the i-th level, P i mid is the intermediate feature of the i-th level, P iout is the output feature of the i-th level.

[0020] Compared with the prior art, the present invention has the following beneficial effects:

[0021] The present invention significantly enhances the local detail representation capability of YOLOv5n by integrating the triple attention mechanism, so that the detection accuracy is significantly improved, especially in the recognition of small targets such as footballs. In addition, the proposed weighted bidirectional feature pyramid network structure effectively integrates feature information of different scales and depths, further enriching the feature representation capability of the model, enabling it to more accurately capture the features of targets at different scales. In comparison with the existing YOLOv8n model, the accuracy of all classifications of YOLOv5n_3Att_BiFPN is improved by 5.3%, and the accuracy of "ball" classification is improved by 7.8%. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a flow chart of the present invention;

[0023] Figure 2 This is a structural diagram of the triple attention mechanism (TripletAttention) of the present invention;

[0024] Figure 3 It is the first branch of the triple attention mechanism of the present invention;

[0025] Figure 4 It is the second branch of the triple attention mechanism of the present invention;

[0026] Figure 5 It is the third branch of the triple attention mechanism of the present invention;

[0027] Figure 6 The BiFPN usage position of the present invention;

[0028] Figure 7 It is a pyramid network with different characteristics of the present invention;

[0029] Figure 8 The present invention (a) counts the image resolution; (b) counts the maximum pixel value distribution of the player height; (c) counts whether there is a football in the image;

[0030] Fig. 9 Visualize the detection differences between YOLOv8n and YOLOv5n_3Att_BiFPN (Ours) of the present invention;

[0031] Fig.10 Football match detection effect under horizontal viewing angle;

[0032] Fig.11 Panoramic perspective football match detection effect diagram. DETAILED DESCRIPTION

[0033] 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 implementation regulations described 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.

[0034] Example

[0035] See also Figure 1 , Figure is a method structure diagram of the present invention, a football match target detection method, the method is implemented by the YOLOv5n_3Att_BiFPN model, and includes the following steps:

[0036] Step S1, converting the original input image into a multi-layer feature map, performing feature extraction through the backbone network of the model, and introducing a triple attention mechanism in the backbone network;

[0037] Step S2, fusing the multi-scale features obtained in step S1 through the feature enhancement network of the model based on BiFPN;

[0038] Step S3, integrating the features extracted in step S2 through the detection head of the model, and outputting the final detection information.

[0039] As a single-stage target detection algorithm, YOLOv5 is mainly composed of three core components: Backbone, Neck and Prediction. In the Input module, by using data enhancement technologies such as mosaic, the number of target samples is effectively expanded, the robustness of the network is significantly enhanced, and the target detection effect is improved. For pictures with different aspect ratios, the model achieves the unification of picture size by filling small pictures and scaling large pictures, thereby improving detection efficiency.

[0040] The role of Backbone is to convert the original input image into a multi-layer feature map to provide the necessary feature information for subsequent target detection tasks, while the Neck part adopts the FPN+PAN structure. Among them, FPN (Feature Pyramid Network) adopts a top-down approach to transmit strong semantic features of high-level layers and enhance the semantic information; however, it is insufficient in the transmission of positioning information. Therefore, PAN (Path Aggregation Network) adds a bottom-up pyramid based on FPN to transmit the strong positioning features of the lower layers, thereby enhancing the network feature fusion capability and making the model more accurate in detecting large and small targets, further improving the detection accuracy. The Head part is responsible for fusing feature maps of different levels to obtain richer features, thereby improving the detection performance.

[0041] During the training process, YOLOv5 adopts an end-to-end approach and includes three loss functions: confidence loss (lossobj), classification loss (losscls) and positioning loss (lossrect). Among them, confidence loss and classification loss use binary cross entropy, and positioning loss uses CIoU. The overall loss is the weighted sum of these three losses. Usually, the confidence loss takes the largest weight a, while the positioning loss weight b and the classification loss weight c are smaller (a, b, c ∈ (0, 1)), as shown in formula (1):

[0042] loss=a*lossobj+b*losscls+c*lossrect (1)

[0043] The lossrect is constructed as follows: v represents the difference in aspect ratio between the predicted box and the true box, w, h and w gt 、h gt Represent the height and width of the predicted box and the height and width of the real box respectively. IoU is the ratio of the intersection and union between the predicted box and the real box. p represents the coordinates of the center of the predicted box. gt represents the coordinates of the center of the real target bounding box, and ρ represents p and p gt The Euclidean distance between 2 (p,p gt ) is the square of the distance between the two center points, c represents the diagonal length of the minimum circumscribed rectangle of the two rectangles, and α is the aspect ratio weight coefficient.

[0044]

[0045] lossrect=1-CIoU (5).

[0046] The significance of feature fusion is to integrate features from different depths and levels to reduce the semantic differences between layers and output more discriminative features. As the network depth increases, the features of large objects are usually well preserved, while the features of small objects may be gradually ignored. In order to solve this problem, the Feature Pyramid Network (FPN) was proposed to extract multi-scale features. As a typical feature fusion method, FPN adopts a top-down equal-weight fusion strategy, but this method has limitations: it fails to distinguish the importance of different feature layers. At the same time, the processing of the same object at different layers may cause feature conflicts, interfere with gradient operations, and reduce the effectiveness of features.

[0047] In order to more accurately balance features of different scales, the present invention proposes a weighted bidirectional feature pyramid (BiFPN), which introduces a weight mechanism to assign different fusion weights to each layer, so that the network can focus more on key features. In addition, BiFPN also more effectively improves the feature fusion capability of the model by reducing unnecessary layer node connections.

[0048] The present invention proposes a football match target detection method that integrates triple attention and weighted bidirectional feature pyramid features. The method takes YOLOv5n as the baseline, adds a triple attention mechanism to highlight the feature performance of key areas, and introduces a weighted bidirectional feature pyramid structure to enhance the recognition ability of targets of different scales. These improvement measures are used to improve the accuracy, stability and reliability of target detection in football matches.

[0049] The model consists of three core components: backbone network, feature enhancement network neck and detection head. Figure 1 The relationships between these components are shown in detail.

[0050] First, the backbone network is responsible for feature extraction. It gradually reduces the size of the feature map and increases the number of channels through convolutional layers and C3 modules. A triple attention mechanism is introduced in the backbone network. The connection between the input channel and the spatial position is established through a three-branch structure, thereby helping the model to obtain the intrinsic characteristics of the input data. Subsequently, in order to capture features of different scales, the SPPF module is used. This module can apply receptive fields of different sizes to the same image, which can capture the changes of targets in different perspectives in football matches. Next, the feature enhancement network uses BiFPN to fuse multi-scale features. This method enhances the fusion ability of deep and shallow features of the image, allowing the model to more accurately capture its details and contextual information when detecting targets. Finally, the detection head is responsible for integrating the extracted features and outputting the final detection information.

[0051] The triple attention mechanism is an attention method that requires almost no additional parameters and is used to establish channel attention and spatial attention. It can reduce the main loss of spatial information. The present invention adds the triple attention mechanism before the spatial pyramid pooling SPPF module, which can help the SPPF module better focus on the key areas and features in the image. By assigning different weights to different areas, the triple attention mechanism can emphasize important features in the task while suppressing irrelevant noise information, which helps the SPPF module to more effectively extract and utilize useful information in the image.

[0052] Triple attention consists of three branches, each of which focuses on capturing the cross-dimensional information between the spatial dimension and channel dimension of the input. Figure 2 As shown in Figure 2, in this mechanism, the Z-pool layer compresses the tensor of the channel dimension to two dimensions, and then concatenates the average pooling features and the maximum pooling features in this dimension.

[0053] In the first branch, the input tensor X∈R C×H×W , establish the interaction between dimension H and dimension C, the specific process is as follows Figure 3 As shown, first, we rotate the tensor X 90° counterclockwise along the H axis to obtain a rotation tensor of shape (W×H×C) Then, after Z-Pool processing, the tensor shape is transformed into (2×H×C), marked as Next, the tensor passes through a standard convolutional layer with a kernel size of k×k for feature extraction and is normalized by a batch normalization layer to obtain an intermediate output of shape (1×H×C). After that, the intermediate output passes through a Sigmoid activation layer (σ) to generate attention weights. Finally, in order to keep the shape consistent with the input, we rotate 90° clockwise along the H axis to obtain the output.

[0054] In the second branch, the input tensor X∈R C×H×W , establish the interaction between C dimension and W dimension, the process is as follows Figure 4 As shown, first, we rotate the input tensor X counterclockwise along the W axis to obtain a rotated tensor of shape (H×C×W) Subsequently, through the Z-Pool operation, the tensor shape is transformed into (2×C×W), marked as Next, the tensor passes through a standard convolutional layer with a kernel size of k×k for feature extraction and is normalized by a batch normalization layer to obtain an intermediate output of shape (1×C×W). Subsequently, we pass the intermediate output to a Sigmoid activation layer (σ) to generate attention weights. Finally, in order to keep the shape consistent with the input, we rotate the tensor 90° clockwise along the W axis to obtain the output.

[0055] In the third branch, the input tensor X∈R C×H×W , establish the interaction between H dimension and W dimension, the whole process is as follows Figure 5 As shown in the figure, first, we simplify the channels of the input tensor X through Z-Pool to obtain a simplified tensor with a shape of (2×H×W). Then, the simplified tensor passes through a standard convolution layer with a kernel size of k×k for feature extraction. Subsequently, we pass the convolved tensor through a sigmoid activation layer (σ) to generate attention weights with a shape of (1×H×W). Finally, we apply these attention weights to the original input tensor X to obtain the result tensor This branch is designed to capture the interactive information between the H dimension and the W dimension to further improve the performance of the model. Finally, the outputs of the three branches are averaged to obtain the tensor C×H×W, as shown in formula (6).

[0056]

[0057] In the present invention, BiFPN is used to fuse two different sets of features. In a football match, the characteristics of the football and the players are different, and the characteristics of the football in different field areas are also different. These differences lead to insufficient detection accuracy. The main function of BiFPN is to fuse features of different levels and depths to obtain a stronger feature representation, thereby improving detection accuracy.

[0058] The earliest feature pyramid network FPN design is as follows Figure 7 As shown in (a), it adopts a bottom-up sampling and fusion strategy to upsample the bottom-level features and fuse them with the upper-level features to generate high-resolution feature representations rich in semantic information. However, FPN has a limitation that its bottom-level features cannot directly affect the high-level features. To overcome this limitation, PANet introduces a bottom-up path so that the bottom-level information can be more efficiently transmitted to the high-level features. Figure 7 (b) as shown.

[0059] Although FPN and PANet use traditional feature fusion methods, they simply superimpose feature maps and do not fully consider the contribution differences between feature maps of different resolutions. To solve this problem, in BiFPN, different input features are assigned different weights, thereby achieving differentiated fusion.

[0060] like Figure 7As shown in (c), the blue arrows in BiFPN represent the top-down pathways, which are responsible for transmitting the semantic information of high-level features; while the red arrows represent the bottom-up pathways, which are responsible for transmitting the position information of low-level features. The characteristics of BiFPN are mainly reflected in the following aspects: first, it removes those nodes with only one input edge, thereby optimizing the efficiency of feature fusion; second, for the same level of features, BiFPN adds an additional edge between the original input and output nodes to fuse more features without significantly increasing the computational cost; finally, unlike PANet, BiFPN regards each top-down and bottom-up path as a feature network layer, and achieves higher-level feature fusion by repeating the same layer multiple times.

[0061] BiFPN adopts a weighted feature fusion strategy, which gives each feature an additional weight. In order to effectively constrain the size of each weight, BiFPN uses the Fast Normalized Fusion method, which is similar to Softmax and can scale the weight range to [0,1]. By introducing this weighting method, BiFPN not only improves the training speed, but also optimizes the training efficiency. Fast normalization is shown in formula (7):

[0062]

[0063] In formula (7), ω i Represents a learnable weight, using the activation function ReLU to ensure that each ω i The value of is non-negative. The calculation process is as follows: First, calculate all ω i The sum of the weights of ; then, add a small constant ε = 0.0001 to avoid numerical instability; then, normalize these weights; finally, use the normalized weights to i The output feature O is obtained by weighting.

[0064] by Figure 7 Taking the P6 layer in (c) as an example, the calculation formula for feature fusion is:

[0065]

[0066] In formulas (8) and (9), Conv is a convolution operation, Resize is an upsampling or downsampling operation, and P i in is the input feature of the i-th level, P i mid is the intermediate feature of the i-th level, P i out is the output feature of the i-th level.

[0067] BiFPN utilizes both semantic information and spatial information. In football matches, it is crucial to accurately understand the position information of players and footballs. By introducing weight information in BiFPN, the model can better highlight the key features of players and footballs. This enables the model to differentiate features based on their importance when fusing them. The model will assign higher weights to features that are closely related to players and footballs.

[0068] Secondly, the advantage of BiFPN is also reflected in its ability to fuse bidirectional cross-scale features. In football matches, the movement of players and footballs is multi-scale, that is, they present different characteristics at different time and space scales. BiFPN can fully fuse features of different scales, thereby more comprehensively capturing the movement information of players and footballs. Through bidirectional fusion, the model can fully fuse the characteristics of players and footballs from multiple scales, thereby improving the accuracy, stability and reliability of position detection.

[0069] Based on the above, the present invention conducts the following experiments, using the dataset: SoccerNet_v3_H250, which is used to evaluate the player and football detection model under long shots. The length (height) of the bounding box of the person in the dataset does not exceed 250 pixels. The dataset contains two categories: "0" represents football and "1" represents the bounding box of the person. The training, validation and test parts in the dataset are divided into 14368, 2726 and 2692 images respectively. Figure 8 The distribution of data in the dataset is statistically analyzed. This dataset can be downloaded through this link: [https: / / github.com / kmouts / S occerNet_v3_H250].

[0070] At the same time, the following evaluation indicators are used: precision (P) represents the proportion of instances predicted by the model as positive samples that are truly positive samples; recall (R) represents the proportion of all positive samples correctly predicted by the model; mAP50 represents the average precision when the IoU threshold is 0.5; mAP50-95 represents the average precision of multiple IoU thresholds from 0.5 to 0.95.

[0071] Example 1

[0072] In order to improve the accuracy of target detection in football games, this embodiment first uses YOLOv5n and YOLOv8n as model baselines, and then adds a triple attention mechanism for comparison. The original YOLOv5n.pt and YOLOv8n.pt pre-training weights are used respectively. The experimental epoch is 200 rounds, and the default resolution is 640*640. The experimental results show that YOLOv5n is superior to YOLOv8n in ball classification and overall classification. In the detection of "ball" classification, the accuracy of the YOLOv5n model is 5.7% higher than that of YOLOv8n, and the recall is 1.34%. The accuracy of the "ball" classification is improved by 5.9%, the recall rate is improved by 6.7%, and the mAP50-95 is improved by 8.1%. Although the mAP50-95 is slightly lower than that of YOLOv5n, it is still 1.2% higher than that of YOLOv8n.

[0073] Table 1 Comparative experiments between YOLOv5n and YOLOv8n

[0074]

[0075] Example 2

[0076] In order to verify the contribution of each module of the model proposed in the present invention to the accuracy improvement, a step-by-step experiment is conducted. In this embodiment, YOLOv8n, YOLOv5n, YOLOv5n_BiFPN with BiFPN, YOLOv5n_3Att with triple attention mechanism, YOLOv5n_3Att_BiFPN(Ours) with BiFPN and triple attention mechanism added at the same time, and YOLOv5n_3Att_BiFPN(Ours) without pre-training weights are compared horizontally. After adding BiFPN on the basis of YOLOv8n, the accuracy of all classifications of YOLOv5n_3Att_BiFPN is improved by 5.3%, the recall rate is improved by 3.2%, the mAP50 is improved by 4.2%, and the mAP0-95 is improved by 0.4%. The accuracy of "ball" classification is improved by 7.8%, the recall rate is improved by 7.9%, the mAP50 is improved by 8.5%, and the mAP0-95 is improved by 3.3%. The accuracy of "person" classification is still slightly lower than that of YOLOv8n.

[0077] Table 2 Comparison experiment with YOLOv8n after adding BiFPN and triple attention mechanism

[0078]

[0079]

[0080] Example 3

[0081] In order to verify the impact of the triple attention mechanism on the accuracy of this experiment, this embodiment will compare multiple parameter-free attention mechanisms, including TripletAttention, SE, CBAM, Coordatt, ECA and PfAAM. After comparing multiple parameter-free attention mechanisms, YOLOv5n_3Att_BiFPN (Ours) still obtains the highest data in the detection of all categories and the "ball" category.

[0082] Table 3 Comparative experiments of triple attention mechanism with other non-parameter attention mechanisms

[0083]

[0084] Example 4

[0085] In order to verify the impact of different input resolutions on detection accuracy, this embodiment will perform a horizontal comparison between the resolutions of 640*640 and 1280*1280. Inputting higher resolution images allows the model to capture more detailed features and increase the receptive field, which brings about an overall improvement in model performance, especially for the "ball" category. However, this also increases the model's computational cost and memory consumption, which places higher requirements on the computing power of the device.

[0086] Table 4 Comparative experiments with different input resolutions

[0087]

[0088] Example 5

[0089] This example shows the visualization of football match detection. The differences between YOLOv8n and YOLOv5n_3Att_BiFPN (Ours) in actual detection are compared. The images after detection are enlarged to show the details. Fig. 9 As shown in (a), at a position far from the camera, YOLOv8n detection fails and YOLOv5n_3Att_BiFPN (Ours) detection succeeds.

[0090] Fig. 9 As shown in (b), YOLOv8n fails to detect, while YOLOv5n_3Att_BiFPN (Ours) succeeds.

[0091] Fig. 9As shown in (c), when the white football coincides with the white baseline, YOLOv8n detection fails, while YOLOv5n_3Att_BiFPN (Ours) detection succeeds.

[0092] Fig. 9 As shown in (d), when the football is kicked out with great force, the sphere is elongated into an irregular spherical state, YOLOv8n fails to detect it, while YOLOv5n_3Att_BiFPN (Ours) succeeds in detecting it.

[0093] Fig. 9 As shown in (e), when the football is kicked out with great force, the sphere becomes transparent and even cannot be recognized by the naked eye. YOLOv8n fails to detect it, while YOLOv5n_3Att_BiFPN (Ours) succeeds.

[0094] Example 6

[0095] Fig.10 and Fig.11 The object detection of two real football game clips outside the training dataset is shown. The clips are taken from a football game between students of a certain school. Fig.10 At a more level perspective, the players occlude each other more seriously. YOLOv5n_3Att_BiFPN(Ours) detection can successfully detect the players who occlude each other. Fig.11 In the detection, YOLOv5n_3Att_BiFPN(Ours) correctly detects the players and the ball taken from a long distance, and successfully excludes non-playing figures outside the field.

[0096] The above content is a further detailed description of the present invention in combination with specific implementation methods. It cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, some simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the scope of protection determined by the claims submitted for the present invention.

Claims

1. A method for detecting a target in a football match, the method being implemented by a YOLOv5n_3Att_BiFPN model. It is characterized in that The steps include: Step S1, converting the original input image into a multi-layer feature map, performing feature extraction through the backbone network of the model, and introducing a triple attention mechanism in the backbone network; Step S2, fusing the multi-scale features obtained in step S1 through the feature enhancement network of the model based on BiFPN; Step S3, integrating the features extracted in step S2 through the detection head of the model, and outputting the final detection information.

2. The football match target detection method according to claim 1, Features: In the step S1, the backbone network reduces the size of the feature map and increases the number of channels through the convolutional layer and the C3 module, and uses the SPPF module to capture features of different scales and apply them to the same image.

3. The football match target detection method according to claim 1, Features: In the step S1, the backbone network backbone adds the triple attention mechanism before the spatial pyramid pooling SPPF module, and the triple attention mechanism consists of three branches.

4. The football match target detection method according to claim 3, Features: The specific process of each branch of the triple attention mechanism is as follows: In the first branch, the input tensor X∈R C×H×W , establish the interaction between dimension H and dimension C, first rotate the tensor X 90° counterclockwise along the H axis to obtain a rotation tensor with a shape of (W×H×C) Then, after Z-Pool processing, the tensor shape is transformed into (2×H×C), marked as Next, the tensor passes through a standard convolutional layer with a kernel size of k×k for feature extraction and is normalized by a batch normalization layer to obtain an intermediate output of shape (1×H×C). The intermediate output then passes through a Sigmoid activation layer (σ) to generate attention weights and is finally rotated 90° clockwise along the H axis to obtain the output.

5. The football match target detection method according to claim 4, Features: In the second branch of the triple attention mechanism, the input tensor X∈R C×H×W , establish the interaction between the C dimension and the W dimension, first rotate the input tensor X counterclockwise along the W axis to obtain a rotated tensor with a shape of (H×C×W) Then, through the Z-Pool operation, the tensor shape is transformed into (2×C×W), marked as The tensor is then passed through a standard convolutional layer with a kernel size of k×k for feature extraction and normalized through a batch normalization layer to obtain an intermediate output of shape (1×C×W). The intermediate output is then passed to a Sigmoid activation layer (σ) to generate attention weights, and finally the tensor is rotated 90° clockwise along the W axis to obtain the output.

6. The football match target detection method according to claim 5, Features: In the third branch of the triple attention mechanism, the input tensor X∈R C×H×W , establish the interaction between the H dimension and the W dimension, first simplify the channel of the input tensor X through Z-Pool to obtain a simplified tensor with a shape of (2×H×W), then the simplified tensor passes through a standard convolution layer with a kernel size of k×k for feature extraction, and then the convolved tensor passes through a sigmoid activation layer (σ) to generate attention weights with a shape of (1×H×W), and finally these attention weights are applied to the original input tensor X to obtain the result tensor Finally, the outputs of the above three branches are averaged to obtain the tensor C×H×W.

7. The football match target detection method according to claim 1, Features: The BiFPN of step S2 adopts a fast normalization fusion method, and the fast normalization is shown in the following formula: In the above formula, ω i Represents a learnable weight, using the activation function ReLU to ensure that each ω i The value of is non-negative, and the calculation process is as follows: First, calculate all ω i The sum of the weights of I is then added with a small constant ε = 0.0001 to avoid numerical instability. Then, these weights are normalized. Finally, the normalized weights are used to calculate the input feature I. i The output feature O is obtained by weighting.

8. The football match target detection method according to claim 1, Features: In step S2, feature fusion is performed. Taking the P6 layer as an example, the calculation formula for feature fusion is: In formulas (8) and (9), Conv is a convolution operation, Resize is an upsampling or downsampling operation, is the input feature of the i-th level, is the intermediate feature of the i-th level, is the output feature of the i-th level.

Citation Information

Patent Citations

  • Real-time football target detection method based on neural network

    CN111832513A

  • Insulator defect detection method fusing BiFPN and attention mechanism

    CN118196598A