Distributed reasoning method for action recognition model based on multiple ARMs
The distributed reasoning method of multiple ARM processors solves the problem of low efficiency of traditional action recognition technology, achieves rapid recognition and real-time response to human body movements, relieves resource pressure in the training and reasoning process of deep learning models, and improves efficiency. Recognition accuracy and efficiency.
Patent Information
- Application Number
- CN202011006730.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-25
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-09-25
AI Technical Summary
Traditional action recognition technology is inefficient and cannot respond and alarm quickly. The large parameters and data scale of deep learning models have limited memory and computing power. The stand-alone training mode cannot adapt to complex models and large-scale data requirements, resulting in insufficient resource utilization and recognition time. extend.
Using a multi-ARM based action recognition model distributed reasoning method, multiple ARM processors share computing tasks, and use gradient descent algorithms and gradient exchange training models to achieve distributed processing and real-time recognition of video data, optimizing resource allocation and recognition efficiency .
It effectively alleviates the problems of insufficient memory and long time during the training and inference process of the deep learning model, improves resource utilization and recognition accuracy, and achieves rapid recognition and real-time response to human actions.
Smart Images

Figure CN112101266B
Abstract
Description
Technical Field
[0001] The present invention relates to a distributed reasoning method for a multi-ARM-based motion recognition model, belongs to the field of big data artificial intelligence, and is particularly suitable for human motion recognition of multi-ARM processors. Background Art
[0002] Action recognition technology is widely used in competitive sports, health checks, medical research, pedestrian navigation and rescue, and is of great significance for timely detection of abnormal events and prevention of major accidents. Visual recognition technology is usually used for human action recognition. Traditionally, the extraction and classification of action videos rely heavily on manual methods, which is inefficient, and cannot respond quickly to some dangerous events and issue alarms in time, lacking real-time performance.
[0003] Action recognition model refers to the recognition model established through deep learning technology to determine the human body's actions in pictures or videos. Nowadays, deep learning technology has been successfully applied to image recognition and is effective in extracting feature information from images or videos. This technology will gradually replace manual methods, such as using action recognition models to achieve unmanned monitoring, which can respond and alarm more efficiently.
[0004] However, as the size of deep learning model parameters and data grows, memory and computing power will become limitations. The reason is that deep learning models require repeated iterations and optimization processes, and the model of training using a single machine can no longer meet the training requirements of complex models and large-scale training data.
[0005] As the core of trend-setting intelligent products, ARM processors are widely used in various industrial life fields, especially in intelligent products in the fields of monitoring and video. It is very valuable to realize motion recognition on intelligent products based on ARM processors, but since intelligent products are mostly reflected in small system boards, large amounts of data bring a burden to the calculation of a single ARM processor. Resource utilization and conservation will become the key to restricting applications, which may lead to increased motion recognition time and reduced accuracy. Summary of the invention
[0006] In view of this, the present invention provides a distributed reasoning method for action recognition models based on multiple ARMs, which can effectively extract image features, optimize resource allocation, and alleviate the pressure of insufficient memory and long training and reasoning time during deep learning model training and reasoning.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] The distributed reasoning method of the action recognition model based on multiple ARMs includes the following steps:
[0009] S1: Collect videos, classify, edit and annotate them according to human movements, and build a sports video database;
[0010] S2: After sampling and preprocessing the videos in the motion video database, image data is generated as the input of the action recognition model;
[0011] S3: Use deep learning technology to build an action recognition model;
[0012] S4: Distributed inference training of multi-ARM based action recognition model;
[0013] S5: Input the real-time video shot by the user into the multi-ARM-based action recognition model for distributed reasoning, determine the human action category, and determine whether the action video needs to be extracted and saved based on user needs.
[0014] Furthermore, the collected videos described in step S1 include: human motion videos under various factors such as different scenes, different resolutions, frame rates, contrasts, shooting angles, different numbers of people being photographed, and different shooting distances, and may be existing sports events, network or third-party video collections, etc.
[0015] Furthermore, step S1 requires classifying, editing and labeling the human body movements in the sports video database manually or through supervised learning.
[0016] Furthermore, the preprocessing described in step S2 is: first, the image is cropped using a sliding window of a fixed size; second, the cropped image is grayscaled; then, high-pass filtering is performed, and finally normalization is performed.
[0017] Furthermore, the action recognition model described in step S3 is composed of n Stage modules connected in series, and the Stage modules are connected by a feature fusion module; wherein n>1. The i-th Stage module is composed of two parallel CNN networks, which respectively extract human node features and human node connection features; each CNN network is composed of (1+2i) layers of convolutional layers with a convolution kernel of 3x3 or 5x5 and 2 layers of 1x1 convolutional layers connected in series in sequence.
[0018] Further, the distributed reasoning training of the multi-ARM action recognition model described in step S4 includes the following steps:
[0019] (4-1) According to the number N of ARM processors and the corresponding working status, all image data are divided into N temporally continuous parts, and then divided into training sets and test sets according to a certain ratio, and input into the ARM processor one by one; where N>1.
[0020] (4-2) The ARM processor uses the gradient descent algorithm to train the allocated image data, adjust the parameters of the action recognition model, and calculate the respective gradients;
[0021] (4-3) The ARM processors perform N-1 gradient exchanges between each other to complete the gradient accumulation of all image data.
[0022] Further, the step S5 specifically comprises the following steps:
[0023] (5-1) The camera shoots the user's movement process in real time, and transmits the captured real-time video to the ARM processor through the router, and generates image data after image sampling and preprocessing the user's real-time video;
[0024] (5-2) The master node ARM divides all the image data into N parts that are continuous in time according to the number N of ARM processors and the corresponding working status, and inputs them into the ARM processors one by one;
[0025] (5-3) Each ARM processor uses the action recognition model to calculate and infer the image data and classify the human body actions in the image data;
[0026] (5-4) The master node ARM monitors the status of each ARM processor in step (5-3) in real time to facilitate task allocation for video processing in the next cycle;
[0027] (5-5) Each ARM processor sends the classification results of video action recognition to the main node ARM for aggregation, and based on user needs, determines whether the action video needs to be extracted and saved. If it is the action classification required by the user, the current action video clip and its classification are output to the display and storage device, otherwise it continues to determine the next action category.
[0028] Furthermore, the multi-ARM processor includes a master node ARM processor and at least one computing node ARM processor; the ARM processor has a peripheral interface, a network module, and a power supply module; the master node ARM processor can calculate the working status of all ARM processors in the next video cycle through a load prediction model, and allocate tasks to the ARM processors according to the working status.
[0029] The beneficial effects of the present invention are as follows: the present invention provides a distributed reasoning method for a multi-ARM-based action recognition model, establishes a motion video database, a multi-ARM-based action recognition model and a distributed reasoning method, can effectively extract image features, optimize resource allocation, and alleviate the pressure of insufficient memory and excessive training and reasoning time during deep learning model training and reasoning. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to make the purpose and technical solution of the present invention, the present invention provides the following drawings for explanation:
[0031] Figure 1 This is a flow chart of the distributed reasoning method for multi-ARM-based action recognition model;
[0032] Figure 2 is a diagram of the action recognition model architecture of an embodiment of the present invention; wherein FK is the human body node feature data input, FL is the human body node connection feature data input, K i is the human node feature output by the i-th Stage module, L i B is the human body node connection feature output by the i-th Stage module; i A is the human node feature CNN network output by the i-th Stage module, i Connect the feature CNN network to the human body nodes output by the i-th Stage module;
[0033] Figure 3 Schematic diagram of distributed reasoning training according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose and technical solution of the present invention more clearly understood, the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0035] Embodiment: When a figure skating coach instructs an athlete on the essentials of movements and analyzes the opponent's movements, it is often necessary to make a video collection of the athlete and edit the movements that the athlete is interested in, such as front jump and other movements. This embodiment provides a distributed reasoning method for a movement recognition model based on multiple ARMs. The multiple ARM processors [1-3] include a master node ARM processor [1] and two computing node ARM processors [2-3]; the ARM processors [1-3] are provided with a peripheral interface, a network module, and a power supply module; the master node ARM processor [1] can calculate the working state (overload O, normal N, low load U) of all ARM processors [1-3] in the next video cycle through a load prediction model (first-order Markov prediction model), and allocate tasks to the ARM processors [1-3] according to the working state.
[0036] The peripheral interface is connected to the parallel computing unit to form an operating system module; the power supply module is connected to the parallel computing unit and the network module respectively to provide power; the network module connects all ARM processors [1-3] via a local area network.
[0037] The master node includes: a resource management module: used to collect node status information uploaded by the computing node management module; a task management module: used to send analysis tasks to the computing nodes; a data preprocessing module: used to preprocess and split the execution task data; a calculation module: used to specifically execute the action recognition model; a result aggregation module: used to collect the analysis results of the ARM processor [1-3] and organize the result set according to the sequence; an output module: used to output the analysis result set to the application layer.
[0038] The computing node comprises: a node management module: used for collecting the computing node status information, receiving computing tasks, starting the computing module and transferring specific computing parameters to the computing module; and a computing module: used for specifically executing the action recognition model.
[0039] Combination Figure 1 , the method comprises the following steps:
[0040] Step 1:
[0041] Figure skating videos with different resolutions, frame rates, contrasts, shooting angles, different number of people photographed, different shooting distances, etc. were obtained from event videos and online videos to establish a sports video database. The human body movements in the sports video database were identified into the action categories of a combination of one or more actions such as jumps, rotations, lifts, steps, and turns using supervised model learning, and then edited and annotated respectively.
[0042] Step 2:
[0043] (201) Divide a continuous video stream into uniform video segments with a certain number of frames, where the number of frames of the video segment is N=3000; (202) Sample the RGB image information of the video segment with a sampling period of 10 frames as the representative information of the segment; (203) Crop the RGB image information using a sliding window of a fixed size; secondly, grayscale the cropped RGB image information; then, perform high-pass filtering, and finally perform normalization.
[0044] Step 3:
[0045] Combination Figure 2 , using deep learning technology, to establish an action recognition model. The action recognition model is composed of three Stage modules connected in series, and the Stage modules are connected by a feature fusion module Concat; the i-th Stage module consists of two parallel CNN networks (A i and B i) to extract human node features (FK) and human node connection features (FL) respectively; each CNN network is composed of (1+2i) layers of convolutional layers with convolutional kernels of 3x3 or 5x5 and 2 layers of 1x1 convolutional layers connected in series.
[0046] Step 4: Combine Figure 3 , Distributed reasoning training of multi-ARM action recognition models includes the following steps:
[0047] (401) According to the number of ARM processors [1-3] and the corresponding working status, all image data are divided into three temporally continuous parts, and then divided into a training set and a test set in a ratio of 8:2, and input into the ARM processors [1-3] one by one;
[0048] (402) The ARM processor [1-3] uses a gradient descent algorithm to train the allocated image data, adjust the parameters of the action recognition model, and calculate the respective gradients;
[0049] (403) The ARM processors [1-3] perform gradient exchange twice between each other to complete the gradient accumulation of all image data.
[0050] Step 5: Use the real-time video shot by the user as the input of the motion target detection model to determine the category of human body movements, and based on user needs, determine whether the action video needs to be extracted and saved.
[0051] (501) The camera shoots the user's figure skating process in real time, and transmits the captured real-time video to the ARM processor [1-3] through a router, and generates image data after image sampling and preprocessing the user's real-time video;
[0052] (502) The master node ARM[1] divides all the image data into three parts that are continuous in time according to the number of ARM processors [1-3] and their corresponding working states, and inputs them into the ARM processors [1-3] one by one;
[0053] (503) Each ARM processor [1-3] uses the action recognition model to calculate and infer the image data respectively, and classifies the human body actions in the image data;
[0054] (504) The master node ARM1[1] monitors the status of each ARM processor [1-3] in step (503) in real time to facilitate task allocation for video processing in the next cycle;
[0055] (505) Each ARM processor [1-3] sends the classification results of the video action recognition to the main node ARM [1] for aggregation, and determines whether the action video needs to be extracted and saved in combination with user needs. If it is the action classification required by the user, the current action video clip and its classification are output to the coach for reference. Otherwise, the next action category is determined.
[0056] Among them, the camera's variable-focus high-speed camera can be installed in a fixed, rail-mounted, or pan-tilt manner to meet the user's motion shooting needs in different scenarios.
[0057] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.
Claims
1. A distributed reasoning method for action recognition model based on multiple ARMs, characterized in that: The method comprises the following steps: S1: Collect videos, classify, edit and annotate them according to human movements, and build a sports video database; S2: After sampling and preprocessing the videos in the motion video database, image data is generated as the input of the action recognition model; S3: Use deep learning technology to build an action recognition model; S4: Distributed inference training of multi-ARM based action recognition model; S5: Input the real-time video shot by the user into the multi-ARM-based action recognition model for distributed reasoning, determine the human action category, and determine whether the action video needs to be extracted and saved based on user needs; The preprocessing is as follows: first, the image is cropped using a sliding window of a fixed size; second, the cropped image is grayed; then, a high-pass filter is performed, and finally, normalization is performed; The action recognition model is composed of n Stage modules connected in series, and the Stage modules are connected by a feature fusion module; the i-th Stage module is composed of two parallel CNN networks, which respectively extract human node features and human node connection features; Each CNN network is composed of (1+2i) layers of convolutional layers with convolutional kernels of 3x3 or 5x5 and 2 layers of 1x1 convolutional layers connected in series; distributed reasoning training of the multi-ARM action recognition model includes the following steps: (4-1) According to the number N of ARM processors and the corresponding working status, all image data are divided into N parts that are continuous in time, and are input into the ARM processors one by one; (4-2) The ARM processor trains the assigned image data and calculates the respective gradients; (4-3) ARM processors exchange gradients N-1 times each to complete the gradient accumulation of all image data; The step S5 specifically comprises the following steps: (5-1) After sampling and preprocessing the video shot by the user in real time, image data is generated; (5-2) The master node ARM divides all the image data into N parts that are continuous in time according to the number N of ARM processors and the corresponding working status, and inputs them into the ARM processors one by one; (5-3) Each ARM processor uses the action recognition model to calculate and infer the image data and classify the human body actions in the image data; (5-4) The master node ARM monitors the status of each ARM processor in step (5-3) in real time to facilitate task allocation for video processing in the next cycle; (5-5) Each ARM processor sends the classification results of video action recognition to the master node ARM for aggregation, and determines whether the action video needs to be extracted and saved based on user needs; The multi-ARM processor includes a master node ARM processor and at least one computing node ARM processor; the ARM processor is provided with a peripheral interface, a network module, and a power supply module; the master node ARM processor can calculate the working status of the next video cycle of all ARM processors through a load prediction model, and allocate tasks to the ARM processors according to the working status.
Citation Information
Patent Citations
Power artificial-intelligence visual-analysis system based on multi-core heterogeneous parallel computing
CN108171117A
A face recognition method with attention mechanism
CN109543606A
An action video extraction and classification method based on moving object detection
CN109886165A
Communication optimization method and system for distributed deep learning
CN109951438A
Column division-based distributed machine learning optimization classification method and device
CN110929884A
