Method and apparatus for analyzing a role
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-26
- Publication Date
- 2026-08-11
AI Technical Summary
其主要目的在于解决单一特征依赖与简单逻辑处理的缺陷,使得系统在球员密集遮挡、多视角切换等复杂场景下,难以维持稳定的角色分类与分队性能,进而影响越位判断、战术分析等下游任务的可靠性的问题
[0023] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first aspect above.
Smart Images

Figure CN122551233A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer vision technology, and more particularly to a method and apparatus for character analysis. Background Technology
[0002] Computer vision technology serves as a core support for intelligent analysis of sports events, and is widely used in role classification and team assignment in football matches. With the development of deep learning and multimodal feature fusion technologies, existing methods mainly construct their technical systems through Mask R-CNN and HSV color space processing.
[0003] However, existing color-based team assignment modules have significant limitations. Specifically, traditional methods directly use HSV transformation and color histograms for cluster analysis, which may lead to team assignment errors due to distortion of jersey color features. This reliance on a single feature and simple logical processing makes it difficult for the system to maintain stable role classification and team assignment performance in complex scenarios such as dense player occlusion and multiple perspective switching, thus affecting the reliability of downstream tasks such as offside detection and tactical analysis. Summary of the Invention
[0004] This disclosure provides a method and apparatus for role analysis. Its main purpose is to address the shortcomings of relying on single features and simple logic processing, which makes it difficult for the system to maintain stable role classification and team assignment performance in complex scenarios such as dense player obstruction and multiple perspective switching, thereby affecting the reliability of downstream tasks such as offside judgment and tactical analysis.
[0005] According to a first aspect of this disclosure, a method for analyzing roles is provided, comprising: Perform illumination-adaptive processing on video frames and extract player detection regions from the processed video frames; After removing background interference based on the player detection area, the target color features are extracted, and the classification result of the player corresponding to the target color features is calculated by feature similarity. Construct a dynamic player graph, integrate spatial proximity and event interaction features, calculate the criticality index of players in the tactical structure, and reconstruct a two-way verification system between players and teams through attributes. Combine this with a pre-trained position model to predict the position of missing players. The player classification results and the predicted missing player positions are probabilistically fused to generate the player's role classification and team identification results.
[0006] In some embodiments, the step of extracting target color features based on the player detection region after excluding background interference, and calculating the classification result of the player corresponding to the target color features through feature similarity, includes: Background color information is collected within a preset range outside the player detection area to determine the background color range in order to construct a dynamic background model; Pixels matching the dynamic background model are excluded from the player detection area, features of players in green jerseys are extracted, and different jersey colors are distinguished based on the features of players in green jerseys to obtain classification results for different players.
[0007] In some embodiments, the step of collecting background color information within a preset range outside the player detection area and determining the background color range to construct a dynamic background model includes: The RGB image is converted to the HSV color space for the player detection area and the outer pixel area of the preset range outside the player detection area, and the hue, saturation and brightness channels are separated. Collect the grass color of the environment outside the player detection area, collect all green hue pixels based on the extended pixel area, calculate the extreme values in the saturation and brightness dimensions, and construct the dynamic background model based on the extreme values.
[0008] In some embodiments, the step of excluding pixels matching the dynamic background model from the player detection region, extracting features of green-shirted players, and distinguishing different jersey colors based on the features of green-shirted players to obtain classification results for different players includes: Select all colors with green hue in the HSV color space, and take the maximum and minimum values in the two dimensions of saturation and brightness to construct the color range of the green grass environment where the player is located; The pixels in the player detection area are compared with the dynamic background model, and the pixels that match the dynamic background model are excluded, while the pixels of the green-shirted player are retained. Determine the hue histogram of the pixels of the green-shirted players that are retained; The Bach coefficient is used to calculate the Bach distance between the hue histogram of the pixels of the green-shirted player and the baseline histogram, thus obtaining the classification results of the different players.
[0009] In some embodiments, the construction of the player dynamic graph, which integrates spatial proximity and event interaction features, calculates the criticality index of a player in the tactical structure, reconstructs a two-way verification system between players and the team through attribute reconstruction, and predicts the position of missing players by combining a pre-trained position model, includes: Collect the real-time position, speed, passing and confrontation events of each player, and create a dynamic graph of the players; The player dynamics graph is used to analyze the spatial and / or event connections between the player and other players. Based on the spatial and / or event connections between the players and other players, determine the players' local tactical characteristics and the team's overall tactical characteristics; The basic attributes of players are reconstructed using a reconstruction model, and the first degree of matching between the reconstructed basic attributes and the actual observed attributes is calculated. The overall attributes of the team are reconstructed using a reconstruction model, and the second degree of matching between the reconstructed overall attributes and the actual observed attributes is calculated. Based on the reconstructed basic attributes, the reconstructed overall attributes, the first matching degree, and the second matching degree, the position of the missing player is predicted.
[0010] In some embodiments, determining the player's local tactical characteristics and the team's overall tactical characteristics based on the spatial and / or event connections between the player and other players includes: Calculate the player's tactical curvature characteristics based on the spatial and / or event connections between the player and other players; Based on the spatial distance and relative position of the player with respect to the other players, and the tactical curvature characteristics, the local tactical characteristics of the player are determined; wherein, the local tactical characteristics are used to describe the spatial relationship and tactical status of the player with respect to the other players; Based on the total number of players, the time interval between two consecutive passes or defenses by a player, player attributes, and player connectivity, the overall tactical characteristics of the team are extracted globally; wherein, the overall tactical characteristics of the team are used to describe the overall tactical form of the team at the current moment.
[0011] In some embodiments, the step of reconstructing the player's basic attributes using a reconstruction model and calculating a first degree of matching between the reconstructed basic attributes and the actually observed attributes; and reconstructing the team's overall attributes using a reconstruction model and calculating a second degree of matching between the reconstructed overall attributes and the actually observed attributes, includes: Reconstruct the basic attributes of each player based on the aforementioned local tactical characteristics; Based on the team's overall tactical characteristics, the team's overall attributes are reconstructed, and based on the reconstructed basic attributes and the reconstructed team overall attributes, a reconstructed player dynamic diagram is obtained. In some embodiments, predicting the position of the missing player based on the reconstructed basic attributes, the reconstructed overall attributes, the first matching degree, and the second matching degree includes: Based on the player dynamic graph, remove each player in sequence and calculate the perturbation information of the team in the tactical curvature feature after removing the players; Based on the current visible player status, generate the position distribution of the removed players, and compare the position distribution of the removed players with the actual observed positions; Based on the perturbation information of the team's tactical curvature features after player removal, the first matching degree, the second matching degree, the contrast between the position distribution of the removed players and the actual observed positions, the reconstructed basic attributes, and the reconstructed overall attributes, the position of the missing player is predicted.
[0012] In some embodiments, the probabilistic fusion processing of the player classification results and the predicted missing player positions to generate the player's role classification and team identification results includes: The probability distribution of each category to which each detection box belongs is determined based on the player classification results and the predicted location of the missing player; By multiplying the player's classification result with the predicted probability of the missing player's position belonging to the same category and then weighting the product, a comprehensive score for the same category is obtained. The player's role classification and team identification results are determined based on the comprehensive score.
[0013] According to a second aspect of this disclosure, a role analysis apparatus is provided, comprising: The extraction unit is used to perform illumination adaptive processing on video frames and extract player detection regions from the processed video frames. The first calculation unit is used to extract target color features based on the player detection area after excluding background interference, and to calculate the classification result of the player corresponding to the target color features through feature similarity. The second computing unit is used to construct a player dynamic map, integrate spatial proximity and event interaction features, calculate the criticality index of players in the tactical structure, and reconstruct a two-way verification system between players and teams through attributes, and predict the position of missing players by combining a pre-trained position model. The determining unit is used to perform probability fusion processing on the player classification results and the predicted positions of the missing players to generate the player's role classification and team identification results.
[0014] In some embodiments, the first computing unit includes: The construction module is used to collect background color information within a preset range outside the player detection area and determine the color range of the background to construct a dynamic background model. The classification module is used to exclude pixels that match the dynamic background model from the player detection area, extract the features of green jersey players, and distinguish different jersey colors based on the features of green jersey players to obtain classification results for different players.
[0015] In some embodiments, the building module is further configured to: The RGB image is converted to the HSV color space for the player detection area and the outer pixel area of the preset range outside the player detection area, and the hue, saturation and brightness channels are separated. Collect the grass color of the environment outside the player detection area, collect all green hue pixels based on the extended pixel area, calculate the extreme values in the saturation and brightness dimensions, and construct the dynamic background model based on the extreme values.
[0016] In some embodiments, the classification module is further configured to: Select all colors with green hue in the HSV color space, and take the maximum and minimum values in the two dimensions of saturation and brightness to construct the color range of the green grass environment where the player is located; The pixels in the player detection area are compared with the dynamic background model, and the pixels that match the dynamic background model are excluded, while the pixels of the green-shirted player are retained. Determine the hue histogram of the pixels of the green-shirted players that are retained; The Bach coefficient is used to calculate the Bach distance between the hue histogram of the pixels of the green-shirted player and the baseline histogram, thus obtaining the classification results of the different players.
[0017] In some embodiments, the second computing unit includes: A module is established to collect the real-time position, speed, passing and confrontation events of each player, and to create the player dynamic graph; The analysis module is used to analyze the spatial and / or event connections between the player and other players through the player dynamic graph; The determination module is used to determine the local tactical characteristics of a player and the overall tactical characteristics of the team based on the spatial and / or event connections between the player and other players. The calculation module is used to reconstruct the player's basic attributes through the reconstruction model, calculate the first degree of matching between the reconstructed basic attributes and the actual observed attributes; and to reconstruct the team's overall attributes through the reconstruction model, calculate the second degree of matching between the reconstructed overall attributes and the actual observed attributes. The prediction module is used to predict the position of the missing player based on the reconstructed basic attributes, the reconstructed overall attributes, the first matching degree, and the second matching degree.
[0018] In some embodiments, the determining module is further configured to: Calculate the player's tactical curvature characteristics based on the spatial and / or event connections between the player and other players; Based on the spatial distance and relative position of the player with respect to the other players, and the tactical curvature characteristics, the local tactical characteristics of the player are determined; wherein, the local tactical characteristics are used to describe the spatial relationship and tactical status of the player with respect to the other players; Based on the total number of players, the time interval between two consecutive passes or defenses by a player, player attributes, and player connectivity, the overall tactical characteristics of the team are extracted globally; wherein, the overall tactical characteristics of the team are used to describe the overall tactical form of the team at the current moment.
[0019] In some embodiments, the computing module is further configured to: Reconstruct the basic attributes of each player based on the aforementioned local tactical characteristics; Based on the team's overall tactical characteristics, the team's overall attributes are reconstructed, and based on the reconstructed basic attributes and the reconstructed team overall attributes, a reconstructed player dynamic diagram is obtained. In some embodiments, the prediction module is further configured to: Based on the player dynamic graph, remove each player in sequence and calculate the perturbation information of the team in the tactical curvature feature after removing the players; Based on the current visible player status, generate the position distribution of the removed players, and compare the position distribution of the removed players with the actual observed positions; Based on the perturbation information of the team's tactical curvature features after player removal, the first matching degree, the second matching degree, the contrast between the position distribution of the removed players and the actual observed positions, the reconstructed basic attributes, and the reconstructed overall attributes, the position of the missing player is predicted.
[0020] In some embodiments, the determining unit is further configured to: The probability distribution of each category to which each detection box belongs is determined based on the player classification results and the predicted location of the missing player; By multiplying the player's classification result with the predicted probability of the missing player's position belonging to the same category and then weighting the product, a comprehensive score for the same category is obtained. The player's role classification and team identification results are determined based on the comprehensive score.
[0021] According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect above.
[0022] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in the first aspect above.
[0023] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first aspect above.
[0024] The method and apparatus for analyzing roles disclosed herein perform illumination adaptive processing on video frames and extract player detection regions from the processed video frames; extract target color features based on the player detection regions after eliminating background interference, and calculate the player classification result corresponding to the target color features through feature similarity; construct a player dynamic graph, integrate spatial proximity and event interaction features, calculate the criticality index of players in the tactical structure, and reconstruct a two-way verification system between players and teams through attribute reconstruction, and predict the position of missing players by combining a pre-trained position model; perform probabilistic fusion processing on the player classification results and the predicted position of the missing players to generate the player role classification and team identification results. This embodiment is implemented based on deep learning methods, namely, constructing a player dynamic map, integrating spatial proximity and event interaction features, calculating the criticality index of players in the tactical structure, and reconstructing a two-way verification system between players and teams through attribute reconstruction. It also predicts the location of missing players using a pre-trained position model. Another approach is achieved through rule processing using HSV, specifically calculating the player classification result corresponding to the target color feature based on feature similarity. Finally, the player classification result and the predicted location of the missing player are probabilistically fused, and the fusion result is used as the final output (player role classification and team identification result). This ensures high-precision player team and role classification performance in complex scenarios and possesses excellent real-time processing capabilities, providing solid support for subsequent downstream tasks such as player tracking and tactical analysis.
[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0026] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 A flowchart illustrating a role analysis method provided in an embodiment of this disclosure; Figure 2A flowchart illustrating a role analysis method provided in an embodiment of this disclosure; Figure 3 A flowchart illustrating a role analysis method provided in an embodiment of this disclosure; Figure 4 A flowchart illustrating a role analysis method provided in an embodiment of this disclosure; Figure 5 A schematic diagram of a small-scale competition scenario provided in an embodiment of this disclosure; Figure 6 A flowchart illustrating a role analysis method provided in an embodiment of this disclosure; Figure 7 A schematic diagram of the structure of a role analysis device provided in an embodiment of this disclosure; Figure 8 A schematic diagram of the structure of a role analysis device provided in an embodiment of this disclosure; Figure 9 A schematic block diagram of an example electronic device provided for embodiments of this disclosure. Detailed Implementation
[0027] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0028] The following description, with reference to the accompanying drawings, describes the analysis methods, apparatus, electronic devices, and storage media for embodiments of the present disclosure.
[0029] Figure 1 This is a flowchart illustrating a role analysis method provided in an embodiment of the present disclosure.
[0030] like Figure 1 As shown, the method includes the following steps: Step 101: Perform illumination adaptive processing on the video frames and extract the player detection region from the processed video frames.
[0031] The video frame images (such as match video frames (football match videos, basketball match videos, etc.)) undergo intelligent detection of bright and dark areas. The detected dark areas are brightened, and a softening algorithm ensures consistent visual effects between bright and dark areas under different lighting conditions. Player frames are cropped based on the lighting adaptive processing results. In some embodiments, this can be achieved using, but is not limited to, Mask R-CNN. Specifically, the method for extracting the player detection area in this embodiment is not limited.
[0032] This step involves applying adaptive lighting processing to the football match video frames to improve the visual consistency of the images under different lighting conditions, thereby providing a more stable and reliable image input for subsequent player detection and role classification. This step achieves adaptive enhancement of unevenly lit areas in the image through intelligent detection and softening algorithms for both bright and dark areas.
[0033] Step 102: After removing background interference based on the player detection area, extract the target color features, and calculate the classification result of the player corresponding to the target color features through feature similarity.
[0034] This embodiment of the disclosure implements player role analysis through two technical approaches. One approach, described in step 102, does not rely on machine learning methods but instead comprehensively utilizes HSV color space processing, out-of-frame sampling, color histogram extraction, and Bach coefficient calculation for role classification and player team assignment. The other approach, described in step 103, is based on deep learning methods. It constructs player dynamic graphs, analyzes the spatial and event connections between players and other players, calculates tactical curvature features, and then evaluates the tactical role of players in the game. Then, it analyzes the relationship between players and surrounding players through local tactical embedding and the overall tactical form of the team, and uses an attribute reconstructor to reconstruct player and team attributes. The reconstructed attributes are compared with the actual observed attributes to assess the impact of missing players on team tactics, and a generative model is used to predict the location of missing players.
[0035] In some embodiments, the dynamic grass modeling and role classification module based on the HSV color space aims to achieve efficient classification of players and non-players through image processing and statistical feature analysis. This module extracts target color features from the player detection area after excluding background interference, and calculates the classification result of the player corresponding to the target color features based on feature similarity. This effectively addresses issues such as changes in lighting, interference from green jerseys, and the effects of shadows and highlights, thereby improving the robustness and accuracy of role recognition.
[0036] Step 103: Construct a player dynamic graph, integrate spatial proximity and event interaction features, calculate the criticality index of players in the tactical structure, and reconstruct a two-way verification system between players and teams through attribute reconstruction, and predict the position of missing players by combining a pre-trained position model.
[0037] By constructing a player dynamic graph, the spatial (spatial proximity) and event connections between players are analyzed to calculate the player's criticality index in the tactical structure, i.e., tactical curvature features, thereby assessing the player's tactical role in the game. Then, the relationships between players and their surroundings are analyzed through local tactical embeddings and the overall team tactical form, and player and team attributes are reconstructed using micro-attribute and macro-attribute reconstructors. Next, the reconstructed attributes are compared with the actual observed attributes to assess the impact of missing players on team tactics, and generative models are used to predict the location of missing players. Finally, by combining all information and performing feature fusion through a neural network model, the player to be identified is determined.
[0038] Specifically, the core of this step lies in constructing a dynamic player graph model, integrating spatial proximity relationships and event interaction features, calculating tactical curvature indices, and establishing a player-team bidirectional verification system through micro-attribute reconstructors and macro-attribute reconstructors. This is combined with a generative position model to predict the positions of missing players, thereby improving classification robustness in occluded scenarios. This step in this invention serves the dual function of tactical modeling and player identification, and is a crucial link in achieving high-precision role classification and player team assignment.
[0039] Step 104: Perform probability fusion processing on the player classification results and the predicted positions of the missing players to generate the player role classification and team identification results.
[0040] Voting aggregation based on probability product: Each route provides a probability distribution for each category of each detection box. , ={Home team players, Away team players, Home team goalkeeper, Away team goalkeeper, Referee}, this method obtains a comprehensive score for a category by multiplying and weighting the probabilities of each route for the same category. The product strategy can more significantly suppress low-confidence outputs of any route for that category. The role analysis method disclosed herein performs illumination adaptive processing on video frames and extracts player detection regions from the processed video frames; after removing background interference based on the player detection regions, it extracts target color features and calculates the player classification result corresponding to the target color features through feature similarity; it constructs a player dynamic graph, integrates spatial proximity and event interaction features, calculates the criticality index of players in the tactical structure, and reconstructs a two-way verification system between players and teams through attribute reconstruction, combined with a pre-trained position model to predict the position of missing players; it performs probabilistic fusion processing on the player classification results and the predicted position of the missing players to generate the player role classification and team identification results. This embodiment is implemented based on deep learning methods, namely, constructing a player dynamic map, integrating spatial proximity and event interaction features, calculating the criticality index of players in the tactical structure, and reconstructing a two-way verification system between players and teams through attribute reconstruction. It also predicts the location of missing players using a pre-trained position model. Another approach is achieved through rule processing using HSV, specifically calculating the player classification result corresponding to the target color feature based on feature similarity. Finally, the player classification result and the predicted location of the missing player are probabilistically fused, and the fusion result is used as the final output (player role classification and team identification result). This ensures high-precision player team and role classification performance in complex scenarios and possesses excellent real-time processing capabilities, providing solid support for subsequent downstream tasks such as player tracking and tactical analysis.
[0041] In some embodiments, when extracting target color features based on the player detection region after excluding background interference in step 102, and calculating the player classification result corresponding to the target color features through feature similarity, the following methods may be used, but are not limited to: Step 201: Collect background color information within a preset range outside the player detection area to determine the background color range and construct a dynamic background model.
[0042] The step of collecting background color information within a preset range outside the player detection area to determine the background color range and construct a dynamic background model can be implemented in, but is not limited to, the following ways: Step 2011: Convert the RGB image of the player detection area and the outer pixel area of the preset range outside the player detection area to the HSV color space, and separate the hue, saturation and brightness channels.
[0043] The detection box (bbox) and the pixel area of the preset range (e.g., the preset range includes but is not limited to 10-20) output by the player tracking module are received. The RGB image is converted to the HSV color space using OpenCV's cvtColor function, and the three channels of hue (H), saturation (S), and lightness (V) are separated to establish a feature extraction basis that conforms to human color perception.
[0044] Step 2012: Collect the grass color of the environment outside the player detection area, collect all green hue pixels based on the extended pixel area, calculate the extreme values in the saturation and brightness dimensions, and construct the dynamic background model based on the extreme values.
[0045] Collect the grass color of the environment outside the player detection area (bbox). Based on the extended pixel area, collect all green hues (e.g., H∈[35°,85°]), calculate the extreme values in the saturation (S) and brightness (V) dimensions, and construct a dynamic grass color range model based on the extreme values to eliminate color differences caused by lighting changes and field zoning.
[0046] Step 202: Pixels matching the dynamic background model are excluded from the player detection area, features of green jersey players are extracted, and different jersey colors are distinguished based on the features of green jersey players to obtain classification results for different players.
[0047] The step of excluding pixels matching the dynamic background model from the player detection area, extracting features of players in green jerseys, and distinguishing different jersey colors based on the features of players in green jerseys to obtain classification results for different players can be implemented in, but is not limited to, the following ways: Step 2021: Select all colors with green hue in the HSV color space, and take the maximum and minimum values in the two dimensions of saturation and brightness to construct the color range of the green grass environment where the player is located.
[0048] Step 2022: Compare the pixels in the player detection area with the color range of the green grass environment where the player is located, exclude pixels that match the dynamic background model, and retain the pixels of the green jersey player.
[0049] All green hues within the HSV color space are sampled, and their maximum and minimum values in saturation and brightness are taken to construct the color gamut of the green grass environment in which the player is located. After obtaining the grass color gamut, the pixels within the original bounding boxes are compared with the grass color gamut model (dynamic background model), excluding matching pixels and retaining the player's jersey area. For cases where players overlap, a global bounding box overlap detection is performed to exclude portions where the sampled area overlaps with other player bounding boxes, ensuring that the features of players in green jerseys are preserved.
[0050] Step 2023: Determine the hue histogram of the pixels of the retained green jersey player.
[0051] The `cv2.calcHist()` function is used to calculate the histogram of the remaining portion (the pixels of the players in the green jerseys) within the bounding box after excluding the grass. Since only hue is needed to distinguish different jersey colors, brightness and saturation data would introduce excessive interference for subsequent Bach coefficient similarity calculations. In some embodiments, only the hue (H) histogram is calculated for subsequent modules to eliminate interference from saturation and brightness variations, thus preserving the core color characteristics of the team uniforms (jerseys).
[0052] Step 2024: Calculate the Bart distance between the hue histogram of the pixels of the green jersey player and the baseline histogram based on the Bart coefficient to obtain the classification results of the different players.
[0053] Implement role classification based on Bach coefficient: calculate the Bach distance between the current player's histogram and the preset role baseline histogram, use the normalized similarity measurement formula, manually select the optimal baseline histogram, and complete the two-class identification of home and away team players.
[0054] The Bach coefficient measures similarity by calculating the area of overlap between two distributions, while Bach distance converts this into a logarithmic distance metric, facilitating optimization and comparison. Compared to the point-to-point comparison of Euclidean distance, Bach distance is specifically designed for comparing probability distributions. Applied to the histogram features of jersey colors, it effectively captures the statistical characteristics of color distribution. Furthermore, actual lighting conditions on the field (shade, sunlight, artificial lighting) can lead to significant differences in color values for players on the same team under different lighting conditions. Bach distance considers the overall distribution pattern rather than absolute values, making it less sensitive to color shifts caused by lighting. Euclidean distance, on the other hand, is easily affected by changes in absolute color values, and when players are partially occluded, resulting in incomplete features, probability distribution-based comparisons are more robust to missing data. For two discrete probability distributions (P is the current player's color histogram distribution, and Q is the preset baseline color histogram distribution),...
[0055] The Barthel coefficient is defined as:
[0056] in and These are the probability values of the two histograms in the i-th bin, respectively, where n is the number of bins in the histogram.
[0057] The Bhattacharyya coefficient is often used in conjunction with the Bhattacharyya distance, and the two can be converted to each other.
[0058] The Bach distance has a range of [0, +∞), and a smaller value indicates a more similar distribution. This method uses an alternative normalization definition:
[0059] The value range is [0,1], which is more in line with the intuitive understanding of common distance metrics: similarity for the same character is >= 0.7, and similarity for different characters is < 0.7. The Bach distance is calculated on the color histogram of the hue (H) channel, and pairwise similarity is calculated for all players on the field.
[0060] The above is the classification method for a single photo. However, since it needs to be extended to videos, this solution selects a histogram for each of the two roles as a benchmark. Then, the color histograms of all players in the video are compared with these two benchmarks to calculate the Bach distance. The side with the greater similarity is the role to which the player belongs.
[0061] Step 103 involves constructing a player dynamic graph, integrating spatial proximity and event interaction features, calculating the player's criticality index within the tactical structure, and reconstructing a two-way verification system between players and the team through attribute reconstruction. This, combined with a pre-trained position model, predicts the location of missing players, such as... Figure 3 As shown, it includes: Step 301: Collect the real-time position, speed, passing and confrontation events of each player to create the player dynamic graph.
[0062] Collect real-time position, speed, passing and contact events of each player during the match to create a player dynamic map. .
[0063] Abstract the players on the field as a set of nodes. The edge E of the player's dynamic graph includes the spatially adjacent edges. Interact with events . These are the node attributes of the player's animated GIF. This is time information.
[0064] The nodes of the player animation graph are each player on the field; the edges of the player animation graph include spatial proximity edges (determined based on the reciprocal of the distance between different players) and event interaction edges (determined based on events such as passing and pressing); the node attributes of the player animation graph include player position, player speed, player orientation, etc.; time information: match time.
[0065] Step 302: Analyze the spatial and / or event connections between the player and other players using the player dynamic graph.
[0066] Step 303: Determine the player's local tactical characteristics and the team's overall tactical characteristics based on the spatial and / or event connections between the player and other players.
[0067] Based on the spatial and / or event connections between the players and other players, determine the players' local tactical characteristics and the team's overall tactical characteristics, such as... Figure 4 As shown, it includes: Step 3031: Calculate the tactical curvature characteristics of the player based on the spatial and / or event connectivity between the player and other players.
[0068] According to player motion charts Determine how many people the player is connected to in space or events at the same time, the number of local tactical combinations such as triangular passing and multi-player defensive coordination that the player participates in, and the number of parallel tactical sides that exist in the player's cooperation; then, calculate the player's tactical curvature characteristics based on this information.
[0069]
[0070] The curvature characteristic of player v is indicated by the value of v. The higher the value, the more crucial the player's role in the field structure, and the greater the disruption to the formation if the player is absent. How many people or events does a player have spatial or event connections with at the same time? For example, if a midfielder is being pressed by two opponents at the same time and he has a teammate supporting him, then he has 3 direct connections at that moment.
[0071] This represents the number of local tactical combinations in which the player participates, such as triangular passing and multi-player defensive coordination. For example, if a winger forms a triangular passing group with a full-back and a midfielder, and at the same time forms a defensive coordination group with another midfielder and a forward, then the winger's combination count is 2. This indicates the number of parallel tactical sides the player participates in. For example, a midfielder can simultaneously choose to distribute the ball to either the left or right flank, creating two parallel attacking lines. In this case, the player has one tactical side on the left wing and one on the right wing, meaning the number of parallel sides is 2. It is a preset normalization factor.
[0072] The following diagram illustrates how to calculate a player's curvature characteristics in practical applications.
[0073] As shown in the diagram below, taking a simplified 7-player match scenario as an example, there is a midfielder A in the center of the field. Midfielder A has two opponents in front of him (pressing), one teammate on each side (wingers), and one teammate behind him (defensive midfielder). The blue lines in the diagram represent direct connections, that is, the spatial / event connections between midfielder A and his teammates and opponents. The green dotted lines represent triangular combinations, that is, A, left winger, and defensive midfielder; or A, right winger, and defensive midfielder, forming two triangular tactical groups. The red lines represent parallel sides, that is, A simultaneously maintains two passing lanes (left winger and right winger), i.e., parallel tactical sides.
[0074] according to Figure 5 It can be seen that player A has spatial or event connections with 3 people simultaneously. =Number of blue borders=3; Number of local tactical combinations such as triangle passing and multi-player defensive coordination involving player A. =Number of green triangles=2; Number of parallel tactical sides in player A's cooperation = Number of red parallel tactical lines =2. Therefore, it can be determined that... =3+2-2 / Z.
[0075] Step 3032: Determine the local tactical characteristics of the player based on the spatial distance and relative position between the player and the other players, and the tactical curvature characteristics; wherein, the local tactical characteristics are used to describe the spatial relationship and tactical status of the player and the other players.
[0076] Based on the spatial distance, relative position, and tactical curvature characteristics of the player to be identified and surrounding players, the local tactical embedding of the player is determined using the following formula:
[0077] This represents the local tactical embedding of the player to be identified. This vector describes the spatial relationship and tactical position of the player with respect to surrounding teammates / opponents. The number of neighbors indicates the number of other players around the player to be identified, including teammates and opponents. It is a non-linear activation function. It involves vector concatenation. Neighbor curvature refers to the tactical curvature features of other players surrounding the player to be identified. Neighbor position refers to the real-time position of other players surrounding the player to be identified on the field. Relative distance refers to the relative distance between the player to be identified and other players surrounding the player to be identified.
[0078] Step 3033: Extract the team's overall tactical characteristics globally based on the total number of players, the time interval between two consecutive passes or defenses by a player, player attributes, and player connectivity; wherein, the team's overall tactical characteristics are used to describe the team's overall tactical form at the current moment.
[0079] Based on the total number of players, the time interval between two consecutive passes or defenses by a player, player attributes, and player connectivity, the overall team embedding is extracted globally and calculated using the following formula:
[0080] The team-wide embedding describes the team's overall tactical posture at the current moment. N represents the total number of players. The average passing cycle refers to the time interval between two consecutive passes or defensive actions by a player. Player attributes are vectors corresponding to information such as player position, player speed, and player orientation. Player connectivity is the number of relationships or connections established between each player and other players, which can be based on spatial proximity (such as distance) or event interactions (such as passing, receiving, etc.). For example, if player A has passing connections with players B, C, and D, then player A's player connectivity is 3. Total connectivity is the sum of all possible connections between all players (whether player-to-player passes or spatial distances between them), resulting in the total number of connections formed by all players on the field. It can be understood as the number of connections between all nodes on the entire field.
[0081] Step 304: Reconstruct the player's basic attributes using the reconstruction model, and calculate the first degree of matching between the reconstructed basic attributes and the actual observed attributes; reconstruct the team's overall attributes using the reconstruction model, and calculate the second degree of matching between the reconstructed overall attributes and the actual observed attributes.
[0082] The basic attributes of players are reconstructed by the reconstruction model, and the first degree of matching between the reconstructed basic attributes and the actual observed attributes is calculated. The overall attributes of the team are reconstructed by the reconstruction model, and the second degree of matching between the reconstructed overall attributes and the actual observed attributes is calculated. This includes, but is not limited to, the following methods: reconstructing the basic attributes of each player based on the local tactical characteristics; reconstructing the overall attributes of the team based on the overall tactical characteristics of the team; and obtaining the reconstructed player dynamic graph based on the reconstructed basic attributes and the reconstructed overall attributes of the team.
[0083] Based on the player's local tactical embedding, the basic attributes of each player, such as position and speed, are reconstructed through a micro-attribute reconstructor to ensure that key personal information is not lost during feature extraction.
[0084]
[0085] This represents the reconstructed base attributes of player m output by the micro-attribute reconstructor; This represents the reconstruction function of the micro-attribute reconstructor. The micro-attribute reconstructor consists of two smooth graph convolutional layers. Given the local tactical embeddings of a player... The micro-attribute refactorer refactors each player's basic attributes:
[0086]
[0087] Here, Smoothing represents the smoothing result. 'a' represents the stride of the smoothing convolutional layer. This represents the output of the first smoothing convolutional layer; These represent the trainable parameters of the two smooth graph convolutional layers, respectively.
[0088] Based on the overall team embedding, the overall team attributes (average positioning height, passing speed distribution) are reconstructed through the macro attribute reconstructor.
[0089]
[0090] This indicates the overall attributes of the reconstructed team; This is the reconstruction function of the macro attribute reconstructor. The macro attribute reconstructor, composed of `smoothing` and `conv`, is used to reconstruct the team's overall attributes under macro adjacency constraints, including average positioning height, passing speed distribution, etc.
[0091]
[0092] It's a player GIF; Smooth the stride of the convolutional layer; Trainable parameters for a two-layer smooth map convolution: The overall attributes of the team after macroscopic reconstruction.
[0093] Based on the overall team embedding, the overall team attributes (average positioning height, passing speed distribution) are reconstructed through the macro attribute reconstructor.
[0094]
[0095] This indicates the overall attributes of the reconstructed team; This is the reconstruction function of the macro attribute reconstructor. The macro attribute reconstructor, composed of `smoothing` and `conv`, is used to reconstruct the team's overall attributes under macro adjacency constraints, including average positioning height, passing speed distribution, etc.
[0096]
[0097] It's a player GIF; Smooth the stride of the convolutional layer; Trainable parameters for a two-layer smooth map convolution: The overall attributes of the team after macroscopic reconstruction.
[0098] By assessing the matching degree between player attributes and overall team attributes obtained through micro / macro attribute reconstruction and the actual observed attributes, we can determine the consistency between the reconstructed player animation and the actual player animation. The similarity between them.
[0099]
[0100] R1 represents the degree of matching between the reconstructed overall team attributes and the actual observed attributes. V represents the set of players. It is the adjacency matrix of the overall attributes of the reconstructed team. It is the adjacency matrix of the overall attributes of the team as actually observed.
[0101]
[0102] R2 is the degree of matching between the player's basic attributes and the actual observed attributes. It is an adjacency matrix that reconstructs the player's basic attributes. It is the adjacency matrix of the player attributes actually observed.
[0103] Step 305: Based on the reconstructed basic attributes, the reconstructed overall attributes, the first matching degree, and the second matching degree, predict the position of the missing player.
[0104] When performing the prediction of the missing player's position based on the reconstructed basic attributes, the reconstructed overall attributes, the first matching degree, and the second matching degree, the following methods may be used, but are not limited to: Figure 6 As shown, it includes: Step 3051: Remove each player sequentially according to the player dynamic graph, and calculate the perturbation information of the team in the tactical curvature feature after removing the players.
[0105] According to player motion charts Remove each player in turn and calculate the perturbation of the team's tactical curvature characteristics after that player is missing:
[0106] It refers to the disturbance in the team's tactical curvature characteristics after a player's absence, mainly reflected in the impact on player dynamics when a player is missing. The effects include changes in passing chains and spatial proximity relationships. A complete player animation at time t. Features; This indicates the player animation after removing the players. Its characteristics.
[0107] Step 3052: Based on the current state of the visible players, generate the position distribution of the removed players and compare the position distribution of the removed players with the actual observed positions.
[0108] Based on the current status of the visible players, generate the positional distribution of the missing players and compare it with the actual observed positions.
[0109] The generative location model is as follows:
[0110] This indicates the position of the missing player, where m is the number of players that are obscured. It refers to the current status of the visible players (such as their position, speed, relative distance, etc.).
[0111]
[0112] This represents the contrast between the generated distribution of missing player positions and the actual observed positions. This indicates the position of the missing player predicted based on the generative position model described above. This is the currently observed player position.
[0113] Step 3053: Based on the perturbation information of the team's tactical curvature features after player removal, the first matching degree, the second matching degree, the contrast between the position distribution of the removed players and the actual observed positions, the reconstructed basic attributes, and the reconstructed overall attributes, predict the position of the missing player.
[0114] Based on information such as the player's reconstructed basic attributes, the reconstructed overall team attributes, the perturbation of the team's tactical curvature characteristics after the player's absence, the matching degree between player attributes, overall team attributes and actual observed attributes, and the contrast between the generated positional distribution of missing players and the actual observed positions, the player to be identified is identified.
[0115] First, the reconstructed basic attributes of players, the reconstructed overall attributes of the team, the perturbation of the team's tactical curvature features after the absence of players, the matching degree between player attributes, overall team attributes and actual observed attributes, and the contrast between the generated positional distribution of missing players and the actual observed positions are fused using a neural network model. The specific process is as follows: (1) Each of the above input features is transformed into a high-dimensional vector space through the embedding layer, and the final linear transformation of the input features is expressed as:
[0116] It is the weight matrix of the embedding layer. It is a bias term.
[0117] (2) All input features are weighted and fused through an attention mechanism to obtain a fused feature representation:
[0118] It is the feature representation after fusion. It is the attention weight for each input feature.
[0119] (3) Based on the fused feature representation, the model calculates the final identity score for each player through the fully connected layer of the identification model. The output of the model is the identity score for each candidate player, expressed by the formula:
[0120] This represents the identity score of each candidate player.
[0121] Finally, by combining information from all input features, the model outputs a comprehensive score for each candidate player.
[0122]
[0123] This indicates the similarity between the perturbation of a team's tactical curvature characteristics after a player's absence and the perturbation of the team's tactical curvature characteristics when the player is not absent. It is the degree of matching between the reconstructed player attributes, team overall attributes and the actual observed attributes, that is, the weighted sum of R1 and R2. The short-term tactical consistency score is calculated as follows:
[0124] Y represents a player's short-term tactical results, such as offensive success rate and defensive solidity. This represents the expected tactical objective after the missing player C is restored. This indicates the current player's dynamic graph. The actual results of tactical objectives.
[0125] In some embodiments, the step of performing probability fusion processing on the player classification results and the predicted missing player positions to generate the player's role classification and team identification results includes: determining the probability distribution of each category to which each detection box belongs based on the player classification results and the predicted missing player positions; obtaining a comprehensive score for the same category by multiplying the player classification results and the predicted missing player positions for the same category and weighting the results; and determining the player's role classification and team identification results based on the comprehensive score.
[0126] If the probability distribution of a certain route's output is not guaranteed to be normalized, then normalization is performed first:
[0127] After normalization:
[0128] Calculate the weighted product score: for each detection box i and each candidate category ,according to
[0129] Calculate the product score. (If already guaranteed...) If it is unified, then it can be directly... Replace with If the accuracy of route one has been evaluated on the validation set... The accuracy rate of Route 2 is , can make
[0130] If obtaining accuracy is inconvenient, it can be provided based on business needs; for example, if there is greater trust in the output of the deep learning approach, the accuracy can be increased. .
[0131] Final category determination: For detection box i, select the category with the highest score as the prediction result:
[0132] If the product scores of the two routes are equal, the output category corresponding to the deep learning method route is selected; or a confidence threshold can be set in advance, and if the output probability of a certain category in any technical route is greater than the threshold, then it is selected directly.
[0133] Corresponding to the aforementioned method for analyzing roles, this invention also proposes a device for analyzing roles. Since the device embodiments of this invention correspond to the method embodiments described above, details not disclosed in the device embodiments can be referred to in the method embodiments, and will not be repeated here.
[0134] Figure 7 This is a schematic diagram of the structure of a role analysis device provided in an embodiment of the present disclosure, such as... Figure 7 As shown, it includes: Extraction unit 41 is used to perform illumination adaptive processing on video frames and extract player detection regions from the processed video frames; The first calculation unit 42 is used to extract target color features based on the player detection area after excluding background interference, and to calculate the classification result of the player corresponding to the target color features through feature similarity. The second calculation unit 43 is used to construct a player dynamic map, integrate spatial proximity relationship and event interaction features, calculate the keyness index of the player in the tactical structure, and reconstruct the two-way verification system between the player and the team through attributes, and predict the position of missing players by combining the pre-trained position model. The determining unit 44 is used to perform probability fusion processing on the player classification results and the predicted positions of the missing players to generate the player's role classification and team identification results.
[0135] The role analysis device disclosed herein performs illumination adaptive processing on video frames and extracts player detection regions from the processed video frames; extracts target color features based on the player detection regions after eliminating background interference, and calculates the player classification result corresponding to the target color features through feature similarity; constructs a player dynamic graph, integrates spatial proximity and event interaction features, calculates the criticality index of players in the tactical structure, and reconstructs a two-way verification system between players and teams through attribute reconstruction, and predicts the position of missing players by combining a pre-trained position model; performs probabilistic fusion processing on the player classification results and the predicted position of the missing players to generate the player role classification and team identification results. This embodiment is implemented based on deep learning methods, namely, constructing a player dynamic map, integrating spatial proximity and event interaction features, calculating the criticality index of players in the tactical structure, and reconstructing a two-way verification system between players and teams through attribute reconstruction. It also predicts the location of missing players using a pre-trained position model. Another approach is achieved through rule processing using HSV, specifically calculating the player classification result corresponding to the target color feature based on feature similarity. Finally, the player classification result and the predicted location of the missing player are probabilistically fused, and the fusion result is used as the final output (player role classification and team identification result). This ensures high-precision player team and role classification performance in complex scenarios and possesses excellent real-time processing capabilities, providing solid support for subsequent downstream tasks such as player tracking and tactical analysis.
[0136] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the first computing unit 42 includes: Module 421 is used to collect background color information within a preset range outside the player detection area and determine the color range of the background to construct a dynamic background model. The classification module 422 is used to exclude pixels that match the dynamic background model from the player detection area, extract the features of green jersey players, and distinguish different jersey colors based on the features of green jersey players to obtain classification results for different players.
[0137] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the building module 421 is further configured to: The RGB image is converted to the HSV color space for the player detection area and the outer pixel area of the preset range outside the player detection area, and the hue, saturation and brightness channels are separated. Collect the grass color of the environment outside the player detection area, collect all green hue pixels based on the extended pixel area, calculate the extreme values in the saturation and brightness dimensions, and construct the dynamic background model based on the extreme values.
[0138] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the classification module 422 is further used for: Select all colors with green hue in the HSV color space, and take the maximum and minimum values in the two dimensions of saturation and brightness to construct the color range of the green grass environment where the player is located; The pixels in the player detection area are compared with the dynamic background model, and the pixels that match the dynamic background model are excluded, while the pixels of the green-shirted player are retained. Determine the hue histogram of the pixels of the green-shirted players that are retained; The Bach coefficient is used to calculate the Bach distance between the hue histogram of the pixels of the green-shirted player and the baseline histogram, thus obtaining the classification results of the different players.
[0139] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the second computing unit 43 includes: Module 431 is established to collect the real-time position, speed, passing and confrontation events of each player and establish the player dynamic graph; Analysis module 432 is used to analyze the spatial and / or event connection relationships between the player and other players through the player dynamic graph; The determination module 433 is used to determine the local tactical characteristics of the players and the overall tactical characteristics of the team based on the spatial and / or event connection relationships between the players and other players. The calculation module 434 is used to reconstruct the player's basic attributes through the reconstruction model, calculate the first degree of matching between the reconstructed basic attributes and the actual observed attributes; and to reconstruct the team's overall attributes through the reconstruction model, calculate the second degree of matching between the reconstructed overall attributes and the actual observed attributes. The prediction module 435 is used to predict the position of the missing player based on the reconstructed basic attributes, the reconstructed overall attributes, the first matching degree, and the second matching degree.
[0140] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the determining module 433 is further configured to: Calculate the player's tactical curvature characteristics based on the spatial and / or event connections between the player and other players; Based on the spatial distance and relative position of the player with respect to the other players, and the tactical curvature characteristics, the local tactical characteristics of the player are determined; wherein, the local tactical characteristics are used to describe the spatial relationship and tactical status of the player with respect to the other players; Based on the total number of players, the time interval between two consecutive passes or defenses by a player, player attributes, and player connectivity, the overall tactical characteristics of the team are extracted globally; wherein, the overall tactical characteristics of the team are used to describe the overall tactical form of the team at the current moment.
[0141] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the calculation module 434 is further used for: Reconstruct the basic attributes of each player based on the aforementioned local tactical characteristics; Based on the team's overall tactical characteristics, the team's overall attributes are reconstructed, and based on the reconstructed basic attributes and the reconstructed team overall attributes, a reconstructed player dynamic diagram is obtained. Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the prediction module 435 is further used for: Based on the player dynamic graph, remove each player in sequence and calculate the perturbation information of the team in the tactical curvature feature after removing the players; Based on the current visible player status, generate the position distribution of the removed players, and compare the position distribution of the removed players with the actual observed positions; Based on the perturbation information of the team's tactical curvature features after player removal, the first matching degree, the second matching degree, the contrast between the position distribution of the removed players and the actual observed positions, the reconstructed basic attributes, and the reconstructed overall attributes, the position of the missing player is predicted.
[0142] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 8 As shown, the determining unit 44 is further configured to: The probability distribution of each category to which each detection box belongs is determined based on the player classification results and the predicted location of the missing player; By multiplying the player's classification result with the predicted probability of the missing player's position belonging to the same category and then weighting the product, a comprehensive score for the same category is obtained. The player's role classification and team identification results are determined based on the comprehensive score.
[0143] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.
[0144] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0145] Figure 9 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0146] like Figure 9 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 602 or loaded from storage unit 608 into RAM (Random Access Memory) 603. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An I / O (Input / Output) interface 605 is also connected to the bus 604.
[0147] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0148] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the role analysis method. For example, in some embodiments, the role analysis method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the analysis methods of the aforementioned role by any other suitable means (e.g., by means of firmware).
[0149] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0150] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0151] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0152] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0153] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.
[0154] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0155] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0156] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0157] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. An analysis method of a role, characterized by, include: Perform illumination-adaptive processing on video frames and extract player detection regions from the processed video frames; After removing background interference based on the player detection area, the target color features are extracted, and the classification result of the player corresponding to the target color features is calculated by feature similarity. Construct a dynamic player graph, integrate spatial proximity and event interaction features, calculate the criticality index of players in the tactical structure, and reconstruct a two-way verification system between players and teams through attributes. Combine this with a pre-trained position model to predict the position of missing players. The player classification results and the predicted missing player positions are probabilistically fused to generate the player's role classification and team identification results.
2. The method of claim 1, wherein, The step of extracting target color features based on the player detection region after excluding background interference, and calculating the player classification result corresponding to the target color features through feature similarity, includes: Background color information is collected within a preset range outside the player detection area to determine the color range of the background in order to construct a dynamic background model; Pixels matching the dynamic background model are excluded from the player detection area, features of players in green jerseys are extracted, and different jersey colors are distinguished based on the features of players in green jerseys to obtain classification results for different players.
3. The method of claim 2, wherein, The step of collecting background color information within a preset range outside the player detection area and determining the background color range to construct a dynamic background model includes: The RGB image is converted to the HSV color space for the player detection area and the outer pixel area of the preset range outside the player detection area, and the hue, saturation and brightness channels are separated. Collect the grass color of the environment outside the player detection area, collect all green hue pixels based on the extended pixel area, calculate the extreme values in the saturation and brightness dimensions, and construct the dynamic background model based on the extreme values.
4. The method of claim 3, wherein, The process of excluding pixels matching the dynamic background model from the player detection area, extracting features of players in green jerseys, and distinguishing different jersey colors based on the features of players in green jerseys to obtain classification results for different players includes: Select all colors with green hue in the HSV color space, and take the maximum and minimum values in the two dimensions of saturation and brightness to construct the color range of the green grass environment where the player is located; The pixels within the player detection area are compared with the color range of the green grass environment where the player is located. Pixels that match the dynamic background model are excluded, and the pixels of the player in the green jersey are retained. Determine the hue histogram of the pixels of the green-shirted players that are retained; The Bach coefficient is used to calculate the Bach distance between the hue histogram of the pixels of the green-shirted player and the baseline histogram, thus obtaining the classification results of the different players.
5. The method of claim 1, wherein, The construction of the player dynamic map integrates spatial proximity and event interaction features, calculates the criticality index of players in the tactical structure, and reconstructs a two-way verification system between players and the team through attribute reconstruction. Combined with a pre-trained position model, it predicts the positions of missing players, including: Collect the real-time position, speed, passing and confrontation events of each player, and create a dynamic graph of the players; The player dynamics graph is used to analyze the spatial and / or event connections between the player and other players. Based on the spatial and / or event connections between the players and other players, determine the players' local tactical characteristics and the team's overall tactical characteristics; The basic attributes of players are reconstructed using a reconstruction model, and the first degree of matching between the reconstructed basic attributes and the actual observed attributes is calculated. The overall attributes of the team are reconstructed using a reconstruction model, and the second degree of matching between the reconstructed overall attributes and the actual observed attributes is calculated. Based on the reconstructed basic attributes, the reconstructed overall attributes, the first matching degree, and the second matching degree, the position of the missing player is predicted.
6. The method of claim 5, wherein, The determination of a player's local tactical characteristics and the team's overall tactical characteristics based on the spatial and / or event connections between the player and other players includes: Calculate the player's tactical curvature characteristics based on the spatial and / or event connections between the player and other players; Based on the spatial distance and relative position of the player with respect to the other players, and the tactical curvature characteristics, the local tactical characteristics of the player are determined; wherein, the local tactical characteristics are used to describe the spatial relationship and tactical status of the player with respect to the other players; Based on the total number of players, the time interval between two consecutive passes or defenses by a player, player attributes, and player connectivity, the overall tactical characteristics of the team are extracted globally; wherein, the overall tactical characteristics of the team are used to describe the overall tactical form of the team at the current moment.
7. The method of claim 5, wherein, The process of reconstructing player basic attributes using a reconstruction model and calculating the first degree of matching between the reconstructed basic attributes and the actual observed attributes; and reconstructing the team's overall attributes using a reconstruction model and calculating the second degree of matching between the reconstructed overall attributes and the actual observed attributes, includes: Reconstruct the basic attributes of each player based on the aforementioned local tactical characteristics; Based on the team's overall tactical characteristics, the team's overall attributes are reconstructed, and based on the reconstructed basic attributes and the reconstructed team overall attributes, a reconstructed player dynamic diagram is obtained.
8. The method according to claim 7, characterized in that, The step of predicting the position of the missing player based on the reconstructed basic attributes, the reconstructed overall attributes, the first matching degree, and the second matching degree includes: Based on the player dynamic graph, remove each player in sequence and calculate the perturbation information of the team in the tactical curvature feature after removing the players; Based on the current visible player status, generate the position distribution of the removed players, and compare the position distribution of the removed players with the actual observed positions; Based on the perturbation information of the team's tactical curvature features after player removal, the first matching degree, the second matching degree, the contrast between the position distribution of the removed players and the actual observed positions, the reconstructed basic attributes, and the reconstructed overall attributes, the position of the missing player is predicted.
9. The method of any one of claims 1-8, wherein, The process of probabilistically fusing the player classification results with the predicted missing player positions to generate the player's role classification and team identification results includes: The probability distribution of each category to which each detection box belongs is determined based on the player classification results and the predicted location of the missing player; By multiplying the player's classification result with the predicted probability of the missing player's position belonging to the same category and then weighting the product, a comprehensive score for the same category is obtained. The player's role classification and team identification results are determined based on the comprehensive score.
10. An analysis apparatus of a role, characterized by, include: The extraction unit is used to perform illumination adaptive processing on video frames and extract player detection regions from the processed video frames. The first calculation unit is used to extract target color features based on the player detection area after excluding background interference, and to calculate the classification result of the player corresponding to the target color features through feature similarity. The second computing unit is used to construct a player dynamic map, integrate spatial proximity and event interaction features, calculate the criticality index of players in the tactical structure, and reconstruct a two-way verification system between players and teams through attributes, and predict the position of missing players by combining a pre-trained position model. The determining unit is used to perform probability fusion processing on the player classification results and the predicted positions of the missing players to generate the player's role classification and team identification results.