Athlete re-identification method and device based on artificial intelligence

Through the athlete re-identification method based on artificial intelligence, using feature extraction and clustering technology, combined with sampling mechanism and loss function optimization, the identification problem in the unified clothing scenario of athlete re-identification is solved, and efficient and accurate athlete recognition and tracking is achieved.

CN120108030APending Publication Date: 2025-06-06HANGZHOU ARCVIDEO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311645728.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The prior art has the problem of poor recognition of athletes in terms of re-identification, especially in scenarios where the clothing standards and colors are extremely uniform, it is difficult to effectively identify and track athletes.

Method used

Using an athlete re-identification method based on artificial intelligence, by obtaining the SoccerNet2023 data set, the feature expression vector is extracted using the preset feature extraction model and clustering method, clustering and classification processing is performed, and the second feature extraction model is trained to achieve the recognition of athletes.

Benefits of technology

It realizes effective identification and tracking of athletes with highly unified clothing, reduces resource consumption of human labeling, ensures the distribution consistency of training data, and improves identification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120108030A_ABST
    Figure CN120108030A_ABST
Patent Text Reader

Abstract

The invention discloses an athlete re-identification method and device based on artificial intelligence. The method comprises the following steps: S1, acquiring athlete re-identification data of a public data set SocceNet2023; s2, inputting a preset first feature extraction model by using an existing SocceNet2023 data set with a mark, and extracting a feature expression vector of the SocceNet2023 data set; s3, performing clustering processing on the feature expression by using a preset clustering method to obtain a clustering result with a mark; s4, processing the clustering result to obtain a preliminary classification result; s5, utilizing a sampling mechanism to obtain a batch classification result with a fixed size; s6, inputting the batch classification result into a preset second feature extraction model for training optimization; the to-be-trained classification result converges, and a trained second feature extraction model can be obtained; and S7, inputting the query data set to be identified into the trained second feature extraction model to obtain a feature expression vector, and calculating the similarity between the feature expression vector and the feature expression vector of the preset base library gallley data set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to an artificial intelligence-based athlete re-identification method and device. Background Art

[0002] In the prior art, pedestrian re-identification methods can achieve real-time tracking and identification of the same pedestrian under different surveillance cameras. Traditional pedestrian re-identification often shows poor recognition effect, misidentification or missed recognition when facing unfavorable factors such as lighting changes, similar clothing colors, or occlusion; especially in scenes with extremely uniform clothing colors, especially athletes' competition scenes. Ordinary pedestrian re-identification algorithms are usually used under surveillance cameras. Different people have obvious differences in clothing styles, which brings convenience to identity re-identification. Athletes on the field usually wear uniform clothes, and the clothes of different teams are different. Sometimes, the same team can only be distinguished by jersey numbers. Therefore, it is very challenging to re-identify athletes on the field. Athlete re-identification is very practical. It can achieve stable tracking of athletes, or complete the retrieval of specific athletes in front and back shots, and then develop a lot of special functions. The movement of people at the competition site is usually very complicated, and there are often two or more people gathering and intersecting. The athlete re-identification algorithm can identify the identity information of each person after the athletes are separated, so that the identity of the athlete can be always locked. Summary of the invention

[0003] In view of the above problems, the present invention provides an athlete re-identification method and device based on artificial intelligence to solve the problem of athlete identity re-identification in the arena.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0005] In one aspect, the present invention provides a method for re-identifying athletes based on artificial intelligence, comprising the following steps:

[0006] S1, obtain the publicly available dataset SoccerNet2023 athlete re-identification data;

[0007] S2, using the existing labeled SoccerNet2023 dataset to input a preset first feature extraction model, and extracting a feature expression vector of the SoccerNet2023 dataset;

[0008] S3, clustering the feature expressions using a preset clustering method to obtain a clustering result with a label;

[0009] S4, processing the clustering results to obtain preliminary classification results;

[0010] S5, uses the sampling mechanism to obtain fixed-size batch classification results;

[0011] S6, inputting the batch classification results into a preset second feature extraction model for training optimization; when the trained classification results converge, a trained second feature extraction model can be obtained;

[0012] S7, input the query data set to be identified into the trained second feature extraction model to obtain a feature expression vector, and calculate its similarity with the feature expression vector of the preset base gallery data set, sort the similarity scores, and the base gallery ID corresponding to the highest score is the identification result.

[0013] In a possible implementation, the preset first feature extraction model in S2 is obtained by the following steps: a convolutional neural network is pre-trained using a labeled soccernet2023 dataset, and a feature extraction model is obtained after the network results converge.

[0014] In a possible implementation, the clustering method preset in S3 adopts the following clustering formula:

[0015]

[0016] Where Φ(●) represents the convolutional neural network model, μ (k) Represented as the set of clusters C belonging to the kth cluster k The mean vector of the feature space, K is the total number of clusters, C is the set of all clusters, x (i) is the cluster C k Samples within.

[0017] In a possible embodiment, the clustering result is processed in S4 using the following formula:

[0018]

[0019] Where dist represents the distance from each sample in the current cluster to the mean vector within the cluster; when dist>dist_thresh, the sample is deleted from the cluster.

[0020] In one possible implementation, the sampling mechanism preset in S5 is a hierarchical sampling mechanism, and the sampling levels include: the first level is any sample in the data set, which is used to obtain behavior fragments; the second level is samples with the same behavior fragments; the third level is samples with the same game; the fourth level is samples with the same two teams in the same year; the fifth level is samples with the same two teams in different years; the sixth level is samples with at least one of the two teams in the same year; the seventh level is samples with at least one of the two teams in different years; and the eighth level is any sample.

[0021] In one possible implementation, the sampling steps of the sampling mechanism preset in S5 are: for a preset number of samples, first randomly select a sample from all samples, adopt the first-layer sampling, and obtain the behavior segment to which it belongs; for a fixed number of samples, continue to sample other samples in the obtained behavior segment, if the preset number of samples is not reached, select the remaining samples from the next level; and so on, until the number of selected samples reaches the preset number of samples.

[0022] In a possible implementation manner, the loss function formula used in the training optimization in S6 is:

[0023] L = a·L T +β·L C +λ·L Centroid (3)

[0024] Where L is the total loss function, L T is the triplet loss function, L C is the classification loss function, L Centroid is the centroid loss function, ɑ, β and λ are the weight coefficients of the corresponding loss function.

[0025] In a possible implementation manner, the metric for calculating the similarity in S7 is the cosine distance between the feature expression vectors, and the specific formula is as follows:

[0026]

[0027] where f q 、f g Represent the query feature vector and gallery feature vector respectively, Represents the vector f x Perform normalization operation.

[0028] Another aspect of the present invention provides an artificial intelligence-based athlete re-identification device, comprising:

[0029] A feature extraction module, used for inputting the to-be-detected data set to be marked into a preset first feature extraction model, and extracting a feature space vector of the to-be-detected data set;

[0030] A clustering module is used to process the feature expression using a preset clustering method to obtain the filtered classification results;

[0031] The sampling module is used to select fixed-size batch classification results from the filtered classification results using a preset sampling mechanism;

[0032] The training module is used to input the classification results into a preset second feature extraction model for training optimization, and when the trained classification results converge, a trained second feature extraction model can be obtained;

[0033] The recognition module is used to extract features from the query data to be recognized through the trained athlete re-recognition model, perform similarity matching with the gallery data, sort the similarities, and obtain the final recognition result.

[0034] In a possible implementation, the clustering method preset in the clustering module adopts the following clustering formula:

[0035]

[0036] Where Φ(●) represents the convolutional neural network model, μ (k) Represented as the set of clusters C belonging to the kth cluster k The mean vector of the feature space, K is the total number of clusters, C is the set of all clusters, x (i) is the cluster C k Samples within.

[0037] The invention has the following beneficial effects: the efficient and easy-to-implement identity archiving method and training data sampling mechanism can be used to realize the rapid organization of data sets; the consistency of training data distribution and reasoning is guaranteed. It is used to realize personnel retrieval and identification of athletes with highly uniform clothing, which can greatly reduce the resource consumption required for human labeling and is easy to implement. It solves the problem of identity re-identification of athletes on the field, making it possible to stably track and lock the identities of athletes on the field, which is of great use for subsequent applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flowchart of the steps of the athlete re-identification method based on artificial intelligence according to an embodiment of the present invention;

[0039] Figure 2 is a principle block diagram of an athlete re-identification device based on artificial intelligence according to an embodiment of the present invention;

[0040] Figure 3 It is a schematic diagram of the recognition effect in a specific application example of the present invention;

[0041] Figure 4 It is a schematic diagram of the recognition effect of the prior art. DETAILED DESCRIPTION

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

[0043] See also Figure 1 , which is a flowchart of a method for re-identifying athletes based on artificial intelligence according to an embodiment of the present invention, comprising the following steps:

[0044] S1, obtain the publicly available dataset SoccerNet2023 athlete re-identification data;

[0045] S2, using the existing labeled SoccerNet2023 dataset to input a preset first feature extraction model, and extracting a feature expression vector of the SoccerNet2023 dataset;

[0046] S3, clustering the feature expressions using a preset clustering method to obtain a clustering result with a label;

[0047] S4, processing the clustering results to obtain preliminary classification results;

[0048] S5, uses the sampling mechanism to obtain fixed-size batch classification results;

[0049] S6, inputting the batch classification results into a preset second feature extraction model for training optimization; when the trained classification results converge, a trained second feature extraction model can be obtained;

[0050] S7, input the query data set to be identified into the trained second feature extraction model to obtain a feature expression vector, and calculate its similarity with the feature expression vector of the preset base gallery data set, sort the similarity scores, and the base gallery ID corresponding to the highest score is the identification result.

[0051] In the method for re-identifying athletes based on artificial intelligence according to an embodiment of the present invention, the structure of the Soccernet2023 dataset in S1 is as follows: championship->season->game->action->image files, i.e., league->season->game->action clip->image. The format of the image data annotation in the dataset is:<bbox_idx> _<action_idx> _<person_uid> _<frame_idx> _ <class> _ <id>

[0052] _ <uai> _ <height> x <width>.png, that is, <frame index>_<action segment index>_<identity ID>_<frame number>_<role on the field>_<ID in the action segment>_<identification code>_<image height>x<image width>.png. Among them, bbox_idx is the frame index, which is the frame index of the current image, and its valid range is the entire dataset; action_idx is the action segment index, which is the index of the action segment to which the current image belongs, and its valid range is the entire dataset; person_uid is the identity ID, and its valid range is the entire dataset; frame_idx is the frame number, which is the frame number of the current image; class is the role on the field, including athletes, goalkeepers, referees, and linesmen, etc.; ID is the identification number identity in the action segment, if the jersey number of the role is visible in the action segment, it is the jersey number, otherwise it is a letter code or None, and its valid range is within the action segment; UAI is the identification code; height is the image height; width is the image width. The identity ID annotation unit of this dataset is the behavior segment, that is, the identity ID of the same athlete is the same and unique in the same behavior segment, but there will be multiple behavior segments in the whole game, and the same athlete will have multiple identity IDs. Since there is almost no relevant public athlete re-identification dataset, the SoccerNet2023 dataset is a rare public athlete re-identification data. Because of its annotation method for the identity ID of athletes, this dataset is more suitable for retrieving any athlete under different cameras in the behavior segment; it is inconsistent with the task of locking any athlete in the whole game, that is, correctly retrieving any athlete under each camera in the current whole game. For this reason, it is necessary to reorganize the dataset and re-archive the identity ID within the game range, that is, to ensure that an athlete can only have one identity ID in the current game. For this reason, the following S2~S7 reorganizes the dataset and re-archives the identity ID within the game range, that is, to ensure that an athlete can only have one identity ID in the current game.

[0053] In the artificial intelligence-based athlete re-identification method of one embodiment of the present invention, the preset first feature extraction model in S2 is obtained by the following steps: the convolutional neural network is pre-trained using a labeled soccernet2023 dataset, and the feature extraction model is obtained after the network results converge.

[0054] In the method for re-identifying athletes based on artificial intelligence according to an embodiment of the present invention, the clustering method preset in S3 adopts the following clustering formula:

[0055]

[0056] Where Φ(●) represents the convolutional neural network model, μ (k) Represented as the set of clusters C belonging to the kth cluster k The mean vector of the feature space, K is the total number of clusters, C is the set of all clusters, x (i) is the cluster C k Samples within. When clustering, it is necessary to select the initial point as the initial class center. After continuous iterative updates, the final representative mean vector that can represent the class is obtained; further, the method of selecting the initial point of clustering is the farthest point method, specifically: first, a sample is randomly selected from all the sample points as the first initial cluster center, and the selection rule for the initial class centers of the remaining clusters is that the feature distance between the sample and the selected initial cluster center is far enough, until all the initial cluster centers are selected. Due to the need to archive identity IDs within the scope of the game, the scope of the clustering method is all samples at the game level. The number of categories of the clustering method is set according to the actual number of athlete roles on the field. At the same time, considering that there will be relevant staff on the sidelines of the field, an additional category is added for archiving staff.

[0057] In the athlete re-identification method based on artificial intelligence according to an embodiment of the present invention, in S4, since the clustering result cannot be 100% accurate, there are often some outlier samples, that is, samples that do not belong to the current class. By setting a screening threshold, outlier samples can be removed to ensure the accuracy of the training data. The screening threshold is set, and the clustering results are screened using a preset selection formula to obtain the filtered classification results. The clustering results are processed using the following formula:

[0058]

[0059] Where dist represents the distance from each sample in the current cluster to the mean vector within the cluster; when dist>dist_thresh, the sample is deleted from the cluster.

[0060] In the artificial intelligence-based athlete re-identification method of one embodiment of the present invention, the sampling mechanism preset in S5 is a hierarchical sampling mechanism, and the sampling levels include: the first level is any sample in the data set, which is used to obtain behavior fragments; the second level is samples with the same behavior fragments; the third level is samples with the same game; the fourth level is samples with the same two teams in the same year; the fifth level is samples with the same two teams in different years; the sixth level is samples with at least one of the two teams in the same year; the seventh level is samples with at least one of the two teams in different years; the eighth level is any sample.

[0061] Furthermore, the sampling steps of the sampling mechanism preset in S5 are as follows: for the preset number of samples, first randomly select a sample from all samples, adopt the first-level sampling, and obtain the behavior segment to which it belongs; for a fixed number of samples, continue to sample other samples in the obtained behavior segment, if the preset number of samples is not reached, select the remaining samples from the next level; and so on, until the number of selected samples reaches the preset number of samples. This sampling mechanism ensures that the sample distribution input into the preset second feature extraction model training is preferentially consistent with the distribution of the players' roles during the actual competition, which can deepen the model's ability to distinguish the same team members. The clothes of the same team members are usually the same. In order to distinguish them as much as possible, this sampling mechanism will enable the model to learn not to rely on the appearance of clothing, but to focus on other representations of the athletes, such as hairstyle, whether they are wearing shoes and socks, skin color, etc.

[0062] In the method for re-identifying athletes based on artificial intelligence according to an embodiment of the present invention, the loss function formula used in the training optimization in S6 is:

[0063] L=α·L T +β·L C +λ·L Centroid (3)

[0064] Where L is the total loss function, L T is the triplet loss function, L C is the classification loss function, L Centroid is the centroid loss function, ɑ, β and λ are the weight coefficients of the corresponding loss function. Each weight coefficient can be adjusted according to the actual situation and is not limited here.

[0065] Furthermore, the specific formulas of each loss function are as follows. First is the triplet loss function:

[0066] L T =max(d(a,p)-d(a,n)+margin,0) (5)

[0067] Where d(●) represents the distance formula, (a,p) is a positive sample pair constructed by two samples belonging to the same identity ID, (a,n) is a negative sample pair constructed by two samples belonging to different identity IDs; margin is a distance constant. By minimizing this loss function, the feature vector space of samples within the class can be made more compact, and the feature vector space of samples outside the class can be made farther away. The above sample pairs are usually constructed by selecting a sample from the samples with the same identity ID for an anchor sample to form a positive sample pair, and then selecting a sample from other identity IDs to form a negative sample pair; further, the samples with the farthest feature distance are selected from the samples with the same identity ID to form a positive sample pair, and the samples with the closest distance are selected from different identity IDs to form a negative sample pair, and the hardtriplet triplet is obtained, which can further shorten the feature distance within the class and increase the feature distance outside the class.

[0068] Next is the centroid loss function:

[0069]

[0070]

[0071]

[0072] Among them C cluster-I Indicates that the identity ID is M i The characteristic clustering centers of all K samples; C cluster-II Indicates that the identity ID is not M i The characteristic clustering center of all K*MK samples; L Centroid It is the centroid loss function, which maximizes the distance between the center of the feature within the class and the center of all out-of-class features, so that the model learns that the class spaces of different IDs should be far away from each other.

[0073] In the method for re-identifying athletes based on artificial intelligence according to an embodiment of the present invention, the measure for calculating the similarity in S7 is the cosine distance between the feature expression vectors, and the specific formula is as follows:

[0074]

[0075] where f q 、f g Represent the query feature vector and gallery feature vector respectively, Represents the vector f x Perform normalization. After sorting the calculated similarity scores, the gallery corresponding to the highest score is the recognition result. Optionally, according to the needs of the actual application scenario, a similarity threshold is set. Only when the similarity score is the highest and greater than the similarity threshold, the corresponding gallery can be used as the final recognition result.

[0076] In a specific application example, the athlete re-identification effect of the present invention is as follows: Figure 3 and Figure 4 As shown in the figure. The leftmost part of the figure with a black border is the sample to be retrieved, and the right side of the figure is the retrieval result, which is sorted from high to low according to the similarity score with the sample to be retrieved. The one with a dark border is actually not the same athlete as the sample to be retrieved. The test data comes from the test set in the SoccerNet2023 dataset. Figure 3 The retrieval result of the athlete re-identification method based on artificial intelligence according to the embodiment of the present invention is as follows: Figure 4 This is the retrieval result output by the common pedestrian re-identification model in the prior art. From the comparison of the retrieval result ranking in the following two figures, we can see that: Figure 3 The retrieval results obtained by using the athlete re-identification model of the present invention show that the top 2 hits the athlete himself, and the top 10 hit rate is 60%. Figure 4 In the retrieval results using the traditional pedestrian re-identification model, the top 2 did not hit the athlete himself, and the hit rate of the top 10 was only 10%.

[0077] The above-mentioned AI-based athlete re-identification method adopts an efficient and easy-to-implement identity archiving method and training data sampling mechanism, which can realize the rapid organization of data sets and ensure the consistency of training data distribution and reasoning. It is used to realize personnel retrieval and identification of athletes with highly uniform clothing, which can greatly reduce the resource consumption required for human labeling and is easy to implement. It solves the problem of athlete identity re-identification on the field, making it possible to stably track and lock the identity of athletes on the field, which is of great use for subsequent applications.

[0078] Corresponding to the embodiment of the method of the present invention, the embodiment of the present invention also provides an athlete re-identification device based on artificial intelligence, including: a feature extraction module 101, used to input the marked data set to be detected into a preset first feature extraction model, and extract the feature space vector of the data set to be detected; a clustering module 102, used to obtain a filtered classification result after processing the feature expression using a preset clustering method; a sampling module 103, used to select a fixed-size batch classification result from the filtered classification result using a preset sampling mechanism; a training module 104, used to input the classification result into a preset second feature extraction model for training optimization, and when the trained classification result converges, a trained second feature extraction model can be obtained; an identification module 105, used to extract features from the query data to be identified through the trained athlete re-identification model, and then perform similarity matching with the gallery data, and after sorting the similarities, obtain the final identification result.

[0079] In the artificial intelligence-based athlete re-identification device of an embodiment of the present invention, the feature extraction module 101 uses the publicly available Soccernet2023 dataset. The structure of the Soccernet2023 dataset is as follows: championship->season->game->action->image files, i.e., league->season->game->action clip->image. The format of the image data annotation in the dataset is:<bbox_idx> _<action_idx> _<person_uid> _<frame_idx> _ <class> _ <id> _ <uai>_<h eight>x <width>.png, that is, <frame index>_<action segment index>_<identity ID>_<frame number>_<role on the field>_<ID in the action segment>_<identification code>_<image height>x<image width>.png. Among them, bbox_idx is the frame index, which is the frame index of the current image, and its valid range is the entire dataset; action_idx is the action segment index, which is the index of the action segment to which the current image belongs, and its valid range is the entire dataset; person_uid is the identity ID, and its valid range is the entire dataset; frame_idx is the frame number, which is the frame number of the current image; class is the role on the field, including athletes, goalkeepers, referees, and linesmen, etc.; ID is the identification number identity in the action segment, if the jersey number of the role is visible in the action segment, it is the jersey number, otherwise it is a letter code or None, and its valid range is within the action segment; UAI is the identification code; height is the image height; width is the image width. The identity ID annotation unit of this dataset is the behavior segment, that is, the identity ID of the same athlete is the same and unique in the same behavior segment, but there will be multiple behavior segments in the whole game, and the same athlete will have multiple identity IDs. Since there is almost no relevant public athlete re-identification dataset, the SoccerNet2023 dataset is a rare public athlete re-identification data. Because of its annotation method for the identity ID of athletes, this dataset is more suitable for retrieving any athlete under different cameras in the behavior segment; it is inconsistent with the task of locking any athlete in the whole game, that is, correctly retrieving any athlete under each camera in the current whole game. For this reason, it is necessary to reorganize the dataset and re-archive the identity ID within the game range, that is, to ensure that an athlete can only have one identity ID in the current game. For this reason, the next module will reorganize the dataset and re-archive the identity ID within the game range, that is, to ensure that an athlete can only have one identity ID in the current game.

[0080] In the artificial intelligence-based athlete re-identification device of one embodiment of the present invention, the first feature extraction model preset in the feature extraction module 101 is obtained by the following steps: the convolutional neural network is pre-trained using the labeled soccernet2023 data set, and the feature extraction model is obtained after the network results converge.

[0081] In the player re-identification device based on artificial intelligence according to an embodiment of the present invention, the clustering method preset in the clustering module 102 adopts the following clustering formula:

[0082]

[0083] Where Φ(●) represents the convolutional neural network model, μ (k) Represented as the set of clusters C belonging to the kth cluster k The mean vector of the feature space, K is the total number of clusters, C is the set of all clusters, x (i) is the cluster C k Samples within. When clustering, it is necessary to select the initial point as the initial class center. After continuous iterative updates, the final representative mean vector that can represent the class is obtained; further, the method of selecting the initial point of clustering is the farthest point method, specifically: first, a sample is randomly selected from all the sample points as the first initial cluster center, and the selection rule for the initial class centers of the remaining clusters is that the feature distance between the sample and the selected initial cluster center is far enough, until all the initial cluster centers are selected. Due to the need to archive identity IDs within the scope of the game, the scope of the clustering method is all samples at the game level. The number of categories of the clustering method is set according to the actual number of athlete roles on the field. At the same time, considering that there will be relevant staff on the sidelines of the field, an additional category is added for archiving staff.

[0084] In the athlete re-identification device based on artificial intelligence of one embodiment of the present invention, since the clustering result cannot be 100% accurate, there are often some outlier samples, that is, samples that do not belong to the current class. By setting the screening threshold, the outlier samples can be removed to ensure the accuracy of the training data. The screening threshold is set, and the clustering results are screened using a preset selection formula to obtain the filtered classification results. The clustering results are processed using the following formula:

[0085]

[0086] Where dist represents the distance from each sample in the current cluster to the mean vector within the cluster; when dist>dist_thresh, the sample is deleted from the cluster.

[0087] In the artificial intelligence-based athlete re-identification device of one embodiment of the present invention, the sampling mechanism preset in the sampling module 103 is a hierarchical sampling mechanism, and the sampling levels include: the first level is any sample in the data set, which is used to obtain behavior fragments; the second level is samples with the same behavior fragments; the third level is samples with the same game; the fourth level is samples with the same two teams in the same year; the fifth level is samples with the same two teams in different years; the sixth level is samples with at least one of the two teams in the same year; the seventh level is samples with at least one of the two teams in different years; the eighth level is any sample.

[0088] Further, the sampling steps of the sampling mechanism preset in the sampling module 103 are: for the preset number of samples, first randomly select a sample from all samples, adopt the first layer sampling, and obtain the behavior segment to which it belongs; for the fixed number of samples, continue to sample other samples in the obtained behavior segment, if the preset number of samples is not reached, select the remaining samples from the next level; and so on, until the number of selected samples reaches the preset number of samples. This sampling mechanism ensures that the sample distribution input into the preset second feature extraction model training is preferentially consistent with the distribution of the players' roles when the actual competition is online, which can deepen the model's ability to distinguish the same team members. The clothes of the same team members are usually the same. In order to distinguish as much as possible, this sampling mechanism will enable the model to learn not to rely on the appearance of clothing, but to focus on other representations of the athletes, such as hairstyle, whether they are wearing shoes and socks, skin color, etc.

[0089] In the player re-identification device based on artificial intelligence according to an embodiment of the present invention, the loss function formula used for training optimization in the training module 104 is:

[0090] L=α·L T +β·L C +λ·L Centroid (3)

[0091] Where L is the total loss function, L T is the triplet loss function, L C is the classification loss function, L Centroid is the centroid loss function, ɑ, β and λ are the weight coefficients of the corresponding loss function. Each weight coefficient can be adjusted according to the actual situation and is not limited here.

[0092] Furthermore, the specific formulas of each loss function are as follows. First is the triplet loss function:

[0093] L T =max(d(a,p)-d(a,n)+margin,0) (5)

[0094] Where d(●) represents the distance formula, (a,p) is a positive sample pair constructed by two samples belonging to the same identity ID, (a,n) is a negative sample pair constructed by two samples belonging to different identity IDs; margin is a distance constant. By minimizing this loss function, the feature vector space of samples within the class can be made more compact, and the feature vector space of samples outside the class can be made farther away. The above sample pairs are usually constructed by selecting a sample from the samples with the same identity ID for an anchor sample to form a positive sample pair, and then selecting a sample from other identity IDs to form a negative sample pair; further, the samples with the farthest feature distance are selected from the samples with the same identity ID to form a positive sample pair, and the samples with the closest distance are selected from different identity IDs to form a negative sample pair, and the hardtriplet triplet is obtained, which can further shorten the feature distance within the class and increase the feature distance outside the class.

[0095] Next is the centroid loss function:

[0096]

[0097]

[0098]

[0099] Among them C cluster-I Indicates that the identity ID is M i The characteristic clustering centers of all K samples; C cluster-II Indicates that the identity ID is not M i The characteristic clustering center of all K*MK samples; L Centroid It is the centroid loss function, which maximizes the distance between the center of the feature within the class and the center of all out-of-class features, so that the model learns that the class spaces of different IDs should be far away from each other.

[0100] In the player re-identification device based on artificial intelligence according to an embodiment of the present invention, the metric for calculating the similarity in the recognition module 105 is the cosine distance between the feature expression vectors, and the specific formula is as follows:

[0101]

[0102] where f q 、f g Represent the query feature vector and gallery feature vector respectively, Represents the vector f x Perform normalization. After sorting the calculated similarity scores, the gallery corresponding to the highest score is the recognition result. Optionally, according to the needs of the actual application scenario, a similarity threshold is set. Only when the similarity score is the highest and greater than the similarity threshold, the corresponding gallery can be used as the final recognition result.

[0103] The above-mentioned AI-based athlete re-identification device adopts an efficient and easy-to-implement identity archiving method and training data sampling mechanism to achieve rapid organization of data sets and ensure the consistency of training data distribution and reasoning. It is used to achieve personnel retrieval and identification of athletes with highly uniform clothing, which can greatly reduce the resource consumption required for human labeling and is easy to implement. It solves the problem of athlete identity re-identification on the field, making it possible to stably track and lock the identity of athletes on the field, which is of great use for subsequent applications.

[0104] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention are described in conjunction with the accompanying drawings, it should be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the present invention as defined by the appended claims.< / width> < / uai> < / id> < / class> < / width> < / height> < / uai> < / id> < / class>

Claims

1. A method for athlete re-identification based on artificial intelligence, It is characterized in that The following steps are involved: S1, obtain the publicly available dataset SoccerNet2023 athlete re-identification data; S2, using the existing labeled SoccerNet2023 dataset to input a preset first feature extraction model, and extracting a feature expression vector of the SoccerNet2023 dataset; S3, clustering the feature expressions using a preset clustering method to obtain a clustering result with a label; S4, processing the clustering results to obtain preliminary classification results; S5, uses the sampling mechanism to obtain fixed-size batch classification results; S6, inputting the batch classification results into a preset second feature extraction model for training optimization; When the trained classification results converge, the trained second feature extraction model can be obtained; S7, input the query data set to be identified into the trained second feature extraction model to obtain a feature expression vector, and calculate its similarity with the feature expression vector of the preset base gallery data set, sort the similarity scores, and the base gallery ID corresponding to the highest score is the identification result.

2. The method for athlete re-identification based on artificial intelligence as claimed in claim 1, It is characterized in that The preset first feature extraction model described in S2 is obtained by the following steps: the convolutional neural network is pre-trained using the labeled soccernet2023 dataset, and the feature extraction model is obtained after the network results converge.

3. The method for re-identifying athletes based on artificial intelligence as claimed in claim 1, It is characterized in that The clustering method preset in S3 uses the following clustering formula: Where Φ(●) represents the convolutional neural network model, μ (k) Represented as the set of clusters C belonging to the kth cluster k The mean vector of the feature space, K is the total number of clusters, C is the set of all clusters, x (i) is the cluster C k Samples within.

4. The method for re-identifying athletes based on artificial intelligence as claimed in claim 3, It is characterized in that The following formula is used to process the clustering results in S4: Where dist represents the distance from each sample in the current cluster to the mean vector within the cluster; when dist>dist_thresh, the sample is deleted from the cluster.

5. The method for re-identifying athletes based on artificial intelligence as claimed in claim 1, It is characterized in that The sampling mechanism preset in S5 is a hierarchical sampling mechanism, and the sampling levels include: the first level is any sample in the data set, which is used to obtain behavior fragments; the second level is samples with the same behavior fragments; the third level is samples with the same game; the fourth level is samples with the same two teams in the same year; the fifth level is samples with the same two teams in different years; the sixth level is samples with at least one of the two teams in the same year; the seventh level is samples with at least one of the two teams in different years; the eighth level is any sample.

6. The method for re-identifying athletes based on artificial intelligence as claimed in claim 5, It is characterized in that The sampling steps of the sampling mechanism preset in S5 are: for the preset number of samples, first randomly select a sample from all the samples, use the first-level sampling to obtain the behavior segment to which it belongs; for a fixed number of samples, continue to sample other samples in the obtained behavior segment, if the preset number of samples is not reached, select the remaining samples from the next level; and so on, until the number of selected samples reaches the preset number of samples.

7. The method for re-identifying athletes based on artificial intelligence as claimed in claim 1, It is characterized in that The loss function formula used in the training optimization in S6 is: L=α·L T +β·L C +λ·L Centroid (3) Where L is the total loss function, L T is the triplet loss function, L C is the classification loss function, L Centroid is the centroid loss function, ɑ, β and λ are the weight coefficients of the corresponding loss function.

8. The method for re-identifying athletes based on artificial intelligence as claimed in claim 1, It is characterized in that The measure of similarity in S7 is the cosine distance between feature expression vectors. The specific formula is as follows: where f q 、f g Represent the query feature vector and gallery feature vector respectively, Represents the vector f x Perform normalization operation.

9. An artificial intelligence-based athlete re-identification device, It is characterized in that include: A feature extraction module, used for inputting the to-be-detected data set to be marked into a preset first feature extraction model, and extracting a feature space vector of the to-be-detected data set; The clustering module is used to process the feature expression using a preset clustering method to obtain the filtered classification results; The sampling module is used to select fixed-size batch classification results from the filtered classification results using a preset sampling mechanism; The training module is used to input the classification results into a preset second feature extraction model for training optimization, and when the trained classification results converge, a trained second feature extraction model can be obtained; The recognition module is used to extract features from the query data to be recognized through the trained athlete re-recognition model, perform similarity matching with the gallery data, sort the similarities, and obtain the final recognition result.

10. The player re-identification device based on artificial intelligence as claimed in claim 9, It is characterized in that The clustering method preset in the clustering module uses the following clustering formula: Where Φ(●) represents the convolutional neural network model, μ (k) Represented as the set of clusters C belonging to the kth cluster k The mean vector of the feature space, K is the total number of clusters, C is the set of all clusters, x (i) is the cluster C k Samples within.