Fencing competition referee method and device, system, and computer-readable storage medium
The automatic refereeing of fencing competitions is realized through computer vision technology, which solves the problems of high cost and high misjudgment rate of manual referees, and improves the fairness and transparency of the competition.
Patent Information
- Application Number
- CN202211516505.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-11-29
AI Technical Summary
The existing refereeing method of fencing competitions relies on manual referees, which results in high costs, high misjudgment rates and affects the fairness of the competition.
Computer vision technology is used to obtain images through video acquisition equipment, and human body detection, clarity detection, key point identification and foul action identification are performed. It is combined with signal light color recognition to perform score statistics and realize an automated referee system.
It reduces the workload of referees, improves the fairness and impartiality of the game, reduces the reliance on referees for score interpretation, and improves the transparency and accuracy of the game.
Smart Images

Figure CN115869608B
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to, but are not limited to, the field of referee assistance technology, and in particular, to a fencing match refereeing method and device, system, and computer-readable storage medium. Background Art
[0002] Fencing is a sport that is highly entertaining and competitive and is loved by young people. Currently, fencing competitions are judged manually, which is expensive and difficult to find professional referees. In addition, manual judging is likely to result in misjudgments or missed judgments, which will affect the fairness of the competition. Summary of the invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The present disclosure provides a fencing match refereeing method, including:
[0005] Obtaining the image to be detected captured by the video acquisition device;
[0006] Performing human body detection and clarity detection on the image to be detected to obtain a human body detection image that meets preset clarity requirements;
[0007] Performing human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images;
[0008] According to the coordinates of key points of the human body, the foul action is recognized, and according to the image of human body parts, the hitting action is recognized;
[0009] Score statistics are performed based on the results of the foul action recognition and the results of the hitting action recognition.
[0010] An embodiment of the present disclosure also provides a fencing match referee device, comprising a memory; and a processor connected to the memory, wherein the memory is used to store instructions, and the processor is configured to execute the steps of the fencing match referee method described in any embodiment of the present disclosure based on the instructions stored in the memory.
[0011] The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for refereeing a fencing competition described in any embodiment of the present disclosure is implemented.
[0012] The disclosed embodiment also provides a fencing match referee device, including a communication module, a human body detection and clarity detection module, a human body key point detection and human body part segmentation module, a foul action recognition module, a hitting action recognition module and a score statistics module, wherein:
[0013] The communication module is configured to obtain the image to be detected captured by the video capture device;
[0014] The human body detection and clarity detection module is configured to perform human body detection and clarity detection on the image to be detected to obtain a human body detection image that meets the preset clarity requirement;
[0015] The human body key point detection and human body part segmentation module is configured to perform human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images;
[0016] The foul action recognition module is configured to perform foul action recognition according to the coordinates of key points of the human body;
[0017] The hitting action recognition module is configured to perform hitting action recognition based on the human body part image;
[0018] The score statistics module is configured to perform score statistics according to the result of the foul action recognition and the result of the hitting action recognition.
[0019] The embodiments of the present disclosure also provide a fencing match referee system, comprising a video acquisition device, a screen display device, and also the fencing match referee device described in any embodiment of the present disclosure; wherein: the video acquisition device is used to acquire images to be detected and output them to the fencing match referee device; the screen display device is used to display the score statistics results of the fencing match referee device.
[0020] Other aspects will become apparent upon reading and understanding the drawings and detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to provide a further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure. The shapes and sizes of the components in the accompanying drawings do not reflect the actual proportions and are only intended to illustrate the contents of the present disclosure.
[0022] Figure 1 A schematic diagram of a flow chart of a fencing match refereeing method provided by an exemplary embodiment of the present disclosure;
[0023] Figure 2A A schematic diagram of a fencing competition venue;
[0024] Figure 2B A schematic diagram of a scene for fencers to perform a fencing match;
[0025] Figure 3AA schematic diagram of the structure of a target detection model provided for an exemplary embodiment of the present disclosure;
[0026] Figure 3B Schematic diagram of output content of the target detection model according to an embodiment of the present disclosure;
[0027] Figure 4A and Figure 4B Schematic diagram of two first training images according to an embodiment of the present disclosure;
[0028] Figure 5 This is a flowchart of the hitting action recognition according to an embodiment of the present disclosure;
[0029] Fig. 6A A flowchart of foul action recognition according to an embodiment of the present disclosure;
[0030] Figure 6B A schematic diagram of setting the kendo end line threshold according to an embodiment of the present disclosure;
[0031] Figure 7 This is a score statistics flow chart of an embodiment of the present disclosure;
[0032] Figure 8 It is a structural schematic diagram of a fencing competition referee system according to an embodiment of the present disclosure;
[0033] Fig. 9 The present invention is a schematic diagram of the structure of a fencing competition referee device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present disclosure can be combined with each other arbitrarily without conflict.
[0035] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprising" and similar words mean that the elements or objects before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0036] like Figure 1 As shown, the embodiment of the present disclosure provides a fencing competition referee method, comprising the following steps:
[0037] Step 101: Obtain an image to be detected captured by a video capture device;
[0038] Step 102: Perform human body detection and clarity detection on the image to be detected to obtain a human body detection image that meets the preset clarity requirement;
[0039] Step 103, performing human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images;
[0040] Step 104, performing foul action recognition based on the coordinates of the key points of the human body, and performing hitting action recognition based on the human body part image;
[0041] Step 105: Score statistics are performed based on the results of the foul action recognition and the results of the hitting action recognition.
[0042] The fencing match referee method provided by the disclosed embodiment obtains a human body detection image that meets the preset clarity requirement by performing human body detection and clarity detection on the detected image; performs human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images; performs foul action recognition based on the human body key point coordinates, and performs hitting action recognition based on the human body part images; and performs score statistics based on the results of foul action recognition and hitting action recognition, which can reduce the workload of the referee and the labor cost, and can also effectively solve the problem that the player's score is too dependent on the referee's interpretation, making the game more fair and just. In addition, the disclosed embodiment uses artificial intelligence to allow ordinary audiences to better understand the scoring of fencing sports, and also allows players to better review the game.
[0043] Figure 2A This is a schematic diagram of a fencing competition venue. Figure 2B This is a schematic diagram of a fencer performing a fencing match. Figure 2A and 2B As shown, fencing is a sport that combines elegance and wisdom, and kendo is the competition venue for fencing. In fencing competitions, fencers must compete on the kendo and cannot leave the kendo. The length of the kendo is 14 meters and the width is mostly around 2 meters. There are also 1.5 to 2 meters of extension parts at both ends of the kendo.
[0044] In some exemplary embodiments, Figure 2A As shown, the video acquisition device may include two cameras, which are arranged on both sides of the kendo, with the shortest distance between each camera and the kendo being 3 to 3.5 meters, and the height between each camera and the ground being 2 to 2.5 meters.
[0045] In some exemplary embodiments, performing human body detection and clarity detection on an image to be detected to obtain a human body detection image that meets a preset clarity requirement includes:
[0046] A target detection model is used to simultaneously perform human body detection and clarity detection on an image to be detected to obtain a human body detection image that meets the preset clarity requirements. During the model training stage, the target detection model is trained using a first training set. The first training set includes multiple first training images, and each first training image is formed by joining at least one human body detection data set image containing a human body detection frame annotation and at least one human body clarity data set image containing a clarity annotation.
[0047] Since fencers move at a fast speed during fencing competitions, conventional target detection algorithms cannot determine whether the captured human body picture (i.e., the image to be detected) is a clear image. If the image is not clear, it is easy to cause positioning errors in the segmentation of human body parts. Therefore, by first filtering out images whose clarity does not meet the requirements through the algorithm, the accuracy can be improved while reducing the running time. However, if a new human body clarity recognition model is added, the computing power requirements will increase on the original basis, thereby increasing the processing time. Therefore, the disclosed embodiment optimizes the structure of the target detection model, uses a target detection model, and outputs human body detection results and clarity detection results at the same time, which can improve the accuracy, reduce the running time, and reduce the computing power requirements at the same time.
[0048] In some exemplary embodiments, Figure 3A As shown, the target detection model of the embodiment of the present disclosure includes an input end, a backbone network layer (Backbone), a neck (Neck) and a prediction layer (Prediction), wherein:
[0049] The input end is configured to perform operations such as data augmentation and adaptive image scaling on the image to be detected.
[0050] The backbone network layer is configured to convert the image to be detected into a first feature map through a convolution operation;
[0051] A neck, configured to convert the first feature map into a prediction feature map by upsampling and downsampling;
[0052] The prediction layer is configured to make predictions based on the prediction feature map.
[0053] For example, Figure 3A As shown, the backbone network layer slices the input image to be detected (i.e., divides a large image into some small image slices). For example, the image to be detected of s1'*s2'*3 (exemplary, s1'=720, s2'=400, 3 channels) is converted into a feature map of s1'*s2'*12 through a slicing operation, and then undergoes a convolution operation of 32 convolution kernels, and finally converted into the first feature map of s1'*s2'*32. In the figure, F1, F2, F3 and F4 represent four convolution layers.
[0054] In order to better extract fusion features, some layers are usually added between the Backbone and the prediction layer. This part is called Neck. It is equivalent to the neck of the target detection network. It usually uses ordinary convolutional networks and FPN structures. It can be seen from the figure that in the Neck layer, after several ups and downsampling, the lower arrow is upsampling, and the upper arrow is downsampling. The FPN structure is top-down, and the high-level feature information is transferred and fused by upsampling to obtain the feature map for prediction. In the figure, Upsample represents upsampling and Downsample represents downsampling.
[0055] The prediction layer usually uses the GIOU_Loss (Generalized Intersection over Union) loss function. The loss function of the target detection task includes two parts: the classification loss function (Classificition Loss) and the regression loss function (Bounding Box Regeression Loss).
[0056] Figure 3B This is a schematic diagram of the output content of the target detection model of the embodiment of the present disclosure. The content output by the prediction layer includes the predicted position coordinates of the detection box Box, the number of targets Obj, and the number of target categories Cls. Since the target detection model of the embodiment of the present disclosure can train two types of target data at the same time, the number of targets Obj is 2. Since the target detection model of the embodiment of the present disclosure can obtain two output categories at the same time: human body detection results and clarity detection results, the number of target categories Cls is also 2. The human body detection and clarity detection results are obtained through the same target detection model network structure and different losses. During the training process, for human body detection and clarity detection, the two detection categories reversely calculate the Loss separately, and do not mix them together.
[0057] In some exemplary embodiments, the target detection model outputs the coordinates of the human body detection frame, the human body detection probability, the clarity result, and the clarity probability of the image to be detected, and the clarity result includes clarity and unclearness;
[0058] When the output human body detection probability is greater than the preset first probability, the clarity result is clear and the clarity probability is greater than the preset second probability, the output human body detection image is a human body detection image that meets the preset clarity requirement.
[0059] When in use, the motion images of the fencing players obtained during the game (images to be detected) are input into the target detection model, and the human body position area (i.e., the human body detection frame coordinates), clarity results, and the corresponding human body detection probability and clarity probability are output; based on the clarity results, clarity probability and human body detection probability, the human body detection frame coordinates and human body screenshots with higher clarity that meet the preset requirements are screened out.
[0060] In some exemplary embodiments, the preset first probability may be set between 0.5 and 0.7, and the preset second probability may be set between 0.5 and 0.7.
[0061] Exemplarily, the first probability is preset to 0.6, and the second probability is preset to 0.6.
[0062] During the screening process, since the target detection model will output the clarity probability of clarity and the human detection probability of the human detection box coordinates, the human detection box coordinates and human screenshots whose clarity results are clear and whose clarity probability and human detection probability are both greater than the preset probability threshold are retained, and the human detection box coordinates and human screenshots whose clarity results are unclear, or whose clarity results are clear and whose clarity probability and human detection probability are at least one less than the preset threshold are discarded.
[0063] Since the human detection dataset only has human detection frame annotations but no clarity annotations, while the human clarity dataset only has clarity annotations but no human detection frame annotations, if the input structure of the training dataset of the target detection model is not adjusted, the two datasets need to be uniformly labeled, which requires a lot of manpower to complete the labeling. Therefore, the disclosed embodiment adjusts the dataset input structure for training the target detection model from a single dataset to mixed loading of multiple datasets. The mixed loading randomly pastes data of different categories onto the first training image of a fixed size (generally set to 1440x 800), and at least ensures that each first training image contains two categories.
[0064] It should be noted that when using the target detection model of the embodiment of the present disclosure to perform human body detection and human body clarity detection, there is no need to perform a puzzle operation on the image to be detected captured by the video acquisition device. The image to be detected captured by the video acquisition device can be directly input into the target detection model of the embodiment of the present disclosure, and the human body detection result and the human body clarity frame detection result can be obtained at the same time.
[0065] In some exemplary embodiments, Figure 4A and Figure 4B As shown, each first training image can be formed by joining two human detection dataset images containing human detection frame annotations and two human clarity dataset images containing clarity annotations.
[0066] In the disclosed embodiment, the human body detection frame annotation and the clarity annotation are labeled according to the corresponding data set images. Each human body detection data set image and body clarity data set image has a corresponding category label.
[0067] In other exemplary embodiments, each first training image may be formed by pasting together a human body detection data set picture including a human body detection frame annotation and a human body clarity data set picture including clarity annotation, or each first training image may be formed by pasting together four human body detection data set pictures including human body detection frame annotations and four human body clarity data set pictures including clarity annotations. The present disclosure embodiment is not limited to this, as long as each first training image includes at least one human body detection data set picture including a human body detection frame annotation and at least one human body clarity data set picture including clarity annotations.
[0068] Exemplarily, the size of the human body detection data set image is s1*s2, the size of the human body definition data set image is s1*s2, and the size of the first training image is s1'*s2'=2s1*2s2.
[0069] In some exemplary embodiments, Figure 4A and Figure 4B As shown, the coordinates of the four vertices of the first training image in the image coordinate system are (0, 0), (2s1, 0), (0, 2s2) and (2s1, 2s2), respectively. The coordinates of the fitting point A in each first training image are within the rectangular area enclosed by the first coordinate point B (s1 / 2, s2 / 2), the second coordinate point C (3*s1 / 2, s2 / 2), the third coordinate point D (s1 / 2, 3*s2 / 2) and the fourth coordinate point E (3*s1 / 2, 3*s2 / 2).
[0070] When fitting to form the first training image, areas in the fitted human body detection dataset image and / or human body clarity dataset image that exceed the size of the first training image are discarded, and parts of the first training image that are not filled by the human body detection dataset image and / or human body clarity dataset image are filled with a preset color.
[0071] In the embodiment of the present disclosure, the preset filling color may be gray, however, the embodiment of the present disclosure is not limited to this.
[0072] In some exemplary embodiments, forming the first training image by assembling comprises the following steps:
[0073] (1) Set the image size of the input dataset of different categories to s1*s2 (s1=720, s2=400), then generate a blank first training image of size 2s1*2s2;
[0074] (2) A point is randomly selected from the rectangular area defined by the first coordinate point B (s1 / 2, s2 / 2), the second coordinate point C (3*s1 / 2, s2 / 2), the third coordinate point D (s1 / 2, 3*s2 / 2) and the fourth coordinate point E (3*s1 / 2, 3*s2 / 2) as the pasting point, and partial areas of four images are randomly selected from the data sets of the two categories and pasted onto the blank first training image. The areas of the four images that exceed the first training image are discarded, and the unfilled parts of the first training image are filled with a preset color.
[0075] In the object detection model of the disclosed embodiment, during the training process, not only one mapping point is selected, but many mapping points in different positions are generated, thereby generating many first training images. The data diversity of the first training set is enhanced by randomly selecting mapping points, and the cropped parts of different degrees that appear themselves also enhance the data diversity of the first training set. On the contrary, if a fixed center point is selected for mapping, the result of stitching together multiple images is unique, and the data diversity of the first training set cannot be enhanced.
[0076] For the target detection model of the disclosed embodiment, during the training process, the validation set can be an alternating validation of dual data, that is, two types of validation sets are loaded, and the mAP (Mean Average Precision)) on each validation set is calculated respectively. The validation set only needs to be labeled with a single category label, and no mixed labeling is required.
[0077] In some exemplary embodiments, performing human key point detection and human body part segmentation on a human body detection image to obtain human key point coordinates and human body part images includes:
[0078] The fusion model is used to perform human key point detection and human part segmentation on the human detection image to obtain the human key point coordinates and human part images. The fusion model includes two feature pyramid network structures (Feature Pyramid Networks, FPN). The two FPN structures perform human key point detection and human region segmentation respectively, and the results of the two FPN structures are integrated in the output layer of the fusion model.
[0079] The disclosed embodiment uses a fusion model to fuse human key point detection and human body part segmentation. The fusion model uses a residual network with two FPN structure inputs to process human key point detection and human body region positioning respectively, and integrates the two results in the model output layer to implement an end-to-end network model, and outputs instance segmentation images of human body parts, i.e., regional coordinates of different positions including human torso, legs, hands, arms, head, etc. The disclosed embodiment can improve the detection speed by using a fusion model.
[0080] In some other exemplary embodiments, performing human key point detection and human body part segmentation on a human body detection image to obtain human key point coordinates and human body part images includes:
[0081] Perform human key point detection on the human detection image through the human key point detection model to obtain the coordinates of the human key points;
[0082] The human body detection image is segmented into human body parts by using a semantic segmentation model to obtain a human body part image.
[0083] In this embodiment, by using a human key point detection model and a semantic segmentation model, human key point detection and human body part segmentation are performed respectively, and the detection accuracy can be improved. For example, the obtained human body detection frame and human body screenshot with higher clarity are input into the human body key point detection model (such as MoveNet model / PoseNet model, etc.) to obtain information such as human body key point coordinates. Exemplarily, the human body key points are the human body parts corresponding to 17 skeletal key points: 0: nose, 1: left eye, 2: right eye, 3: left ear, 4: right ear, 5: left shoulder, 6: right shoulder, 7: left elbow, 8: right elbow, 9: left wrist, 10: right wrist, 11: left hip, 12: right hip, 13: left knee, 14: right knee, 15: left ankle, 16: right ankle. The high-definition human detection frame and human screenshot are input into the semantic segmentation model (such as the PSPnet model), and a pixel-level human segmentation map is output. Combined with the coordinates of the human key points obtained above, the coordinates of the human body areas at different positions such as the human torso, legs, hands, arms and head can be obtained.
[0084] In the disclosed embodiment, the coordinates of the key points of the human body and the coordinates of the human body region are both coordinates in the world coordinate system. Since the video acquisition device can be placed at any position in the environment, a reference coordinate system is selected in the environment to describe the position of the video acquisition device, and it is used to describe the position of any object in the environment. This coordinate system is called the world coordinate system.
[0085] In some exemplary embodiments, sensor lights of different colors are provided on the sword heads of multiple fencers, and the sensor lights light up when there is a hitting pressure sense.
[0086] In the disclosed embodiment, the signal light is a sensor light set on the head of the fencing sword. When there is a hitting pressure sensor, the signal light lights up. The signal lights on the heads of the two players can be set to two different colors respectively.
[0087] For example, the signal light on the sword head of the left player can be set to a red signal light, and the signal light on the sword head of the right player can be set to a green signal light. When the red light is on, it means that the left player has scored, and when the green light is on, it means that the right player has scored. The embodiment of the present disclosure does not limit the color of the signal light.
[0088] In some exemplary embodiments, Figure 5 As shown, according to the human body part image, the hitting action recognition is performed, including:
[0089] The human body part image is input into the traffic light detection model, and whether it is hit and the hitting position are determined according to the output result of the traffic light detection model; the traffic light detection model is an image classification model, and the model training set of the traffic light detection model includes different human body part image data sets, and at least some of the human body part images are affixed with sensor lights of different colors.
[0090] The fencing match refereeing method of the disclosed embodiment combines the color of the hit signal light identified by the signal light detection model with the human body segmentation result to determine the hit position (torso, legs, feet, hands and arms or helmet).
[0091] In some exemplary embodiments, the image classification model may be a model of a small network structure such as mobilenet.
[0092] Since the signal light (pressure sensor) on the tip of the fencing sword is relatively small, if the entire human body detection image is directly input into the signal light detection model, there will be a problem of low accuracy. Because when constructing the training data set of the signal light detection model, the disclosed embodiment segments different areas of different human parts to generate a human body part image data set of more than 100,000, and then randomly pastes the red light, green light, etc. of the signal light onto different human body part images to produce positive samples with red and green light. This training method is equivalent to enlarging the area of the signal light on the human body image, which can effectively improve the accuracy of signal light detection. During training, different human body part images with red light spots, green light spots, and no light spots are used as three categories, and the ratio of sample data with red light spots, green light spots, and no light spots in the training data set can be set to 1:1:1.
[0093] When used, the input of the traffic light detection model is the output of the semantic segmentation model, that is, the human body part image. For example, a human body can be divided into 8 human body parts: head / torso / left arm / left hand / right arm / right hand / left leg / right leg.
[0094] During the traffic light detection process, different human body part images are input into the traffic light detection model to obtain the category of the human body part image, which includes any one of the following: with red light spots, with green light spots, or without light spots. According to the position of the input area and the category of the output human body part image, it is determined whether the traffic light in the effective hit area is on.
[0095] The rules for setting the effective hit area signal light detection are as follows:
[0096] (1) Epee: The effective parts of the body include the torso, legs, feet, hands, arms and helmet.
[0097] (2) Sabre: The effective areas of impact are the upper body, helmet and arms.
[0098] (3) Foil: on the trunk.
[0099] In some exemplary embodiments, Fig. 6A FIG. 4 is a flowchart of the foul action recognition of the embodiment of the present disclosure. Fig. 6A As shown, according to the coordinates of the key points of the human body, the foul action recognition is performed, including:
[0100] Input the coordinates of the key points of the human body and the threshold of the kendo end line to detect whether the player's feet are beyond the kendo end line. If they are beyond the kendo end line, an out-of-bounds alarm is triggered, and the player's violation message is sent and the score of the non-out-of-bounds player is sent and recorded;
[0101] Detect whether the non-fencing hand covers the effective part. If so, send the player a violation message and record it;
[0102] Detect whether there is a player with his back facing the opponent. If there is a player with his back facing the opponent, send a violation message to the player and record it;
[0103] Detect whether there is physical contact. If there is physical contact, send and record a physical contact message, issue a foul warning, and record N1 seconds of video before and after. For example, N1 can be set to 10 seconds.
[0104] In the disclosed embodiment, the detection of whether the player's feet are beyond the kendo end line, the detection of whether the non-sword-holding hand covers the effective part, the detection of whether the player's back is facing the opponent, and the detection of whether there is body contact can all be set with corresponding detection rules according to the coordinates of the key points of the human body and the coordinates of the kendo end line. For example, the detection of whether the player's feet are beyond the kendo end line can be specifically: the coordinate position of the player's feet is detected to see whether it is outside the position range of the kendo end line mark. For another example, the detection of whether the player's back is facing the opponent can be specifically: whether the distance between the back position coordinates of player 1 and the shoulder position of player 2 is greater than the distance between the hand position coordinates of player 1 and the shoulder position of player 2.
[0105] In some exemplary embodiments, Figure 6B As shown, the kendo end line threshold is set to: F point (0, 0), G point (14, 0), H point (2, 0), I point (14, 2), where F point is the origin of the coordinates. In the disclosed embodiment, the coordinates of the kendo end line threshold are the coordinates of the world coordinate system.
[0106] In some exemplary embodiments, Figure 7FIG. 4 is a flowchart of score statistics in an embodiment of the present disclosure. Figure 7 As shown, according to the results of the foul action recognition and the hit action recognition, score statistics are performed, including:
[0107] Input the hit results and foul messages, count the scores and violations by person, detect whether the scores have changed, and if so, push the scores to the screen display device for display;
[0108] If the score does not change, check whether there is any physical contact information. If there is physical contact information, push a foul warning and ask the referee to make a decision;
[0109] If there is no physical contact message, check whether the number of violations has changed. If the number of violations has not changed, return to the step of inputting the hit result and the foul message;
[0110] If the number of violations changes, check whether it is a new violation. If it is a new violation, a yellow card alarm will be pushed to the screen for display;
[0111] If it is not a new violation, the cumulative number of violations is calculated, the opponent is given 1 point, and the score and red card warning are pushed to the screen for display;
[0112] Check whether the player's cumulative score reaches 15 points. If it does not reach 15 points, check whether the game time reaches 9 minutes;
[0113] If 9 minutes have not been reached, return to the step of inputting the hit result and foul message;
[0114] If the players' cumulative score reaches 15 points or the game time reaches 9 minutes, check whether it is a tie;
[0115] In case of a tie, a sudden death playoff winner is set;
[0116] Check whether the extra time has reached 1 minute. If the extra time has reached 1 minute, check whether the game is tied again.
[0117] If there is another tie, the winner of the sudden death method will be the winner, and the winning player information will be pushed to the screen for display, and the final result and process data will be stored;
[0118] If there is no tie again, the player with the higher cumulative score wins, and the winning player's information is pushed to the screen for display, and the final result and process data are stored.
[0119] In the disclosed embodiment, the "sudden death method" means that if the two players are tied within the specified time, an extra minute will be played. Whoever stabs the other player first and scores within this minute will win the final victory. At the same time, in order to prevent both sides from excessively defending for the sake of safety in the overtime, the rules stipulate that a draw before the overtime will determine the priority of both sides. If neither side scores in the overtime, whoever draws the priority will win the final victory. Therefore, setting the winner of the sudden death method of the extra game means setting the party that draws the priority as the winner of the sudden death method of the extra game. If the overtime is tied again, the winner of the sudden death method of the extra game will be the final winner.
[0120] The disclosed embodiment proposes an intelligent fencing referee system based on computer vision technology, which is composed of a video acquisition device, a cloud server and a screen display device. The intelligent fencing referee system is realized through computer vision technology, which can reduce the workload of the referee and effectively solve the problem that the player's score is too dependent on the referee's interpretation, making the game more fair and just.
[0121] The disclosed embodiment of the invention uses human body detection and segmentation technology and hit signal light color recognition technology to achieve functions such as locating the hit part and warning of foul behavior, counting the scores of players and pushing the scores in real time, and storing the results and wonderful videos of the hit moment. The disclosed embodiment of the invention uses artificial intelligence to help ordinary audiences better understand the scores of fencing sports and also allows players to better review the game.
[0122] like Figure 8 As shown, the embodiment of the present disclosure further provides a fencing competition referee device 810, including: a communication module 801, a human body detection and clarity detection module 802, a human body key point detection and human body part segmentation module 803, a foul action recognition module 804, a hitting action recognition module 805 and a score statistics module 806, wherein:
[0123] The communication module 801 is configured to obtain the image to be detected captured by the video capture device 820;
[0124] The human body detection and clarity detection module 802 is configured to perform human body detection and clarity detection on the image to be detected, and obtain a human body detection image that meets the preset clarity requirement;
[0125] The human body key point detection and human body part segmentation module 803 is configured to perform human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images;
[0126] The foul action recognition module 804 is configured to perform foul action recognition according to the coordinates of key points of the human body;
[0127] The hitting action recognition module 805 is configured to perform hitting action recognition based on the human body part image;
[0128] The score statistics module 806 is configured to perform score statistics according to the result of the foul action recognition and the result of the hitting action recognition.
[0129] The disclosed embodiment also provides a fencing match referee system, including a video acquisition device 820, a fencing match referee device 810 and a screen-end display device 830. The fencing match referee device 810 can be applied to the cloud server side or to the terminal server. Among them, the fencing match referee device 810 mainly realizes functions such as human body detection and clarity detection, human body key point detection and human body part segmentation, hitting action recognition, foul action recognition and score statistics. By performing hitting action recognition and foul action recognition on multiple fencers' human body detection and clarity detection, human body key point detection and human body part segmentation, an alarm is issued when a foul behavior is recognized, and score statistics are performed based on the results of foul action recognition and hitting action recognition, and the statistical scores and data such as the wonderful video of the hitting moment are stored, and the statistical scores are pushed to the screen-end display device 830 for display.
[0130] In some exemplary embodiments, Figure 2A As shown, the video acquisition device 820 may include two cameras, which are arranged on both sides of the kendo, with the shortest distance between each camera and the kendo being 3 to 3.5 meters, and the height between each camera and the ground being 2 to 2.5 meters.
[0131] In some exemplary embodiments, the human body detection and clarity detection module 802 is specifically configured to:
[0132] A target detection model is used to simultaneously perform human body detection and clarity detection on an image to be detected. During the model training phase, the target detection model is trained using a first training set. The first training set includes multiple first training images. Each first training image is formed by joining at least one human body detection data set image containing a human body detection frame annotation and at least one human body clarity data set image containing a clarity annotation.
[0133] Since fencers move at a fast speed during fencing competitions, conventional target detection algorithms cannot determine whether the captured human body picture (i.e., the image to be detected) is a clear image. If the image is not clear, it is easy to cause positioning errors in the segmentation of human body parts. Therefore, by filtering out images that do not meet the clarity requirements through the algorithm, the accuracy can be improved while reducing the running time. If a new human body clarity recognition model is added, the computing power requirements will increase on the original basis, thereby increasing the processing time. Therefore, the disclosed embodiment optimizes the structure of the target detection model, uses one target detection model, and outputs the human body detection results and the clarity detection results at the same time, which can improve the accuracy, reduce the running time, and reduce the computing power requirements at the same time.
[0134] In some exemplary embodiments, Figure 3A As shown, the target detection model of the embodiment of the present disclosure includes an input end, a backbone network layer (Backbone), a neck (Neck) and a prediction layer (Prediction), wherein:
[0135] The input end is configured to perform operations such as data augmentation and adaptive image scaling on the image to be detected.
[0136] The backbone network layer is configured to convert the image to be detected into a first feature map through a convolution operation;
[0137] A neck, configured to convert the first feature map into a prediction feature map by upsampling and downsampling;
[0138] The prediction layer is configured to make predictions based on the prediction feature map.
[0139] In some exemplary embodiments, the target detection model outputs the coordinates of the human body detection frame, the human body detection probability, the clarity result, and the clarity probability of the image to be detected, and the clarity result includes clarity and unclearness;
[0140] When the output human body detection probability is greater than the preset first probability, the clarity result is clear and the clarity probability is greater than the preset second probability, the output human body detection image is a human body detection image that meets the preset clarity requirement.
[0141] In some exemplary embodiments, the preset first probability may be set between 0.5 and 0.7, and the preset second probability may be set between 0.5 and 0.7.
[0142] Exemplarily, the preset first probability may be set to 0.6, and the preset second probability may be set to 0.6.
[0143] During the screening process, since the target detection model will output the clarity probability of clarity and the human detection probability of the human detection box coordinates, the human detection box coordinates and human screenshots whose clarity results are clear and whose clarity probability and human detection probability are both greater than the preset probability threshold are retained, and the human detection box coordinates and human screenshots whose clarity results are unclear, or whose clarity results are clear and whose clarity probability and human detection probability are at least one less than the preset threshold are discarded.
[0144] In some exemplary embodiments, Figure 4A and Figure 4B As shown, each first training image can be formed by joining two human detection dataset images containing human detection frame annotations and two human clarity dataset images containing clarity annotations.
[0145] In other exemplary embodiments, each first training image may be formed by pasting together a human body detection data set picture including a human body detection frame annotation and a human body clarity data set picture including clarity annotation, or each first training image may be formed by pasting together four human body detection data set pictures including human body detection frame annotations and four human body clarity data set pictures including clarity annotations. The present disclosure embodiment is not limited to this, as long as each first training image includes at least one human body detection data set picture including a human body detection frame annotation and at least one human body clarity data set picture including clarity annotations.
[0146] Exemplarily, the size of the human body detection data set image is s1*s2, the size of the human body definition data set image is s1*s2, and the size of the first training image is s1'*s2'=2s1*2s2.
[0147] In some exemplary embodiments, Figure 4A and Figure 4B As shown, the coordinates of the four vertices of the first training image in the image coordinate system are (0, 0), (2s1, 0), (0, 2s2) and (2s1, 2s2), respectively, and the coordinates of the fitting point A in each first training image are within the rectangular area enclosed by the first coordinate point B (s1 / 2, s2 / 2), the second coordinate point C (3*s1 / 2, s2 / 2), the third coordinate point D (s1 / 2, 3*s2 / 2) and the fourth coordinate point E (3*s1 / 2, 3*s2 / 2);
[0148] When fitting to form the first training image, areas in the fitted human body detection dataset image and / or human body clarity dataset image that exceed the size of the first training image are discarded, and parts of the first training image that are not filled by the human body detection dataset image and / or human body clarity dataset image are filled with a preset color.
[0149] In the embodiment of the present disclosure, the preset filling color may be gray, however, the embodiment of the present disclosure is not limited to this.
[0150] In some exemplary embodiments, forming the first training image by assembling comprises the following steps:
[0151] (1) Set the image size of the input dataset of different categories to s1*s2 (s1=720, s2=400), then generate a blank first training image of size 2s1*2s2;
[0152] (2) A point is randomly selected from the rectangular area defined by the first coordinate point B (s1 / 2, s2 / 2), the second coordinate point C (3*s1 / 2, s2 / 2), the third coordinate point D (s1 / 2, 3*s2 / 2) and the fourth coordinate point E (3*s1 / 2, 3*s2 / 2) as the pasting point, and partial areas of four images are randomly selected from the data sets of the two categories and pasted onto the blank first training image. The areas of the four images that exceed the first training image are discarded, and the unfilled parts of the first training image are filled with a preset color.
[0153] In the object detection model of the disclosed embodiment, during the training process, instead of selecting only one mapping point, mapping points at many different positions are selected, thereby generating many first training images. The data diversity of the first training set is enhanced by randomly selecting mapping points, and the cropped parts of different degrees that appear themselves also enhance the data diversity of the first training set. On the contrary, if a fixed center point is selected for mapping, the result of stitching together multiple images is unique, and the data diversity of the first training set cannot be enhanced.
[0154] In some exemplary embodiments, performing human key point detection and human body part segmentation on a human body detection image to obtain human key point coordinates and human body part images includes:
[0155] The fusion model is used to perform human key point detection and human part segmentation on the human detection image to obtain the human key point coordinates and human part images. The fusion model includes two FPN structures, which perform human key point detection and human region segmentation respectively. The results of the two FPN structures are integrated in the output layer of the fusion model.
[0156] The disclosed embodiment uses a fusion model to fuse human key point detection and human body part segmentation. The fusion model uses a residual network with two FPN structure inputs to process human key point detection and human body region positioning respectively, and integrates the two results in the model output layer to implement an end-to-end network model, and outputs instance segmentation images of human body parts, i.e., regional coordinates of different positions including human torso, legs, hands, arms, head, etc. The disclosed embodiment can improve the detection speed by using a fusion model.
[0157] In some other exemplary embodiments, performing human key point detection and human body part segmentation on a human body detection image to obtain human key point coordinates and human body part images includes:
[0158] Perform human key point detection on the human detection image through the human key point detection model to obtain the coordinates of the human key points;
[0159] The human body detection image is segmented into human body parts by using a semantic segmentation model to obtain a human body part image.
[0160] In this embodiment, by using a human key point detection model and a semantic segmentation model, human key point detection and human body part segmentation are performed respectively, and the detection accuracy can be improved. For example, the obtained human body detection frame and human body screenshot with higher clarity are first input into the human body key point detection model (such as MoveNet model / PoseNet model, etc.) to obtain information such as human body key point coordinates. Exemplarily, the human body key points are the human body parts corresponding to 17 skeletal key points: 0: nose, 1: left eye, 2: right eye, 3: left ear, 4: right ear, 5: left shoulder, 6: right shoulder, 7: left elbow, 8: right elbow, 9: left wrist, 10: right wrist, 11: left hip, 12: right hip, 13: left knee, 14: right knee, 15: left ankle, 16: right ankle. Then, the high-definition human detection frame and human screenshot are input into the semantic segmentation model (such as the PSPnet model), and a pixel-level human segmentation map is output. Combined with the coordinates of the human key points obtained above, the coordinates of the human body areas at different positions such as the human torso, legs, hands, arms and head can be obtained.
[0161] In some exemplary embodiments, a sensor light of a first color is provided on the head of the fencing sword of the first fencer, and a sensor light of a second color is provided on the head of the fencing sword of the second fencer, the first color and the second color are different, and the sensor lights light up when there is a hitting pressure sensing.
[0162] In the disclosed embodiment, the signal light is a sensor light set on the head of the fencing sword. When there is a hitting pressure sensor, the signal light lights up. The signal lights on the heads of the two players can be set to two different colors respectively.
[0163] For example, the signal light on the sword head of the left player can be set to a red signal light, and the signal light on the sword head of the right player can be set to a green signal light. When the red light is on, it means that the left player has scored, and when the green light is on, it means that the right player has scored. The embodiment of the present disclosure does not limit the color of the signal light.
[0164] In some exemplary embodiments, the hitting action recognition module 805 is specifically configured to:
[0165] The human body part image is input into the traffic light detection model, and whether it is hit and the hitting position are determined according to the output result of the traffic light detection model, and the hitting result is input into the score statistics module 806; the traffic light detection model is an image classification model, and the model training set of the traffic light detection model includes different human body part image data sets, and the human body part image data sets include a first human body part image, a second human body part image and a third human body part image, the first human body part image is affixed with a sensor light of a first color, the second human body part image is affixed with a sensor light of a second color, and the third human body part image has no sensor light.
[0166] In the disclosed embodiment, the hitting action recognition module 805 combines the color of the hitting signal light identified by the signal light detection model with the human body segmentation result to determine the hitting position (torso, legs, hands and arms or helmet).
[0167] In some exemplary embodiments, the image classification model may be a model of a small network structure such as mobilenet.
[0168] Since the signal light (pressure sensor) on the tip of the fencing sword is relatively small, if the entire human body detection image is directly input into the signal light detection model, there will be a problem of low accuracy. Because when constructing the training data set of the signal light detection model, the disclosed embodiment segments different areas of different human parts to generate a human body part image data set of more than 100,000, and then randomly pastes the red light, green light, etc. of the signal light onto different human body part images to produce positive samples with red and green light. This training method is equivalent to enlarging the area of the signal light on the human body image, which can effectively improve the accuracy of signal light detection. During training, different human body part images with red light spots, green light spots, and no light spots are used as three categories, and the ratio of sample data with red light spots, green light spots, and no light spots in the training data set can be set to 1:1:1.
[0169] When used, the input of the traffic light detection model is the output of the semantic segmentation model, that is, the human body part image. For example, a human body can be divided into 8 human body parts: head / torso / left arm / left hand / right arm / right hand / left leg / right leg.
[0170] During the traffic light detection process, different human body part images are input into the traffic light detection model to obtain the category of the human body part image, which includes any one of the following: with red light spots, with green light spots, or without light spots. According to the position of the input area and the category of the output human body part image, it is determined whether the traffic light in the effective hit area is on.
[0171] The rules for setting the effective hit area signal light detection are as follows:
[0172] (1) Epee: The effective parts of the body include the torso, legs, feet, hands, arms and helmet.
[0173] (2) Sabre: The effective areas of impact are the upper body, helmet and arms.
[0174] (3) Foil: on the trunk.
[0175] Fig. 6A FIG. 4 is a flowchart of the foul action recognition of the embodiment of the present disclosure. Fig. 6A As shown, the foul action recognition module 804 is mainly used to detect whether a foul has occurred. Exemplarily, the foul action recognition module 804 is specifically configured as follows:
[0176] Input the coordinates of the key points of the human body and the threshold of the kendo end line to detect whether the player's feet are beyond the kendo end line. If they are beyond the kendo end line, an out-of-bounds alarm is triggered, and the player's violation message is sent and the score of the non-out-of-bounds player is sent and recorded;
[0177] Detect whether the non-fencing hand covers the effective part. If so, send the player a violation message and record it;
[0178] Detect whether there is a player with his back facing the opponent. If there is a player with his back facing the opponent, send a violation message to the player and record it;
[0179] Detect whether there is physical contact. If there is physical contact, send and record a physical contact message, issue a foul warning, and record N1 seconds of video before and after. For example, N1 can be set to 10 seconds.
[0180] like Figure 6B As shown, the kendo end line threshold is set to: F point (0, 0), G point (14, 0), H point (2, 0), I point (14, 2), where F point is the origin of the coordinates. In the disclosed embodiment, the coordinates of the kendo end line threshold are the coordinates of the world coordinate system.
[0181] Figure 7 FIG. 4 is a flowchart of score statistics in an embodiment of the present disclosure. Figure 7 As shown, the score statistics module 806 is specifically configured as follows:
[0182] Input the hit results and foul messages, count the scores and violations by person, detect whether the scores have changed, and if so, push the scores to the screen display device for display;
[0183] If the score does not change, check whether there is any physical contact information. If there is any physical contact information, push a foul warning and ask the referee to make a decision;
[0184] If there is no physical contact message, check whether the number of violations has changed. If the number of violations has not changed, return to the step of inputting the hit result and the foul message;
[0185] If the number of violations changes, check whether it is a new violation. If it is a new violation, a yellow card alarm will be pushed to the screen for display;
[0186] If it is not a new violation, the cumulative number of violations is calculated, the opponent is given 1 point, and the score and red card warning are pushed to the screen for display;
[0187] Check whether the player's cumulative score reaches 15 points. If it does not reach 15 points, check whether the game time reaches 9 minutes;
[0188] If 9 minutes have not been reached, return to the step of inputting the hit result and foul message;
[0189] If the players' cumulative score reaches 15 points or the game time reaches 9 minutes, check whether it is a tie;
[0190] In case of a tie, a sudden death playoff winner is set;
[0191] Check whether the extra time has reached 1 minute. If the extra time has reached 1 minute, check whether the game is tied again.
[0192] If there is another tie, the winner of the sudden death method will be the winner, and the winning player information will be pushed to the screen for display, and the final result and process data will be stored;
[0193] If there is no tie again, the player with the higher cumulative score wins, and the winning player's information is pushed to the screen for display, and the final result and process data are stored.
[0194] An embodiment of the present disclosure also provides a fencing match referee device, comprising a memory; and a processor connected to the memory, wherein the memory is used to store instructions, and the processor is configured to execute the steps of the fencing match referee method as described in any embodiment of the present disclosure based on the instructions stored in the memory.
[0195] like Fig. 9As shown, in one example, the fencing match referee device may include: a processor 910, a memory 920 and a bus system 930, wherein the processor 910 and the memory 920 are connected via the bus system 930, the memory 920 is used to store instructions, and the processor 910 is used to execute the instructions stored in the memory 920 to obtain the image to be detected acquired by the video acquisition device; perform human body detection and clarity detection on the image to be detected to obtain a human body detection image that meets the preset clarity requirements; perform human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images; perform foul action recognition based on the human body key point coordinates, and perform hitting action recognition based on the human body part images; and perform score statistics based on the results of the foul action recognition and the results of the hitting action recognition.
[0196] It should be understood that the processor 910 may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0197] The memory 920 may include a read-only memory and a random access memory, and provide instructions and data to the processor 910. A portion of the memory 920 may also include a nonvolatile random access memory. For example, the memory 920 may also store information on the device type.
[0198] In addition to the data bus, the bus system 930 may also include a power bus, a control bus, and a status signal bus. Fig. 9 Various buses are labeled as bus system 930 .
[0199] In the implementation process, the processing performed by the processing device can be completed by the hardware integrated logic circuit in the processor 910 or the instructions in the form of software. That is, the method steps of the embodiment of the present disclosure can be embodied as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 920, and the processor 910 reads the information in the memory 920 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0200] The embodiment of the present disclosure also provides a non-transient computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for refereeing a fencing match as described in any embodiment of the present disclosure is implemented. The method for driving a fencing match referee by executing executable instructions is basically the same as the method for refereeing a fencing match provided in the above embodiment of the present disclosure, and will not be described in detail here.
[0201] In some possible implementations, various aspects of the fencing match refereeing method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the fencing match refereeing method according to the various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the fencing match refereeing method recorded in the embodiments of the present application.
[0202] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0203] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0204] Although the embodiments disclosed in the present disclosure are as above, the contents described are only embodiments adopted to facilitate understanding of the present disclosure and are not intended to limit the present invention. Any technician in the relevant field can make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in the present disclosure, but the patent protection scope of the present invention shall still be subject to the scope defined by the attached claims.
Claims
1. A method for refereeing a fencing match, characterized in that: The fencing competition includes a first fencer and a second fencer, a sensor light of a first color is arranged on the head of the fencing sword of the first fencer, and a sensor light of a second color is arranged on the head of the fencing sword of the second fencer, the first color and the second color are different, and the sensor light is turned on when there is a hitting pressure sensing, and the method includes: Acquire the image to be detected; Performing human body detection and clarity detection on the image to be detected to obtain a human body detection image that meets preset clarity requirements; Performing human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images; According to the coordinates of key points of the human body, a foul action is identified, and according to the human body part image, a hitting action is identified; the hitting action identification according to the human body part image includes: inputting the human body part image into a signal light detection model, and determining whether it is hit and the hitting position according to the output result of the signal light detection model; the signal light detection model is an image classification model, and the training data set of the signal light detection model includes different human body part image data sets, and the human body part image data set includes a first human body part image, a second human body part image and a third human body part image, the first human body part image is attached with a sensor light of a first color, the second human body part image is attached with a sensor light of a second color, and the third human body part image has no sensor light; Score statistics are performed based on the results of the foul action recognition and the results of the hitting action recognition.
2. The method according to claim 1, characterized in that The performing of human body detection and clarity detection on the image to be detected to obtain a human body detection image that meets preset clarity requirements includes: A target detection model is used to simultaneously perform human body detection and clarity detection on the image to be detected to obtain a human body detection image that meets the preset clarity requirements. The target detection model is trained through a first training set during the model training stage. The first training set includes multiple first training images, and each of the first training images is formed by pasting at least one human body detection data set image containing a human body detection frame annotation and at least one human body clarity data set image containing a clarity annotation.
3. The method according to claim 2, characterized in that Each of the first training images is formed by pasting together two human detection data set images containing human detection frame annotations and two human clarity data set images containing clarity annotations. The size of the human detection data set images is s1*s2, the size of the human clarity data set images is s1*s2, and the size of the first training image is 2s1*2s2.
4. The method according to claim 3, characterized in that The coordinates of the four vertices of the first training image in the image coordinate system are respectively (0, 0), (2s1, 0), (0, 2s2) and (2s1, 2s2), and the coordinates of the fitting points in each of the first training images are within a rectangular area enclosed by the first coordinate point (s1 / 2, s2 / 2), the second coordinate point (3*s1 / 2, s2 / 2), the third coordinate point (s1 / 2, 3*s2 / 2) and the fourth coordinate point (3*s1 / 2, 3*s2 / 2); When fitting to form the first training image, areas in the fitted human body detection data set picture and / or human body clarity data set picture that exceed the size of the first training image are discarded, and parts of the first training image that are not filled by the human body detection data set picture and / or human body clarity data set picture are filled with a preset color.
5. The method according to claim 2, characterized in that: The target detection model outputs the human body detection frame coordinates, human body detection probability, clarity result, and clarity probability of the image to be detected, wherein the clarity result includes clarity and unclearness; When the output human body detection probability is greater than the preset first probability, the clarity result is clear and the clarity probability is greater than the preset second probability, the output human body detection image is a human body detection image that meets the preset clarity requirement.
6. The method according to claim 2, characterized in that The target detection model includes an input end, a backbone network layer, a neck and a prediction layer, wherein: The input end is configured to perform data enhancement and adaptive image scaling operations on the image to be detected; The backbone network layer is configured to convert the image to be detected into a first feature map through a convolution operation; The neck is configured to convert the first feature map into a prediction feature map by upsampling and downsampling; The prediction layer is configured to make predictions based on the prediction feature map.
7. The method according to claim 1, characterized in that The step of performing human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images includes: The human body detection image is subjected to human body key point detection and human body part segmentation through a fusion model to obtain human body key point coordinates and human body part images. The fusion model includes two feature pyramid network structures, which respectively perform human body key point detection and human body region segmentation. The results of the two feature pyramid network structures are integrated in the output layer of the fusion model.
8. The method according to claim 1, characterized in that The step of performing human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images includes: Performing human key point detection on the human body detection image using a human key point detection model to obtain human key point coordinates; The human body detection image is segmented into human body parts by using a semantic segmentation model to obtain a human body part image.
9. A fencing match referee device, characterized in that: The invention comprises a memory; and a processor connected to the memory, the memory being used to store instructions, the processor being configured to execute the steps of the fencing match refereeing method according to any one of claims 1 to 8 based on the instructions stored in the memory.
10. A fencing competition referee system, characterized in that: It includes a video acquisition device, a screen display device, and also includes the fencing competition referee device as claimed in claim 9; wherein: The video acquisition device is used to acquire the image to be detected and output it to the fencing competition referee device; The screen display device is used to display the score statistics of the fencing competition referee device.
11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for refereeing a fencing match as claimed in any one of claims 1 to 8 is implemented.
12. A fencing match referee device, characterized in that: The fencing competition includes a first fencer and a second fencer, a sensor light of a first color is arranged on the head of the fencing sword of the first fencer, and a sensor light of a second color is arranged on the head of the fencing sword of the second fencer, the first color and the second color are different, and when there is a hitting pressure sensing, the sensor light is lit, and the device includes a communication module, a human body detection and clarity detection module, a human body key point detection and human body part segmentation module, a foul action recognition module, a hitting action recognition module and a score statistics module, wherein: The communication module is configured to obtain the image to be detected captured by the video capture device; The human body detection and clarity detection module is configured to perform human body detection and clarity detection on the image to be detected to obtain a human body detection image that meets the preset clarity requirement; The human body key point detection and human body part segmentation module is configured to perform human body key point detection and human body part segmentation on the human body detection image to obtain human body key point coordinates and human body part images; The foul action recognition module is configured to perform foul action recognition according to the coordinates of key points of the human body; The hitting action recognition module is configured to perform hitting action recognition based on a human body part image; the hitting action recognition based on a human body part image includes: inputting the human body part image into a signal light detection model, and determining whether it is hit and the hitting position according to an output result of the signal light detection model; the signal light detection model is an image classification model, and a training data set of the signal light detection model includes different human body part image data sets, and the human body part image data set includes a first human body part image, a second human body part image and a third human body part image, the first human body part image is affixed with a sensor light of a first color, the second human body part image is affixed with a sensor light of a second color, and the third human body part image has no sensor light; The score statistics module is configured to perform score statistics according to the result of the foul action recognition and the result of the hitting action recognition.
