Construction of action labeling model, video action labeling method and device
Action labeling and labeling data are calibrated through the video input model, the operation parameters are adjusted, and the action labeling model is generated, which solves the problem of manually labeling a large number of sample data in the existing technology and improves the training efficiency of the action recognition model.
Patent Information
- Application Number
- CN202010775545.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-04
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-08-04
AI Technical Summary
Existing action recognition technology requires manual labeling of a large amount of sample data, which is time-consuming and labor-intensive, and the number of samples in the early stage of model training needs to reach more than 100,000, which affects efficiency.
By inputting the video into the model for labeling operation, calibrating the label data, and adjusting the operation parameters according to the similarity for model training, an action labeling model is generated, which reduces sample data requirements and saves manual labeling time.
It achieves model training with a small amount of sample data, saving early manual labeling time, optimizing model training efficiency, and reusing trained models.
Smart Images

Figure CN112036252B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of action recognition, and in particular to the construction of an action labeling model, and a video action labeling method and device. Background Art
[0002] In the field of vision-based human motion recognition, existing motion recognition technology first requires preliminary motion recognition model training. Model training usually requires manual labeling of a large number of learning samples, and then training a classification model based on these samples. Using the classification model, image features are extracted from the video, and the obtained image features are manually classified and labeled. However, in order to ensure the accuracy of subsequent models in recognizing human motions, the number of preliminary sample sets must reach more than 100,000. Such a large number of samples makes manual processing time-consuming and labor-intensive. Summary of the invention
[0003] In view of this, in order to solve the technical problem that a large amount of sample data needs to be manually labeled in the early stage of the above-mentioned traditional model training, the embodiments of the present invention provide a method and device for constructing an action labeling model, and a video action labeling method.
[0004] In a first aspect, an embodiment of the present invention provides a method for constructing an action labeling model, comprising:
[0005] Input the video (i) into the model (i), so that the model (i) performs a labeling operation on the action of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1), wherein i is a positive integer greater than or equal to 1;
[0006] Performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1) to generate the video (i) carrying the label data (2i);
[0007] Inputting the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1);
[0008] If the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model.
[0009] In a possible implementation, the method further includes:
[0010] Determine the action type corresponding to the action performed by the target person in the video (i), and the start and end time corresponding to each action type;
[0011] Based on the action type and the start and end time corresponding to each action type, a calibration operation is performed on the label data (2i-1), the type error and / or start and end time error in the label data (2i-1) is corrected, and the video (i) carrying the label data (2i) is generated.
[0012] In a possible implementation, the method further includes:
[0013] If the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is not within the preset range, the training step of the model (i+1) is continued by adjusting the operation parameters in the model (i+1).
[0014] In a second aspect, an embodiment of the present invention provides a video action marking method, comprising:
[0015] Inputting the video data to be labeled into the action labeling model, so that the action labeling model can identify the action type of the target person in the video data, and the start and end time corresponding to each action type;
[0016] The action labeling model performs a labeling operation on the target person's action based on the action type and the start and end time corresponding to each action type, and outputs the video data carrying the label data.
[0017] In a possible implementation, the method further includes:
[0018] Dividing the video into a plurality of frame images according to the timing information;
[0019] Based on a preset area frame containing the motion changes of the target person, determining the target person from the plurality of frame images;
[0020] Extracting a group of action features corresponding to the target person from each frame image to obtain multiple groups of action features corresponding to multiple frame images;
[0021] Matching the plurality of groups of action features with the standard action features stored in the action feature database one by one, and taking the action type corresponding to the standard action feature whose similarity with the action feature exceeds a set threshold as the action type corresponding to the action feature;
[0022] Based on the action type, the plurality of frame images are grouped according to time sequence information to obtain a plurality of video clips consisting of a plurality of groups of frame images corresponding to a plurality of action types;
[0023] Based on the start and end times respectively corresponding to the start and end frame images in the video segment, the start and end times respectively corresponding to the plurality of action types in the video are determined.
[0024] In a possible implementation, the method further includes:
[0025] The action type and the start and end time corresponding to each action type are output together with the video data in the form of tags.
[0026] In a third aspect, an embodiment of the present invention provides a device for constructing an action labeling model, including:
[0027] An acquisition module, used for inputting the video (i) into the model (i), so that the model (i) performs a labeling operation on the actions of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1);
[0028] A verification module, used for performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1), to generate the video (i) carrying the label data (2i);
[0029] A training module, used for inputting the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1);
[0030] A determination module is used to use the model (i+1) as an action labeling model if the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range.
[0031] In a fourth aspect, an embodiment of the present invention provides a video action marking device, including:
[0032] A labeling module, used for inputting the video data to be labeled into the action labeling model, so that the action labeling model can identify the action type of the target person in the video data, and the start and end time corresponding to each action type;
[0033] An output module is used for the action labeling model to perform labeling operations on the actions of the target person based on the action type and the start and end time corresponding to each action type, and output the video data carrying the label data.
[0034] In a fifth aspect, an embodiment of the present invention provides a computer device, comprising: a processor and a memory, wherein the processor is used to execute a construction program of an action labeling model or a video action labeling program stored in the memory to implement the construction method of the action labeling model described in the first aspect or the video action labeling method described in the second aspect.
[0035] In a sixth aspect, an embodiment of the present invention provides a storage medium, comprising: the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for constructing the action labeling model described in the first aspect or the video action labeling method described in the second aspect.
[0036] The method for constructing an action labeling model provided by an embodiment of the present invention comprises the following steps: inputting a video (i) into a model (i) so that the model (i) performs a labeling operation on the action of a target person in the video (i), and outputting the video (i) carrying label data (2i-1), wherein i is a positive integer greater than or equal to 1; performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1), and generating the video (i) carrying the label data (2i); inputting the video (i) carrying the label data (2i) into the model (i) for training, and obtaining a model (i+1); if the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model. The method can obtain a larger number of sample data for model training through a small amount of sample data, thereby saving the time of manually labeling a large amount of data in the early stage. The trained and optimized model can be reused, thereby improving the efficiency of the production line process action detection project. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flowchart of a method for constructing an action labeling model provided by an embodiment of the present invention;
[0038] Figure 2 A flowchart of another method for constructing an action labeling model provided by an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of a flow chart of a video action marking method provided by an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of a flow chart of another video action marking method provided by an embodiment of the present invention;
[0041] Figure 5 A schematic diagram of the structure of a device for constructing an action labeling model provided by an embodiment of the present invention;
[0042] Figure 6 A schematic diagram of the structure of a video action marking device provided by an embodiment of the present invention;
[0043] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0045] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0046] Figure 1 A flowchart of a method for constructing an action labeling model provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method specifically includes:
[0047] S11. Input the video (i) into the model (i) so that the model (i) performs a labeling operation on the actions of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1), where i is a positive integer greater than or equal to 1.
[0048] The present invention can be applied to workshop production lines in order to monitor the standards of manual actions of employees on the workshop production line, because different action sequences and action amplitudes may affect product quality and production efficiency. Therefore, the action labeling model provided by the present invention is needed to label the actions of employees in the monitoring video of the workshop production line, so as to control product quality later.
[0049] When i=1, model 1 is an untrained and unoptimized initial classification model obtained by the developer based on experience. Then a video 1 of a workshop production line is input into model 1. Model 1 initially and automatically distinguishes the actions in the video and performs preliminary labeling operations on the distinguished actions. The label content includes the action type of each action of the employee and the start and end time corresponding to each action type. Finally, video 1 carrying label data 1 is output.
[0050] It should be noted that the initial classification model stores multiple action types; the action type includes at least one of the following:
[0051] The video shows employees removing and installing fan blades, installing gaskets, applying fasteners and / or tightening nuts.
[0052] S12. Perform a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1) to generate the video (i) carrying the label data (2i).
[0053] In an embodiment of the present invention, a staff member views a video with labeled data output by the above-mentioned model. During video playback, the labeled data is displayed synchronously with the video playback. When an error occurs in the labeled data, the staff member can modify it directly. The video can be played back or played at double speed, which is convenient for the staff member to calibrate the label data and save time, and finally generates a video 1 carrying label data 2.
[0054] For example, a video has a total length of 60 seconds and contains three action types. The first action type is from 0 to 30 seconds, the second action type is from 31 to 40 seconds, and the third action type is from 41 to 60 seconds. The label data generated by the initial model for labeling the video may be that the start and end time of the first action type is from 0 to 28 seconds, and the start and end time of the second action type is from 29 to 40 seconds. The action type from 41 to 60 seconds is mistakenly identified as the fourth action type. Therefore, the staff needs to calibrate the label data to generate a video with standard label data.
[0055] S13. Input the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1).
[0056] The video 1 with the label data 2 after the label data is calibrated by the above-mentioned staff is re-input into the model 1, so that the model 1 performs a deep learning training based on the video 1 with the label data 2, and obtains the model 2 after the training.
[0057] Furthermore, another video 2 with the same background as video 1 but with a different sequence of target character's actions and start and end time of each action is input into model 2. Model 2 labels the actions in video 2 and outputs video 2 carrying label data 3.
[0058] Furthermore, the staff again reviews video 2 with label data 3 output by model 2, calibrates label data 3, and generates video 2 carrying label data 4.
[0059] Furthermore, video 2 with label data 4 is re-input into model 2, so that model 2 performs a deep learning training based on video 2 with label data 4 to obtain model 3.
[0060] S14. If the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model.
[0061] The model will adjust the operation parameters accordingly when labeling the video. When the similarity of the operation parameters of two adjacent models is within the preset threshold range, model (i+1) is determined to be the trained model, and model (i+1) is used as the action labeling model.
[0062] For example, the similarity of the operating parameters of Model 2 obtained after one training of Model 1 and Model 3 obtained after one training of Model 2 is 95%. The similarity range of the operating parameters of two adjacent models when the model training is successful is set to 90% to 98%. Then, the similarity of the operating parameters of Model 2 and Model 3 is 95%, which is within the set threshold range. It is determined that Model 3 has been successfully trained, and Model 3 can be used as an action labeling model for the scenes represented by Video 1 and Video 2. Model 3 can label the actions of the characters in the video of the scene.
[0063] The method for constructing an action labeling model provided by an embodiment of the present invention comprises the following steps: inputting a video (i) into a model (i) so that the model (i) performs a labeling operation on the action of a target person in the video (i), and outputting the video (i) carrying label data (2i-1), wherein i is a positive integer greater than or equal to 1; performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1), and generating the video (i) carrying the label data (2i); inputting the video (i) carrying the label data (2i) into the model (i) for training, and obtaining a model (i+1); if the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model. According to this method, a larger number of sample data can be obtained through a small amount of sample data for model training, thereby saving the time of manually labeling a large amount of data in the early stage, and the trained and optimized model can be reused.
[0064] Figure 2 A flowchart of another method for constructing an action labeling model provided by an embodiment of the present invention is shown as follows: Figure 2 As shown, the method specifically includes:
[0065] S21. Input the video (i) into the model (i) so that the model (i) performs a labeling operation on the actions of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1).
[0066] A video of a workshop production line is input into an untrained and unoptimized initial model designed by the developer based on experience. The initial model is equipped with algorithms such as target trajectory tracking, image feature extraction, transfer learning or feature fusion. Using these algorithms, the initial model can initially and automatically identify the target person in the video, identify and distinguish the target person's actions, and preliminarily mark the identified actions. The marked content is the type of action and the corresponding start and end time of each action type in the video. These labels are then output together with the video, and the label content can be displayed synchronously during video playback.
[0067] S22, determining the action type corresponding to the action performed by the target person in the video (i), and the start and end time corresponding to each action type.
[0068] In the embodiment of the present invention, after the video carrying the label data is output, the staff checks the video and determines the action types of the target person appearing sequentially in the entire video and the start and end time of each action type according to the standard.
[0069] For example, the video content is a video of welding air guide tubes in the production of air conditioners, with a total length of 10 seconds. The types of actions included include picking up welding tools, welding pauses and / or removing welding tools. The welding of the curved part close to the throttle valve is required to be paused for at least 3 seconds. To ensure that the welding rod is fully welded, the start and end time corresponding to picking up the welding tool is 0 to 4 seconds, the start and end time corresponding to the welding pause is 5 to 7 seconds, and the start and end time corresponding to removing the welding tool is 8 to 10 seconds.
[0070] S23. Perform a calibration operation on the label data (2i-1) based on the action type and the start and end time corresponding to each action type, correct the type error and / or start and end time error in the label data (2i-1), and generate the video (i) carrying the label data (2i).
[0071] Because the initial model has not undergone deep learning training and optimization, the initially generated label content may have recognition errors. The staff calibrates the initially generated label data based on the standard action types that appear in the video and the start and end times corresponding to each action type. When the error in the label data is an action type recognition error, the staff can directly modify it to the correct action type name in the text box. When the error in the label data is an error in the start and end time corresponding to the action type, the staff can use the progress bar to drag to correct and optimize the label data, and finally generate a video with standard label data.
[0072] S24. Input the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1).
[0073] After the staff calibrates the video labels, the program automatically re-inputs the video carrying the standard label data into the initial model, performs deep learning training on the model, and generates a model after one training.
[0074] S25. If the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model.
[0075] The model will adjust the operation parameters accordingly when labeling the video. When the similarity of the operation parameters of two adjacent models is within the preset threshold range, model (i+1) is determined to be the trained model, and model (i+1) is used as the action labeling model.
[0076] For example, when i=3, model 2 is obtained after one training of model 1, model 3 is obtained after one training of model 2, and model 4 is obtained after one training of model 3. The similarity of the operation parameters of model 4 and model 3 is 97%. The similarity range of the operation parameters of two adjacent models when the model training is successful is set to 95% to 99%. Then, the similarity of the operation parameters of model 4 and model 3 is 97%, which is within the set threshold range. It is determined that model 4 is successfully trained, and model 4 can be used as an action labeling model in the scene of video representation of the training model. Model 4 can label the action of the characters in the video of the scene.
[0077] S26. If the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is not within the preset range, continue to execute the training step of the model (i+1) by adjusting the operation parameters in the model (i+1).
[0078] If the similarity between the operation parameters corresponding to model (i+1) and the model (i) is not within the preset threshold range, it is determined that model (i+1) needs to be trained again. The model optimization process of this solution is completed automatically, and the staff only needs to choose whether to optimize, saving manpower.
[0079] When the model is undergoing deep learning training, after each pair of videos is marked, a video with labeled data is re-output. The staff checks the new labeled data in the video and calibrates it. The video with calibrated labeled data is re-input into the model for model training and a new model is output. When the similarity of the operation parameters of the models trained twice are within the preset range, the model training is considered complete and model (i+1) is used as the action labeling model.
[0080] For example, when the model training is successful, the similarity of the operation parameters of two adjacent models is set to a range of 80% to 90%. If the similarity of the corresponding operation parameters of model (i+1) and model (i) is 70% or 95%, it is considered that model (i+1) has not been trained and cannot be used, and model (i+1) needs to be trained again.
[0081] The method for constructing an action labeling model provided by an embodiment of the present invention comprises the following steps: inputting a video (i) into a model (i) so that the model (i) performs a labeling operation on the action of a target person in the video (i), and outputting the video (i) carrying label data (2i-1), wherein i is a positive integer greater than or equal to 1; performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1), and generating the video (i) carrying the label data (2i); inputting the video (i) carrying the label data (2i) into the model (i) for training, and obtaining a model (i+1); if the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model. The method can realize cyclic training of the model through a small amount of sample data, save the time of manually marking sample data, and improve the training optimization efficiency of the model.
[0082] Figure 3 A schematic diagram of a video action marking method provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the method specifically includes:
[0083] S31, inputting the video data to be labeled into the action labeling model, so that the action labeling model can identify the action type of the target person in the video data, and the start and end time corresponding to each action type.
[0084] The embodiment of the present invention is that the action labeling model after successful training and optimization can be applied to the labeling operation of other production line process action videos. The video to be labeled is input into the action labeling model, so that the action labeling model automatically identifies the target person and multiple action types of the target person in the video and the start and end time corresponding to each action type, and outputs the action type and the start and end time corresponding to each action type together with the video.
[0085] S32: The action labeling model performs a labeling operation on the target person's action based on the action type and the start and end time corresponding to each action type, and outputs the video data carrying the label data.
[0086] The action labeling model identifies the target person in the video and multiple action types of the target person as well as the start and end time corresponding to each action type, and outputs the action type and the start and end time corresponding to each action type in the form of labels along with the video. The staff can check whether the actions of the production line operators are standard based on the label data in the video, thereby monitoring the product quality.
[0087] This action labeling model can also be applied to video surveillance, video retrieval, human-computer interaction and other fields.
[0088] A video action labeling method provided by an embodiment of the present invention inputs the video data to be labeled into an action labeling model so that the action labeling model identifies the action type of the target person in the video data and the start and end time corresponding to each action type; the action labeling model performs a labeling operation on the action of the target person based on the action type and the start and end time corresponding to each action type, and outputs the video data carrying the label data. The method can be applied to the labeling operation of the production line process action video, and the staff can check whether the actions of the production line operator are standard according to the label data in the video, thereby achieving control over the product quality.
[0089] Figure 4 A flow chart of another video action marking method provided by an embodiment of the present invention is shown as follows: Figure 4 As shown, the method specifically includes:
[0090] S41, dividing the video into a plurality of frame images according to time sequence information.
[0091] In the embodiment of the present invention, the above-mentioned trained action labeling model is used to identify multiple actions of the target person in the production line process action video, and the identified action types and the start and end time of each action type are labeled. First, the video is input into the action labeling model, and the model divides the video into multiple video frame images during video playback.
[0092] S42: Determine the target person from the plurality of frame images based on a preset area frame containing the motion changes of the target person.
[0093] The target trajectory tracking algorithm is adopted. First, the target person is captured in the preset area frame where the target person's movements change. Then, the target person in each video frame image is determined from the multiple segmented video frame images to realize the trajectory tracking of the target person.
[0094] S43, extracting a group of action features corresponding to the target person from each frame image, and obtaining multiple groups of action features corresponding to multiple frame images.
[0095] An image feature extraction algorithm or a feature fusion algorithm is used to extract features from each video frame image. Multiple image features can be extracted from each video frame image, and then a group of action features corresponding to the target person in each video frame image can be identified, and finally multiple groups of action features of the target person corresponding to multiple video frame images are obtained.
[0096] S44, matching the plurality of groups of action features with the standard action features stored in the action feature database one by one, and taking the action type corresponding to the standard action feature whose similarity with the action feature exceeds a set threshold as the action type corresponding to the action feature.
[0097] The action feature database of the action labeling model stores multiple standard action features corresponding to multiple action types. The action features of the multiple groups of target persons corresponding to the multiple video frame images identified above are compared with the multiple standard action features corresponding to the multiple action types stored in the action feature database. The action types corresponding to the standard action features whose feature similarity exceeds a set threshold (for example, 98%) are used as the action types of the multiple groups of target persons corresponding to each video frame image.
[0098] S45 . Based on the action type, group the plurality of frame images according to time sequence information to obtain a plurality of video clips consisting of a plurality of groups of frame images corresponding to a plurality of action types.
[0099] In the embodiment of the present invention, since one action type corresponds to multiple action features, there will be duplication in the multiple groups of target person's action types corresponding to each of the above-mentioned identified video frame images. The video frame images with the same action type are grouped according to the timing information to obtain a group of video frame images corresponding to each action type. These video frame images can be combined into a video clip according to the timing information, and finally multiple video clips corresponding to multiple action types are obtained.
[0100] S46: Determine the start and end times corresponding to the plurality of action types in the video based on the start and end times corresponding to the start and end frame images in the video segment.
[0101] S47: Output the action type and the start and end time corresponding to each action type together with the video data in the form of tags.
[0102] The time corresponding to the first video frame image and the last video frame image in each video clip is used as the start and end time of each video clip, and then the start and end time corresponding to each action type is obtained. The action type of the identified target person and the start and end time corresponding to each action type are output together with the video data in the form of labels to obtain a video with labeled data. The staff can check whether the actions of the production line operators are standard based on the labeled data in the video, thereby realizing the monitoring of product quality.
[0103] A video action labeling method provided by an embodiment of the present invention inputs the video data to be labeled into an action labeling model so that the action labeling model identifies the action type of the target person in the video data and the start and end time corresponding to each action type; the action labeling model performs a labeling operation on the action of the target person based on the action type and the start and end time corresponding to each action type, and outputs the video data carrying the label data. The method can be applied to the labeling operation of the production line process action video, and the staff can check whether the actions of the production line operator are standard according to the label data in the video, thereby achieving control over the product quality.
[0104] Figure 5 A schematic diagram of a structure of a device for constructing an action labeling model provided by an embodiment of the present invention, specifically comprising:
[0105] The acquisition module 501 is used to input the video (i) into the model (i), so that the model (i) performs a labeling operation on the actions of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1);
[0106] A verification module 502, configured to perform a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1), to generate the video (i) carrying the label data (2i);
[0107] A training module 503 is used to input the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1);
[0108] The determination module 504 is used to use the model (i+1) as the action labeling model if the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range.
[0109] The verification module is specifically used to determine the action type corresponding to the action generated by the target person in the video (i), as well as the start and end time corresponding to each action type; based on the action type and the start and end time corresponding to each action type, a calibration operation is performed on the label data (2i-1), and the type error and / or start and end time error in the label data (2i-1) are corrected to generate the video (i) carrying the label data (2i).
[0110] In one possible implementation, the determination module is also used to continue the training step of the model (i+1) by adjusting the operating parameters in the model (i+1) if the similarity between the corresponding operating parameters of the model (i+1) and the model (i) is not within a preset range.
[0111] The construction device of the action labeling model provided in this embodiment can be as follows: Figure 5 The construction device of the action labeling model shown in can be executed as follows Figure 1-2 All steps of the construction method of the action labeling model in Figure 1-2 For details, please refer to the technical effect of the construction method of the action labeling model shown in Figure 1-2 For the sake of brevity, the relevant description is not repeated here.
[0112] Figure 6 A schematic diagram of the structure of a video action marking device provided by an embodiment of the present invention specifically includes:
[0113] The labeling module 601 is used to input the video data to be labeled into the action labeling model, so that the action labeling model can identify the action type of the target person in the video data and the start and end time corresponding to each action type;
[0114] The output module 602 is used for the action labeling model to perform labeling operations on the actions of the target person based on the action type and the start and end time corresponding to each action type, and output the video data carrying the label data.
[0115] The marking module is specifically used to divide the video into multiple frame images according to timing information; determine the target person from the multiple frame images based on a preset area frame containing the motion changes of the target person; extract a group of action features corresponding to the target person from each frame image to obtain multiple groups of action features corresponding to the multiple frame images; match the multiple groups of action features with the standard action features stored in the action feature database one by one, and use the action type corresponding to the standard action feature whose similarity with the action feature exceeds a set threshold as the action type corresponding to the action feature; based on the action type, group the multiple frame images according to timing information to obtain multiple video clips composed of multiple groups of frame images corresponding to multiple action types; based on the start and end times corresponding to the start and end frame images in the video clips, respectively, determine the start and end times corresponding to the multiple action types in the video.
[0116] The output module is specifically used to output the action type and the start and end time corresponding to each action type together with the video data in the form of labels.
[0117] The video motion marking device provided in this embodiment can be as follows Figure 6 The video action marking device shown in the figure can be executed as follows Figure 3-4 All steps of the video action labeling method are implemented Figure 3-4 The technical effect of the video action marking method shown in the figure is shown in the figure. Figure 3-4 For the sake of brevity, the relevant description is not repeated here.
[0118] Figure 7 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention, Figure 7 The computer device 700 shown includes: at least one processor 701, a memory 702, at least one network interface 704 and other user interfaces 703. The various components in the computer device 700 are coupled together via a bus system 705. It is understood that the bus system 705 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 705 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 705 is not described in detail. Figure 7 Various buses are labeled as bus system 705.
[0119] The user interface 703 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0120] It can be understood that the memory 702 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 702 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0121] In some implementations, the memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 7021 and an application 7022 .
[0122] The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 7022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 7022.
[0123] In the embodiment of the present invention, by calling the program or instruction stored in the memory 702, specifically, the program or instruction stored in the application 7022, the processor 701 is used to execute the following Figure 1 and Figure 2 The method steps provided in any implementation manner in the corresponding embodiment include, for example:
[0124] Input the video (i) into the model (i) so that the model (i) performs a labeling operation on the action of the target person in the video (i) and outputs the video (i) carrying the label data (2i-1), wherein i is a positive integer greater than or equal to 1; perform a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1) to generate the video (i) carrying the label data (2i); input the video (i) carrying the label data (2i) into the model (i) for training to obtain the model (i+1); if the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model.
[0125] In a possible implementation, determining the action type corresponding to the action performed by the target person in the video (i), and the start and end time corresponding to each action type;
[0126] Based on the action type and the start and end time corresponding to each action type, a calibration operation is performed on the label data (2i-1), the type error and / or start and end time error in the label data (2i-1) is corrected, and the video (i) carrying the label data (2i) is generated.
[0127] In one possible implementation, if the similarity between the corresponding operating parameters of the model (i+1) and the model (i) is not within a preset range, the training step of the model (i+1) is continued by adjusting the operating parameters in the model (i+1).
[0128] Or, the processor 701 is used to execute various methods such as Figure 3 and Figure 4 The method steps provided in any implementation manner in the corresponding embodiment include, for example:
[0129] The video data to be labeled is input into the action labeling model so that the action labeling model can identify the action type of the target person in the video data and the start and end time corresponding to each action type; the action labeling model performs labeling operations on the action of the target person based on the action type and the start and end time corresponding to each action type, and outputs the video data carrying the label data.
[0130] In one possible implementation, the video is segmented into a plurality of frame images according to timing information; the target person is determined from the plurality of frame images based on a preset area frame containing the motion changes of the target person; a group of action features corresponding to the target person is extracted from each frame image to obtain a plurality of groups of action features corresponding to the plurality of frame images; the plurality of groups of action features are matched one by one with standard action features stored in an action feature database, and the action type corresponding to the standard action feature whose similarity with the action feature exceeds a set threshold is used as the action type corresponding to the action feature; based on the action type, the plurality of frame images are grouped according to timing information to obtain a plurality of video clips consisting of a plurality of groups of frame images corresponding to a plurality of action types; based on the start and end times corresponding to the start and end frame images in the video clips, the start and end times corresponding to the plurality of action types in the video are determined.
[0131] In a possible implementation manner, the action type and the start and end time corresponding to each action type are output together with the video data in the form of tags.
[0132] The method disclosed in the above embodiment of the present invention can be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 701 or the instruction in the form of software. The above processor 701 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field 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 702, and the processor 701 reads the information in the memory 702 and completes the steps of the above method in combination with its hardware.
[0133] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0134] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0135] The computer device provided in this embodiment may be Figure 7 The computer device shown in , can execute Figure 1-2 Method for constructing action labeling model in Figure 3-4 All steps of the video action labeling method are implemented Figure 1-2 The construction method of the action labeling model shown in Figure 3-4 The technical effect of the video action marking method is shown in the figure below. Figure 1-2 and Figure 3-4 For the sake of brevity, the relevant description is not repeated here.
[0136] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0137] When one or more programs in the storage medium can be executed by one or more processors, the method for constructing the action labeling model and the method for labeling video actions executed on the computer device side can be implemented.
[0138] The processor is used to execute the action labeling model construction program and the video action labeling program stored in the memory to implement the following steps of the action labeling model construction method executed on the computer device side:
[0139] Input the video (i) into the model (i) so that the model (i) performs a labeling operation on the action of the target person in the video (i) and outputs the video (i) carrying the label data (2i-1), wherein i is a positive integer greater than or equal to 1; perform a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1) to generate the video (i) carrying the label data (2i); input the video (i) carrying the label data (2i) into the model (i) for training to obtain the model (i+1); if the similarity between the corresponding operation parameters of the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model.
[0140] In one possible implementation, the action type corresponding to the action performed by the target person in the video (i) and the start and end time corresponding to each action type are determined; based on the action type and the start and end time corresponding to each action type, a calibration operation is performed on the label data (2i-1), the type error and / or start and end time error in the label data (2i-1) is corrected, and the video (i) carrying the label data (2i) is generated.
[0141] In one possible implementation, if the similarity between the corresponding operating parameters of the model (i+1) and the model (i) is not within a preset range, the training step of the model (i+1) is continued by adjusting the operating parameters in the model (i+1).
[0142] Or, implement the following steps of the video action marking method executed on the computer device side:
[0143] The video data to be labeled is input into the action labeling model so that the action labeling model can identify the action type of the target person in the video data and the start and end time corresponding to each action type; the action labeling model performs labeling operations on the action of the target person based on the action type and the start and end time corresponding to each action type, and outputs the video data carrying the label data.
[0144] In one possible implementation, the video is segmented into a plurality of frame images according to timing information; the target person is determined from the plurality of frame images based on a preset area frame containing the motion changes of the target person; a group of action features corresponding to the target person is extracted from each frame image to obtain a plurality of groups of action features corresponding to the plurality of frame images; the plurality of groups of action features are matched one by one with standard action features stored in an action feature database, and the action type corresponding to the standard action feature whose similarity with the action feature exceeds a set threshold is used as the action type corresponding to the action feature; based on the action type, the plurality of frame images are grouped according to timing information to obtain a plurality of video clips consisting of a plurality of groups of frame images corresponding to a plurality of action types; based on the start and end times corresponding to the start and end frame images in the video clips, the start and end times corresponding to the plurality of action types in the video are determined.
[0145] In a possible implementation manner, the action type and the start and end time corresponding to each action type are output together with the video data in the form of tags.
[0146] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0147] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0148] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for constructing an action labeling model, characterized in that: include: Input the video (i) into the model (i), so that the model (i) performs a labeling operation on the actions of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1), wherein i is a positive integer greater than or equal to 1; if i in the video (i) takes different values, it corresponds to videos with different action sequences of the target person in the same scene; Performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1) to generate the video (i) carrying the label data (2i); Input the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1); If the similarity between the operation parameters corresponding to the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model; If the similarity between the operation parameters corresponding to the model (i+1) and the model (i) is not within the preset range, the training step of the model (i+1) is continued by adjusting the operation parameters in the model (i+1).
2. The method according to claim 1, characterized in that The label data (2i-1) or the label data (2i) includes: an action type and a start and end time corresponding to the action type; The step of performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1) to generate the video (i) carrying the label data (2i) comprises: Determine the action type corresponding to the action performed by the target person in the video (i), and the start and end time corresponding to each action type; Based on the action type and the start and end time corresponding to each action type, a calibration operation is performed on the label data (2i-1), the type error and / or the start and end time error in the label data (2i-1) is corrected, and the video (i) carrying the label data (2i) is generated.
3. The method according to claim 1, characterized in that If i = 1, then model (1) is the initial classification model; The initial classification model stores multiple action types; The action type includes at least one of the following: The target person performs actions of removing and installing fan blades, installing gaskets, applying fastening glue and / or tightening nuts.
4. A video action marking method, characterized in that: include: Input the video (i) into the model (i), so that the model (i) performs a labeling operation on the actions of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1), wherein i is a positive integer greater than or equal to 1; if i in the video (i) takes different values, it corresponds to videos with different action sequences of the target person in the same scene; Performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1) to generate the video (i) carrying the label data (2i); Input the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1); If the similarity between the operation parameters corresponding to the model (i+1) and the model (i) is within a preset range, the model (i+1) is used as the action labeling model; If the similarity between the operation parameters corresponding to the model (i+1) and the model (i) is not within the preset range, continuing the training step of the model (i+1) by adjusting the operation parameters in the model (i+1); Inputting the video data to be labeled into the action labeling model, so that the action labeling model can identify the action type of the target person in the video data, and the start and end time corresponding to each action type; The action labeling model performs a labeling operation on the target person's action based on the action type and the start and end time corresponding to each action type, and outputs the video data carrying the label data.
5. The method according to claim 4, characterized in that The action labeling model identifies the action type of the target person in the video data, and the start and end time corresponding to each action type, including: Dividing the video into a plurality of frame images according to the timing information; Determine the target person from the plurality of frame images based on a preset area frame containing the motion changes of the target person; Extracting a group of action features corresponding to the target person from each frame image to obtain multiple groups of action features corresponding to multiple frame images; Matching the plurality of groups of action features with the standard action features stored in the action feature database one by one, and taking the action type corresponding to the standard action feature whose similarity with the action feature exceeds a set threshold as the action type corresponding to the action feature; Based on the action type, the plurality of frame images are grouped according to time sequence information to obtain a plurality of video clips consisting of a plurality of groups of frame images corresponding to a plurality of action types; Based on the start and end times respectively corresponding to the start and end frame images in the video segment, the start and end times respectively corresponding to the plurality of action types in the video are determined.
6. The method according to claim 5, characterized in that The step of performing a labeling operation on the target person's action based on the action type and the start and end time corresponding to each action type, and outputting the video data carrying the label data, includes: The action type and the start and end time corresponding to each action type are output together with the video data in the form of tags.
7. A device for constructing an action labeling model, characterized in that: include: The acquisition module is used to input the video (i) into the model (i), so that the model (i) performs a labeling operation on the actions of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1); if i in the video (i) takes different values, it corresponds to videos with different action sequences of the target person in the same scene; A verification module, used for performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1), to generate the video (i) carrying the label data (2i); A training module, used for inputting the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1); A determination module, configured to use the model (i+1) as an action labeling model if the similarity between the operation parameters corresponding to the model (i) and the model (i) is within a preset range; If the similarity between the operation parameters corresponding to the model (i+1) and the model (i) is not within the preset range, the training step of the model (i+1) is continued by adjusting the operation parameters in the model (i+1).
8. A video action marking device, characterized in that: include: The acquisition module is used to input the video (i) into the model (i), so that the model (i) performs a labeling operation on the actions of the target person in the video (i), and outputs the video (i) carrying the label data (2i-1); if i in the video (i) takes different values, it corresponds to videos with different action sequences of the target person in the same scene; A verification module, used for performing a calibration operation on the label data (2i-1) in the video (i) carrying the label data (2i-1), to generate the video (i) carrying the label data (2i); A training module, used for inputting the video (i) carrying the label data (2i) into the model (i) for training to obtain a model (i+1); A determination module, configured to use the model (i+1) as an action labeling model if the similarity between the operation parameters corresponding to the model (i) and the model (i) is within a preset range; If the similarity between the operation parameters corresponding to the model (i+1) and the model (i) is not within the preset range, continuing the training step of the model (i+1) by adjusting the operation parameters in the model (i+1); A labeling module, used for inputting the video data to be labeled into the action labeling model, so that the action labeling model can identify the action type of the target person in the video data, and the start and end time corresponding to each action type; An output module is used for the action labeling model to perform labeling operations on the actions of the target person based on the action type and the start and end time corresponding to each action type, and output the video data carrying the label data.
9. A computer device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a construction program of an action labeling model or a video action labeling program stored in the memory to implement the construction method of the action labeling model described in any one of claims 1 to 3 or the video action labeling method described in any one of claims 4 to 6.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for constructing an action labeling model described in any one of claims 1 to 3 or the video action labeling method described in any one of claims 4 to 6.
Citation Information
Patent Citations
Image processing method, image processing device, storage medium and electronic device
CN108804658A
Method and device for automatically making video tags for videos, medium and electronic equipment
CN109660865A
Generating a video segment of an action from a video
US20190114487A1
Facial expression recognition utilizing unsupervised learning
US20190205625A1
Feature recognition method and apparatus
WO2020114135A1
