Method and system for soccer game video processing analysis based on target detection model

The method of processing and analyzing football match videos using a target detection model solves the problem of inaccurate target trajectory mapping under camera movement, and achieves accurate target trajectory mapping and efficient data analysis in football match videos.

CN122157075APending Publication Date: 2026-06-05BEIJING DONGFANG AIDIPU DIGITAL TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING DONGFANG AIDIPU DIGITAL TECH CO LTD
Filing Date
2025-12-29
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing methods for processing and analyzing football match videos based on target detection models struggle to accurately map target trajectories to the coordinate system of the real match field when camera movement is present, affecting the accuracy and comparability of statistics on movement speed, distance traveled, and ball control.

Method used

By receiving video streams of football matches, decoding and target detection are performed, multi-target tracking and camera motion compensation are carried out, field size parameters are obtained, perspective transformation is used to map the target trajectory from pixel coordinates to field coordinates, and spatiotemporal data analysis is performed to generate match statistics.

Benefits of technology

It enables accurate mapping of target trajectory to the coordinate system of the real match field under dynamic camera conditions, improving the accuracy and comparability of movement speed, movement distance and ball control status, reducing manual statistical costs, and improving the efficiency and consistency of match analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157075A_ABST
    Figure CN122157075A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer vision and intelligent analysis of sports data, and discloses a method and system for processing and analyzing a football match video based on a target detection model, which comprises the following steps: S1, receiving a football match video stream; S2, performing target detection on the video frame; S3, obtaining a target trajectory compensated by camera motion; S4, obtaining a venue size parameter; S5, generating a match statistical index; and S6, outputting the match statistical index and corresponding visual results and structured data. Through the combination of multi-target tracking, camera motion compensation, a venue size parameter and perspective transformation, the target trajectory in the football match video can be accurately and stably mapped to a real match venue coordinate system under the condition of dynamic camera shooting, so that the motion speed, moving distance and ball control state of players can be accurately, quantitatively and comparably statistically analyzed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision and intelligent analysis of sports data, specifically to a method and system for processing and analyzing football match videos based on a target detection model. Background Technology

[0002] Football match video analysis refers to a type of technical means that uses computer vision and video processing technology to process video data collected during football matches in order to obtain player positions, movement trajectories, and match-related statistical information. With the development of video acquisition equipment and computing power, football match video processing and analysis methods based on target detection models have gradually become an important way to implement football match data analysis. By automatically identifying and tracking targets such as players, referees, and the football in the match video, it provides data support for match review, tactical analysis, and training evaluation. Existing football match video processing and analysis methods based on target detection models usually detect and track targets in the match video to obtain the pixel-level position of the targets in the video frame, and calculate motion-related indicators accordingly.

[0003] However, in current technology, the processing and analysis of football match videos based on target detection models usually only detects and tracks players and the ball in the video pixel coordinate system. It is difficult to accurately map the target trajectory to the real match field coordinate system when there is camera movement, thus affecting the accuracy and comparability of movement speed, movement distance and ball control statistics. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method and system for processing and analyzing football match videos based on a target detection model, solving the problem that target trajectories are difficult to accurately map to the coordinate system of the real match field under dynamic camera conditions.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for processing and analyzing football match videos based on a target detection model, comprising:

[0006] S1. Receive a football match video stream, decode the football match video stream to obtain video frames arranged in chronological order, and assign timestamps to the video frames.

[0007] S2. Perform target detection on the video frame, identify and output target detection results including at least players, referees, goalkeepers and footballs, the target detection results including the bounding box, category label and confidence score of each target;

[0008] S3. Perform multi-target tracking based on the target detection results, and perform camera motion compensation on the target trajectory generated during the tracking process to obtain the target trajectory after camera motion compensation.

[0009] S4. Obtain the site size parameters, and based on perspective transformation, map the target trajectory compensated by camera motion from pixel coordinates to site coordinates;

[0010] S5. Perform spatiotemporal data analysis on the target trajectory based on the field coordinates to generate competition statistical indicators;

[0011] S6. Output the competition statistics and corresponding visualization results and structured data.

[0012] Preferably, step S1 includes:

[0013] The football match video stream is acquired from at least one of local video files, network video streams, or live cameras;

[0014] The video stream of the football match is standardized in terms of frame rate and resolution so that the video frames meet the preset processing frame rate and processing resolution requirements.

[0015] Timestamps are assigned to the standardized video frames for subsequent target tracking and spatiotemporal data analysis.

[0016] Preferably, step S2 includes:

[0017] A deep learning-based target detection model is used to perform inference calculations on the video frames to obtain candidate detection boxes and their confidence scores for each target.

[0018] Based on the overlap relationship between the candidate detection boxes, soft nonmaximum suppression is performed on the candidate detection boxes to attenuate the confidence of overlapping detection boxes instead of deleting them directly.

[0019] The detection results after soft nonmaximum suppression are filtered based on a preset confidence threshold, and the final detection result of the target is output. The final detection result is used for subsequent multi-target tracking.

[0020] Preferably, in step S3, the step of performing multi-target tracking based on the target detection result includes:

[0021] Based on the target detection results, a corresponding target state model is established for each detected target, and the target state model includes the target's position state information;

[0022] Based on the target state model, the position of the target in adjacent video frames is predicted;

[0023] The predicted location is associated and matched with the target detection result in the current video frame to maintain the consistency of the target's identity between adjacent video frames and generate the corresponding target trajectory.

[0024] Preferably, in step S3, the step of performing camera motion compensation on the target trajectory generated during the tracking process includes:

[0025] Based on the image changes between adjacent video frames, estimate the inter-frame motion information of the camera during video acquisition;

[0026] Based on the inter-frame motion information, the target trajectory obtained from the multi-target tracking is positionally corrected to obtain a target trajectory compensated for by camera motion.

[0027] Preferably, step S4 includes:

[0028] Obtain field size parameters for representing a football match field, wherein the field size parameters include at least field length parameters and field width parameters;

[0029] Based on the site size parameters, determine the mapping relationship between the pixel coordinate system and the site coordinate system;

[0030] Based on the mapping relationship, perspective transformation is performed on the target trajectory after camera motion compensation to convert the pixel coordinates of the target in the video frame into the corresponding site coordinates.

[0031] Preferably, step S5 includes:

[0032] Based on the continuous positional changes of the target in the field coordinate system, calculate the target's moving distance and speed within a preset time interval;

[0033] Based on the relative positional relationship between the football and the players in the field coordinate system, the ownership status of the football among the players is determined, and ball control status information is generated accordingly.

[0034] Based on the target trajectory and ball control status information, the targets are grouped and statistically analyzed to generate match statistics indicators, including player-level and team-level statistical indicators.

[0035] Preferably, step S6 includes:

[0036] The competition statistics are overlaid on the corresponding video frames in a graphical form to generate a visual video result containing analytical information.

[0037] The competition statistics are organized according to a preset data structure and exported as a structured data file;

[0038] Based on user instructions, the visualized video results and the structured data file are output.

[0039] A system for processing and analyzing football match videos based on an object detection model, the system comprising:

[0040] The video stream input module receives a football match video stream and decodes the football match video stream to obtain video frames.

[0041] The target detection module performs target detection on the video frame and outputs target detection results including at least players, referees, goalkeepers and footballs. The target detection results include the bounding box, category label and confidence score of each target.

[0042] The tracking and compensation module performs multi-target tracking based on the target detection results and performs camera motion compensation on the target trajectory generated during the multi-target tracking process to obtain the target trajectory after camera motion compensation.

[0043] The coordinate transformation module obtains the site size parameters and converts the target trajectory compensated by camera motion from pixel coordinates to site coordinates based on perspective transformation.

[0044] The data analysis module performs spatiotemporal data analysis on the target trajectory based on the field coordinates and generates competition statistical indicators.

[0045] The results output module outputs the competition statistics and corresponding visualization results and structured data.

[0046] Preferably, the tracking and compensation module includes:

[0047] The target state modeling unit establishes a corresponding target state model for each target based on the target detection results output by the target detection module.

[0048] The trajectory prediction and association unit predicts the position of the target in adjacent video frames based on the target state model, and associates and matches the predicted position with the target detection result in the current video frame to generate and update the target trajectory.

[0049] The camera motion estimation unit is used to estimate the inter-frame motion information of the camera by estimating image changes between adjacent video frames;

[0050] The trajectory compensation unit corrects the position of the target trajectory based on the inter-frame motion information of the camera to obtain a target trajectory compensated for camera motion.

[0051] This invention provides a method and system for processing and analyzing football match videos based on a target detection model. It has the following beneficial effects:

[0052] 1. This invention combines multi-target tracking with camera motion compensation, field size parameters, and perspective transformation to achieve stable and accurate mapping of target trajectories in football match videos from pixel coordinates to the real match field coordinate system under dynamic camera shooting conditions. This enables accurate, quantifiable, and comparable statistical analysis of player movement speed, movement distance, and ball control status.

[0053] 2. This invention performs multi-target tracking based on target detection results and maintains target identity consistency through position prediction and association matching mechanisms, enabling players and footballs to generate continuous and stable motion trajectories even in complex scenarios such as occlusion and dense movement, thereby improving the integrity and reliability of target trajectories during video analysis.

[0054] 3. Based on the field coordinate mapping of the target trajectory, this invention can further calculate multi-dimensional statistical indicators such as the player's movement speed, cumulative distance and ball control status, realize the automatic generation of player-level and team-level match data, reduce manual statistical costs, and improve the efficiency of match analysis and data consistency. Attached Figure Description

[0055] Figure 1 This is an architecture diagram of the method for processing and analyzing football match videos based on a target detection model according to the present invention;

[0056] Figure 2 This is an architecture diagram of the system for processing and analyzing football match videos based on a target detection model, as described in this invention. Detailed Implementation

[0057] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] Please see the appendix Figure 1 This invention provides a method for processing and analyzing football match videos based on a target detection model, comprising:

[0059] S1. Receive the football match video stream, decode the football match video stream, obtain video frames arranged in chronological order, and assign timestamps to the video frames.

[0060] Furthermore, step S1 includes:

[0061] Acquire a video stream of a football match from at least one of local video files, network video streams, or live cameras;

[0062] The frame rate and resolution of the football match video stream are standardized to ensure that the video frames meet the preset processing frame rate and processing resolution requirements.

[0063] Timestamps are assigned to the standardized video frames for subsequent target tracking and spatiotemporal data analysis.

[0064] Specifically, the system acquires a football match video stream from at least one of the following: a local video file, a network video stream, or a real-time camera. The local video file can be a pre-recorded match video, the network video stream can be a match video transmitted in real time via a network protocol, and the real-time camera can be a camera deployed at the match venue. When the analysis process is started, the system selects the appropriate video acquisition method based on user configuration or input parameters, and uses the acquired video data as the input video stream for subsequent processing. For example, a football match video file named "08fd33_4.mp4" is loaded from the local storage medium, and this video file is used as the input video stream, which is then used for video decoding and frame processing.

[0065] After acquiring the video stream of a football match, the video stream undergoes frame rate and resolution standardization. This involves parsing the original frame rate and resolution parameters of the input video stream and resampling the video stream according to preset processing frame rate and resolution requirements. This generates a video frame sequence with consistent temporal sampling frequency and spatial resolution. Simultaneously, color space conversion and brightness distribution adjustment can be performed on the video frames. For example, the video frames can be converted from their original color space to RGB format, and histogram equalization can be performed on the RGB video frames to unify the brightness and contrast performance of different video sources. This allows the video frames to be used as input for subsequent target detection and multi-target tracking steps, enabling subsequent processing to be carried out under a unified video data scale and representation.

[0066] After completing the frame rate and resolution standardization process, corresponding timestamp information is assigned to the standardized video frames. The timestamp is used to identify the position of the video frame in the original video timeline and serves as an important time reference for subsequent multi-target tracking and spatiotemporal data analysis. By introducing timestamp information into the video frames, the temporal relationship between adjacent video frames can be clearly defined when performing cross-frame target association, target motion trajectory generation, and velocity and distance calculation based on time intervals, thereby supporting the sequential execution of subsequent time series analysis processes.

[0067] S2. Perform target detection on the video frames, identify and output target detection results including at least players, referees, goalkeepers and footballs. The target detection results include the bounding box, class label and confidence score of each target.

[0068] Furthermore, step S2 includes:

[0069] A deep learning-based target detection model is used to perform inference calculations on video frames to obtain candidate detection boxes and their confidence scores for each target.

[0070] Based on the overlap between candidate detection boxes, soft nonmaximum suppression is performed on the candidate detection boxes to attenuate the confidence of overlapping detection boxes instead of deleting them directly.

[0071] The detection results after soft nonmaximum suppression are filtered based on a preset confidence threshold, and the final detection result of the target is output. The final detection result is used for subsequent multi-target tracking.

[0072] Specifically, a deep learning-based object detection model performs inference calculations on video frames to obtain candidate detection boxes and their confidence scores for each target. The standardized video frames are then input into the object detection model, which outputs the bounding box position, target category, and corresponding confidence score for each candidate target through forward inference. The target categories include at least players, referees, goalkeepers, and soccer balls.

[0073] Furthermore, the target detection model can be a detection model trained or fine-tuned for football match scenarios. It can simultaneously detect multiple types of targets in a single frame video image, thereby forming a set of candidate detection results at the frame level. For example, in a specific example, the video frame is input into the target detection model based on the YOLOv11 architecture for inference. The model outputs several candidate detection boxes, each corresponding to a type of target, and is accompanied by a corresponding confidence value.

[0074] After obtaining candidate detection boxes, soft nonmaximum suppression is performed on the candidate detection boxes based on the overlap relationship between them, so as to attenuate the confidence of overlapping detection boxes instead of deleting them directly.

[0075] First, the candidate detection box with the highest confidence is selected as the reference detection box, and the intersection-union ratio (CUI) between it and the other candidate detection boxes is calculated. The confidence of the other candidate detection boxes is adjusted according to the CUI. That is, soft nonmaximum suppression adopts a confidence decay method based on Gaussian function, and its calculation formula is as follows:

[0076] ;

[0077] in: Indicates the first The confidence level of each candidate detection box before decay; Indicates the first One candidate detection box; This indicates the currently selected reference detection box; Represents candidate detection boxes With reference detection box The crossover and union ratio between them; The preset parameter is used to control the confidence decay rate. Thus, through the soft nonmaximum suppression processing method described above, when multiple candidate detection boxes overlap in spatial position, their confidence will gradually decrease with the degree of overlap, instead of being directly deleted, thereby retaining more candidate detection results in scenes with dense targets or small target sizes.

[0078] After completing the soft nonmaximum suppression processing, the processed detection results are filtered based on the preset confidence threshold, and the final detection result of the target is output. The candidate detection boxes after soft nonmaximum suppression processing are judged one by one, and only the detection boxes with a confidence of not less than the threshold are retained as the final detection result.

[0079] The confidence threshold can be set according to the detection characteristics of different targets in a football match scene. For example, for football targets that are small in size and easily occluded, a relatively low confidence threshold can be used to ensure that the detection results of the football target in consecutive video frames are preserved. The final detection results obtained after filtering are used as input for subsequent multi-target tracking steps to generate the target's motion trajectory.

[0080] S3. Perform multi-target tracking based on the target detection results, and perform camera motion compensation on the target trajectory generated during the tracking process to obtain the target trajectory after camera motion compensation.

[0081] Furthermore, in step S3, the step of performing multi-target tracking based on the target detection result includes:

[0082] Based on the target detection results, a corresponding target state model is established for each detected target. The target state model includes the target's position state information.

[0083] Based on the target state model, predict the position of the target in adjacent video frames;

[0084] The predicted location is associated with the target detection result in the current video frame to maintain the consistency of the target's identity between adjacent video frames and generate the corresponding target trajectory.

[0085] Specifically, firstly, a reference point for representing the spatial position of the target is determined from the target detection results. In one implementation, for a player target, the midpoint of the bottom edge of its target detection box is used as the player's position point in the video frame to approximate the contact position between the player and the playing field. For a soccer ball target, the center point of its target detection box is used as the soccer ball's position point in the video frame. By converting the target detection box into a position representation with clear physical meaning, a unified position reference is provided for subsequent trajectory generation.

[0086] After determining the target location, a corresponding target state model is established for each detected target to describe its spatial position and motion state in the current video frame. The target state model is represented in the form of a state vector. In one implementation, the target's state vector can be represented as:

[0087] ;

[0088] in, and Indicates the target is in the first place. The center position coordinates in the frame, and This indicates the width and height of the detection box corresponding to the target. and This represents the velocity components of the target's motion in the horizontal and vertical directions. Through state modeling, the spatial states of different targets can be maintained separately, providing a basis for subsequent motion prediction.

[0089] Furthermore, after obtaining the target's state information, the target's position in the current frame is predicted based on the temporal relationship between adjacent video frames. This prediction process is based on the target's state at the previous moment and combines a preset motion model to extrapolate and estimate the target's state. In other words, the target state prediction process can be expressed as: ;

[0090] in, Indicates the first The prediction results of the target state in the frame. Indicates the first The state vector of the target in the frame. The state transition matrix describes the positional change relationship of the target between adjacent video frames. Based on this, the possible location range of the target can be obtained before the detection results of the current frame have been associated.

[0091] After the target location is predicted, the predicted target location is associated with the detection results in the current video frame to maintain the consistency of the target's identity between adjacent video frames. To this end, a matching cost between the prediction results and the detection results is constructed, and the correspondence between the target and the detection results is completed based on this cost.

[0092] In one implementation, the matching cost between the prediction result and the detection result can be expressed as:

[0093] ;

[0094] in, Indicates the first The predicted detection bounding box of each target in the current frame. Indicates the first in the current frame One test result, This represents the intersection-union ratio between two detection boxes, thereby matching the prediction results with the detection results based on the cost matrix, and updating the target's state information accordingly;

[0095] In other words, by repeatedly performing state modeling, position prediction, and association matching processes in consecutive video frames, a continuous target trajectory sequence can be formed for each target. This target trajectory sequence is used to describe the target's movement path during the game and serves as input for subsequent camera motion compensation and game data analysis steps. For example, based on the ByteTrack framework, multi-target tracking can continuously track players and referees in a football game. When players briefly occlude or approach each other during the game, the consistency of target identity can still be maintained and a continuous movement trajectory can be generated by matching the target state prediction with the detection results.

[0096] Furthermore, in step S3, the step of performing camera motion compensation on the target trajectory generated during the tracking process includes:

[0097] Based on the image changes between adjacent video frames, estimate the inter-frame motion information of the camera during video acquisition;

[0098] Based on the inter-frame motion information, the target trajectory obtained from multi-target tracking is corrected to obtain the target trajectory after camera motion compensation.

[0099] Specifically, after continuously tracking multiple targets and generating initial target trajectories, in order to reduce the impact of the video acquisition device's own movement on the target trajectory, the image changes between adjacent video frames are analyzed to estimate the motion information generated by the camera between adjacent frames. The camera motion information is used to describe the overall image displacement introduced by the camera's translation, panning, or follow shooting.

[0100] In one implementation, the inter-frame motion information of the camera is estimated using an optical flow method. Based on the assumption of constant brightness, it is assumed that the brightness of the same physical point remains unchanged in adjacent video frames, and the relationship can be expressed as:

[0101] ;

[0102] Performing a first-order Taylor expansion on the above relationship, we can obtain the optical flow constraint equation:

[0103] ;

[0104] in, and These represent the images in direction and Spatial gradient in direction, This represents the gradient of the image over time. and These represent the pixel points in... direction and Motion components in the direction. By solving the above constraints within a local image region, pixel motion information between adjacent video frames can be obtained, and the overall displacement trend of the camera between frames can be estimated further;

[0105] After obtaining the inter-frame motion information of the camera, the position of the target trajectory obtained by multi-target tracking is corrected based on the inter-frame motion information. Specifically, the estimated overall displacement of the camera is offset from the position coordinates of the target in the current frame, thereby separating the overall displacement caused by the camera motion from the actual motion of the target itself, and obtaining the target trajectory after camera motion compensation.

[0106] By performing the aforementioned position correction processing on the target trajectory, the obtained target trajectory can more realistically reflect the relative motion of the player and the football during the game, reducing trajectory offset caused by camera shake, translation, or follow shooting. This provides a stable trajectory input for subsequent trajectory-based field mapping, velocity calculation, and distance analysis. For example, when the football game footage is captured by a sideline camera and the camera translates along the sideline direction as the game progresses, the system estimates the overall image displacement between adjacent video frames using the optical flow method, and corrects the initial tracking trajectory of the player and the football based on this displacement. Thus, even when the camera is continuously moving, a continuous and smooth target motion trajectory can still be obtained.

[0107] S4. Obtain the site size parameters and map the target trajectory after camera motion compensation from pixel coordinates to site coordinates based on perspective transformation;

[0108] Furthermore, step S4 includes:

[0109] Obtain the field size parameters used to represent a football match field, including at least the field length and field width parameters;

[0110] Based on the site size parameters, determine the mapping relationship between the pixel coordinate system and the site coordinate system;

[0111] Based on the mapping relationship, perspective transformation is performed on the target trajectory after camera motion compensation to convert the pixel coordinates of the target in the video frame into the corresponding site coordinates.

[0112] Specifically, after obtaining the target trajectory after camera motion compensation, in order to convert the target's motion trajectory in the video frame into a spatial trajectory corresponding to the actual competition venue, the venue size parameters are introduced and a mapping relationship between the pixel coordinate system and the venue coordinate system is established based on perspective transformation, thereby realizing the conversion of the target trajectory between different coordinate systems.

[0113] First, obtain the field size parameters to represent the football match field, which are used to describe the geometric scale of the actual match field. That is, the field size parameters include at least the length and width parameters of the field. The length and width parameters are expressed in physical length units and are used to characterize the size range of the football match field in real space. By introducing the field size parameters, a scale benchmark consistent with the actual field can be provided for the subsequent coordinate mapping process.

[0114] After obtaining the site size parameters, the mapping relationship between the video pixel coordinate system and the site coordinate system is determined based on the site size parameters. Specifically, by selecting the location points in the video frame that have known site semantics and combining them with the corresponding site size parameters, the correspondence between pixel coordinates and site coordinates is constructed, thereby establishing a mathematical mapping model for coordinate transformation. That is, the mapping relationship can be described by the planar perspective transformation model.

[0115] After establishing the mapping relationship, perspective transformation is performed on the camera motion-compensated target trajectory based on the mapping relationship, converting the target's pixel coordinates in the video frame into corresponding site coordinates. The conversion process from pixel coordinates to site coordinates can be represented by a homography matrix as follows:

[0116] ;

[0117] in, This represents the pixel coordinates of the target within the video frame. This indicates the target's corresponding coordinate position in the site coordinate system. for The homography matrix is ​​used to describe the perspective mapping relationship between the pixel coordinate system and the field coordinate system. By performing the above transformation on each pixel coordinate point in the target trajectory, the motion trajectory of the target in the field coordinate system can be obtained.

[0118] Thus, through the above-mentioned field size configuration and perspective transformation processing, the target trajectory based on video pixel coordinates can be converted into a spatial trajectory corresponding to the actual football match field, providing a unified and quantifiable spatial reference for subsequent speed calculation, distance statistics and tactical analysis based on field coordinates.

[0119] S5. Perform spatiotemporal data analysis on the target trajectory based on the field coordinates to generate competition statistical indicators;

[0120] Furthermore, the S5 steps include:

[0121] Based on the continuous positional changes of the target in the field coordinate system, calculate the target's moving distance and speed within a preset time interval;

[0122] Based on the relative positions of the football and the players in the field coordinate system, the ownership status of the football among the players is determined, and ball control status information is generated accordingly.

[0123] By using target trajectory and ball control information, targets are grouped and statistically analyzed to generate match statistics that include player-level and team-level statistical indicators.

[0124] Specifically, based on the continuous positional changes of the target in the field coordinate system, the moving distance and speed of the target within a preset time interval are calculated. That is, for the field coordinate positions of the same target at adjacent times, the moving distance of the target within the time interval is obtained by calculating the Euclidean distance between adjacent position points.

[0125] The distance the target moves between two adjacent time points can be expressed as:

[0126] ;

[0127] in, and These represent the site coordinates of the target at two adjacent time points. This represents the distance moved within that time interval. By summing the distances moved within consecutive time intervals, the cumulative distance moved by the target within a preset time period can be obtained. Based on this, combined with video frame rate or timestamp information, the target's speed within that time interval can be expressed as: ;

[0128] in, This represents the time interval between two adjacent time points. This indicates the target's instantaneous velocity within that time interval. Using this method, the target's velocity changes and cumulative distance traveled during the race can be obtained.

[0129] Based on the analysis of the target movement, the system further determines the ownership status of the football among the players based on the relative positional relationship between the football and the players in the field coordinate system, thereby generating ball control status information. First, at each time point, the system calculates the spatial distance between the position of the football and the positions of each player, and assigns the football to the player who is closest to it and meets the preset distance threshold condition. When the distance between the football and a player is less than the preset distance threshold, the player is determined to be in possession of the football. When there is no player who meets the distance threshold condition, the football is determined to be in an undefined ownership state. By statistically analyzing the ownership status of the football at continuous time points, the player-level possession time and team-level possession ratio information can be obtained.

[0130] After obtaining target trajectory information and ball control status information, the targets are grouped and statistically analyzed to generate match statistics indicators. In one implementation, the player's targets are divided into different groups according to the team information of the player, and the target trajectory data and ball control status data in each group are summarized and statistically analyzed separately.

[0131] This grouping and statistical process generates match statistics that include both player-level and team-level metrics. Player-level metrics can include an individual player's cumulative distance traveled, average speed, and possession time, while team-level metrics can include the team's cumulative distance traveled, average speed distribution, and team possession percentage. These metrics are used to quantify and describe the intensity of movement and possession during the match.

[0132] S6. Output the competition statistics and corresponding visualization results and structured data.

[0133] Furthermore, step S6 includes:

[0134] The statistical indicators of the competition are overlaid on the corresponding video frames in a graphical form to generate visual video results containing analytical information.

[0135] Organize the competition statistics according to the preset data structure and export them as structured data files;

[0136] Based on user instructions, output visualized video results and structured data files.

[0137] Specifically, based on the original match video frames, the target detection results, target trajectory, and statistical information corresponding to the current time point are overlaid and displayed in the form of visual elements;

[0138] Visualization elements can include target bounding boxes, target identifiers, motion speed labels, ball control status indicators, and heatmap overlay results. By integrating the above analysis information with the original video footage, a visual video result containing match analysis information is generated, allowing users to intuitively obtain the corresponding statistical analysis content while watching the match footage.

[0139] In addition to visualizing the game statistics, the game statistics are also organized according to a preset data structure and exported as a structured data file. This means that player-level statistics, team-level statistics, and corresponding time index information are organized according to a unified data field format and a data file is generated for subsequent processing and storage.

[0140] Structured data files can be stored in common data formats, such as exporting competition statistics in JSON or CSV format. The data files generated through structured data export can be used for subsequent data analysis, statistical modeling, or third-party system calls.

[0141] After generating the visualized video results and structured data files, the output content can be controlled according to user instructions. The output can selectively include visualized video results, structured data files, or a combination of both, based on the user's operation instructions. Through the above output control method, users can obtain the required analysis results according to actual application needs, realizing flexible output and use of competition analysis results.

[0142] Please see the appendix Figure 2 A system for processing and analyzing football match videos based on an object detection model. The system includes:

[0143] The video stream input module receives the football match video stream and decodes it to obtain video frames.

[0144] The target detection module performs target detection on video frames and outputs target detection results that include at least players, referees, goalkeepers and footballs. The target detection results include the bounding boxes, class labels and confidence scores of each target.

[0145] The tracking and compensation module performs multi-target tracking based on the target detection results and performs camera motion compensation on the target trajectory generated during the multi-target tracking process to obtain the target trajectory after camera motion compensation.

[0146] The coordinate transformation module obtains the site size parameters and converts the target trajectory, which has undergone camera motion compensation, from pixel coordinates to site coordinates based on perspective transformation.

[0147] The data analysis module performs spatiotemporal data analysis on the target trajectory based on the field coordinates and generates competition statistics.

[0148] The results output module outputs the competition statistics and corresponding visualizations and structured data.

[0149] Specifically, the system first receives and decodes the football match video stream through the video stream input module to obtain a continuous sequence of video frames. Then, the target detection module performs target detection processing on the video frames, outputting target detection results including players, referees, goalkeepers, and the football. Based on this, the tracking and compensation module performs multi-target tracking on the detected targets and performs camera motion compensation on the generated target trajectories to eliminate the influence of camera motion on the trajectory during video acquisition. The compensated target trajectory is then processed by the coordinate transformation module using field size parameters to perform perspective transformation, achieving a mapping from pixel coordinates to field coordinates. The data analysis module further performs spatiotemporal analysis based on the target trajectory under field coordinates to generate match statistics. Finally, the results output module outputs the match statistics in a visualized and structured data format, thereby achieving automated processing and analysis of football match videos.

[0150] The tracking and compensation module includes:

[0151] The target state modeling unit establishes a corresponding target state model for each target based on the target detection results output by the target detection module.

[0152] The trajectory prediction and association unit predicts the position of the target in adjacent video frames based on the target state model, and associates and matches the predicted position with the target detection result in the current video frame to generate and update the target trajectory.

[0153] The camera motion estimation unit is used to estimate the inter-frame motion information of the camera by estimating image changes between adjacent video frames;

[0154] The trajectory compensation unit corrects the position of the target trajectory based on the inter-frame motion information of the camera to obtain the target trajectory after camera motion compensation.

[0155] Specifically, firstly, the target state modeling unit establishes a corresponding target state model for each detected target based on the detection results output by the target detection module, which is used to describe the position and motion state of the target in the video frame;

[0156] Subsequently, the trajectory prediction and association unit predicts the position of the target in adjacent video frames based on the target state model, and associates and matches the predicted position with the target detection result in the current video frame to maintain the consistency of the target identity and generate or update the target trajectory.

[0157] Based on this, the camera motion estimation unit estimates the inter-frame motion information of the camera during video acquisition by analyzing the image changes between adjacent video frames;

[0158] The trajectory compensation unit further corrects the target trajectory based on the inter-frame motion information of the camera, thereby obtaining the target trajectory after camera motion compensation, so as to reduce the impact of camera motion on the accuracy of the target trajectory.

[0159] Example 1: Processing and analyzing standard football match videos: The video input is a high-definition match video file with a resolution of 1920×1080 and a frame rate of 25FPS. The field size parameters are set to a length of 105 meters and a width of 68 meters to correspond to a standard international football field. In the processing, the system first performs resolution and frame rate standardization on the video, and then detects players, referees, goalkeepers, and the football in the video frames based on a target detection model. The detection results are then processed by soft nonmaximum suppression and used for multi-target tracking. Subsequently, stable target trajectories are generated through multi-target tracking and camera motion compensation, and the target trajectories are mapped to the field coordinate system based on the field size parameters and perspective transformation. On this basis, statistical analysis of player movement speed, cumulative distance, and ball control status is completed. Finally, the system outputs a visualized video result superimposed with player identification, real-time speed, and ball control status, and generates a structured data file containing statistical information of all players and a team heat map to reflect the team's overall formation and activity hotspot distribution.

[0160] Example 2: Video Analysis in Complex Match Scenarios: The system is applied to complex match scenarios with poor lighting conditions, dense player density, and slight camera shake. For such scenarios, the system combines image enhancement methods to adjust the brightness and contrast of video frames during video standardization and target detection stages. In the post-processing stage of target detection, the soft nonmaximum suppression parameter is adjusted to enhance the detection effect of overlapping targets. In the multi-target tracking stage, the system maintains the consistency of target identity through target state modeling, position prediction, and association matching, and enables camera motion compensation based on optical flow to reduce the impact of camera shake on target trajectories. After the above processing, the system can still generate continuous and stable target trajectories under complex conditions and complete match statistical analysis such as player speed, distance, and ball control status, thereby outputting visualized analysis results and structured data that meet real-time requirements.

[0161] Example 3: Match Analysis Adapted to Multiple Field Sizes. The system is designed to adapt to the video analysis needs of football fields of different sizes. Before analysis, the system configures different field size parameters according to the actual match or training field conditions, including various field specifications such as standard professional stadiums, youth training fields, and indoor fields. After completing target detection, multi-target tracking, and camera motion compensation, the system establishes a mapping relationship between the pixel coordinate system and the field coordinate system based on the corresponding field size parameters, and performs perspective transformation processing on the target trajectory to obtain a field coordinate trajectory consistent with the actual field size. Based on the field coordinate trajectory, the system can calculate player movement speed, distance, ball control status, and team statistical indicators under different field conditions, and output corresponding visualized video results and structured data, realizing unified analysis of various football match and training scenarios.

[0162] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for processing and analyzing a football match video based on a target detection model, characterized in that, include: S1. Receive a football match video stream, decode the football match video stream to obtain video frames arranged in chronological order, and assign timestamps to the video frames. S2. Perform target detection on the video frame, identify and output target detection results including at least players, referees, goalkeepers and footballs, the target detection results including the bounding box, category label and confidence score of each target; S3. Perform multi-target tracking based on the target detection results, and perform camera motion compensation on the target trajectory generated during the tracking process to obtain the target trajectory after camera motion compensation. S4. Obtain the site size parameters, and based on perspective transformation, map the target trajectory compensated by camera motion from pixel coordinates to site coordinates; S5. Perform spatiotemporal data analysis on the target trajectory based on the field coordinates to generate competition statistical indicators; S6. Output the competition statistics and corresponding visualization results and structured data.

2. The method for processing and analyzing football match videos based on a target detection model according to claim 1, characterized in that, Step S1 includes: The football match video stream is acquired from at least one of local video files, network video streams, or live cameras; The video stream of the football match is standardized in terms of frame rate and resolution so that the video frames meet the preset processing frame rate and processing resolution requirements. Timestamps are assigned to the standardized video frames for subsequent target tracking and spatiotemporal data analysis.

3. The method for processing and analyzing football match videos based on a target detection model according to claim 1, characterized in that, Step S2 includes: A deep learning-based target detection model is used to perform inference calculations on the video frames to obtain candidate detection boxes and their confidence scores for each target. Based on the overlap relationship between the candidate detection boxes, soft nonmaximum suppression is performed on the candidate detection boxes to attenuate the confidence of overlapping detection boxes instead of deleting them directly. The detection results after soft nonmaximum suppression are filtered based on a preset confidence threshold, and the final detection result of the target is output. The final detection result is used for subsequent multi-target tracking.

4. The method for processing and analyzing football match videos based on a target detection model according to claim 1, characterized in that, In step S3, the step of performing multi-target tracking based on the target detection result includes: Based on the target detection results, a corresponding target state model is established for each detected target, and the target state model includes the target's position state information; Based on the target state model, the position of the target in adjacent video frames is predicted; The predicted location is associated and matched with the target detection result in the current video frame to maintain the consistency of the target's identity between adjacent video frames and generate the corresponding target trajectory.

5. The method for processing and analyzing football match videos based on a target detection model according to claim 1, characterized in that, In step S3, the step of performing camera motion compensation on the target trajectory generated during the tracking process includes: Based on the image changes between adjacent video frames, estimate the inter-frame motion information of the camera during video acquisition; Based on the inter-frame motion information, the target trajectory obtained from the multi-target tracking is positionally corrected to obtain a target trajectory compensated for by camera motion.

6. The method for processing and analyzing football match videos based on a target detection model according to claim 1, characterized in that, The S4 step includes: Obtain field size parameters for representing a football match field, wherein the field size parameters include at least field length parameters and field width parameters; Based on the site size parameters, determine the mapping relationship between the pixel coordinate system and the site coordinate system; Based on the mapping relationship, perspective transformation is performed on the target trajectory after camera motion compensation to convert the pixel coordinates of the target in the video frame into the corresponding site coordinates.

7. The method for processing and analyzing football match videos based on a target detection model according to claim 1, characterized in that, Step S5 includes: Based on the continuous positional changes of the target in the field coordinate system, calculate the target's moving distance and speed within a preset time interval; Based on the relative positional relationship between the football and the players in the field coordinate system, the ownership status of the football among the players is determined, and ball control status information is generated accordingly. Based on the target trajectory and ball control status information, the targets are grouped and statistically analyzed to generate match statistics indicators, including player-level and team-level statistical indicators.

8. The method for processing and analyzing football match videos based on a target detection model according to claim 1, characterized in that, Step S6 includes: The competition statistics are overlaid on the corresponding video frames in a graphical form to generate a visual video result containing analytical information. The competition statistics are organized according to a preset data structure and exported as a structured data file; Based on user instructions, the visualized video results and the structured data file are output.

9. A system for processing and analyzing football match videos based on a target detection model, characterized in that, The method for processing and analyzing football match videos based on a target detection model as described in any one of claims 1-8, the system comprising: The video stream input module receives a football match video stream and decodes the football match video stream to obtain video frames. The target detection module performs target detection on the video frame and outputs target detection results including at least players, referees, goalkeepers and footballs. The target detection results include the bounding box, category label and confidence score of each target. The tracking and compensation module performs multi-target tracking based on the target detection results and performs camera motion compensation on the target trajectory generated during the multi-target tracking process to obtain the target trajectory after camera motion compensation. The coordinate transformation module obtains the site size parameters and converts the target trajectory compensated by camera motion from pixel coordinates to site coordinates based on perspective transformation. The data analysis module performs spatiotemporal data analysis on the target trajectory based on the field coordinates and generates competition statistical indicators. The results output module outputs the competition statistics and corresponding visualization results and structured data.

10. The system for processing and analyzing football match videos based on a target detection model according to claim 9, characterized in that, The tracking and compensation module includes: The target state modeling unit establishes a corresponding target state model for each target based on the target detection results output by the target detection module. The trajectory prediction and association unit predicts the position of the target in adjacent video frames based on the target state model, and associates and matches the predicted position with the target detection result in the current video frame to generate and update the target trajectory. The camera motion estimation unit is used to estimate the inter-frame motion information of the camera by estimating image changes between adjacent video frames; The trajectory compensation unit corrects the position of the target trajectory based on the inter-frame motion information of the camera to obtain a target trajectory compensated for camera motion.