Volume measurement long jump distance measurement method and system based on improved YOLOv8 model
By improving the YOLOv8 model, robustness to sandpit dust and occlusion was enhanced, solving the adaptability problem of long jump distance measurement in complex scenarios, and realizing high-precision and low-cost long jump distance measurement, which is suitable for various physical fitness test scenarios.
Patent Information
- Application Number
- CN202511060925.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-12-12
AI Technical Summary
Existing deep learning-based long jump distance measurement technology is not adaptable enough to complex scenarios and is easily affected by dust, occlusion and changes in light, causing the detection frame to deviate from the actual landing point, affecting the accuracy and stability of distance measurement, and making it difficult to meet the reliability requirements of various physical measurement scenarios.
The improved YOLOv8 model achieves robust detection and accurate coordinate transformation of sandpit dust and occlusion by inserting a CBAM attention module into the Neck layer, optimizing the Anchor size, and using a parallel occlusion-dust robust detection head. Combined with camera calibration parameters, coordinate transformation is performed.
It effectively resists dust and obstruction from sandpits, improves adaptability and accuracy in various scenarios, and achieves high-precision, low-cost long jump distance measurement, making it suitable for various physical fitness test scenarios.
Smart Images

Figure CN121120769A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of long jump measurement technology, specifically relating to a physical test method and system for measuring long jump distance based on an improved YOLOv8 model. Background Technology
[0002] In competitive sports and routine physical fitness tests, the long jump is a key indicator for measuring an athlete's explosive power, limb coordination, and core strength. The accuracy and objectivity of its test results directly affect the validity of the assessment of athletic ability. However, current mainstream methods for measuring long jump distance consistently face irreconcilable contradictions: traditional manual measurement is not only inefficient but also susceptible to human visual errors; while some automated equipment can improve accuracy, its reliance on complex sensor arrays or specialized venue modifications makes it costly and difficult to promote in widespread physical fitness testing scenarios such as schools and communities.
[0003] In recent years, with the breakthrough development of artificial intelligence technology, deep learning-based visual ranging solutions have provided a new approach to solving this dilemma. By intelligently analyzing image and video data of athletes' long jumps, low-cost and high-efficiency automated ranging can be achieved. However, existing deep learning-based long jump ranging and line-crossing detection technologies still have significant bottlenecks in practical applications: when faced with a large amount of sand kicked up at the moment of takeoff in the sandpit, obstruction by the limbs of people nearby, or unexpected interference from the referee's shadow, the model often "misses detection" due to the target features being obscured, and even the phenomenon of "box drift" where the detection box deviates from the actual landing point occurs; at the same time, when encountering a sudden change in the angle of sunlight (such as a passing cloud instantly blocking the sunlight), the drastic change in ambient light will cause the image grayscale histogram to fluctuate sharply, directly causing a significant decrease in the model's confidence in the recognition of the target, thus affecting the stability of the ranging. These problems collectively lead to insufficient adaptability of existing technologies in complex scenarios. The line-crossing judgment can only rely on the simple intersection of the detection box and the starting line, which is easily misled by factors such as shadows. Furthermore, due to the lack of accurate mapping between camera parameters and real coordinates, the cumulative error of distance calculation is difficult to control, and it has always failed to meet the stringent requirements for the reliability of results in various physical testing scenarios. Summary of the Invention
[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method and system for measuring distance in long jump based on an improved YOLOv8 model to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides a method for measuring the distance of a long jump in physical fitness tests based on an improved YOLOv8 model, comprising: Step S1: Image acquisition step, used to acquire video streams of the long jump area in real time; Step S2: The model inference step, load and run the trained and improved YOLOv8 model, output the insole detection box and the sole mask; The improved YOLOv8 model inserts a CBAM attention module at the top of the feature pyramid in the Neck layer. The CBAM attention module includes a channel attention submodule and a spatial attention submodule. The channel attention submodule is used to enhance the sole texture features, and the spatial attention submodule is used to focus on the edges of the motion direction. The improved YOLOv8 model's anchor size was determined by reanalyzing the width and height distribution of the bounding boxes using the k-means clustering algorithm. The model inference step also includes an occlusion-dust robust detection head. By running a lightweight segmentation branch in parallel with the YOLOv8 detection head, the final feature output of the network is transformed into an interpretable shoe sole probability mask, and the output resolution is fixed to ensure spatial consistency with the detection box. The training data for the occlusion-dust robust detection head includes: real long jump scene images, dust / occlusion composite images generated by GAN. The real long jump scene images are used to annotate the bounding boxes and shoe sole segmentation mask, and the dust / occlusion composite images generated by GAN are used to enhance the robustness of the model. Step S3: The coordinate transformation step involves converting the coordinates of the lower left corner pixel of the detection box to the true coordinates in the world coordinate system based on the camera calibration parameters. The coordinate transformation formula is defined as follows: , in, This represents the pixel coordinates of the shoe in the image. Represents the shoe's coordinates in the real world. This represents the camera intrinsic parameters obtained through calibration. Represents camera external parameters; The real-world coordinates of the shoe are calculated using the inverse matrix of the camera parameters and the pixel coordinates of the shoe in the image, as expressed by the formula: = .
[0006] Step S4: The line-pressing judgment step is used to calculate the distance between the sole of the shoe and the take-off line before the jump. If the distance is less than the threshold, a line-pressing alarm is triggered. Step S5: The long jump distance calculation step, used to calculate the vertical distance between the sole of the shoe and the take-off line after landing, without touching the line, as the long jump score. The formula for calculating the long jump distance is: .
[0007] Secondly, the technical solution of the present invention also provides a physical fitness test long jump distance measurement system based on an improved YOLOv8 model, including an image acquisition module, a model inference module, a coordinate transformation module, a line-pressing judgment module, and a long jump distance calculation module. The image acquisition module is used to acquire video streams from the long jump area in real time. The model inference module loads and runs the trained and improved YOLOv8 model, and outputs the insole detection box and the sole mask; It should be noted that the improved YOLOv8 model inserts a CBAM attention module at the top of the feature pyramid in the Neck layer. The CBAM attention module includes a channel attention submodule and a spatial attention submodule. The channel attention submodule is used to enhance the sole texture features, and the spatial attention submodule is used to focus on the edges of the motion direction. The improved YOLOv8 model's anchor size was determined by reanalyzing the width and height distribution of the bounding boxes using the k-means clustering algorithm. The model inference step also includes an occlusion-dust robust detection head. By running a lightweight segmentation branch in parallel with the YOLOv8 detection head, the final feature output of the network is transformed into an interpretable shoe sole probability mask, and the output resolution is fixed to ensure spatial consistency with the detection box. The training data for the occlusion-dust robust detection head includes: real long jump scene images, dust / occlusion composite images generated by GAN. The real long jump scene images are used to annotate the bounding boxes and shoe sole segmentation mask, and the dust / occlusion composite images generated by GAN are used to enhance the robustness of the model. The coordinate transformation module converts the pixel coordinates of the lower left corner of the detection box into the real coordinates in the world coordinate system based on the camera calibration parameters. Based on the camera calibration parameters, the pixel coordinates of the lower left corner of the detection box are converted to the true coordinates in the world coordinate system. The coordinate transformation formula is defined as follows: , in, This represents the pixel coordinates of the shoe in the image. Represents the shoe's coordinates in the real world. This represents the camera intrinsic parameters obtained through calibration. Represents camera external parameters; The real-world coordinates of the shoe are calculated using the inverse matrix of the camera parameters and the pixel coordinates of the shoe in the image, as expressed by the formula: =
[0008] The line-pressing detection module is used to calculate the distance between the sole of the shoe and the takeoff line before the jump. If the distance is less than the threshold, a line-pressing alarm is triggered. The long jump distance calculation module is used to calculate the vertical distance between the sole of the shoe and the take-off line after landing, as the long jump score, without touching the line. Without landing on the take-off line, the vertical distance between the sole of the shoe and the take-off line is calculated as the long jump score. The formula for calculating the long jump distance is as follows: .
[0009] The beneficial effects of this invention are that the physical fitness test long jump distance measurement method and system provided by this invention can effectively resist the problem of missed detection caused by occlusion caused by sandpit dust, etc., and show excellent adaptability in various scenarios. At the same time, it has accurate distance recognition capability, and can realize high-precision and low-cost standing long jump distance measurement, so it can be widely used in various physical fitness test scenarios.
[0010] Furthermore, the design principle of this invention is reliable, the structure is simple, and it has a very wide range of application prospects. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of a physical fitness test method for measuring distance in long jump based on an improved YOLOv8 model, provided by the present invention.
[0013] Figure 2 This is a schematic diagram of the principle of a physical fitness test long jump distance measurement method system based on an improved YOLOv8 model provided by the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0016] Example 1: like Figure 1 As shown, this embodiment of the invention provides a method for measuring the distance of a long jump based on an improved YOLOv8 model, including the following steps: Step S1: Image acquisition step, used to acquire video streams of the long jump area in real time; Step S2: The model inference step, load and run the trained and improved YOLOv8 model, output the insole detection box and the sole mask; Step S3: The coordinate transformation step, based on the camera calibration parameters, converts the pixel coordinates of the lower left corner of the detection box into the true coordinates in the world coordinate system; Step S4: The line-pressing judgment step is used to calculate the distance between the sole of the shoe and the take-off line before the jump. If the distance is less than the threshold, a line-pressing alarm is triggered. Step S5: The long jump distance calculation step is used to calculate the vertical distance between the sole of the shoe and the take-off line after landing, without touching the line, as the long jump score.
[0017] Example 2: like Figure 1 As shown, this embodiment of the invention provides a method for measuring the distance of a long jump based on an improved YOLOv8 model, including the following steps: Step S1: Image acquisition step, used to acquire video streams of the long jump area in real time; Step S2: The model inference step, load and run the trained and improved YOLOv8 model, output the insole detection box and the sole mask; Step S2 includes inserting a CBAM attention module at the top of the feature pyramid of the Neck layer in the improved YOLOv8 model. The CBAM attention module includes a channel attention submodule and a spatial attention submodule. It should be noted that the channel attention submodule is used to enhance the sole texture features. During the long jump, in the sandpit, the sole color is almost the same as the sand, which results in an RGB difference of less than 20. However, high-frequency textures such as sole stitching and logos are still present. Therefore, CBAM first performs global average pooling to compress the entire feature map into a 1×1×C vector, and then outputs two layers of 1×1 convolution. Since the weights of each channel are inconsistent (the texture channel has a high weight and the background channel has a low weight), the computational resources are directly "locked" on the sole texture. The spatial attention submodule is used to focus on the edges of the movement direction. Backlighting will cast a large shadow on the outside of the sole. Traditional convolution tends to treat the shadow as part of the shoe, causing the detection box to deviate. CBAM lowers the weight of the shadow area. At this time, the box does not drift with the shadow. Raising the weight of the sole edge can improve the localization accuracy. After two attention weightings, the information density and discriminative power are improved. In complex scenes such as fog and backlighting, the shoe detection recall rate is improved by 23.6%.
[0018] The improved YOLOv8 model's anchor size was determined by reanalyzing the width and height distribution of the bounding boxes using the k-means clustering algorithm. It should be noted that the anchors in the public dataset are designed based on the COCO general target, with an average aspect ratio of approximately 1:1. However, long jump shoes are actually "long elliptical" in shape, with an aspect ratio of approximately 1:2, and the pixel size is highly concentrated after imaging. Therefore, 5000 real long jump scene images (covering different lighting, distances, and angles) were collected, and the precise bounding boxes of all shoes were labeled. The k-means clustering algorithm was used to analyze the width and height distribution of the labeled boxes to determine the optimal anchor size. The anchor size was reset to [12×25, 18×40, 25×55]. In YOLOv8, the anchors parameters were replaced with the optimized size, and the backbone layer was frozen during training. The detection head was fine-tuned to accelerate convergence. When detecting small target shoes (distance from the camera > 5m), the detection rate increased from 76% to 90%.
[0019] The model inference step also includes an occlusion-dust robust detection head (OS-Head), which converts the network's final feature output into an interpretable shoe sole probability mask by running a lightweight segmentation branch in parallel with the YOLOv8 detection head, and fixes the output resolution to ensure spatial consistency with the detection box. It should be noted that in actual long jump physical tests, shoe soles are often obscured by instantly kicked-up dust, other people's shoe soles, or the shadows of the referees. Traditional detection boxes directly miss the target, resulting in a false negative rate as high as 30%. Therefore, by running a lightweight segmentation branch in parallel with the YOLOv8 detection head, the network's final feature output is transformed into an interpretable shoe sole probability mask. Then, the IoU between the mask and the detection box is used to filter suspicious results. Using only a monocular camera, the false negative rate caused by dust occlusion can be reduced by 24%. The training data for the occlusion-dust robust detection head includes: real long jump scene images, and GAN-generated dust / occlusion composite images. By labeling the bounding boxes and shoe sole segmentation masks on the data and applying different effects to the data, the data diversity is increased, and the model is trained accordingly.
[0020] Example 3: like Figure 1 As shown, this embodiment of the invention provides a method for measuring the distance of a long jump based on an improved YOLOv8 model, including the following steps: Step S1: Image acquisition step, used to acquire video streams of the long jump area in real time; Step S2: The model inference step, load and run the trained and improved YOLOv8 model, output the insole detection box and the sole mask; Step S2 includes inserting a CBAM attention module at the top of the feature pyramid of the Neck layer in the improved YOLOv8 model. The CBAM attention module includes a channel attention submodule and a spatial attention submodule. It should be noted that the channel attention submodule is used to enhance the sole texture features. During the long jump, in the sandpit, the sole color is almost the same as the sand, which results in an RGB difference of less than 20. However, high-frequency textures such as sole stitching and logos are still present. Therefore, CBAM first performs global average pooling to compress the entire feature map into a 1×1×C vector, and then outputs two layers of 1×1 convolution. Since the weights of each channel are inconsistent (the texture channel has a high weight and the background channel has a low weight), the computational resources are directly "locked" on the sole texture. The spatial attention submodule is used to focus on the edges of the movement direction. Backlighting will cast a large shadow on the outside of the sole. Traditional convolution tends to treat the shadow as part of the shoe, causing the detection box to deviate. CBAM lowers the weight of the shadow area. At this time, the box does not drift with the shadow. Raising the weight of the sole edge can improve the localization accuracy. After two attention weightings, the information density and discriminative power are improved. In complex scenes such as fog and backlighting, the shoe detection recall rate is improved by 23.6%.
[0021] The improved YOLOv8 model's anchor size was determined by reanalyzing the width and height distribution of the bounding boxes using the k-means clustering algorithm. It should be noted that the anchors in the public dataset are designed based on the COCO general target, with an average aspect ratio of approximately 1:1. However, long jump shoes are actually "long elliptical" in shape, with an aspect ratio of approximately 1:2, and the pixel size is highly concentrated after imaging. Therefore, 5000 real long jump scene images (covering different lighting, distances, and angles) were collected, and the precise bounding boxes of all shoes were labeled. The k-means clustering algorithm was used to analyze the width and height distribution of the labeled boxes to determine the optimal anchor size. The anchor size was reset to [12×25, 18×40, 25×55]. In YOLOv8, the anchors parameters were replaced with the optimized size, and the backbone layer was frozen during training. The detection head was fine-tuned to accelerate convergence. When detecting small target shoes (distance from the camera > 5m), the detection rate increased from 76% to 90%.
[0022] The model inference step also includes an occlusion-dust robust detection head (OS-Head), which converts the network's final feature output into an interpretable shoe sole probability mask by running a lightweight segmentation branch in parallel with the YOLOv8 detection head, and fixes the output resolution to ensure spatial consistency with the detection box. It should be noted that in actual long jump physical tests, shoe soles are often obscured by instantly kicked-up dust, other people's shoe soles, or the shadows of the referees. Traditional detection boxes directly miss the target, resulting in a false negative rate as high as 30%. Therefore, by running a lightweight segmentation branch in parallel with the YOLOv8 detection head, the network's final feature output is transformed into an interpretable shoe sole probability mask. Then, the IoU between the mask and the detection box is used to filter suspicious results. Using only a monocular camera, the false negative rate caused by dust occlusion can be reduced by 24%. The training data for the occlusion-dust robust detection head includes: real long jump scene images, and GAN-generated dust / occlusion composite images. By labeling the bounding boxes and shoe sole segmentation masks on the data and applying different effects to the data, the data diversity is increased, and the model is trained accordingly.
[0023] Step S3: The coordinate transformation step involves converting the coordinates of the lower left corner pixel of the detection box to the true coordinates in the world coordinate system based on the camera calibration parameters. The coordinate transformation formula is defined as follows: , in, This represents the pixel coordinates of the shoe in the image. Represents the shoe's coordinates in the real world. This represents the camera intrinsic parameters obtained through calibration. Represents camera extrinsic parameters; the actual meaning of 1 is the third dimension. Since the long jump field is a flat surface and does not involve height, this dimension is ignored and therefore set to 1 here; The real-world coordinates of the shoe are determined by the data processing unit running a trained YOLOv8 model during the actual distance measurement process. This model detects the shoe (lower left corner coordinates) in the image captured by the camera and calculates the coordinates using the inverse matrix of the camera parameters and the pixel coordinates of the shoe in the image. The formula is as follows: = .
[0024] Example 4: like Figure 1 As shown, this embodiment of the invention provides a method for measuring the distance of a long jump based on an improved YOLOv8 model, including the following steps: Step S1: Image acquisition step, used to acquire video streams of the long jump area in real time; Step S2: The model inference step, load and run the trained and improved YOLOv8 model, output the insole detection box and the sole mask; Step S2 includes inserting a CBAM attention module at the top of the feature pyramid of the Neck layer in the improved YOLOv8 model. The CBAM attention module includes a channel attention submodule and a spatial attention submodule. It should be noted that the channel attention submodule is used to enhance the sole texture features. During the long jump, in the sandpit, the sole color is almost the same as the sand, which results in an RGB difference of less than 20. However, high-frequency textures such as sole stitching and logos are still present. Therefore, CBAM first performs global average pooling to compress the entire feature map into a 1×1×C vector, and then outputs two layers of 1×1 convolution. Since the weights of each channel are inconsistent (the texture channel has a high weight and the background channel has a low weight), the computational resources are directly "locked" on the sole texture. The spatial attention submodule is used to focus on the edges of the movement direction. Backlighting will cast a large shadow on the outside of the sole. Traditional convolution tends to treat the shadow as part of the shoe, causing the detection box to deviate. CBAM lowers the weight of the shadow area. At this time, the box does not drift with the shadow. Raising the weight of the sole edge can improve the localization accuracy. After two attention weightings, the information density and discriminative power are improved. In complex scenes such as fog and backlighting, the shoe detection recall rate is improved by 23.6%.
[0025] The improved YOLOv8 model's anchor size was determined by reanalyzing the width and height distribution of the bounding boxes using the k-means clustering algorithm. It should be noted that the anchors in the public dataset are designed based on the COCO general target, with an average aspect ratio of approximately 1:1. However, long jump shoes are actually "long elliptical" in shape, with an aspect ratio of approximately 1:2, and the pixel size is highly concentrated after imaging. Therefore, 5000 real long jump scene images (covering different lighting, distances, and angles) were collected, and the precise bounding boxes of all shoes were labeled. The k-means clustering algorithm was used to analyze the width and height distribution of the labeled boxes to determine the optimal anchor size. The anchor size was reset to [12×25, 18×40, 25×55]. In YOLOv8, the anchors parameters were replaced with the optimized size, and the backbone layer was frozen during training. The detection head was fine-tuned to accelerate convergence. When detecting small target shoes (distance from the camera > 5m), the detection rate increased from 76% to 90%.
[0026] The model inference step also includes an occlusion-dust robust detection head (OS-Head), which converts the network's final feature output into an interpretable shoe sole probability mask by running a lightweight segmentation branch in parallel with the YOLOv8 detection head, and fixes the output resolution to ensure spatial consistency with the detection box. It should be noted that in actual long jump physical tests, shoe soles are often obscured by instantly kicked-up dust, other people's shoe soles, or the shadows of the referees. Traditional detection boxes directly miss the target, resulting in a false negative rate as high as 30%. Therefore, by running a lightweight segmentation branch in parallel with the YOLOv8 detection head, the network's final feature output is transformed into an interpretable shoe sole probability mask. Then, the IoU between the mask and the detection box is used to filter suspicious results. Using only a monocular camera, the false negative rate caused by dust occlusion can be reduced by 24%. The training data for the occlusion-dust robust detection head includes: real long jump scene images, and GAN-generated dust / occlusion composite images. By labeling the bounding boxes and shoe sole segmentation masks on the data and applying different effects to the data, the data diversity is increased, and the model is trained accordingly.
[0027] Step S3: The coordinate transformation step involves converting the coordinates of the lower left corner pixel of the detection box to the true coordinates in the world coordinate system based on the camera calibration parameters. The coordinate transformation formula is defined as follows: , in, This represents the pixel coordinates of the shoe in the image. Represents the shoe's coordinates in the real world. This represents the camera intrinsic parameters obtained through calibration. Represents camera extrinsic parameters; the actual meaning of 1 is the third dimension. Since the long jump field is a flat surface and does not involve height, this dimension is ignored and therefore set to 1 here; The real-world coordinates of the shoe are determined by the data processing unit running a trained YOLOv8 model during the actual distance measurement process. This model detects the shoe (lower left corner coordinates) in the image captured by the camera and calculates the coordinates using the inverse matrix of the camera parameters and the pixel coordinates of the shoe in the image. The formula is as follows: = ; Step S4: The step of judging the landing line is to detect the position of the shoe before the jump, calculate the distance between the shoe and the take-off line, and if the shoe is on the take-off line, an alarm is issued. If the shoe is not on the take-off line, the distance between the shoe position and the take-off line after landing is collected.
[0028] Example 5: like Figure 1 As shown, this embodiment of the invention provides a method for measuring the distance of a long jump based on an improved YOLOv8 model, including the following steps: Step S1: Image acquisition step, used to acquire video streams of the long jump area in real time; Step S2: The model inference step, load and run the trained and improved YOLOv8 model, output the insole detection box and the sole mask; Step S2 includes inserting a CBAM attention module at the top of the feature pyramid of the Neck layer in the improved YOLOv8 model. The CBAM attention module includes a channel attention submodule and a spatial attention submodule. It should be noted that the channel attention submodule is used to enhance the sole texture features. During the long jump, in the sandpit, the sole color is almost the same as the sand, which results in an RGB difference of less than 20. However, high-frequency textures such as sole stitching and logos are still present. Therefore, CBAM first performs global average pooling to compress the entire feature map into a 1×1×C vector, and then outputs two layers of 1×1 convolution. Since the weights of each channel are inconsistent (the texture channel has a high weight and the background channel has a low weight), the computational resources are directly "locked" on the sole texture. The spatial attention submodule is used to focus on the edges of the movement direction. Backlighting will cast a large shadow on the outside of the sole. Traditional convolution tends to treat the shadow as part of the shoe, causing the detection box to deviate. CBAM lowers the weight of the shadow area. At this time, the box does not drift with the shadow. Raising the weight of the sole edge can improve the localization accuracy. After two attention weightings, the information density and discriminative power are improved. In complex scenes such as fog and backlighting, the shoe detection recall rate is improved by 23.6%.
[0029] The improved YOLOv8 model's anchor size was determined by reanalyzing the width and height distribution of the bounding boxes using the k-means clustering algorithm. It should be noted that the anchors in the public dataset are designed based on the COCO general target, with an average aspect ratio of approximately 1:1. However, long jump shoes are actually "long elliptical" in shape, with an aspect ratio of approximately 1:2, and the pixel size is highly concentrated after imaging. Therefore, 5000 real long jump scene images (covering different lighting, distances, and angles) were collected, and the precise bounding boxes of all shoes were labeled. The k-means clustering algorithm was used to analyze the width and height distribution of the labeled boxes to determine the optimal anchor size. The anchor size was reset to [12×25, 18×40, 25×55]. In YOLOv8, the anchors parameters were replaced with the optimized size, and the backbone layer was frozen during training. The detection head was fine-tuned to accelerate convergence. When detecting small target shoes (distance from the camera > 5m), the detection rate increased from 76% to 90%.
[0030] The model inference step also includes an occlusion-dust robust detection head (OS-Head), which converts the network's final feature output into an interpretable shoe sole probability mask by running a lightweight segmentation branch in parallel with the YOLOv8 detection head, and fixes the output resolution to ensure spatial consistency with the detection box. It should be noted that in actual long jump physical tests, shoe soles are often obscured by instantly kicked-up dust, other people's shoe soles, or the shadows of the referees. Traditional detection boxes directly miss the target, resulting in a false negative rate as high as 30%. Therefore, by running a lightweight segmentation branch in parallel with the YOLOv8 detection head, the network's final feature output is transformed into an interpretable shoe sole probability mask. Then, the IoU between the mask and the detection box is used to filter suspicious results. Using only a monocular camera, the false negative rate caused by dust occlusion can be reduced by 24%. The training data for the occlusion-dust robust detection head includes: real long jump scene images, and GAN-generated dust / occlusion composite images. By labeling the bounding boxes and shoe sole segmentation masks on the data and applying different effects to the data, the data diversity is increased, and the model is trained accordingly.
[0031] Step S3: The coordinate transformation step involves converting the coordinates of the lower left corner pixel of the detection box to the true coordinates in the world coordinate system based on the camera calibration parameters. The coordinate transformation formula is defined as follows: , in, This represents the pixel coordinates of the shoe in the image. Represents the shoe's coordinates in the real world. This represents the camera intrinsic parameters obtained through calibration. Represents camera extrinsic parameters; the actual meaning of 1 is the third dimension. Since the long jump field is a flat surface and does not involve height, this dimension is ignored and therefore set to 1 here; The real-world coordinates of the shoe are determined by the data processing unit running a trained YOLOv8 model during the actual distance measurement process. This model detects the shoe (lower left corner coordinates) in the image captured by the camera and calculates the coordinates using the inverse matrix of the camera parameters and the pixel coordinates of the shoe in the image. The formula is as follows: = ; Step S4: The step of judging the landing line: detect the position of the shoe before the jump, calculate the distance between the shoe and the take-off line. If the shoe is on the take-off line, an alarm is issued. If the shoe is not on the take-off line, the distance between the shoe position and the take-off line after landing is collected. Step S5: The long jump distance calculation step, used to calculate the vertical distance between the sole of the shoe and the take-off line after landing, without touching the line, as the long jump score. The formula for calculating the long jump distance is: .
[0032] Example 6: like Figure 2As shown, this embodiment also provides a physical fitness test long jump distance measurement system based on an improved YOLOv8 model, including an image acquisition module 1, a model inference module 2, a coordinate transformation module 3, a line-pressing judgment module 4, and a long jump distance calculation module 5; Image acquisition module 1 is used to acquire video streams of the long jump area in real time; Model inference module 2 loads and runs the trained and improved YOLOv8 model, outputting the insole detection box and the sole mask; It should be noted that the improved YOLOv8 model inserts a CBAM attention module at the top of the feature pyramid in the Neck layer. The CBAM attention module includes a channel attention submodule and a spatial attention submodule. The channel attention submodule is used to enhance the sole texture features, and the spatial attention submodule is used to focus on the edges of the motion direction. The improved YOLOv8 model's anchor size was determined by reanalyzing the width and height distribution of the bounding boxes using the k-means clustering algorithm. The model inference module 2 also includes an occlusion-dust robust detection head. By running a lightweight segmentation branch in parallel with the YOLOv8 detection head, the final feature output of the network is transformed into an interpretable shoe sole probability mask, and the output resolution is fixed to ensure spatial consistency with the detection box. The training data of the occlusion-dust robust detection head includes: real long jump scene images, dust / occlusion composite images generated by GAN. The real long jump scene images are used to annotate the bounding boxes and shoe sole segmentation mask, and the dust / occlusion composite images generated by GAN are used to enhance the robustness of the model. Coordinate transformation module 3 converts the pixel coordinates of the lower left corner of the detection box into the real coordinates in the world coordinate system based on the camera calibration parameters; Based on the camera calibration parameters, the pixel coordinates of the lower left corner of the detection box are converted to the true coordinates in the world coordinate system. The coordinate transformation formula is defined as follows: , in, This represents the pixel coordinates of the shoe in the image. Represents the shoe's coordinates in the real world. This represents the camera intrinsic parameters obtained through calibration. Represents camera external parameters; The real-world coordinates of the shoe are calculated using the inverse matrix of the camera parameters and the pixel coordinates of the shoe in the image, as expressed by the formula: = ; The line-pressing judgment module 4 is used to detect the position of the shoes before the jump, calculate the distance between the shoes and the take-off line, and issue an alarm if the shoes press the take-off line. If the shoes do not press the take-off line, the distance between the shoes and the take-off line after landing is collected. The long jump distance calculation module 5 is used to calculate the vertical distance between the sole of the shoe and the take-off line after landing, as the long jump score, without touching the line. Without landing on the take-off line, the vertical distance between the sole of the shoe and the take-off line is calculated as the long jump score. The formula for calculating the long jump distance is as follows: .
[0033] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the invention should also be covered within the protection scope of the invention. Therefore, the protection scope of the invention should be determined by the scope of the claims.
Claims
1. A body measuring long jump distance measuring method based on an improved YOLOv8 model, characterized in that, It comprises the following steps: Step S1: a step of image acquisition, for collecting a video stream of a jumping area in real time; Step S2: a step of model inference, loading and running a trained improved YOLOv8 model to output a shoe pad detection frame and a sole mask; Step S3: a step of coordinate conversion, converting the pixel coordinates of the lower left corner of the detection frame into real coordinates in the world coordinate system based on camera calibration parameters; Step S4: a step of line pressing judgment, for calculating the distance between the sole before take-off and the take-off line, and triggering a line pressing alarm if the distance is less than a threshold value; Step S5: a step of jumping distance calculation, for calculating the vertical distance between the sole after landing and the take-off line as the jumping result in the case of no line pressing.
2. The body jump method based on the improved YOLOv8 model according to claim 1, wherein, The improved YOLOv8 model inserts a CBAM attention module at the top of the feature pyramid of the Neck layer.
3. The body jump method based on the improved YOLOv8 model according to claim 2, characterized in that, The CBAM attention module comprises a channel attention submodule and a spatial attention submodule; The channel attention submodule is used to enhance the texture features of the sole; The spatial attention submodule is used to focus on the edge of the movement direction.
4. The body jump method based on the improved YOLOv8 model according to claim 1, wherein, The Anchor size of the improved YOLOv8 model is reanalyzed by a k-means clustering algorithm to determine the optimal Anchor size.
5. The body jump method based on the improved YOLOv8 model according to claim 1, characterized in that, The model inference step includes a shelter-dust robust detection head, which converts the last feature output of the network into an interpretable sole probability mask by parallelizing a lightweight segmentation branch with the YOLOv8 detection head, and fixes the output resolution to ensure spatial consistency with the detection frame.
6. The body jump method based on the improved YOLOv8 model according to claim 5, characterized in that, The training data of the shelter-dust robust detection head includes: real jumping scene images and GAN generated dust / shelter synthetic images; The real jumping scene images are used to label the boundary box and the sole segmentation mask; The GAN generated dust / shelter synthetic images are used to enhance the robustness of the model.
7. The body jump method based on the improved YOLOv8 model according to claim 1, characterized in that, The coordinate conversion formula in the coordinate conversion step is defined as: , wherein, represents the pixel coordinates of the shoe in the image, represents the coordinates of the shoe in the real world, represents the camera intrinsic obtained by the calibration, represents the camera extrinsic; The coordinates of the shoe in the real world are calculated by the inverse matrix of the camera parameters and the pixel coordinates of the shoe in the image, which is expressed by the formula: = .
8. The body jump method based on the improved YOLOv8 model according to claim 1, characterized in that, Detect the position of the shoe before take-off, calculate the distance between the shoe and the take-off line, and if the take-off line is pressed, an alarm is given, and if the take-off line is not pressed, the distance between the position of the shoe after landing and the take-off line is collected; In the case of no line pressing, the vertical distance between the sole after landing and the take-off line is calculated as the jumping result; The long jump distance calculation formula expression is: .
9. A body measuring long jump distance measuring system based on an improved YOLOv8 model, characterized in that, Image acquisition module, model inference module, coordinate conversion module, line pressing judgment module, jumping distance calculation module; The model inference module is used to collect a video stream of a jumping area in real time; The model inference module loads and runs a trained improved YOLOv8 model to output a shoe pad detection frame and a sole mask; The coordinate conversion module converts the pixel coordinates of the lower left corner of the detection frame into real coordinates in the world coordinate system based on camera calibration parameters; The line pressing judgment module is used to calculate the distance between the sole before take-off and the take-off line, and triggers a line pressing alarm if the distance is less than a threshold value; The jumping distance calculation module is used to calculate the vertical distance between the sole after landing and the take-off line as the jumping result in the case of no line pressing.
10. The body-measuring long jump distance measuring system based on the improved YOLOv8 model according to claim 1, characterized in that, The improved YOLOv8 model in the model inference module is inserted with a CBAM attention module at the top of a feature pyramid of a Neck layer; anchor sizes of the improved YOLOv8 model are reanalyzed by a k-means clustering algorithm to determine optimal anchor sizes according to width-height distributions of labeled boxes; and a lightweight segmentation branch is parallelly arranged beside a YOLOv8 detection head to reduce the influence of dust, other people's soles or the shadow of a referee on target detection. The coordinate conversion formula in the coordinate conversion module is defined as: , wherein, represents the pixel coordinates of the shoe in the image, represents the coordinates of the shoe in the real world, represents the camera intrinsic obtained by the calibration, represents the camera extrinsic; The coordinates of the shoes in the real world are calculated by the inverse matrix of the camera parameters and the pixel coordinates of the shoes in the image, and the formula is: = ; The position of the shoe before take-off is detected, the distance between the shoe and the take-off line is calculated, if the take-off line is pressed, an alarm is given, and if the take-off line is not pressed, the distance between the position of the shoe after landing and the take-off line is collected. In the case of no pressure line, the vertical distance between the sole and the take-off line after landing is calculated as the long jump result, wherein the long jump distance calculation formula expression is: .