Template generation method and device
By extracting operating actions and action parameters from the hydrogenation video, a hydrogenation action template that meets the preset specifications is generated, which solves the problem of low efficiency of manual key frame selection in the existing technology and achieves rapid and accurate generation of hydrogenation action templates. , which improves the efficiency of the template matching process.
Patent Information
- Application Number
- CN202010761925.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-31
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-07-31
AI Technical Summary
In the existing technology, algorithm developers need to manually select key frames frame by frame to generate template images, which is inefficient and cannot quickly and accurately verify the accuracy of the template, making the template matching process inconvenient for unified management.
By determining the key frames of the hydrogenation video, including the operating actions and action parameters of the target object, a hydrogenation action template is generated based on the preset hydrogenation action specifications. The gesture recognition algorithm and action trajectory are used to extract the action parameters, and the template is generated after ensuring that the actions comply with the specifications. .
It realizes the rapid and accurate generation of hydrogenation action templates from videos, improves the work efficiency of algorithm developers, and solves the problem of low efficiency of manual key frame selection.
Smart Images

Figure CN111881859B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video information processing, and in particular to a template generation method and device. Background Art
[0002] Template matching is a method for finding objects in images. Its basic principle is to find the area in an image that most closely resembles a template image. It is a technique for finding the portion of an image that most closely matches (or is similar to) another template image. Template matching requires a template image, but template images vary in different scenarios. Therefore, quickly and efficiently extracting template images from a video has become a daily task and a major pain point for algorithm developers.
[0003] In existing technologies, after receiving a video, algorithm developers need to manually select key frames one by one and put them into a designated folder. They then use the selected key frames as a template image and verify the accuracy of the selected template image through template matching. However, using these technical methods, algorithm developers cannot intuitively understand which key frames have been selected, cannot quickly generate an efficient template image, and cannot verify the accuracy of the manually selected template, thereby verifying the template image. Moreover, existing technical solutions rely on the accuracy of algorithm developers, cannot guarantee accuracy, are inefficient, and are not convenient for unified management.
[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0005] The embodiments of the present invention provide a template generation method and device to at least solve the technical problem in the related art that hydrogenation action templates cannot be generated quickly and accurately by relying on manual selection of key frames.
[0006] According to one aspect of an embodiment of the present invention, a template generation method is provided, comprising: determining key frames of a hydrogenation video, wherein the key frames include at least operating actions and action parameters of a target object during the hydrogenation process; determining the hydrogenation action of the target object based on the operating actions and the action parameters; and generating a hydrogenation action template for the target object when the hydrogenation action meets a preset hydrogenation action specification.
[0007] Optionally, determining the key frames of the hydrogenation video includes: segmenting the hydrogenation video to obtain segmented hydrogenation videos, wherein the segmented hydrogenation videos are associated with an operation action in the hydrogenation process; extracting multiple initial key frames of the segmented hydrogenation videos; and screening out at least one initial key frame from the multiple initial key frames as the key frame of the hydrogenation video.
[0008] Optionally, before determining the hydrogenation action of the target object based on the operation action and the action parameters, it also includes: determining the time sequence of the key frames in the hydrogenation video; and extracting the operation action and the action parameters from the key frames in sequence according to the time sequence.
[0009] Optionally, based on the operating action and the action parameters, determining the hydrogenation action of the target object includes: identifying the joint points of the operating action based on a preset posture recognition algorithm; generating an action trajectory based on the joint points; determining the action parameters associated with the operating action, wherein the action parameters are dynamic change indicators of the target object relative to the target reference object, and the dynamic change indicators include at least one of the following: position, distance, angle; obtaining the hydrogenation action of the target object based on the action trajectory and the action parameters associated with the operating action.
[0010] Optionally, when the hydrogenation action complies with a preset hydrogenation action specification, generating the hydrogenation action template of the target object includes: determining whether the order in which the hydrogenation actions appear matches the standard order in the preset hydrogenation action specification; if so, generating the hydrogenation action template of the target object.
[0011] Optionally, when the hydrogenation action complies with a preset hydrogenation action specification, generating the hydrogenation action template for the target object further includes: determining a weight of the hydrogenation action; scoring the hydrogenation action based on the weight; and generating the hydrogenation action template for the target object when the score reaches a standard score in the preset hydrogenation action specification.
[0012] Optionally, after generating the hydrogenation action template of the target object, the method further includes: classifying and storing the hydrogenation action template in a hydrogenation action template library based on preset classification rules.
[0013] According to another aspect of an embodiment of the present invention, a template generation device is also provided, including: a first determination module for determining the key frames of the hydrogenation video, wherein the key frames include at least the operating actions and action parameters of the target object during the hydrogenation process; a second determination module for determining the hydrogenation action of the target object based on the operating actions and the action parameters; and a generation module for generating a hydrogenation action template for the target object when the hydrogenation action meets the preset hydrogenation action specifications.
[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute any one of the template generation methods described above.
[0015] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is configured to run a program, wherein the program executes any one of the above-mentioned template generation methods when running.
[0016] In an embodiment of the present invention, a key frame of a hydrogenation video is determined, wherein the key frame includes at least an operating action and action parameters of a target object during a hydrogenation process; the hydrogenation action of the target object is determined based on the operating action and the action parameters; and a hydrogenation action template of the target object is generated when the hydrogenation action meets a preset hydrogenation action specification. The hydrogenation action of the target object is determined by the operating action and action parameters of the hydrogenation process contained in the key frame of the hydrogenation video, so that the hydrogenation action template of the target object is generated when the hydrogenation action meets the preset hydrogenation action specification, thereby achieving the purpose of extracting the hydrogenation action template from the hydrogenation video, thereby realizing the technical effect of quickly and accurately generating the hydrogenation action template, and improving the efficiency of algorithm developers in generating efficient templates, thereby solving the technical problem in the related art of relying on manual selection of key frames to fail to quickly and accurately generate the hydrogenation action template. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a flow chart of a template generation method according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a template generating device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions 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 embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] Example 1
[0023] According to an embodiment of the present invention, an embodiment of a template generation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] Figure 1 is a flow chart of a template generation method according to an embodiment of the present invention. Figure 1 As shown, the template generation method includes the following steps:
[0025] Step S102: determining key frames of the hydrogenation video, wherein the key frames at least include the operation actions and action parameters of the target object during the hydrogenation process;
[0026] The aforementioned hydrogenation video is captured during the hydrogenation process. Specifically, image acquisition devices may be installed at multiple locations in the hydrogenation station to capture relevant videos of the hydrogenation area, such as a video of the target object during the hydrogenation process.
[0027] Step S104, determining a hydrogenation action for the target object based on the operation action and action parameters;
[0028] Step S106 : When the hydrogenation action meets the preset hydrogenation action specification, a hydrogenation action template for the target object is generated.
[0029] During the specific implementation process, the above-mentioned preset hydrogenation action specifications include but are not limited to multi-dimensional indicators such as standard sequence and standard score, which can be flexibly selected according to the application scenario.
[0030] As an optional embodiment, the above-mentioned implementation steps S102 to S106 can be applied to hydrogenation video analysis application software / hydrogenation video analysis system.
[0031] Through the above steps, it is possible to determine the hydrogenation action of the target object through the operating actions and action parameters of the hydrogenation process contained in the key frames of the hydrogenation video, so that when the hydrogenation action meets the preset hydrogenation action specifications, a hydrogenation action template of the target object is generated, thereby achieving the purpose of extracting the hydrogenation action template from the hydrogenation video, thereby realizing the technical effect of quickly and accurately generating the hydrogenation action template, improving the efficiency of algorithm developers in generating efficient templates, and thus solving the technical problem in the related technology of relying on manual selection of key frames and being unable to quickly and accurately generate the hydrogenation action template.
[0032] Optionally, determining the key frame of the hydrogenation video includes: segmenting the hydrogenation video to obtain segmented hydrogenation videos, wherein the segmented hydrogenation videos are associated with an operation action in the hydrogenation process; extracting multiple initial key frames of the segmented hydrogenation videos; and screening at least one initial key frame from the multiple initial key frames as the key frame of the hydrogenation video.
[0033] As an optional embodiment, the hydrogenation video can be divided into several segments, where each segment of the hydrogenation video is associated with an operation action in the hydrogenation process. That is, the hydrogenation video corresponding to each operation action in the hydrogenation process is intercepted to obtain the corresponding segmented hydrogenation video.
[0034] As an optional embodiment, multiple initial key frames can be extracted from each segmented hydrogenation video. For example, the hydrogenation video can be divided into 10 segments, and multiple initial key frames can be extracted from each segment. It should be noted that the number of initial key frames extracted from each segmented hydrogenation video can be the same or different, depending on the specific application scenario.
[0035] As an optional embodiment, in order to obtain a key frame that can better reflect the hydrogenation action of the target object, the initial key frame can be screened. For example, at least one initial key frame can be screened out from multiple initial key frames as a key frame of the hydrogenation video. At this time, the at least one initial key frame screened out is the key frame that is closest to the hydrogenation action of the target object among the multiple initial key frames.
[0036] Through the above implementation, the most representative key frames of the hydrogenation video can be selected, further improving the accuracy of determining the hydrogenation action of the target object.
[0037] Optionally, before determining the hydrogenation action of the target object based on the operation action and action parameters, the above method also includes: determining the time sequence of key frames in the hydrogenation video; and extracting the operation action and action parameters from the key frames in sequence according to the time sequence.
[0038] As an optional embodiment, in the process of extracting key frames from the hydrogenation video, the extracted key frames are marked, and the time nodes at which the key frames appear in the hydrogenation video are recorded using the marks, so that the time sequence of the key frames in the hydrogenation video can be quickly determined.
[0039] As an optional embodiment, the aforementioned time sequence represents the chronological order of the key frames in the hydrogenation video. This time sequence allows for sequential extraction of operational actions and action parameters from the key frames, allowing for serialization of the target object's operational actions and action parameters during the hydrogenation process, enabling more efficient determination of the order in which subsequent hydrogenation actions for the target object will be executed.
[0040] Optionally, based on the operating action and action parameters, determining the hydrogenation action of the target object includes: identifying the joint points of the operating action based on a preset posture recognition algorithm; generating a motion trajectory based on the joint points; determining the action parameters associated with the operating action, wherein the action parameters are dynamic change indicators of the target object relative to the target reference object, and the dynamic change indicators include at least one of the following: position, distance, angle; obtaining the hydrogenation action of the target object based on the action trajectory and the action parameters associated with the operating action.
[0041] As an optional embodiment, the above-mentioned preset posture recognition algorithm includes but is not limited to the YOLO algorithm and the like. In the specific implementation process, for example, a human joint recognition algorithm based on the mutual verification relationship between joints can be used to combine the consciousness learning method with the convolutional neural network, and the relevant joints can be identified in a progressive manner from easy to difficult. In addition, a multi-stage regression human joint recognition algorithm based on a scale-adjustable hourglass module can be used to construct a branch network at each stage using the scale-adjustable hourglass module to achieve multi-scale feature learning. It should be noted that the above-mentioned preset posture recognition algorithm can effectively identify the joints of the operating action, which not only improves the accuracy of identifying the joints, but also improves the efficiency of joint recognition.
[0042] As an optional embodiment, an action trajectory may be generated according to the joint points of the operation action, and the action trajectory is used to describe the dynamic change process of the operation action.
[0043] As an optional embodiment, the target reference object includes but is not limited to a hydrogenation vehicle, a hydrogenation machine, a hydrogenation gun, an electrostatic column, an operator, etc. The dynamic change indicator can be the relative position between the target object and the target reference object, the distance between the target object and the target reference object, or the angle of the target object relative to the target reference object.
[0044] In order to more accurately identify the target object's hydrogenation action, the action trajectory can be combined with the action parameters associated with the operation action, which can effectively avoid interference from non-hydrogenation actions. For example, based on the target object's action trajectory, it can be determined that the target object has performed an operation action, while the action parameters associated with the operation action can indicate that the operation action is not operating a device such as a hydrogenation machine. Such an action is obviously a fake hydrogenation action. Through the above-mentioned embodiments of the present application, the true target object's hydrogenation action can be obtained.
[0045] Optionally, when the hydrogenation action complies with the preset hydrogenation action specification, generating the hydrogenation action template of the target object includes: determining whether the order in which the hydrogenation actions appear matches the standard order in the preset hydrogenation action specification; if so, generating the hydrogenation action template of the target object.
[0046] As an optional embodiment, it is necessary to first determine whether the order in which the hydrogenation actions appear matches the standard order in the preset hydrogenation action specification. If the order in which the hydrogenation actions appear matches the standard order in the preset hydrogenation action specification, a hydrogenation action template for the target object can be generated. In addition, if the order in which the hydrogenation actions appear does not match the standard order in the preset hydrogenation action specification, a prompt message is generated, which is used to remind the hydrogenation action that the hydrogenation action template for the target object cannot be generated. It should be noted that the prompt message may also include feedback information. For example, the feedback information may indicate that the execution order of the hydrogenation action is unreasonable, the hydrogenation action is in violation of regulations, etc.
[0047] Through the above implementation, a hydrogenation action template for a target object that meets the preset hydrogenation action specification can be generated.
[0048] Optionally, when the hydrogenation action complies with the preset hydrogenation action specification, generating the hydrogenation action template for the target object also includes: determining the weight of the hydrogenation action; scoring the hydrogenation action based on the weight; and generating the hydrogenation action template for the target object when the score reaches the standard score in the preset hydrogenation action specification.
[0049] As an optional embodiment, the weight of the hydrogenation action may be determined first, the hydrogenation action may be scored according to the weight, and then a hydrogenation action template for the target object may be generated when the score reaches the standard score in the preset hydrogenation action specification.
[0050] It should be noted that the above-mentioned hydrogenation actions may include, in order of execution, touching the electrostatic column, taking the electrostatic clamp, clamping the electrostatic clamp to the vehicle, operating the hydrogenation machine control panel, taking the hydrogenation gun from the hydrogenation machine, inserting the hydrogenation gun into the hydrogenation vehicle, touching the hydrogenation machine, removing the hydrogenation gun from the hydrogenation machine, putting the hydrogenation gun back into the hydrogenation machine, removing the electrostatic clamp from the hydrogenation vehicle, and putting the electrostatic clamp back into the electrostatic clamp box.
[0051] During the specific implementation process, the weight of each hydrogenation action is different, wherein the weight of the hydrogenation action can be determined by the order in which the hydrogenation actions are executed.
[0052] Optionally, after generating the hydrogenation action template of the target object, the method further includes: classifying the hydrogenation action template and storing it in a hydrogenation action template library based on preset classification rules.
[0053] As an optional embodiment, the hydrogenation action templates can be classified and stored in a hydrogenation action template library based on preset classification rules, wherein the above-mentioned preset classification rules can be the gender, age, vehicle type, hydrogenation time, hydrogenation amount, etc. of the target object, or can be a specific hydrogenation action in the hydrogenation process.
[0054] Through the above implementation, the management level of the hydrogenation action template can be effectively improved, which provides convenience for the subsequent use of the hydrogenation action template.
[0055] Example 2
[0056] According to another aspect of the embodiments of the present invention, a template generating device is provided. Figure 2 is a schematic diagram of a template generating device according to an embodiment of the present invention. Figure 2 As shown, the template generating device includes: a first determining module 22, a second determining module 24 and a generating module 26. The template generating device is described in detail below.
[0057] The first determination module 22 is used to determine the key frames of the hydrogenation video, wherein the key frames include at least the operating actions and action parameters of the target object during the hydrogenation process; the second determination module 24 is connected to the above-mentioned first determination module 22, and is used to determine the hydrogenation action of the target object based on the operating actions and action parameters; the generation module 26 is connected to the above-mentioned second determination module 24, and is used to generate a hydrogenation action template for the target object when the hydrogenation action meets the preset hydrogenation action specifications.
[0058] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0059] It should be noted that the first determination module 22, the second determination module 24, and the generation module 26 described above correspond to steps S102 to S106 in Example 1. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 1. It should be noted that the above modules, as part of the apparatus, can be executed in a computer system, such as a set of computer-executable instructions.
[0060] As can be seen from the above, the template generation device can first determine the key frames of the hydrogenation video through the first determination module 22, wherein the key frames include at least the operating actions and action parameters of the target object during the hydrogenation process, and then determine the hydrogenation action of the target object based on the operating actions and action parameters through the second determination module 24, and then generate the hydrogenation action template of the target object through the generation module 26 when the hydrogenation action meets the preset hydrogenation action specification. In the above embodiment of the present application, the hydrogenation action of the target object can be determined by the operating actions and action parameters of the hydrogenation process contained in the key frames of the hydrogenation video, so that the hydrogenation action template of the target object is generated when the hydrogenation action meets the preset hydrogenation action specification, thereby achieving the purpose of extracting the hydrogenation action template from the hydrogenation video, thereby realizing the technical effect of quickly and accurately generating the hydrogenation action template, improving the efficiency of the algorithm developers in generating efficient templates, and thus solving the technical problem in the related art that the hydrogenation action template cannot be generated quickly and accurately by relying on manual selection of key frames.
[0061] Optionally, the above-mentioned first determination module includes: a segmentation unit, used to segment the hydrogenation video to obtain a segmented hydrogenation video, wherein the segmented hydrogenation video is associated with an operation action in the hydrogenation process; an extraction unit, used to extract multiple initial key frames of the segmented hydrogenation video; and a screening unit, used to screen out at least one initial key frame from the multiple initial key frames as a key frame of the hydrogenation video.
[0062] Optionally, before determining the hydrogenation action of the target object based on the operation action and action parameters, the above-mentioned device also includes: a third determination module, used to determine the time sequence of key frames in the hydrogenation video; an extraction module, used to extract the operation action and action parameters from the key frames in sequence according to the time sequence.
[0063] Optionally, the above-mentioned second determination module includes: an identification unit for identifying the joint points of the operation action based on a preset posture recognition algorithm; a generation unit for generating a motion trajectory based on the joint points; a first determination unit for determining the action parameters associated with the operation action, wherein the action parameters are dynamic change indicators of the target object relative to the target reference object, and the dynamic change indicators include at least one of the following: position, distance, angle; an obtaining unit for obtaining the hydrogenation action of the target object based on the action parameters associated with the action trajectory and the operation action.
[0064] Optionally, the generation module includes: a judgment unit for judging whether the order in which the hydrogenation actions occur matches the standard order in the preset hydrogenation action specification; and a first generation unit for generating a hydrogenation action template for the target object if it matches.
[0065] Optionally, the above-mentioned generation module also includes: a second determination unit, used to determine the weight of the hydrogenation action; a scoring unit, used to score the hydrogenation action according to the weight; and a second generation unit, used to generate a hydrogenation action template for the target object when the score reaches the standard score in the preset hydrogenation action specification.
[0066] Optionally, after generating the hydrogenation action template of the target object, the apparatus further comprises: a storage module configured to classify and store the hydrogenation action template into a hydrogenation action template library based on preset classification rules.
[0067] Example 3
[0068] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above template generation methods.
[0069] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the computer-readable storage medium includes a stored program.
[0070] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: determine the key frames of the hydrogenation video, wherein the key frames at least include the operating actions and action parameters of the target object during the hydrogenation process; determine the hydrogenation action of the target object based on the operating actions and action parameters; and generate a hydrogenation action template for the target object when the hydrogenation action meets the preset hydrogenation action specifications.
[0071] Example 4
[0072] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein any one of the above template generation methods is executed when the program is run.
[0073] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: determining key frames of a hydrogenation video, wherein the key frames include at least operating actions and action parameters of a target object during the hydrogenation process; determining the hydrogenation action of the target object based on the operating actions and action parameters; and generating a hydrogenation action template for the target object when the hydrogenation action meets a preset hydrogenation action specification.
[0074] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: determining a key frame of a hydrogenation video, wherein the key frame includes at least an operating action and action parameters of a target object during the hydrogenation process; determining the hydrogenation action of the target object based on the operating action and action parameters; and generating a hydrogenation action template for the target object when the hydrogenation action meets a preset hydrogenation action specification.
[0075] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0076] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0077] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0078] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0079] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0081] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A template generation method, characterized in that: include: Determine a key frame of the hydrogenation video, wherein the key frame at least includes an operation action and action parameters of the target object during the hydrogenation process; Determining a hydrogenation action for the target object based on the operation action and the action parameter; When the hydrogenation action meets the preset hydrogenation action specification, generating a hydrogenation action template for the target object; When the hydrogenation action meets the preset hydrogenation action specification, generating the hydrogenation action template of the target object includes: Determining whether the order in which the hydrogenation actions occur matches the standard order in the preset hydrogenation action specification; If there is a match, a hydrogenation action template for the target object is generated; When the hydrogenation action meets the preset hydrogenation action specification, generating the hydrogenation action template of the target object further includes: determining a weight of the hydrogenation action; Scoring the hydrogenation action according to the weight; When the score reaches the standard score in the preset hydrogenation action specification, a hydrogenation action template for the target object is generated.
2. The method according to claim 1, characterized in that The key frames of the hydrogenation video are as follows: The hydrogenation video is segmented to obtain a segmented hydrogenation video, wherein the segmented hydrogenation video is associated with an operation action in the hydrogenation process; Extracting a plurality of initial key frames of the segmented hydrogenation video; At least one initial key frame is selected from the multiple initial key frames as a key frame of the hydrogenation video.
3. The method according to claim 1, characterized in that Before determining the hydrogenation action of the target object based on the operation action and the action parameter, the method further includes: Determining the time sequence of the key frames in the hydrogenation video; The operation actions and the action parameters are extracted from the key frames in sequence according to the time sequence.
4. The method according to claim 3, characterized in that Determining the hydrogenation action of the target object based on the operation action and the action parameter includes: Identify the joint points of the operation action based on a preset posture recognition algorithm; Generate an action trajectory according to the joint points; Determining the action parameter associated with the operation action, wherein the action parameter is a dynamic change index of the target object relative to the target reference object, and the dynamic change index includes at least one of the following: position, distance, and angle; The hydrogenation action of the target object is obtained according to the action trajectory and the action parameter associated with the operating action.
5. The method according to any one of claims 1 to 4, characterized in that After generating the hydrogenation action template of the target object, the method further includes: Based on preset classification rules, the hydrogenation action templates are classified and stored in a hydrogenation action template library.
6. A template generating device, characterized in that: include: A first determination module is used to determine a key frame of the hydrogenation video, wherein the key frame at least includes an operation action and action parameters of the target object during the hydrogenation process; A second determination module, configured to determine a hydrogenation action of the target object based on the operation action and the action parameter; A generating module, configured to generate a hydrogenation action template for the target object when the hydrogenation action meets a preset hydrogenation action specification; The generation module includes: a judgment unit, used to judge whether the order in which the hydrogenation actions appear matches the standard order in the preset hydrogenation action specification; a first generation unit, used to generate a hydrogenation action template for the target object if it matches; The generation module also includes: a second determination unit for determining the weight of the hydrogenation action; a scoring unit for scoring the hydrogenation action according to the weight; and a second generation unit for generating a hydrogenation action template for the target object when the score reaches a standard score in a preset hydrogenation action specification.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the template generation method according to any one of claims 1 to 5.
8. A processor, characterized in that: The processor is used to run a program, wherein the program executes the template generation method according to any one of claims 1 to 5 when running.
