A real-time basketball goal detection and recognition method based on video input

By constructing a fixed frame length impact evaluation model based on basketball flight trajectory, pitching behavior and image processing delay, and adjusting the video frame length in real time, the problem that fixed frame length in the prior art cannot adapt to different shooting actions, improving the accuracy of basketball goal detection and system adaptability.

CN119380250BActive Publication Date: 2025-03-18WUXI ANKEDI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411951718.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-18
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The existing real-time basketball goal detection and recognition system based on video input cannot adapt to the speed and duration of different shooting actions due to the fixed frame-long window, resulting in inaccurate determination of goal time, which increases the waste of computing resources and redundant calculation, affecting the system's performance and real-time feedback.

Method used

By detecting the basketball flight trajectory, player pitching behavior and image processing delay information in the video, a fixed frame length impact evaluation model is constructed, an impact evaluation index is generated, and the initial fixed frame length is adjusted in real time to adapt to the characteristics of different shooting actions.

Benefits of technology

More accurate basketball goal status detection is achieved, reducing the waste of computing resources and redundant calculations caused by unreasonable design of fixed frame lengths, and improving the system's intelligent adaptability and real-time response capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380250B_ABST
    Figure CN119380250B_ABST
Patent Text Reader

Abstract

The present invention discloses a real-time basketball goal detection and recognition method based on video input, and specifically relates to the technical field of basketball goal detection. A fixed frame length impact assessment model is constructed according to basketball flight trajectory information, player pitching behavior information and image processing delay information. The system can adjust the initial fixed frame length in real time to ensure that the key picture of the goal moment is captured, and will not cause missed judgment or misjudgment of the goal moment due to the inability of the fixed frame length to adapt to the different durations of fast shots or slow shots, avoid misjudgment caused by the inability of the fixed frame window to adjust according to the actual duration of the shooting action, and improve the detection accuracy of the basketball goal status; through adaptive regulation, the system can be dynamically adjusted according to the real-time video input, reduce unnecessary waste of computing resources, avoid redundant calculations, ensure that it can quickly respond and accurately identify the basketball goal status in different scenarios, and adapt to the diverse actions and complex backgrounds in basketball games.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of basketball goal detection, and more specifically, to a real-time basketball goal detection and recognition method based on video input. Background Art

[0002] The real-time basketball goal detection and recognition system based on video input automatically determines whether a goal has occurred by analyzing the game video stream in real time. The system uses computer vision, image processing, and deep learning technologies to automatically identify key targets in the video (such as the ball, goal, and boundary), and determines whether the ball has successfully entered the goal or scoring area based on a series of judgment rules. It can quickly and accurately extract the moment of shooting and scoring from massive video data through intelligent algorithms, greatly improving analysis efficiency and real-time performance.

[0003] Existing real-time basketball goal detection and recognition systems based on video input usually use a fixed video input frame length to detect and recognize basketball goals, and in order to prevent the goal moment from appearing at the beginning or end of the fixed frame screen, the video data is continuously input with overlapping time sequences. However, although this method can avoid goal judgment errors caused by boundary effects to a certain extent, the fixed frame length window design cannot fully adapt to the speed and duration of different shooting actions. The process of basketball goal may vary greatly in time due to differences in shooting methods (such as jump shots, three-pointers, fast breakthroughs, etc.) and athlete movements. Fast shots may be completed within a fixed frame, while slower shooting actions may take more time to complete. The fixed frame window cannot be adjusted according to the actual duration of the shooting action, resulting in inaccurate judgment of the goal moment and more waste of computing resources. Secondly, although overlapping time sequence input is used, this method ensures that the key frames at the window boundary will not be missed to a certain extent, but due to the existence of overlap, the system needs to process more frame data, which further brings a higher computing burden. Especially in real-time processing and mobile devices, the increased computing burden may affect the performance of the system and even cause delays. In addition, too many overlapping frames may also lead to redundant calculations, reduce system processing efficiency, and thus affect the speed of real-time feedback. Summary of the invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a real-time basketball goal detection and recognition method based on video input to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A real-time basketball goal detection and recognition method based on video input comprises the following steps:

[0007] Step S1, detecting the basketball hoop in the video, outputting the basketball hoop bounding box, expanding the basketball hoop bounding box with the width and height of the basketball hoop as the side length and the center of the basketball hoop as the center, capturing the picture of the expanded basketball hoop bounding box, scaling it to the input size of the goal recognition network, and adjusting the dimension of the RGB channel to form video frame image data in CHW dimension order;

[0008] Step S2, merging the continuous initial fixed frame length images in the channel dimension as input data of the goal recognition network, and obtaining basketball flight trajectory information, player pitching behavior information and image processing delay information;

[0009] Step S3, constructing a fixed frame length impact assessment model based on the basketball flight trajectory information, the player's pitching behavior information, and the image processing delay information, generating a fixed frame length impact assessment index, and determining whether to perform adaptive regulation on the initial fixed frame length;

[0010] Step S4, when the initial fixed frame length needs to be adaptively regulated, the initial fixed frame length is regulated according to the fixed frame length impact evaluation index, and a video frame image is obtained according to the regulated frame length and input into a goal recognition network to identify the basketball goal status.

[0011] In a preferred embodiment, for continuous video frame images, the video frame image data is segmented according to a preset fixed frame length to obtain multiple video frame image data subsequences with fixed frame lengths as units, the video frame images in each video frame image data subsequence with a fixed frame length are spliced ​​in chronological order and merged in the channel dimension, and the video frame image at each moment is regarded as an independent time step; the video frame images in each video frame image data subsequence with a fixed frame length are used as input data of the goal recognition network.

[0012] In a preferred embodiment, the basketball flight trajectory information includes a basketball flight trajectory coefficient, the player pitching behavior information includes a player pitching behavior coefficient, and the image processing delay information includes an image processing delay coefficient; the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient are marked as , , .

[0013] In a preferred embodiment, the logic for obtaining the basketball flight trajectory coefficient is as follows:

[0014] Detect the position of the basketball in each video frame according to the target detection algorithm, and record the position of the basketball in each video frame , and obtain a series of trajectory points ,in ;

[0015] The flying speed of the basketball between consecutive frames is calculated based on the Euclidean distance formula. The calculation expression is as follows ,in represents the flying speed of the basketball in the i-th frame image, is the time interval between frames, and the average speed of the basketball flight trajectory is calculated using the following expression: ,in is the average speed of the basketball's flight trajectory, and the maximum speed of the basketball's flight trajectory is calculated using the following expression: ,in The maximum speed of the basketball flight trajectory is calculated by calculating the flight speed coefficient fxx, which is expressed as follows fxx=( / );

[0016] Calculate the direction angle of two adjacent basketball trajectories , the expression is as follows ; Calculate the trajectory curvature of two adjacent basketball trajectories , the expression is as follows ; Calculate the average trajectory curvature of the basketball flight trajectory , the expression is as follows , calculate the maximum trajectory curvature of the basketball flight trajectory, the expression is as follows , calculate the trajectory curvature coefficient qlx, the expression is as follows qlx=( / ) ; Calculate the basketball flight trajectory coefficient , the expression is as follows ,in Respectively represent the preset proportional coefficients of the flight speed coefficient and the trajectory curvature coefficient, and Both are greater than 0.

[0017] In a preferred embodiment, the logic for obtaining the player's pitching behavior coefficient is as follows:

[0018] Use the posture detection network to detect the key points of the player's pitch and get the key point coordinates ,in , , is the total number of key points, is the total number of video frames of the player pitching;

[0019] Calculating hand speed , the expression is as follows ,in is the inter-frame time interval, is the coordinate of the key point of the hand at time t, is the coordinate of the key point of the hand at time t-1; calculate the rate of change of hand speed , the expression is as follows ;

[0020] Calculate the duration of a player's shooting motion , the expression is as follows ,in The moment when the player starts shooting. The moment when a player's shot ends;

[0021] Calculating the smoothness of player movements , the expression is as follows ;

[0022] Calculate the player's pitching behavior coefficient , the expression is as follows ,in They represent the preset proportional coefficients of the duration of the player's shooting action, the rate of change of hand speed, and the smoothness of the player's action, respectively, and Both are greater than 0.

[0023] In a preferred embodiment, the logic for obtaining the image processing delay coefficient is as follows:

[0024] Get the capture timestamp of each frame of the video frame image and the processing completion timestamp , calculate the image processing time , the expression is as follows ; Compare the image processing time with the expected image processing time. If the image processing time is longer than the expected image processing time, mark the image processing time longer than the expected image processing time as delayed processing time;

[0025] Calculate average delay , the expression is as follows ,in Indicates the duration of the mth delayed processing. ; Calculate the delay standard deviation , the expression is as follows ; Calculate image processing delay coefficient , the expression is as follows .

[0026] In a preferred embodiment, a fixed frame length impact assessment model is constructed based on the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient to generate a fixed frame length impact assessment index. The model is based on the following formula , where represent the preset proportional coefficients of the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient, respectively, and Both are greater than 0.

[0027] In a preferred embodiment, the fixed frame length impact evaluation index is compared with a preset fixed frame length impact evaluation index threshold to determine whether to perform adaptive control on the initial fixed frame length, as follows:

[0028] If the fixed frame length impact evaluation index is greater than the fixed frame length impact evaluation index threshold, a control signal is generated; if the fixed frame length impact evaluation index is less than or equal to the fixed frame length impact evaluation index threshold, there is no need to generate a control signal.

[0029] In a preferred embodiment, when a control signal is generated, the corresponding generated fixed frame length impact evaluation index is obtained, and the initial fixed frame length is controlled according to the control function, and the control function is as follows: ,in Indicates the adjusted frame length. Indicates the initial fixed frame length, is the preset fixed frame length impact assessment index threshold, It is an adjustment factor used to control the amplitude of frame length adjustment.

[0030] Technical effects and advantages of the present invention:

[0031] 1. The present invention constructs a fixed frame length impact assessment model based on basketball flight trajectory information, player pitching behavior information and image processing delay information. The system can adjust the initial fixed frame length in real time to ensure that the key picture of the goal moment is captured, and the fixed frame length cannot adapt to the different durations of fast shots or slow shots, which will lead to missed or misjudgment of the goal moment, avoid misjudgment caused by the inability of the fixed frame window to adjust according to the actual duration of the shooting action, and improve the detection accuracy of the basketball goal status; through adaptive regulation, the system can dynamically adjust according to real-time video input, reduce the waste of computing resources caused by unreasonable fixed frame length design, avoid redundant calculations, so that the system can better adapt to different shooting methods and reduce unnecessary computing burdens; ensure that it can quickly respond and accurately identify the basketball goal status in different scenarios, adapt to the diverse actions and complex backgrounds in basketball games, provide accurate goal status prediction and real-time feedback, and further improve the intelligent adaptability of the basketball video analysis system. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings;

[0033] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Example: Figure 1 The present invention provides a real-time basketball goal detection and recognition method based on video input, comprising the following steps:

[0036] Step S1, detecting the basketball hoop in the video, outputting the basketball hoop bounding box, expanding the basketball hoop bounding box with the width and height of the basketball hoop as the side length and the center of the basketball hoop as the center, capturing the picture of the expanded basketball hoop bounding box, scaling it to the input size of the goal recognition network, and adjusting the dimension of the RGB channel to form video frame image data in CHW dimension order;

[0037] Step S2, merging the continuous initial fixed frame length images in the channel dimension as input data of the goal recognition network, and obtaining basketball flight trajectory information, player pitching behavior information and image processing delay information;

[0038] Step S3, constructing a fixed frame length impact assessment model based on the basketball flight trajectory information, the player's pitching behavior information, and the image processing delay information, generating a fixed frame length impact assessment index, and determining whether to perform adaptive regulation on the initial fixed frame length;

[0039] Step S4, when the initial fixed frame length needs to be adaptively regulated, the initial fixed frame length is regulated according to the fixed frame length impact evaluation index, and a video frame image is obtained according to the regulated frame length and input into a goal recognition network to identify the basketball goal status.

[0040] Step S1, detecting the basketball hoop in the video, outputting the basketball hoop bounding box, expanding the basketball hoop bounding box with the width and height of the basketball hoop as the side length and the center of the basketball hoop as the center, capturing the picture of the expanded basketball hoop bounding box, scaling it to the input size of the goal recognition network, and adjusting the dimension of the RGB channel to form video frame image data in CHW dimension order;

[0041] Locate the bounding box of the basketball hoop based on the pre-trained target detection model (such as YOLOv5, Faster R-CNN, EfficientDet, etc.) and output the coordinates of the basketball hoop bounding box , calculate the width of the basketball hoop bounding box , the expression is as follows , calculate the height of the basketball hoop bounding box , the expression is as follows ; Calculate the center point of the basketball hoop ,in, , ; Expand the bounding box of the basketball hoop with the width and height of the basketball hoop as the side length and the center of the basketball hoop as the center. Then the expanded bounding box of the basketball hoop can be expressed as ; If the extended basketball hoop bounding box exceeds the image boundary, the boundary is cropped or filled (such as mirror filling, black filling), and the boundary constraint rules for the boundary cropping or filling are as follows: , , , ,in and are the width and height of the video frame image respectively; the target area of ​​the video frame image is cropped according to the extended basketball hoop bounding box , using bilinear interpolation to crop the region according to the input size required by the goal recognition network Scaling is performed to maintain the spatial information of the image and to convert the scaled video frame image from the standard (ie height, width, channels) format is adjusted to (i.e., channel, height, width) format, forming video frame image data in CHW dimensional order;

[0042] It should be noted that the goal recognition network is a convolutional neural network (CNN) used to perform image analysis on video frame images, process video frame data and identify whether a goal has occurred. CNN is particularly suitable for image and video analysis because it can automatically extract local features from the input image and abstract higher-level features layer by layer, which is suitable for complex visual tasks. In this embodiment, the goal detection and recognition of basketball is completed based on the pre-trained convolutional neural network;

[0043] Step S2, merging the continuous initial fixed frame length images in the channel dimension as input data of the goal recognition network, and obtaining basketball flight trajectory information, player pitching behavior information and image processing delay information;

[0044] For continuous video frame images, the video frame image data is segmented according to a preset fixed frame length to obtain a plurality of video frame image data subsequences with fixed frame lengths as units, the video frame images in each video frame image data subsequence with fixed frame lengths are spliced ​​in time order and merged in the channel dimension, and the video frame images at each moment are regarded as an independent time step; the video frame images in each video frame image data subsequence with fixed frame lengths are used as input data of the goal recognition network;

[0045] The basketball flight trajectory information includes the basketball flight trajectory coefficient, the player pitching behavior information includes the player pitching behavior coefficient, and the image processing delay information includes the image processing delay coefficient; the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient are marked as , , ;

[0046] The basketball flight trajectory coefficient is used to measure the flight trajectory of the basketball in the video frame image, including the changes in flight speed and flight angle and other dynamic characteristics. It can characterize the complexity and change range of the basketball flight trajectory. By calculating the basketball flight trajectory coefficient, the change characteristics of flight speed and angle can be fully quantified, providing a scientific basis for time window regulation and goal detection. The fixed frame length impact assessment model based on the basketball flight trajectory coefficient can dynamically analyze the adaptability of different basketball flight trajectories to fixed frame lengths by comprehensively measuring the flight speed, angle changes and trajectory complexity of the basketball in the video frame. This model not only improves the sensitive capture capability of fast flight trajectories, but also avoids resource waste or delays caused by too long a window time, ensuring the recognition accuracy under different basketball trajectory characteristics. In the process of adjusting the fixed frame length in real time, it can reduce the misjudgment and missed judgment caused by the mismatch of the time window, thereby optimizing the overall performance and stability of the goal detection system. In particular, in scenarios with high real-time and computational efficiency requirements, the intelligent adaptability of the system is significantly enhanced. A higher basketball flight trajectory coefficient indicates that the basketball flight trajectory is complex and varies greatly, and it is usually necessary to adjust the initial fixed frame length to capture the complete trajectory. A smaller basketball flight trajectory coefficient indicates that the video data frame of the current frame length can meet the detection and recognition requirements of basketball goals.

[0047] The logic for obtaining the basketball flight trajectory coefficient is as follows:

[0048] Detect the position of the basketball in each video frame according to the target detection algorithm, and record the position of the basketball in each video frame , and obtain a series of trajectory points ,in ;

[0049] It should be noted that the target detection algorithm is a type of computer vision algorithm used to identify the location (bounding box) and category of target objects in images or videos. It combines the two tasks of target classification and target positioning, and is an important research direction in the field of image processing and deep learning. Commonly used target detection algorithms include YOLO, Faster R-CNN, etc.

[0050] The flying speed of the basketball between consecutive frames is calculated based on the Euclidean distance formula. The calculation expression is as follows ,in represents the flying speed of the basketball in the i-th frame image, is the time interval between frames, and the average speed of the basketball flight trajectory is calculated using the following expression: ,in is the average speed of the basketball's flight trajectory, and the maximum speed of the basketball's flight trajectory is calculated using the following expression: ,in The maximum speed of the basketball flight trajectory is calculated by calculating the flight speed coefficient fxx, which is expressed as follows fxx=( / );

[0051] Calculate the direction angle of two adjacent basketball trajectories , the expression is as follows ; Calculate the trajectory curvature of two adjacent basketball trajectories , the expression is as follows ; Calculate the average trajectory curvature of the basketball flight trajectory , the expression is as follows , calculate the maximum trajectory curvature of the basketball flight trajectory, the expression is as follows , calculate the trajectory curvature coefficient qlx, the expression is as follows qlx=( / ) ; Calculate the basketball flight trajectory coefficient , the expression is as follows ,in Respectively represent the preset proportional coefficients of the flight speed coefficient and the trajectory curvature coefficient, and All are greater than 0;

[0052] It should be noted that before calculating the basketball flight trajectory coefficient, it is necessary to ensure that the flight speed coefficient and trajectory curvature coefficient are normalized. Commonly used normalization methods include Min-Max normalization and Z-Score normalization. Set it according to the actual situation. For example, adopt the expert empowerment method, that is, invite experts in relevant fields to determine the preset proportion coefficients of various indicators through professional opinion surveys and comprehensive evaluations;

[0053] The player's pitching behavior coefficient is a quantitative indicator used to measure the behavioral characteristics of players during shooting, mainly including the type of pitching action (such as jump shots, hook shots, quick shots, etc.), action duration, shooting height, and changes in shooting rhythm. By accurately modeling the motion characteristics of the player's shooting behavior, this coefficient can reflect the differences in the time window requirements of different shooting methods, providing key behavioral feature support for the goal detection system. The introduction of this coefficient helps to capture the dynamic changes of shooting behavior, improve the adaptability and accuracy of the fixed frame length evaluation model, and thus optimize the real-time recognition performance of the goal status; a larger player's pitching behavior coefficient indicates that the greater the dynamic changes in the player's shooting behavior, the greater the need to adjust the initial fixed frame length; a smaller player's pitching behavior coefficient indicates that the video data frame with the current frame length can meet the detection and recognition requirements of basketball goals;

[0054] The logic for obtaining the player's pitching behavior coefficient is as follows:

[0055] Use the posture detection network to detect the key points of the player's pitch and get the key point coordinates ,in , , is the total number of key points, such as shoulders, elbows, hands, etc. is the total number of video frames of the player pitching;

[0056] It should be noted that the posture detection network is used to automatically detect and track the key points of the player in the video frame. It can identify and locate the important parts of the body (such as shoulders, arms, elbows, wrists, fingers, etc.) to obtain information related to the shooting action. Commonly used posture detection networks include OpenPose, HRNet, etc.

[0057] Calculating hand speed , the expression is as follows ,in is the inter-frame time interval, is the coordinate of the key point of the hand at time t, is the coordinate of the key point of the hand at time t-1; calculate the rate of change of hand speed , the expression is as follows ;

[0058] Calculate the duration of a player's shooting motion , the expression is as follows ,in The moment when the player starts shooting. The moment when a player's shot ends;

[0059] Calculating the smoothness of player movements , the expression is as follows ;

[0060] Calculate the player's pitching behavior coefficient , the expression is as follows ,in They represent the preset proportional coefficients of the duration of the player's shooting action, the rate of change of hand speed, and the smoothness of the player's action, respectively, and All are greater than 0;

[0061] It should be noted that before calculating the player's shooting behavior coefficient, it is necessary to ensure that the player's shooting action duration, hand speed change rate, and player action smoothness are normalized; Set it according to the actual situation. For example, adopt the expert empowerment method, that is, invite experts in relevant fields to determine the preset proportion coefficients of various indicators through professional opinion surveys and comprehensive evaluations;

[0062] The image processing delay coefficient is used to measure the time delay from capture to output of action recognition results in the basketball goal detection and recognition system. This coefficient reflects the speed of the image processing pipeline, the time difference from capturing the image to completing the motion analysis. It affects the real-time response capability of the goal detection system. By measuring the time delay from image capture to analysis output, the fixed frame length can be accurately adjusted to reduce misjudgments and missed judgments and improve recognition accuracy. By real-time monitoring of changes in the delay coefficient, the system can adjust the frame length in a timely manner in different scenarios, so that goal detection is more in line with the needs of actual sports scenes, enhance the adaptability and stability of the system, especially in high-dynamic environments, significantly improve the performance of goal detection; a higher image processing delay coefficient indicates that the greater the delay fluctuation of image processing, the greater the need to adjust the initial fixed frame length, and a smaller player pitching behavior coefficient indicates that the video data frame with the current frame length can meet the detection and recognition needs of basketball goals;

[0063] The logic for obtaining the image processing delay coefficient is as follows:

[0064] Get the capture timestamp of each frame of the video frame image and the processing completion timestamp , calculate the image processing time , the expression is as follows ; Compare the image processing time with the expected image processing time. If the image processing time is longer than the expected image processing time, mark the image processing time longer than the expected image processing time as delayed processing time;

[0065] Calculate average delay , the expression is as follows ,in Indicates the duration of the mth delayed processing. ; Calculate the delay standard deviation , the expression is as follows ; Calculate image processing delay coefficient , the expression is as follows ;

[0066] Step S3, constructing a fixed frame length impact assessment model based on the basketball flight trajectory information, the player's pitching behavior information, and the image processing delay information, generating a fixed frame length impact assessment index, and determining whether to perform adaptive regulation on the initial fixed frame length;

[0067] A fixed frame length impact assessment model is constructed based on the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient to generate a fixed frame length impact assessment index The model is based on the following formula , where represent the preset proportional coefficients of the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient, respectively, and All are greater than 0;

[0068] It should be noted that before constructing the fixed frame length impact assessment model, it is necessary to ensure that the basketball flight trajectory coefficient, the player's pitching behavior coefficient, and the image processing delay coefficient are all normalized; Set it according to the actual situation. For example, adopt the expert empowerment method, that is, invite experts in relevant fields to determine the preset proportion coefficients of various indicators through professional opinion surveys and comprehensive evaluations;

[0069] It can be seen from the above calculation expression that the larger the basketball flight trajectory coefficient, the larger the player pitching behavior coefficient, and the larger the image processing delay coefficient, the larger the fixed frame length impact evaluation index is, indicating that the need to adjust the initial fixed frame length is greater; conversely, the smaller the basketball flight trajectory coefficient, the smaller the player pitching behavior coefficient, and the smaller the image processing delay coefficient, the smaller the fixed frame length impact evaluation index is, indicating that the need to adjust the initial fixed frame length is less;

[0070] The fixed frame length impact assessment index is compared with a preset fixed frame length impact assessment index threshold to determine whether to perform adaptive control on the initial fixed frame length, as follows:

[0071] If the fixed frame length impact evaluation index is greater than the fixed frame length impact evaluation index threshold, it means that the current data needs to adjust the initial fixed frame length, which can optimize the video stream processing, make the system more adaptable to the current basketball flight trajectory, pitching behavior characteristics and processing delay, and generate a control signal; if the fixed frame length impact evaluation index is less than or equal to the fixed frame length impact evaluation index threshold, it means that the current data does not need to adjust the initial fixed frame length, which can ensure that the video processing efficiency and accuracy of the system under the current data stream are not unnecessarily affected, and the system can continue to use the original fixed frame length to maintain the performance stability of the system, while avoiding the waste of computing resources and increased delay caused by unnecessary adjustments, and there is no need to generate a control signal;

[0072] Step S4, when the initial fixed frame length needs to be adaptively regulated, the initial fixed frame length is regulated according to the fixed frame length impact evaluation index, and a video frame image is obtained according to the regulated frame length and input into a goal recognition network to recognize the basketball goal state;

[0073] When the control signal is generated, the corresponding generated fixed frame length impact evaluation index is obtained, and the initial fixed frame length is controlled according to the control function. The control function is as follows: ,in Indicates the adjusted frame length. Indicates the initial fixed frame length, is the preset fixed frame length impact assessment index threshold, is an adjustment factor used to control the amplitude of frame length adjustment, which is set by technicians in this field according to actual conditions;

[0074] The present invention constructs a fixed frame length impact assessment model according to basketball flight trajectory information, player pitching behavior information and image processing delay information. The system can adjust the initial fixed frame length in real time to ensure that the key picture of the goal moment is captured, and the goal moment is not missed or misjudged due to the inability of the fixed frame length to adapt to the different durations of fast shots or slow shots, and avoids misjudgments caused by the inability of the fixed frame window to adjust according to the actual duration of the shooting action, thereby improving the detection accuracy of the basketball goal status; through adaptive regulation, the system can dynamically adjust according to real-time video input, reduce the waste of computing resources caused by unreasonable fixed frame length design, avoid redundant calculations, enable the system to better adapt to different shooting methods, and reduce unnecessary computing burdens; ensure that it can quickly respond and accurately identify the basketball goal status in different scenarios, adapt to the diverse actions and complex backgrounds in basketball games, provide accurate goal status prediction and real-time feedback, and further improve the intelligent adaptability of the basketball video analysis system.

[0075] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0076] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0077] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A real-time basketball goal detection and recognition method based on video input, characterized in that: The steps include: Step S1, detecting the basketball hoop in the video, outputting the basketball hoop bounding box, expanding the basketball hoop bounding box with the width and height of the basketball hoop as the side length and the center of the basketball hoop as the center, capturing the picture of the expanded basketball hoop bounding box, scaling it to the input size of the goal recognition network, and adjusting the dimension of the RGB channel to form video frame image data in CHW dimension order; Step S2, merging the continuous initial fixed frame length images in the channel dimension as input data of the goal recognition network, and obtaining basketball flight trajectory information, player pitching behavior information and image processing delay information; Step S3, constructing a fixed frame length impact assessment model based on the basketball flight trajectory information, the player's pitching behavior information, and the image processing delay information, generating a fixed frame length impact assessment index, and determining whether to perform adaptive regulation on the initial fixed frame length; Step S4, when the initial fixed frame length needs to be adaptively regulated, the initial fixed frame length is regulated according to the fixed frame length impact evaluation index, and a video frame image is obtained according to the regulated frame length and input into a goal recognition network to identify the basketball goal status.

2. A real-time basketball goal detection and recognition method based on video input according to claim 1, characterized in that: For continuous video frame images, the video frame image data is divided into a preset fixed frame length to obtain multiple video frame image data subsequences with fixed frame length as units, the video frame images in each video frame image data subsequence with fixed frame length are spliced ​​in time order and merged in the channel dimension, and the video frame image at each moment is regarded as an independent time step; the video frame images in each video frame image data subsequence with fixed frame length are used as input data of the goal recognition network.

3. The real-time basketball goal detection and recognition method based on video input according to claim 1, characterized in that: The basketball flight trajectory information includes the basketball flight trajectory coefficient, the player pitching behavior information includes the player pitching behavior coefficient, and the image processing delay information includes the image processing delay coefficient; the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient are marked as , , .

4. The real-time basketball goal detection and recognition method based on video input according to claim 3 is characterized in that: The logic for obtaining the basketball flight trajectory coefficient is as follows: Detect the position of the basketball in each video frame according to the target detection algorithm, and record the position of the basketball in each video frame , and obtain a series of trajectory points ,in ; The flying speed of the basketball between consecutive frames is calculated based on the Euclidean distance formula. The calculation expression is as follows ,in represents the flying speed of the basketball in the i-th frame image, is the time interval between frames, and the average speed of the basketball flight trajectory is calculated using the following expression: ,in is the average speed of the basketball's flight trajectory, and the maximum speed of the basketball's flight trajectory is calculated using the following expression: ,in The maximum speed of the basketball flight trajectory is calculated by calculating the flight speed coefficient fxx, which is expressed as follows fxx=( / ); Calculate the direction angle of two adjacent basketball trajectories , the expression is as follows ; Calculate the trajectory curvature of two adjacent basketball trajectories , the expression is as follows ; Calculate the average trajectory curvature of a basketball's flight path , the expression is as follows , calculate the maximum trajectory curvature of the basketball flight trajectory, the expression is as follows , calculate the trajectory curvature coefficient qlx, the expression is as follows qlx=( / ) ; Calculate the basketball flight trajectory coefficient , the expression is as follows ,in Respectively represent the preset proportional coefficients of the flight speed coefficient and the trajectory curvature coefficient, and Both are greater than 0.

5. The real-time basketball goal detection and recognition method based on video input according to claim 3 is characterized in that: The logic for obtaining the player's pitching behavior coefficient is as follows: Use the posture detection network to detect the key points of the player's pitch and get the key point coordinates ,in , , is the total number of key points, is the total number of video frames of the player pitching; Calculating hand speed , the expression is as follows ,in is the inter-frame time interval, is the coordinate of the key point of the hand at time t, is the coordinate of the key point of the hand at time t-1; calculate the rate of change of hand speed , the expression is as follows ; Calculate the duration of a player's shooting motion , the expression is as follows ,in The moment when the player starts shooting. The moment when a player finishes shooting; Calculating the smoothness of player movements , the expression is as follows ; Calculate the player's pitching behavior coefficient , the expression is as follows ,in They represent the preset proportional coefficients of the duration of the player's shooting action, the rate of change of hand speed, and the smoothness of the player's action, respectively, and Both are greater than 0.

6. The real-time basketball goal detection and recognition method based on video input according to claim 3 is characterized in that: The logic for obtaining the image processing delay coefficient is as follows: Get the capture timestamp of each frame of the video frame image and the processing completion timestamp , calculate the image processing time , the expression is as follows ; Compare the image processing time with the expected image processing time. If the image processing time is longer than the expected image processing time, mark the image processing time longer than the expected image processing time as delayed processing time; Calculate average delay , the expression is as follows ,in Indicates the duration of the mth delayed processing. ; Calculate the delay standard deviation , the expression is as follows ; Calculate image processing delay coefficient , the expression is as follows .

7. The real-time basketball goal detection and recognition method based on video input according to claim 3 is characterized in that: A fixed frame length impact assessment model is constructed based on the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient to generate a fixed frame length impact assessment index The model is based on the following formula , where represent the preset proportional coefficients of the basketball flight trajectory coefficient, the player pitching behavior coefficient, and the image processing delay coefficient, respectively, and Both are greater than 0.

8. The real-time basketball goal detection and recognition method based on video input according to claim 7, characterized in that: The fixed frame length impact assessment index is compared with the preset fixed frame length impact assessment index threshold to determine whether to perform adaptive control on the initial fixed frame length, as follows: If the fixed frame length impact evaluation index is greater than the fixed frame length impact evaluation index threshold, a control signal is generated; if the fixed frame length impact evaluation index is less than or equal to the fixed frame length impact evaluation index threshold, there is no need to generate a control signal.

9. The real-time basketball goal detection and recognition method based on video input according to claim 8, characterized in that: When the control signal is generated, the corresponding generated fixed frame length impact evaluation index is obtained, and the initial fixed frame length is controlled according to the control function. The control function is as follows: ,in Indicates the adjusted frame length. Indicates the initial fixed frame length, is the preset fixed frame length impact assessment index threshold, It is an adjustment factor used to control the amplitude of frame length adjustment.

Citation Information

Patent Citations

  • Method and system for judging goals for basketball game video

    CN110298231A

  • Basketball goal scoring judging method and system based on convolutional neural network

    CN110314361A