Method and apparatus for action recognition
By creating spatio-temporal graphs and applying advanced models like CNNs and Gaussian mixture models, the method improves the accuracy of motion recognition in videos by effectively analyzing object relationships.
Patent Information
- Application Number
- JP2023558831
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-04-09
- Filing Date
- 2022-03-30
- Publication Date
- 2024-09-09
- Estimated Expiration
- 2042-03-30
AI Technical Summary
Existing methods for recognizing motions in videos using deep learning techniques suffer from low accuracy due to the limitations in representing and analyzing spatio-temporal relationships between objects in video frames.
The method involves creating spatio-temporal graphs for target objects in video segments, dividing these graphs into subsets, and determining a final selected subset based on similarity and relationships between graphs to identify motion categories, using techniques such as convolutional neural networks and Gaussian mixture models.
This approach enhances the accuracy of motion recognition in videos by comprehensively representing positional and morphological relationships between objects, improving the precision of motion categorization.
Smart Images

Figure 0007547652000014 
Figure 0007547652000015 
Figure 0007547652000016
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This disclosure claims priority to a Chinese patent application bearing application number 202110380638.2, filed on April 9, 2021, and entitled "Method and Apparatus for Action Recognition," the entire contents of which are incorporated herein by reference.
[0002] The present disclosure relates to the field of computer technology, and more particularly, to a method and apparatus for action recognition. [Background technology]
[0003] Recognizing the actions occurring in a detected object in a video is advantageous for video classification or video feature recognition, etc. A method for recognizing an action occurring in a detected object in a video in the related art is to recognize an action in a video using a recognition model trained based on a deep learning method, or to recognize an action in a video based on the features of the action appearing in the video screen and the similarity between the features and predefined features. Summary of the Invention
[0004] The present disclosure provides methods, apparatus, electronic devices, and computer-readable storage media for action recognition.
[0005] In some embodiments of the present disclosure, a method for action recognition is provided, including the steps of obtaining a video segment and determining at least two target objects in the video segment; for each of the at least two target objects, connecting positions of the target objects in each video frame of the video segment to create a spatio-temporal graph of the target objects; dividing the at least two spatio-temporal graphs created for the at least two target objects into a plurality of spatio-temporal graph subsets and determining a final selection subset from the plurality of spatio-temporal graph subsets; and determining an action category between the target objects indicated by a relationship between the spatio-temporal graphs included in the final selection subset as the action category of the action included in the video segment.
[0006] In some embodiments, the position of the target object in each video frame of the video segment is determined based on a technique of obtaining the position of the target object in a start frame of the video segment, setting the start frame as a current frame, and determining the position of the target object in each video frame by multiple iterative operations, the iterative operations including the steps of inputting the current frame into a pre-trained prediction model to predict the position of the target object in a frame following the current frame, and in response to determining that the frame following the current frame is not an end frame of the video segment, setting the frame following the current frame in the current iteration as the current frame in the next iteration, and in response to determining that the frame following the current frame is the end frame of the video segment, stopping the iterative operations.
[0007] In some embodiments, the step of connecting the positions of the target object in each video frame of the video segment includes the steps of representing the target object in the form of a rectangular frame in each video frame, and connecting the rectangular frames in each video frame according to the playback order of each video frame.
[0008] In some embodiments, dividing the at least two space-time graphs created for the at least two target objects into a plurality of space-time graph subsets includes assigning adjacent space-time graphs in the at least two space-time graphs to the same space-time graph subset.
[0009] In some embodiments, obtaining the video segments includes obtaining a video and cutting out each video segment from the video, and the method includes assigning spatio-temporal graphs of identical target objects in adjacent video segments to the same spatio-temporal graph subset.
[0010] In some embodiments, determining a final selection subset from the plurality of space-time graph subsets includes determining a plurality of target subsets from the plurality of space-time graph subsets; and determining a final selection subset from the plurality of target subsets based on a similarity between each space-time graph subset in the plurality of space-time graph subsets and each target subset in the plurality of target subsets.
[0011] In some embodiments, the method includes obtaining a feature vector of each space-time graph in the space-time graph subset; and obtaining relationship features between the plurality of space-time graphs in the space-time graph subset, and determining a plurality of target subsets from the plurality of space-time graph subsets includes clustering the plurality of space-time graph subsets using a Gaussian mixture model based on the feature vectors of the space-time graphs included in the space-time graph subset and the relationship features between the included space-time graphs, and determining at least one target subset to represent the space-time graph subset of each cluster.
[0012] In some embodiments, obtaining a feature vector for each spatio-temporal graph in the spatio-temporal graph subset includes obtaining spatial and visual features of the spatio-temporal graph using a convolutional neural network.
[0013] In some embodiments, the step of obtaining relationship features between the plurality of space-time graphs in the space-time graph subset includes the steps of: for each two space-time graphs among the plurality of space-time graphs, determining a similarity between the two space-time graphs based on visual features of the two space-time graphs; Space-time determining position change characteristics between the two spatio-temporal graphs based on the spatial characteristics of the graphs.
[0014] In some embodiments, determining a final selection subset from the plurality of target subsets based on a similarity between each space-time graph subset in the plurality of space-time graph subsets and each target subset in the plurality of target subsets includes, for each target subset in the plurality of target subsets, obtaining a similarity between each space-time graph subset and the target subset; determining a maximum similarity between each space-time graph subset and the target subset as a score for the target subset; and determining the target subset with the maximum score among the plurality of target subsets as the final selection subset.
[0015] In some embodiments of the present disclosure, an apparatus for action recognition is provided, including: an acquisition unit configured to acquire a video segment and determine at least two target objects in the video segment; a creation unit configured to, for each of the at least two target objects, connect positions of the target objects in each video frame of the video segment and create a spatio-temporal graph of the target objects; a first determination unit configured to divide the at least two spatio-temporal graphs created for the at least two target objects into a plurality of spatio-temporal graph subsets and determine a final selection subset from the plurality of spatio-temporal graph subsets; and a recognition unit configured to determine an action category between the target objects indicated by a relationship between the spatio-temporal graphs included in the final selection subset as an action category of an action included in the video segment.
[0016] In some embodiments, the position of the target object in each video frame of the video segment is determined based on a technique of obtaining the position of the target object in a start frame of the video segment, setting the start frame as a current frame, and determining the position of the target object in each video frame by multiple iterative operations, the iterative operations including the steps of inputting the current frame into a pre-trained prediction model to predict the position of the target object in a frame following the current frame, and in response to determining that the frame following the current frame is not an end frame of the video segment, setting the frame following the current frame in the current iteration as the current frame in the next iteration, and in response to determining that the frame following the current frame is the end frame of the video segment, stopping the iterative operations.
[0017] In some embodiments, the creation unit includes a creation module configured to represent a target object in the form of a rectangular frame in each video frame, and a connection module configured to connect the rectangular frames in each video frame according to the playback order of each video frame.
[0018] In some embodiments, the first determining unit includes a first determining module configured to assign adjacent space-time graphs in the at least two space-time graphs to the same space-time graph subset.
[0019] In some embodiments, the acquisition unit includes a first acquisition module configured to acquire a video and extract each video segment from the video, and the apparatus includes a second determination module configured to assign spatio-temporal graphs of identical target objects in adjacent video segments to the same spatio-temporal graph subset.
[0020] In some embodiments, the first determination unit includes: a first determination subunit configured to determine a plurality of target subsets from the plurality of space-time graph subsets; and a second determination unit configured to determine a final selection subset from the plurality of target subsets based on a similarity between each space-time graph subset in the plurality of space-time graph subsets and each target subset in the plurality of target subsets.
[0021] In some embodiments, the apparatus for action recognition includes a second acquisition module configured to acquire a feature vector of each space-time graph in the space-time graph subset; and a third acquisition module configured to acquire relationship features between a plurality of space-time graphs in the space-time graph subset, and the first determination unit includes a clustering module configured to cluster the plurality of space-time graph subsets using a Gaussian mixture model based on the feature vectors of the space-time graphs included in the space-time graph subset and the relationship features between the included space-time graphs, and to determine at least one target subset to represent the space-time graph subset of each cluster.
[0022] In some embodiments, the second acquisition module includes a convolution module configured to acquire spatial and visual features of the spatio-temporal graph using a convolutional neural network.
[0023] In some embodiments, the third obtaining module includes a similarity calculation module configured to, for each of two space-time graphs among the plurality of space-time graphs, determine a similarity between the two space-time graphs based on visual features of the two space-time graphs; Space-time and a position change calculation module configured to determine a position change characteristic between the two spatio-temporal graphs based on the spatial characteristics of the graphs.
[0024] In some embodiments, the second determination unit includes: a matching module configured for each target subset in the plurality of target subsets to obtain a similarity between each space-time graph subset and the target subset; a scoring module configured to set a maximum similarity among the similarities between each space-time graph subset and the target subset as a score for the target subset; and a filtering module configured to set the target subset having the largest score among the plurality of target subsets as a final selected subset.
[0025] In some embodiments of the present disclosure, an electronic device is provided that includes at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor performs the above-mentioned method of action recognition.
[0026] In some embodiments of the present disclosure, a non-transitory computer-readable storage medium having computer instructions stored thereon is provided, the computer instructions being configured to cause a computer to perform the above-described method of action recognition.
[0027] In some embodiments of the present disclosure, a computer program is provided for causing a computer to execute the above-described action recognition method.
[0028] It should be understood that the contents described in this section are not intended to mark the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become more readily understood from the following specification. [Brief description of the drawings]
[0029] The drawings are intended for a better understanding of the disclosure and are not intended to limit the disclosure. [Figure 1] 1 is an exemplary system architecture to which embodiments of the present disclosure can be applied. [Diagram 2] 1 is a flow chart of one embodiment of a method for action recognition according to the present disclosure. [Diagram 3] 1 is a schematic diagram of a spatiotemporal graph construction method in one embodiment of the action recognition method according to the present disclosure; [Figure 4] FIG. 2 is a schematic diagram of a spatio-temporal graph subset division method in one embodiment of the action recognition method according to the present disclosure. [Diagram 5] 2 is a schematic diagram of another embodiment of a method for action recognition according to the present disclosure; [Figure 6] FIG. 13 is a schematic diagram of a spatio-temporal graph subset division method in another embodiment of the action recognition method according to the present disclosure. [Figure 7] 11 is a flowchart of yet another embodiment of a method for action recognition according to the present disclosure. [Figure 8] 1 is a schematic configuration diagram of an embodiment of an action recognition device according to the present disclosure. [Figure 9] FIG. 1 is a block diagram of an electronic device for implementing a method for action recognition according to an embodiment of the present disclosure. MODE FOR CARRYING OUT THEINVENTION
[0030] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings. For ease of understanding, various details of the embodiments of the present disclosure will be described, but they should be considered as merely illustrative. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, in the following description, for clarity and simplicity, the description of known functions and structures will be omitted.
[0031] FIG. 1 illustrates an exemplary system architecture 100 in which an embodiment of the action recognition method or action recognition apparatus of the present disclosure can be applied.
[0032] 1, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communications links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wires, wireless communication links, or fiber optic cables.
[0033] Using the terminal devices 101, 102, 103, users can interact with the server 105 via the network 104 to receive or send messages etc. Various client applications may be installed on the terminal devices 101, 102, 103, such as an image capture application, a video capture application, an image recognition application, a video recognition application, a playback application, a search application, a financial application, etc.
[0034] The terminal devices 101, 102, 103 may be various electronic devices that have a display and support receiving server messages, including, but not limited to, smartphones, tablets, e-book readers, e-players, laptop computers, and desktop computers.
[0035] The terminal devices 101, 102, 103 may be hardware or software. If the terminal devices 101, 102, 103 are hardware, they may be various electronic devices, and if the terminal devices 101, 102, 103 are software, they may be installed in the above-mentioned electronic devices. This may be implemented as multiple software or software modules (e.g., multiple software modules for providing distributed services), or may be implemented as a single software or software module. No specific limitations are provided here.
[0036] The server 105 can obtain a video segment transmitted by the terminal devices 101, 102, 103, determine at least two target objects in the video segment, for each of the at least two target objects, connect the positions of the target objects in each video frame of the video segment to create a space-time graph for the target objects, divide the created at least two space-time graphs into a plurality of space-time graph subsets, determine a final selection subset from the plurality of space-time graph subsets, and determine an action category between the target objects indicated by the relationship between the space-time graphs included in the final selection subset as the action category of the action included in the video segment.
[0037] It should be noted that the method of action recognition provided by the embodiment of the present disclosure is generally executed by the server 105, and therefore the device for action recognition is generally installed in the server 105.
[0038] It should be understood that the number of terminal devices, networks, and servers in Figure 1 is merely approximate, and any number of terminal devices, networks, and servers may be included according to the needs of the implementation.
[0039] 2, there is shown a flow chart 200 of one embodiment of a method for action recognition according to the present disclosure. The method includes the following steps.
[0040] In step 201, a video segment is obtained and at least two target objects in the video segment are determined.
[0041] In this embodiment, an entity performing the method for action recognition (e.g., the server 105 shown in FIG. 1) can obtain a video segment via wired or wireless communication, and determine at least two target objects in the video segment, where the target objects may be a human being, an animal, or any entity that may exist in a video screen.
[0042] In this embodiment, the trained object recognition model can be used to recognize each target object in a video segment, and it is also possible to recognize target objects that appear in a video screen by, for example, matching the video screen with a preset pattern.
[0043] In step 202, for each of at least two target objects, the positions of the target objects in each video frame of the video segment are connected to create a spatio-temporal graph of the target objects.
[0044] In this embodiment, for each of at least two target objects, a spatiotemporal graph for the target objects can be created by connecting the positions of the target objects in each video frame of the video segment, where the spatiotemporal graph is a diagram across the video frames formed by connecting the positions of the target objects in each video frame of the video segment.
[0045] In some optional embodiments, the step of connecting the positions of the target objects in each video frame of the video segment includes the steps of representing the target objects in the form of rectangular frames in each video frame, and connecting the rectangular frames in each video frame according to the playback order of each video frame.
[0046] In this optional embodiment, as shown in FIG. 3(a), the target object is represented in each video frame in the form of a rectangular frame (or a candidate frame generated by performing object recognition), and the rectangular frames representing the target object in each video frame are connected in sequence according to the playback order of the video frames, thereby forming the spatio-temporal graph of the target object shown in FIG. 3(b). Here, the four rectangular frames included in FIG. 3(a) represent the target objects, the platform 3011 at the bottom left of the figure, the horseback 3012, the brush 3013, and the human 3014, respectively. The rectangular frame representing the human is shown with a dashed line to distinguish it from the rectangular frame of the brush that overlaps it. The space-time graph 3021, the space-time graph 3022, the space-time graph 3023, and the space-time graph 3024 in FIG. 3(b) respectively represent the space-time graph of the platform 3011, the horseback 3012, the brush 3013, and the human 3014.
[0047] In some optional embodiments, the locations of the center points of the target object in each video frame may be connected according to the playback order of each video frame to form a spatio-temporal graph of the target object.
[0048] In some optional embodiments, a target object may be represented by a predefined shape in each video frame, and the shapes representing the target object in each video frame may be connected sequentially in accordance with the playback order of the video frames to form a spatiotemporal graph of the target object.
[0049] In step 203, the at least two spatio-temporal graphs created for the at least two target objects are divided into a plurality of spatio-temporal graph subsets, and a final selection subset is determined from the plurality of spatio-temporal graph subsets.
[0050] In this embodiment, at least two space-time graphs created for at least two target objects are divided into a plurality of space-time graph subsets, and a final selected subset is determined from the plurality of space-time graph subsets. The final selected subset may be a subset that includes the most space-time graphs among the plurality of space-time graph subsets. In addition, the final selected subset may be a subset in which, when calculating the similarity between each pair of space-time graph subsets, the similarity between any of the other space-time graph subsets and the final selected subset is greater than a threshold. Furthermore, the final selected subset may be a space-time graph subset whose included space-time graph is located in a central region of the screen.
[0051] In some optional embodiments, determining a final selection subset from the plurality of space-time graph subsets includes determining a plurality of target subsets from the plurality of space-time graph subsets; and determining a final selection subset from the plurality of target subsets based on a similarity between each space-time graph subset in the plurality of space-time graph subsets and each target subset in the plurality of target subsets.
[0052] In this optional embodiment, a plurality of target subsets may be first determined from the plurality of space-time graph subsets, a similarity between each space-time graph subset in the plurality of space-time graph subsets and each target subset in the plurality of target subsets is calculated, and a final selected subset may be determined from the plurality of target subsets based on a result of the similarity calculation.
[0053] Specifically, a plurality of target subsets can be determined from the plurality of space-time graph subsets, the plurality of target subsets being subsets for representing the plurality of space-time graph subsets, and the plurality of target subsets may be at least one target subset that can represent a space-time graph subset of each cluster obtained by performing a clustering operation on the plurality of space-time graph subsets.
[0054] For each target subset, each space-time graph subset in the multiple space-time graph subsets can be matched with the target subset, and the target subset that has the most matching space-time graph subsets can be set as the final selection subset. For example, it is preset that if there are target subset A, target subset B, space-time graph subset 1, space-time graph subset 2, and space-time graph subset 3, and the similarity between the space-time graph subsets exceeds 80%, the two space-time graph subsets are determined to match. If the similarity between space-time graph subset 1 and target subset A is 85%, the similarity between space-time graph subset 1 and target subset B is 20%, the similarity between space-time graph subset 2 and target subset A is 65%, the similarity between space-time graph subset 2 and target subset B is 95%, the similarity between space-time graph subset 3 and target subset A is 30%, and the similarity between space-time graph subset 3 and target subset B is 90%, then it can be determined that in all space-time graph subsets, the number of space-time graph subsets matching target subset A is 1, and the number of space-time graphs matching target subset B is 2. In this case, the target subset B can be determined as the final selected subset.
[0055] In this optional embodiment, the accuracy of determining the final selected subset can be improved by first determining a target subset and then determining a final selected subset from the multiple target subsets based on the similarity between each of the multiple spatio-temporal graph subsets and each of the multiple target subsets.
[0056] In step 204, the action category between the target objects indicated by the relationship between the spatio-temporal graphs included in the final selection subset is taken as the action category of the action included in the video segment.
[0057] In this embodiment, the space-time graph is for representing the spatial positions of the target objects in successive video frames, and the space-time graph subset includes positional or morphological relationships between various combinable space-time graphs, so that the space-time graph subset can be used to represent the position-pose relationship between the target objects. Meanwhile, the final selected subset is a subset that can represent a global space-time graph subset selected from a plurality of space-time graph subsets, so that the positional or morphological relationships between the space-time graphs included in the final selected subset can be used to represent the position-pose relationship between the global target objects. That is, the action category represented by the position-pose relationship between the target objects indicated by the relationship between the space-time graphs included in the final selected subset can be the action category of the action included in the video segment.
[0058] The method for action recognition provided by the present embodiment includes the steps of obtaining a video segment, determining at least two target objects in the video segment, connecting the positions of the target objects in each video frame of the video segment for each of the at least two target objects to create a spatiotemporal graph for the target objects, dividing the at least two spatiotemporal graphs created for the at least two target objects into a plurality of spatiotemporal graph subsets, determining a final selection subset from the plurality of spatiotemporal graph subsets, and determining an action category between the target objects indicated by the relationship between the spatiotemporal graphs included in the final selection subset as the action category of the action included in the video segment. The method for action recognition can improve the accuracy of action recognition in the video by determining an action category between the target objects indicated by the relationship between the spatiotemporal graphs included in the final selection subset, which can represent a position-pose relationship between the target objects using the relationship between the spatiotemporal graphs and can also represent a global spatiotemporal graph subset, as the action category of the action included in the video segment.
[0059] Alternatively, the position of the target object in each video frame of the video segment is determined by obtaining the position of the target object in a start frame of the video segment, taking the start frame as a current frame, and determining the position of the target object in each video frame by multiple iterations, the iterations including: inputting the current frame into a pre-trained prediction model to predict the position of the target object in a frame following the current frame, and in response to determining that the frame following the current frame is not an end frame of the video segment, taking the frame following the current frame in the current iteration as the current frame in the next iteration, and in response to determining that the frame following the current frame is the end frame of the video segment, stopping the iteration.
[0060] In this embodiment, the start frame of a video segment is first obtained, the position of the target object in the start frame is obtained, and the start frame is taken as the current frame, and the position of the target object in each frame of the video segment can be determined by multiple iterations. In the iterations, the current frame is input into a pre-trained prediction model to predict the position of the target object in the frame following the current frame. If it is determined that the frame following the current frame is not the end frame of the video segment, the frame following the current frame in the current iteration is taken as the current frame in the next iteration, and the position of the target object in the corresponding video frame predicted by the current iteration is used to continue predicting the position of the target object in the subsequent video frame. If it is determined that the frame following the current frame is the end frame of the video segment, the positions of the target object in each frame of the video segment have all been predicted at this point, and the iterations can be stopped.
[0061] The above-mentioned prediction process is that the position of the target object in a first frame of a video segment is known, the position of the target object in a second frame is predicted by a prediction model, and the position of the target object in a third frame is predicted based on the obtained position of the target object in the second frame. In this way, the position of the target object in a subsequent frame is predicted based on the position of the target object in a previous frame, thereby obtaining the position of the target object in all video frames of the video segment.
[0062] Specifically, if the length of a video segment is T frames, first, a pre-trained neural network model (e.g., Faster Region-Convolutional Neural Networks) is used to detect candidate frames (i.e., rectangular frames for representing target objects) of humans or objects in the first frame of the video segment, and the first M candidate frames with the highest scores B1={b1 m m = 1, ..., M}. Similarly, the prediction model holds the candidate frame set B t Based on this, we define a candidate frame set B for the t+1th frame. t+1 That is, we generate a candidate frame b t m Based on the visual features at the same positions in the tth and t+1th frames, the next frame b t m Estimate the movement tendency of
[0063] Then, by pooling, the visual features F t m and F t+1 m Get the.
[0064] Finally, a compact bilinear pooling (CBP) operation captures the pairwise correlation between two visual features to simulate the spatial interactions between adjacent frames. JPEG0007547652000001.jpg17170(1)
[0065] where N is the number of local descriptors, Φ(·) is the low-dimensional mapping function, and 〈·〉 is the quadratic polynomial kernel. Finally, the output features of the CBP layer are fed into a pre-trained regression model / regression layer to obtain the output from the regression layer, b t mpredicted based on the movement tendency of t+1 m Thus, by estimating the motion tendency of each candidate frame, we can obtain a set of candidate frames in subsequent frames and connect these candidate frames into a spatio-temporal graph.
[0066] In this embodiment, instead of directly recognizing the position of the target object using each video frame in a known video segment, the position of the target object in each video frame is predicted based on the position of the target object in the start frame of the video segment, thereby avoiding the problem that the target object may be occluded in a certain video frame due to interaction between target objects, and the recognition result may not realistically reflect the position where the target object is actually located under that interaction, and improving the accuracy of predicting the position of the target object in the video frame.
[0067] Alternatively, the step of dividing the at least two spatio-temporal graphs created for the at least two target objects into a plurality of spatio-temporal graph subsets includes the step of assigning adjacent spatio-temporal graphs of the at least two spatio-temporal graphs to the same spatio-temporal graph subset.
[0068] In this embodiment, the method of dividing at least two space-time graphs created for at least two target objects into multiple space-time graph subsets may be to assign adjacent space-time graphs of the at least two space-time graphs to the same space-time graph subset.
[0069] For example, as shown in Fig. 4, each spatio-temporal graph in Fig. 3(b) can be represented by a node. That is, node 401 can be used to represent spatio-temporal graph 3021, node 402 can be used to represent spatio-temporal graph 3022, node 403 can be used to represent spatio-temporal graph 3023, and node 404 can be used to represent spatio-temporal graph 3024. Adjacent spatio-temporal graphs can be assigned to the same spatio-temporal graph subset. For example, node 401 and node 402 can be assigned to the same spatio-temporal graph subset, node 402 and node 403 can be assigned to the same spatio-temporal graph subset, node 401, node 402, and node 403 can be assigned to the same spatio-temporal graph subset, and further, node 401, node 402, node 403, and node 404 can be assigned to the same spatio-temporal graph subset.
[0070] In this embodiment, assigning adjacent space-time graphs to the same space-time graph subset is advantageous for assigning space-time graphs representing target objects having inter-action relationships to the same space-time graph subset, and each determined space-time graph subset can comprehensively represent each action present in the target object in a video segment, which is advantageous for improving the accuracy of action recognition.
[0071] It should be noted that, in order to explicitly describe the method for recognizing the action category of an action contained in a video segment based on the spatio-temporal graph of a target object in the video segment, in order to clearly describe each step of the method, the present disclosure represents the spatio-temporal graph in the form of a node. In practical application of the method described in the present disclosure, the spatio-temporal graph may not be represented by nodes, and each step may be performed directly using the spatio-temporal graph.
[0072] It should be noted that dividing a plurality of nodes into one subgraph as described by each embodiment of the present disclosure is dividing a space-time graph represented by the nodes into one space-time graph subset. A node feature of a node is a feature vector of the space-time graph represented by the nodes. A feature of an edge between nodes is a relationship feature between the space-time graphs represented by the nodes. A subgraph consisting of at least one node is a space-time graph subset consisting of the space-time graph represented by the at least one node.
[0073] Continuing to refer to FIG. 5, there is shown a flow 500 of another embodiment of a method for action recognition according to the present disclosure, including the following steps.
[0074] In step 501, a video is obtained and video segments are extracted from the video.
[0075] In this embodiment, an entity that performs the action recognition method (e.g., the server 105 shown in FIG. 1 ) can acquire a complete video via wired or wireless connection, and extract each video segment from the acquired complete video through a video segmentation method or a video segment extraction method.
[0076] Step 502 determines at least two target objects present in each video segment.
[0077] In this embodiment, the trained object recognition model can be used to recognize each target object present in each video segment, and can also recognize target objects appearing in a video screen by, for example, matching the video screen with a preset pattern.
[0078] In step 503, for each of at least two target objects, the positions of the target objects in each video frame of the video segment are connected to create a spatio-temporal graph of the target objects.
[0079] In step 504, adjacent space-time graphs in the at least two space-time graphs created for the at least two target objects are divided into identical space-time graph subsets, and / or space-time graphs of the same target object in adjacent video segments are divided into identical space-time graph subsets, and multiple target subsets are determined from the multiple space-time graph subsets.
[0080] In this embodiment, adjacent space-time graphs in at least two space-time graphs created for at least two target objects can be assigned to the same space-time graph subset, and space-time graphs of the same target object in adjacent video segments can be assigned to the same space-time graph subset. Then, a plurality of target subsets are determined from the plurality of space-time graph subsets.
[0081] For example, as shown in FIG. 6(a), we extract video segment 1, video segment 2, and video segment 3 from the complete video, and create a spatiotemporal graph of the target object in each video segment as shown in FIG. 6(b). For target object A (platform), the spatiotemporal graph created in video segment 1 is 601, the spatiotemporal graph created in video segment 2 is 605, and the spatiotemporal graph created in video segment 3 is 609. For target object B (horseback), the spatiotemporal graph created in video segment 1 is 602, the spatiotemporal graph created in video segment 2 is 606, but it is not recognized in video segment 3. For target object C (brush), the spatiotemporal graph created in video segment 1 is 603, the spatiotemporal graph created in video segment 2 is 607, and the spatiotemporal graph created in video segment 3 is 610. For target D (human), the spatiotemporal graph created in video segment 1 is 604, the spatiotemporal graph created in video segment 2 is 608, and the spatiotemporal graph created in video segment 3 is 611. In video segment 3, a new target object (background scenery) 612 appears. In this example, each spatiotemporal graph is the spatiotemporal graph of the same-numbered target object in the corresponding video segment (e.g., in video segment 1, spatiotemporal graph 601 in FIG. 6(b) is the spatiotemporal graph of target object 601 in FIG. 6(a)).
[0082] By representing each of the above spatio-temporal graphs in the form of a node, we construct a complete node relationship graph for the video shown in Figure 6(c), where each node represents the spatio-temporal graph with the same number (e.g., node 601 represents spatio-temporal graph 601).
[0083] 6(c), the nodes 601, 605, and 606 can be divided into the same subgraph, and the nodes 603, 604, 607, and 608 can be divided into the same subgraph.
[0084] In step 505, a final selection subset is determined from the plurality of target subsets based on a similarity between each of the plurality of spatio-temporal graph subsets and each of the plurality of target subsets.
[0085] In step 506, the action category between the target objects indicated by the relationship between the spatio-temporal graphs included in the final selection subset is taken as the action category of the action included in the video segment.
[0086] The description of steps 503, 505, and 506 in this embodiment is consistent with the description of steps 202, 204, and 205, and therefore will not be further described here.
[0087] The method for action recognition provided by the present embodiment includes: extracting each video segment from the acquired complete video, determining each target object existing in each video segment, creating a space-time graph belonging to each video segment of the target object, assigning adjacent space-time graphs to the same space-time graph subset, and / or assigning the space-time graphs of the same target object in adjacent video segments to the same space-time graph subset, and determining multiple target subsets from the multiple space-time graph subsets. The adjacent space-time graphs in the same video segment represent the positional relationship between the target objects, so that the space-time graphs of the same target object in adjacent video segments can represent the change state of the position of the target object in the video playback process. Assigning the adjacent space-time graphs in the same video segment and / or the space-time graphs of the same target object in adjacent video segments to the same space-time graph subset is advantageous to assign the space-time graphs representing the action changes of the target object to the same space-time graph subset, and each determined space-time graph subset can comprehensively represent each action existing in the target object in the video segment, which is advantageous to improving the accuracy of action recognition.
[0088] Continuing to refer to FIG. 7, there is shown a flow 700 of yet another embodiment of a method for action recognition according to the present disclosure, including the following steps.
[0089] In step 701, a video segment is obtained and at least two target objects in the video segment are determined.
[0090] In step 702, for each of at least two target objects, the positions of the target objects in each video frame of the video segment are connected to create a spatio-temporal graph for the target objects.
[0091] In step 703, the multiple spatio-temporal graphs created for the at least two target objects are divided into multiple spatio-temporal graph subsets.
[0092] In this embodiment, at least two spatio-temporal graphs created for the at least two target objects are divided into a number of spatio-temporal graph subsets.
[0093] In step 704, a feature vector of each spatio-temporal graph in the spatio-temporal graph subset is obtained.
[0094] In this embodiment, the feature vector of each spatio-temporal graph in the spatio-temporal graph subset can be obtained. Specifically, the video segment in which the spatio-temporal graph exists is input into a pre-trained neural network model, and the feature vector of each spatio-temporal graph output from the neural network model is obtained. The neural network model may be a recurrent neural network, a deep neural network, a deep residual neural network, etc.
[0095] In some optional embodiments, obtaining a feature vector for each spatio-temporal graph in the spatio-temporal graph subset includes obtaining spatial and visual features of the spatio-temporal graph using a convolutional neural network.
[0096] In this optional embodiment, the feature vector of the spatio-temporal graph includes the spatial features of the spatio-temporal graph and the visual features of the spatio-temporal graph. The video segment in which the spatio-temporal graph exists can be inputted into a pre-trained convolutional neural network to obtain convolutional features with dimensions T*W*H*D outputted from the convolutional neural network, where T is the time dimension of the convolutional feature, W is the width of the convolutional feature, H is the height of the convolutional feature, and D is the number of channels of the convolutional feature. In this embodiment, in order to preserve the temporal granularity of the original video, the convolutional neural network can have no downsampling layer in the time dimension, i.e., does not downsample the spatial features of the video segment. For the spatial coordinates of the bounding box of the spatio-temporal graph in each frame, the visual features f of the spatio-temporal graph can be obtained by performing a pooling operation on the convolutional features outputted from the convolutional neural network. v visual The spatial position of the bounding box of the space-time graph in each frame (e.g., the center point coordinate of the rectangular space-time graph and the four-dimensional vector of the length, width, and height of the rectangular box) is obtained. JPEG0007547652000002.jpg1623) is input to a multilayer perceptron, and the output of the multilayer perceptron is used as the spatial feature f v coord Let us assume that.
[0097] In step 705, relationship features between the multiple spatio-temporal graphs in the spatio-temporal graph subset are obtained.
[0098] In this embodiment, the relationship features between the multiple spatio-temporal graphs in the spatio-temporal graph subset can be obtained, where the relationship features include the similarity between the features, Space-time This is a feature that represents the positional relationship between graphs.
[0099] In some optional embodiments, the step of obtaining relationship characteristics between the plurality of space-time graphs in the space-time graph subset includes the steps of: for each two space-time graphs among the plurality of space-time graphs, determining a similarity between the two space-time graphs based on visual characteristics of the two space-time graphs; Space-time determining position change characteristics between the two spatio-temporal graphs based on the spatial characteristics of the graphs.
[0100] In the optional embodiment, the relationship feature between the space-time graphs may include a similarity between the space-time graphs or a position change feature between the space-time graphs. For each two space-time graphs among the plurality of space-time graphs, a similarity between the two space-time graphs may be determined based on a similarity between the visual features of the two space-time graphs. Specifically, the similarity between the two space-time graphs may be calculated by the following formula (2). JPEG0007547652000003.jpg12170
[0101] JPEG0007547652000004.jpg33170
[0102] In this optional embodiment, two Space-time Based on the spatial characteristics of the graphs, the position change information between the two spatio-temporal graphs can be determined. Specifically, the position change information between the two spatio-temporal graphs can be calculated by the following formula (3). JPEG0007547652000005.jpg15170
[0103] JPEG0007547652000006.jpg51170
[0104] In step 706, the multiple space-time graph subsets are clustered using a Gaussian mixture model based on the feature vectors of the space-time graphs included in the space-time graph subsets and the relationship features between the included space-time graphs, and at least one target subset is determined to represent the space-time graph subset of each cluster.
[0105] In this embodiment, based on the feature vectors of the space-time graphs included in the space-time graph subsets and the relationship features between the space-time graphs included in the space-time graph subsets, a Gaussian mixture model can be used to cluster the multiple space-time graph subsets, and a target subset can be determined to represent the space-time graph subset of each cluster.
[0106] Specifically, the node graph shown in FIG. 6(c) can be decomposed into subgraphs of multiple scales shown in FIG. 6(d). The number of nodes included in the subgraphs of different scales is different. For the subgraphs of each scale, the node features of each node included in the subgraph (the node features of a node are the feature vectors of the spatiotemporal graphs it represents) and the edge features between each node (the edge features between two nodes are the relationship features between the two spatiotemporal graphs represented by the two nodes) are input to a pre-configured Gaussian mixture model, the subgraphs of the scale are clustered using the Gaussian mixture model, and among the subgraphs of each cluster, a target subgraph that can represent the subgraph of the cluster can be determined. When the subgraphs of the same scale are clustered using the Gaussian mixture model, the k Gaussian kernels output from the Gaussian mixture model are the k target subgraphs.
[0107] The space-time graphs represented by the nodes included in the target subgraph may be understood to constitute a target space-time graph subset. The target space-time graph subset may be understood to be a subset that can represent the space-time graph subset at this scale. The motion categories between target objects indicated by the relationships between the space-time graphs included in the target space-time graph subset may be understood to be representative motion categories at the scale. In this way, the k target subsets may be regarded as standard patterns of motion categories corresponding to the subset at the scale.
[0108] In step 707, a final selection subset is determined from the plurality of target subsets based on a similarity between each of the plurality of spatio-temporal graph subsets and each of the plurality of target subsets.
[0109] In this embodiment, a final selection subset may be determined from the multiple target subsets based on the similarity between each of the multiple spatio-temporal graph subsets and each of the multiple target subsets.
[0110] Specifically, for each subgraph shown in FIG. 6(d), the blending weight of the subgraph is first obtained using the following formula: JPEG0007547652000007.jpg10170
[0111] Here, x in the formula represents the feature of subgraph x, which includes the node features of each node in subgraph x and the edge features between nodes. α=MLP(x;θ) is a K-dimensional vector that represents the blending weight of the subgraph by inputting x to a multilayer perceptron with a parameter θ, and then calculating the output of the multilayer perceptron with a normalized exponential softmax function. This indicates to retrieve JPEG0007547652000008.jpg1412.
[0112] After obtaining the blending weights of N subgraphs belonging to the same action category by the above formula (4), the parameters of the kth (1≦k≦K) Gaussian kernel in the Gaussian mixture model can be calculated using the following formula. JPEG0007547652000009.jpg96170
[0113] After obtaining the parameters of all the Gaussian kernels, the probability p(x) that any subgraph x belongs to the action category corresponding to the target subset (i.e., the similarity between any subgraph x and the target subset) can be calculated using Equation (8). JPEG0007547652000011.jpg26170
[0114] Here, |·| represents the determinant of the matrix.
[0115] In this embodiment, the batch loss function including N subgraphs at each scale can be defined as follows: JPEG0007547652000012.jpg34170
[0116] JPEG0007547652000013.jpg21170 is used to regulate the weighting. λ is a weighting parameter for balancing the two parts of equation (9), and can be set as needed (e.g., it may be set to 0.05). Since each operation in the Gaussian mixture layer is differentiable, the entire network frame can be optimized end-to-end by backpropagating the gradient from the Gaussian mixture layer to the feature extraction network.
[0117] In this embodiment, after obtaining the probability that any subgraph x belongs to each action category using the above formula (8), for each action category, the average value of the probabilities of the subgraphs belonging to that action category may be used as the score of that action category, and the action category with the highest score may be used as the action category of the action included in the video.
[0118] In step 708, the action category between the target objects indicated by the relationship between the spatio-temporal graphs included in the final selection subset is taken as the action category of the action included in the video segment.
[0119] The explanations of steps 701, 702, and 708 in this embodiment are consistent with the explanations of steps 201, 202, and 204, and therefore will not be further explained here.
[0120] The action recognition method provided by the present embodiment clusters multiple space-time graph subsets using a Gaussian mixture model based on the feature vectors of the space-time graphs included in each space-time graph subset and the relationship features between the space-time graphs included. In this way, it is possible to cluster multiple space-time graph subsets based on the feature vectors of the space-time graphs included in the multiple space-time graph subsets and the relationship features between the space-time graphs included, and the presented normal distribution curve, even in a situation where the cluster categories are not known, thereby improving clustering efficiency and clustering accuracy.
[0121] In some optional embodiments of the above embodiment described in relation to FIG. 7, the step of determining, for each of a plurality of target subsets, a final selection subset based on a similarity between each space-time graph subset and the target subset includes the steps of: obtaining, for each of a plurality of target subsets, a similarity between each space-time graph subset and the target subset; determining the maximum similarity between each space-time graph subset and the target subset as a score for the target subset; and determining the target subset having the maximum score among the plurality of target subsets as the final selection subset.
[0122] In this embodiment, for each of a plurality of target subsets, the similarity between each space-time graph subset and the target subset is obtained, and the maximum similarity among all similarities is set as the score of the target subset. For all target subsets, the target subset with the highest score can be set as the final selected subset.
[0123] Further referring to FIG. 8, the present disclosure provides an embodiment of an apparatus for action recognition corresponding to the embodiment of the method shown in FIG. 2, FIG. 5, or FIG. 7, which is specifically applicable to various electronic devices, as an embodiment of the method shown in each of the above-mentioned figures.
[0124] As shown in FIG. 8 , the apparatus 800 for action recognition according to this embodiment includes: an acquisition unit 801 configured to acquire a video segment and determine at least two target objects in the video segment; a creation unit 802 configured to, for each of the at least two target objects, connect positions of the target objects in each video frame of the video segment and create a spatio-temporal graph of the target objects; a first determination unit 803 configured to divide the at least two spatio-temporal graphs created for the at least two target objects into a plurality of spatio-temporal graph subsets and determine a final selection subset from the plurality of spatio-temporal graph subsets; and a recognition unit 804 configured to determine an action category between the target objects indicated by a relationship between the spatio-temporal graphs included in the final selection subset as the action category of the action included in the video segment.
[0125] In some embodiments, the position of the target object in each video frame of the video segment is determined by obtaining the position of the target object in a start frame of the video segment, taking the start frame as a current frame, and determining the position of the target object in each video frame through a number of iterations, the iterations including: inputting the current frame into a pre-trained prediction model to predict the position of the target object in a frame following the current frame, and in response to determining that the frame following the current frame is not an end frame of the video segment, taking the frame following the current frame in the current iteration as the current frame in the next iteration, and in response to determining that the frame following the current frame is the end frame of the video segment, stopping the iteration.
[0126] In some embodiments, the creation unit includes a creation module configured to represent a target object in the form of a rectangular frame in each video frame, and a connection module configured to connect the rectangular frames in each video frame according to the playback order of each video frame.
[0127] In some embodiments, the first determining unit includes a first determining module configured to assign adjacent space-time graphs in the at least two space-time graphs to the same space-time graph subset.
[0128] In some embodiments, the acquisition unit includes a first acquisition module configured to acquire a video and extract each video segment from the video, and the apparatus includes a second determination module configured to assign spatio-temporal graphs of identical target objects in adjacent video segments to the same spatio-temporal graph subset.
[0129] In some embodiments, the first determination unit includes a first determination subunit configured to determine a plurality of target subsets from the plurality of space-time graph subsets, and a second determination unit configured to determine a final selection subset from the plurality of target subsets based on a similarity between each of the plurality of space-time graph subsets and each of the plurality of target subsets.
[0130] In some embodiments, the apparatus for action recognition includes a second acquisition module configured to acquire a feature vector of each space-time graph in the space-time graph subset, and a third acquisition module configured to acquire relationship features between a plurality of space-time graphs in the space-time graph subset, and the first determination unit includes a clustering module configured to cluster the plurality of space-time graph subsets using a Gaussian mixture model based on the feature vectors of the space-time graphs included in the space-time graph subset and the relationship features between the included space-time graphs, and to determine at least one target subset to represent the space-time graph subset of each cluster.
[0131] In some embodiments, the second acquisition module includes a convolution module configured to acquire spatial and visual features of the spatio-temporal graph using a convolutional neural network.
[0132] In some embodiments, the third obtaining module includes a similarity calculation module configured to, for each of two space-time graphs among the plurality of space-time graphs, determine a similarity between the two space-time graphs based on visual features of the two space-time graphs; Space-time and a position change calculation module configured to determine a position change characteristic between the two spatio-temporal graphs based on the spatial characteristics of the graphs.
[0133] In some embodiments, the second determination unit includes: a matching module configured to obtain, for each of a plurality of target subsets, a similarity between each space-time graph subset and the target subset; a scoring module configured to set a maximum similarity between each space-time graph subset and the target subset as a score for the target subset; and a filtering module configured to set the target subset having the largest score among the plurality of target subsets as a final selected subset.
[0134] Each unit of the above-mentioned apparatus 800 corresponds to a step in the method described with reference to Figure 2, Figure 5 or Figure 7. Accordingly, the operations, features and achievable technical effects described for the method of action recognition are equally applicable to the apparatus 800 and the units contained therein, and will not be described further herein.
[0135] According to an embodiment of the present disclosure, the present specification also provides an electronic device and a readable storage medium.
[0136] As shown in FIG. 9, a block diagram of an electronic device 900 for a method of motion recognition according to an embodiment of the present specification is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, mobile phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0137] As shown in FIG. 9, the electronic device includes one or more processors 901, a memory 902, and an interface for connecting various components including a high-speed interface and a low-speed interface. Each component is connected to each other by different buses and may be mounted on a common motherboard or may be mounted in other ways as needed. The processor can process instructions executed in the electronic device. The instructions include instructions stored in or on a memory for displaying graphical information of a GUI on an external input / output device such as a display device coupled to the interface. In other embodiments, multiple processors and / or multiple buses may be used along with multiple memories and multiple memories as needed. Similarly, multiple electronic devices may be connected that partially provide the required operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). In FIG. 9, one processor 901 is taken as an example.
[0138] The memory 902 is a non-transitory computer-readable storage medium provided by the present disclosure. Here, the memory stores instructions executable by at least one processor to cause the at least one processor to execute the method of action recognition provided by the present disclosure. The non-transitory computer-readable storage medium of the present disclosure stores computer instructions to cause a computer to execute the method of action recognition provided by the present disclosure.
[0139] The memory 902, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules (e.g., the acquisition unit 801, the creation unit 802, the first determination unit 803, and the recognition unit 804 shown in FIG. 8) corresponding to the method of action recognition in the disclosed embodiment. The processor 901 executes the non-transitory software programs, instructions, and modules stored in the memory 902 to perform various functional applications and data processing of the server, and realize the method of action recognition in the above-mentioned method embodiment.
[0140] The memory 902 may include a program storage area capable of storing an operating system, an application required for at least one function, and a data storage area capable of storing data generated by use of the electronic device to generate information, etc. Additionally, the memory 902 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 902 may optionally include memory configured remotely relative to the processor 901, which may be connected via a network to the electronic device to generate information. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0141] The electronic device of the method for action recognition may further include an input device 903, an output device 904, and a bus 905. The processor 901, the memory 902, the input device 903, and the output device 904 may be connected via the bus 905 or in other ways. In FIG. 9, they are connected via the bus 905.
[0142] The input device 903 can receive input numeric or character information and generate key signal inputs for user settings and function control of the electronic device for video segment extraction, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing lever, one or more mouse buttons, a track ball, a joystick, etc. The output device 904 can include a display device, an auxiliary lighting device (e.g., LED), a haptic feedback device (e.g., vibration motor), etc. The display device can include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device can be a touch screen.
[0143] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuitry systems, integrated circuit systems, application specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being embodied in one or more computer programs. The one or more computer programs can be executed and / or interpreted on a programmable system including at least one programmable processor. The programmable processor can be a special purpose or general purpose programmable processor and can receive data and instructions from and transmit data and instructions to a storage system, at least one input device, and at least one output device.
[0144] These computing programs (also referred to as programs, software, software applications, or code) contain machine instructions for a programmable processor and may be implemented using high level process and / or object oriented programming languages, and / or assembly / machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer-readable medium for providing machine instructions and / or data to a programmable processor. program "machine-readable signal" refers to any signal that provides machine instructions and / or data to a programmable processor.
[0145] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball). A user can provide input to the computer via the keyboard and pointing device. Other types of devices can also be used to provide interaction with a user. For example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback). Input from the user can be received in any form, including acoustic input, speech input, or haptic input.
[0146] The systems and techniques described herein can be implemented in a computing system that includes background components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0147] The computer system may include clients and servers. The clients and servers are typically remote from each other and interact through a communication network. The relationship of client and server is created by running computer programs on the corresponding computers having a client-server relationship to each other.
[0148] The present disclosure provides a method and apparatus for action recognition, including the steps of obtaining a video segment and determining at least two target objects in the video segment; for each of the at least two target objects, connecting positions of the target objects in each video frame of the video segment to create a spatio-temporal graph of the target objects; dividing the at least two spatio-temporal graphs created for the at least two target objects into a plurality of spatio-temporal graph subsets and determining a final selection subset from the plurality of spatio-temporal graph subsets; and determining an action category between the target objects indicated by a relationship between the spatio-temporal graphs included in the final selection subset as the action category of the action included in the video segment, which can improve the accuracy of recognizing actions in videos.
[0149] The technology disclosed herein solves the problem of "low recognition accuracy" that exists in existing methods for recognizing actions in videos.
[0150] It should be understood that the above-mentioned various forms of processes can be used to reorder, add, or delete steps. For example, each step described in the present disclosure can be performed in parallel, sequentially, or in a different order, and is not limited herein as long as the desired effect of the technical solution disclosed in the present disclosure is achieved.
[0151] The above specific embodiments do not limit the scope of protection of the present disclosure. Those skilled in the art should recognize that various modifications, combinations, recombinations, and substitutions are possible according to design requirements and other factors. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present disclosure should all be included within the scope of protection of the present disclosure.
Claims
1. obtaining a video segment and determining at least two target objects in the video segment; for each of the at least two target objects, connecting a position of the target object in each video frame of the video segment to create a spatio-temporal graph of the target object; partitioning the at least two spatio-temporal graphs created for the at least two target objects into a plurality of spatio-temporal graph subsets and determining a final selection subset from the plurality of spatio-temporal graph subsets; determining a motion category between target objects indicated by a relationship between the spatio-temporal graphs included in the final selection subset as a motion category of the motion included in the video segment; A method for action recognition comprising:
2. The position of the target object in each video frame of the video segment is by obtaining a position of the target object in a start frame of the video segment, setting the start frame as a current frame, and determining the position of the target object in each of the video frames through a number of iterations; The repetitive operation includes: inputting the current frame into a pre-trained prediction model to predict a position of the target object in a frame following the current frame, and in response to determining that the frame following the current frame is not an end frame of the video segment, setting the frame following the current frame in a current iteration as a current frame in a next iteration; 2. The method of claim 1, further comprising: in response to determining that the frame next to the current frame is an ending frame of the video segment, stopping the repeating action.
3. The step of connecting the positions of the target object in each video frame of the video segment comprises: representing the target object in the form of a rectangular box in each of the video frames; and connecting the rectangular boxes in each of the video frames according to a playback order of the video frames.
4. The step of dividing the at least two spatio-temporal graphs created for the at least two target objects into a plurality of spatio-temporal graph subsets includes: The method of claim 1 , further comprising assigning adjacent space-time graphs in the at least two space-time graphs to the same space-time graph subset.
5. The step of obtaining a video segment includes: obtaining a video and extracting video segments from the video; The method comprises: The method of claim 1 , comprising assigning spatio-temporal graphs of identical target objects in adjacent video segments to the same spatio-temporal graph subset.
6. Determining a final selection subset from the plurality of spatio-temporal graph subsets comprises: determining a plurality of target subsets from the plurality of spatio-temporal graph subsets; and determining a final selection subset from the plurality of target subsets based on a similarity between each space-time graph subset in the plurality of space-time graph subsets and each of the plurality of target subsets.
7. The method comprises: obtaining a feature vector for each spatio-temporal graph in the spatio-temporal graph subset; obtaining relationship features between the plurality of spatio-temporal graphs in the spatio-temporal graph subset; The step of determining a plurality of target subsets from the plurality of spatio-temporal graph subsets comprises:
7. The method of claim 6, further comprising: clustering the plurality of space-time graph subsets using a Gaussian mixture model based on feature vectors of the space-time graphs included in the space-time graph subsets and relationship features between the space-time graphs included in the space-time graph subsets, and determining at least one target subset to represent the space-time graph subset of each cluster.
8. Obtaining a feature vector for each space-time graph in the space-time graph subset comprises:
8. The method of claim 7, comprising capturing spatial and visual features of the spatio-temporal graph using a convolutional neural network.
9. The step of obtaining relationship features between a plurality of spatio-temporal graphs in the spatio-temporal graph subset includes: determining, for each pair of the plurality of space-time graphs, a similarity between the two space-time graphs based on visual features of the two space-time graphs; and determining position change characteristics between the two spatio-temporal graphs based on spatial characteristics of the two spatio-temporal graphs.
10. determining a final selection subset from the plurality of target subsets based on a similarity between each space-time graph subset in the plurality of space-time graph subsets and each of the plurality of target subsets, comprising: For each of the plurality of target subsets, obtaining a similarity between each spatio-temporal graph subset and the target subset; determining a maximum similarity between each spatio-temporal graph subset and the target subset as a score for the target subset; and selecting the target subset having the highest score among the plurality of target subsets as the final selected subset.
11. a capturing unit configured to capture a video segment and determine at least two target objects in the video segment; a creation unit configured for each of the at least two target objects to connect positions of the target objects in each video frame of the video segment to create a spatio-temporal graph of the target objects; a first determining unit configured to divide the at least two spatio-temporal graphs created for the at least two target objects into a plurality of spatio-temporal graph subsets and determine a final selection subset from the plurality of spatio-temporal graph subsets; and a recognition unit configured to determine that an action category between target objects indicated by a relationship between spatio-temporal graphs included in the final selection subset is the action category of the action included in the video segment.
12. The position of the target object in each video frame of the video segment is by obtaining a position of the target object in a start frame of the video segment, setting the start frame as a current frame, and determining the position of the target object in each of the video frames through a number of iterations; The iterative operation includes: inputting the current frame into a pre-trained prediction model to predict a position of the target object in a frame following the current frame, and in response to determining that the frame following the current frame is not an end frame of the video segment, setting the frame following the current frame in a current iteration as a current frame in a next iteration; and ceasing the repetitive action in response to determining that the frame next to the current frame is an ending frame of the video segment.
13. The creation unit includes: a creation module configured to represent the target object in the form of a rectangular box in each of the video frames; and a connection module configured to connect the rectangular boxes in each of the video frames according to a playback order of the each of the video frames.
14. The first determination unit comprises: The apparatus of claim 11 , comprising a first determination module configured to assign adjacent space-time graphs in the at least two space-time graphs to a same space-time graph subset.
15. The acquisition unit includes: a first capture module configured to capture a video and extract video segments from the video; The apparatus comprises: The apparatus of claim 11 , further comprising a second determination module configured to assign spatio-temporal graphs of identical target objects in adjacent video segments to the same spatio-temporal graph subset.
16. The first determination unit comprises: a first determining subunit configured to determine a plurality of target subsets from the plurality of spatio-temporal graph subsets; and a second determining unit configured to determine a final selection subset from the plurality of target subsets based on a similarity between each space-time graph subset in the plurality of space-time graph subsets and each of the plurality of target subsets.
17. The apparatus comprises: a second obtaining module configured to obtain a feature vector of each space-time graph in the space-time graph subset; and a third acquiring module configured to acquire relationship features between a plurality of spatio-temporal graphs in the spatio-temporal graph subset; The first determination unit comprises:
17. The apparatus of claim 16, further comprising a clustering module configured to cluster the plurality of space-time graph subsets using a Gaussian mixture model based on feature vectors of space-time graphs included in the space-time graph subsets and relationship features between the space-time graphs included, and determine at least one target subset to represent the space-time graph subset of each cluster.
18. The second acquisition module includes:
20. The apparatus of claim 17, comprising a convolution module configured to obtain spatial and visual features of the spatio-temporal graph using a convolutional neural network.
19. The third acquisition module includes: a similarity calculation module configured to, for each two of the plurality of space-time graphs, determine a similarity between the two space-time graphs based on visual features of the two space-time graphs; and a position change calculation module configured to determine a position change characteristic between the two spatio-temporal graphs based on spatial characteristics of the two spatio-temporal graphs.
20. The second determination unit comprises: a matching module configured to obtain, for each of the plurality of target subsets, a similarity between each spatio-temporal graph subset and the target subset; a scoring module configured to determine a maximum similarity between each spatio-temporal graph subset and the target subset as a score for the target subset; and a filtering module configured to select a target subset of the plurality of target subsets having a highest score as the final selected subset.
21. 1. An electronic device including at least one processor and a memory communicatively coupled to the at least one processor, An electronic device, wherein the memory stores instructions executable by the at least one processor, the instructions, when executed by the at least one processor, cause the at least one processor to perform a method according to any one of claims 1 to 10.
22. A non-transitory computer readable storage medium having computer instructions stored thereon, comprising: A non-transitory computer readable storage medium, the computer instructions being configured to cause a computer to perform the method of any one of claims 1 to 10.
23. A computer program causing a computer to carry out the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Human body action recognition method based on a TP-STG framework
CN109492581A
A method for activity recognition using video tubes.
JP2021510225A
