User daily activity detection method and device and electronic equipment
By combining RGB video data and inertial measurement unit data to generate grayscale images and sampling data frames, and using convolutional neural networks and additive attention mechanisms for multi-modal data fusion, the problem caused by single-modal data in the existing technology is solved. solves the low-precision problem and achieves more efficient detection of user daily activities.
Patent Information
- Application Number
- CN202410719185.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-01
AI Technical Summary
Existing technologies mainly rely on single modal data in user daily activity detection, resulting in low detection accuracy.
Combine RGB video data and inertial measurement unit data (including acceleration, angular velocity, and angular acceleration) for processing to generate grayscale images and sampling data frames. Multi-modal data fusion is performed through convolutional neural networks and additive attention mechanisms to improve detection. Accuracy.
It significantly improves the accuracy and efficiency of user daily activity detection, and has stronger feature extraction capabilities and computational efficiency than single modal data detection methods.
Smart Images

Figure CN118736668A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of sensor device data processing, and in particular to a method, device and electronic device for detecting user daily activities. Background Art
[0002] Due to the rapid development of wearable sensing technology in recent years, wearable sensing devices have emerged in an endless stream. Using the data collected by wearable devices to detect users' daily activities (such as cooking, running, taking elevators, etc.) has become a research hotspot. However, currently, single-modal data is basically used when detecting users' daily activities, resulting in low detection accuracy of users' daily activities. Summary of the invention
[0003] To solve the above problems, the purpose of the embodiments of the present application is to provide a method, device and electronic device for detecting user daily activities.
[0004] In a first aspect, an embodiment of the present application provides a method for detecting daily activities of a user, comprising:
[0005] Acquire RGB video data and multiple inertial measurement unit data sequences respectively collected within a preset time period; the inertial measurement unit data sequence includes: inertial measurement unit data respectively collected at multiple time points included in the preset time period; the inertial measurement unit data includes: acceleration, angular velocity and angular acceleration;
[0006] Processing the plurality of inertial measurement unit data sequences to obtain a grayscale image of each of the plurality of inertial measurement unit data sequences;
[0007] Sampling the RGB video data to obtain a plurality of sampling data frames;
[0008] Based on the grayscale image of each of the inertial measurement unit data sequences and a plurality of sampling data frames, the user's daily activities are detected.
[0009] In a second aspect, the embodiment of the present application further provides a user daily activity detection device, comprising:
[0010] An acquisition module, used to acquire RGB video data and multiple inertial measurement unit data sequences respectively collected within a preset time period; the inertial measurement unit data sequence includes: inertial measurement unit data respectively collected at multiple time points included in the preset time period; the inertial measurement unit data includes: acceleration, angular velocity and angular acceleration;
[0011] A processing module, configured to process the plurality of inertial measurement unit data sequences to obtain a grayscale image of each of the plurality of inertial measurement unit data sequences;
[0012] A sampling module, used for sampling the RGB video data to obtain a plurality of sampling data frames;
[0013] The detection module is used to detect the user's daily activities based on the grayscale image of each inertial measurement unit data sequence and multiple sampling data frames.
[0014] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the method described in the first aspect above.
[0015] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor and one or more programs, wherein the one or more programs are stored in the memory and configured so that the processor executes the steps of the method described in the first aspect above.
[0016] In the solutions provided in the first to fourth aspects of the embodiments of the present application, RGB video data and multiple inertial measurement unit data sequences respectively collected within a preset time period are obtained; the multiple inertial measurement unit data sequences are processed to obtain a grayscale image of each inertial measurement unit data sequence in the multiple inertial measurement unit data sequences; the RGB video data is sampled to obtain a plurality of sampled data frames; based on the grayscale image of each inertial measurement unit data sequence and the plurality of sampled data frames, the user's daily activities are detected; compared with the method of using only a single modality of data to detect the user's daily activities in the related art, the user's daily activities can be detected by combining the multi-modality (multi-type) data of each inertial measurement unit data sequence and the RGB video data, which can greatly improve the detection precision and improve the accuracy of the detection.
[0017] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flowchart of a method for detecting daily activities of a user provided in Example 1 of the present application is shown;
[0020] Figure 2 A schematic diagram of the structure of a user daily activity detection device provided in Example 2 of the present application is shown;
[0021] Figure 3 A schematic diagram of the structure of an electronic device provided in Example 3 of the present application is shown. DETAILED DESCRIPTION
[0022] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0023] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0024] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0025] Due to the rapid development of wearable sensing technology in recent years, wearable sensing devices have emerged in an endless stream. Using the data collected by wearable devices to detect users' daily activities (such as cooking, running, taking elevators, etc.) has become a research hotspot. However, currently, single-modal data is basically used when detecting users' daily activities, resulting in low detection accuracy of users' daily activities.
[0026] Based on this, the following embodiments of the present application propose a method, device and electronic device for detecting user daily activities, which obtain RGB video data and multiple inertial measurement unit data sequences collected respectively within a preset time period; process the multiple inertial measurement unit data sequences to obtain a grayscale image of each inertial measurement unit data sequence in the multiple inertial measurement unit data sequences; sample the RGB video data to obtain multiple sampling data frames; detect the user's daily activities based on the grayscale image of each inertial measurement unit data sequence and the multiple sampling data frames; the user's daily activities can be detected by combining these multimodal (multiple) data such as each inertial measurement unit data sequence and RGB video data, which can greatly improve the detection precision and improve the accuracy of the detection.
[0027] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and embodiments.
[0028] Example 1
[0029] The execution subject of the user daily activity detection method proposed in this embodiment is a processing unit in a wearable device having an inertial measurement unit and a camera unit.
[0030] The processing unit is respectively connected to the inertial measurement unit and the camera unit, and can interact with the inertial measurement unit and the camera unit respectively.
[0031] See also Figure 1 The flowchart of a method for detecting daily activities of a user is shown in FIG. 1 . This embodiment proposes a method for detecting daily activities of a user, including the following specific steps:
[0032] Step 100: Acquire RGB video data and multiple inertial measurement unit data sequences collected respectively within a preset time period; the inertial measurement unit data sequence includes: inertial measurement unit data collected respectively at multiple time points included in the preset time period; the inertial measurement unit data includes: acceleration, angular velocity and angular acceleration.
[0033] In the above step 100, the preset time period can be any time period between 30 seconds and 3000 seconds before the current moment, which will not be described in detail here.
[0034] In a preset time period, among a plurality of time points at which the inertial measurement unit data is collected, the time intervals between adjacent time points are the same.
[0035] In one embodiment, when the inertial measurement unit data includes acceleration, angular velocity and angular acceleration, each inertial measurement unit data sequence may be: an acceleration sequence, an angular velocity sequence and an angular acceleration sequence, respectively.
[0036] Each IMU data carries a timestamp.
[0037] Step 102: Process the plurality of inertial measurement unit data sequences to obtain a grayscale image of each of the plurality of inertial measurement unit data sequences.
[0038] In order to obtain the grayscale image of each inertial measurement unit data sequence, the above step 102 can perform the following steps (1) to (4):
[0039] (1) normalizing the inertial measurement unit data in each of the plurality of inertial measurement unit data sequences to obtain each of the inertial measurement unit data sequences after the normalization process;
[0040] (2) performing polar coordinate conversion on each of the inertial measurement unit data sequences after normalization processing to obtain each of the inertial measurement unit data sequences under polar coordinates;
[0041] (3) processing each of the inertial measurement unit data sequences in polar coordinates using a Gram angle field, projecting each of the inertial measurement unit data sequences into a two-dimensional space, and obtaining a two-dimensional matrix of each of the inertial measurement unit data sequences;
[0042] (4) Normalizing the elements in the two-dimensional matrix of each of the inertial measurement unit data sequences to obtain a grayscale image of each of the inertial measurement unit data sequences.
[0043] In the above step (1), the inertial measurement unit data in each inertial measurement unit data sequence is normalized, that is, the inertial measurement unit data in each inertial measurement unit data sequence is reduced to a range of -1 to 1.
[0044] In the above step (2), when the data in each of the normalized inertial measurement unit data sequences are converted into polar coordinates, the angle is calculated by the arc cosine function known to the sampled data, and the amplitude is calculated by the timestamp at the time of sampling. Of course, the process of converting the data in each of the normalized inertial measurement unit data sequences into polar coordinates to obtain each of the inertial measurement unit data sequences in polar coordinates can also be obtained by any polar coordinate conversion method in the prior art, which will not be repeated here.
[0045] In the above steps (3) to (4), the process of processing each inertial measurement unit data sequence under polar coordinates using the Gram angle field, projecting each inertial measurement unit data sequence into a two-dimensional space, and obtaining a two-dimensional matrix of each inertial measurement unit data sequence; and normalizing the elements in the two-dimensional matrix of each inertial measurement unit data sequence to obtain a grayscale image of each inertial measurement unit data sequence is a prior art and will not be repeated here.
[0046] Through the contents described in the above steps (1) to (4), the method of imaging the inertial measurement unit data sequence based on the Gram angle field effectively extracts a series of feature quantities in the inertial measurement unit data, such as periodicity, waveform change, signal amplitude, timestamp, timing correlation, etc. Compared with the existing methods, the method of imaging the inertial measurement unit data sequence based on the Gram angle field has stronger feature extraction capability, higher interpretability, and higher scalability.
[0047] Step 104: Sample the RGB video data to obtain a plurality of sampled data frames.
[0048] In the above step 104, in order to sample the RGB video data to obtain a plurality of sampled data frames, the following steps (1) to (2) may be performed:
[0049] (1) dividing the RGB video data according to a preset duration to obtain a plurality of RGB video data segments;
[0050] (2) Selecting a video frame from each RGB video data segment in the multiple RGB video data segments as a sampling data frame of each RGB video data segment, thereby completing a sampling operation on the RGB video data and obtaining multiple sampling data frames.
[0051] In the above step (1), the preset time length can be any time length between 0.1 seconds and 3 seconds, which will not be described in detail here.
[0052] Each RGB video data segment in the multiple RGB video data segments should have at least one video frame. Each video frame carries a timestamp.
[0053] In the above step (2), one video frame is selected from each RGB video data segment in the multiple RGB video data segments as the sampling data frame of each RGB video data segment, that is, the RGB video data segment is downsampled, which greatly reduces the amount of subsequent data processing, reduces data redundancy and system overhead, and improves the efficiency of detecting users' daily activities.
[0054] The sampling data frame of each RGB video data segment carries a timestamp.
[0055] Step 106: Detect the user's daily activities based on the grayscale image of each of the inertial measurement unit data sequences and the multiple sampling data frames.
[0056] Specifically, in order to detect the user's daily activities, the above step 106 may perform the following steps (1) to (3):
[0057] (1) dividing the grayscale image of each of the inertial measurement unit data sequences according to the preset time length to obtain a plurality of grayscale sub-images of each of the inertial measurement unit data sequences;
[0058] (2) obtaining a data sampling time based on a timestamp carried in a sampling data frame of each RGB video data segment, extracting a portion of an image located within the data sampling time from different grayscale sub-images of each inertial measurement unit data sequence, and determining the extracted portion of an image from different grayscale sub-images of each inertial measurement unit data sequence as a sampling image of different grayscale sub-images of each inertial measurement unit data sequence;
[0059] (3) Detecting the user's daily activities based on the sampled images of different grayscale sub-images in each of the inertial measurement unit data sequences and the sampled data frames of each of the RGB video data segments.
[0060] In the above step (2), the time 1 second before and after the moment indicated by the timestamp carried in the sampling data frame of each RGB video data segment is determined as the data sampling time, thereby obtaining the data sampling time.
[0061] Of course, according to actual conditions, any other time before or after the moment indicated by the timestamp carried in the sampling data frame of each RGB video data segment can be determined as the data sampling time, which will not be described in detail here.
[0062] Extracting the partial images located within the data sampling time from the different grayscale sub-images of each inertial measurement unit data sequence means extracting the partial images collected within the data sampling time from the multiple grayscale sub-images of each inertial measurement unit data sequence as the sampling images of the different grayscale sub-images of each inertial measurement unit data sequence.
[0063] In the above step (3), in order to detect the user's daily activities, the following steps (31) to (36) may be performed:
[0064] (31) respectively inputting the sampled images of the different grayscale sub-images in each of the inertial measurement unit data sequences into a convolutional neural network capable of processing the different grayscale sub-images in each of the inertial measurement unit data sequences, to obtain a first feature vector of the different grayscale sub-images in each of the inertial measurement unit data sequences;
[0065] (32) inputting the sampled data frames of each of the RGB video data segments into a convolutional neural network capable of processing video data frames to obtain a second feature vector of the sampled data frames of each of the RGB video data segments;
[0066] (33) splicing first feature vectors obtained from sampling images of grayscale sub-images of the inertial measurement unit data sequences collected in the same time period in different grayscale sub-images in each of the inertial measurement unit data sequences and in each of the RGB video data segments and second feature vectors obtained from sampling data frames of the RGB video data segments to obtain a plurality of spliced feature vectors;
[0067] (34) using an additive attention mechanism to process the multiple spliced feature vectors to obtain a weight value of each of the multiple spliced feature vectors;
[0068] (35) performing a weighted sum operation on the concatenated feature vectors according to the weight values of the concatenated feature vectors to obtain a recognition vector;
[0069] (36) Inputting the recognition vector into a classifier for detecting the user's daily activities to detect the user's daily activities.
[0070] In the above step (31), in one embodiment, if the inertial measurement unit data sequence is an acceleration sequence, then the sampled images of different grayscale sub-images in each of the inertial measurement unit data sequences are respectively input into a convolutional neural network capable of processing different grayscale sub-images in each of the inertial measurement unit data sequences, that is, the sampled images of different grayscale sub-images in the acceleration sequence are input into a convolutional neural network capable of processing different grayscale sub-images in the acceleration sequence for processing.
[0071] The convolutional neural network for processing different grayscale sub-images in the acceleration sequence and the convolutional neural network for processing different grayscale sub-images in other inertial measurement unit data sequences are pre-trained and run in the processing unit.
[0072] In the above step (33), the first eigenvector and the second eigenvector to be spliced are obtained by using the grayscale sub-image of the inertial measurement unit data sequence and the RGB video data fragment collected in the same time period.
[0073] In the above step (34), the specific process of using the additive attention mechanism to process the multiple spliced feature vectors and respectively obtain the weight value of each of the multiple spliced feature vectors is prior art and will not be repeated here.
[0074] In the above step (36), the classifier for detecting the user's daily activities runs in the processing unit.
[0075] The classifier used for detecting the daily activities of the user processes the recognition vector to obtain the probabilities of various daily activities, and then selects the daily activity with the greatest probability as the detection result of detecting the daily activities of the user.
[0076] Through the above steps (31) to (36), it can be seen that: compared with other fusion methods, the inter-segment multimodal attention fusion mechanism reduces the additional computational overhead while ensuring the recognition accuracy. The additive attention mechanism is used to process the multiple spliced feature vectors to fuse the multimodal data, making the multimodal fusion more efficient.
[0077] The user daily activity detection method proposed in this embodiment has a significantly better recognition effect than a single-modality detection method, has a lower computational overhead, and has the potential to be deployed on mobile devices.
[0078] In summary, the present embodiment proposes a method for detecting daily activities of users, which obtains RGB video data and multiple inertial measurement unit data sequences collected respectively within a preset time period; processes the multiple inertial measurement unit data sequences to obtain a grayscale image of each inertial measurement unit data sequence in the multiple inertial measurement unit data sequences; samples the RGB video data to obtain multiple sampling data frames; based on the grayscale image of each inertial measurement unit data sequence and the multiple sampling data frames, detects the daily activities of users; compared with the method of using only a single modality of data to detect daily activities of users in the related art, the method can combine the multi-modality (multi-type) data such as the inertial measurement unit data sequences and the RGB video data to detect daily activities of users, which can greatly improve the detection precision and improve the accuracy of detection.
[0079] Example 2
[0080] This embodiment provides a user daily activity detection device, which is used to execute the user daily activity detection method provided in the above embodiment 1.
[0081] See also Figure 2 The structure diagram of a user daily activity detection device is shown in FIG. 1 . This embodiment provides a user daily activity detection device, including:
[0082] The acquisition module 200 is used to acquire RGB video data and multiple inertial measurement unit data sequences respectively collected within a preset time period; the inertial measurement unit data sequence includes: inertial measurement unit data respectively collected at multiple time points included in the preset time period; the inertial measurement unit data includes: acceleration, angular velocity and angular acceleration;
[0083] A processing module 202 is used to process the plurality of inertial measurement unit data sequences to obtain a grayscale image of each of the plurality of inertial measurement unit data sequences;
[0084] The sampling module 204 is used to sample the RGB video data to obtain a plurality of sampling data frames;
[0085] The detection module 206 is used to detect the user's daily activities based on the grayscale image of each of the inertial measurement unit data sequences and the multiple sampling data frames.
[0086] Specifically, the processing module 202 is specifically used to:
[0087] Normalizing the inertial measurement unit data in each of the plurality of inertial measurement unit data sequences to obtain each of the inertial measurement unit data sequences after the normalization process;
[0088] Performing polar coordinate conversion on each of the inertial measurement unit data sequences after normalization processing to obtain each of the inertial measurement unit data sequences under polar coordinates;
[0089] Processing each of the inertial measurement unit data sequences in polar coordinates using a Gram angle field, projecting each of the inertial measurement unit data sequences into a two-dimensional space, and obtaining a two-dimensional matrix of each of the inertial measurement unit data sequences;
[0090] The elements in the two-dimensional matrix of each of the inertial measurement unit data sequences are normalized to obtain a grayscale image of each of the inertial measurement unit data sequences.
[0091] Specifically, the sampling module 204 is specifically used for:
[0092] Dividing the RGB video data according to a preset duration to obtain a plurality of RGB video data segments;
[0093] A video frame is respectively selected from each RGB video data segment in the multiple RGB video data segments as a sampling data frame of each RGB video data segment, thereby completing a sampling operation on the RGB video data and obtaining multiple sampling data frames.
[0094] In summary, the present embodiment proposes a user daily activity detection device, which obtains RGB video data and multiple inertial measurement unit data sequences collected respectively within a preset time period; processes the multiple inertial measurement unit data sequences to obtain a grayscale image of each inertial measurement unit data sequence in the multiple inertial measurement unit data sequences; samples the RGB video data to obtain multiple sampling data frames; based on the grayscale image of each inertial measurement unit data sequence and the multiple sampling data frames, detects the user's daily activities; compared with the method of using only a single modality of data to detect the user's daily activities in the related art, the user's daily activities can be detected by combining multi-modal (multi-type) data such as each inertial measurement unit data sequence and RGB video data, which can greatly improve the detection precision and improve the accuracy of the detection.
[0095] Example 3
[0096] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the user daily activity detection method described in the above embodiment 1 are executed. The specific implementation can be found in method embodiment 1, which will not be described in detail here.
[0097] In addition, see Figure 3 The structural diagram of an electronic device shown in FIG. 1 is a schematic diagram of a structure of an electronic device. This embodiment further provides an electronic device, which includes a bus 51 , a processor 52 , a transceiver 53 , a bus interface 54 , a memory 55 and a user interface 56 . The electronic device includes a memory 55 .
[0098] In this embodiment, the electronic device further includes: one or more programs stored in the memory 55 and executable on the processor 52, and configured so that the processor executes the one or more programs to perform the following steps (1) to (4):
[0099] (1) acquiring RGB video data and a plurality of inertial measurement unit data sequences respectively collected within a preset time period; the inertial measurement unit data sequences comprising: inertial measurement unit data respectively collected at a plurality of time points included in the preset time period; the inertial measurement unit data comprising: acceleration, angular velocity and angular acceleration;
[0100] (2) processing the plurality of inertial measurement unit data sequences to obtain a grayscale image of each of the plurality of inertial measurement unit data sequences;
[0101] (3) sampling the RGB video data to obtain a plurality of sampled data frames;
[0102] (4) Detecting the user's daily activities based on the grayscale image of each of the inertial measurement unit data sequences and multiple sampling data frames.
[0103] The transceiver 53 is used to receive and send data under the control of the processor 52.
[0104] Among them, the bus architecture (represented by bus 51), bus 51 can include any number of interconnected buses and bridges, and bus 51 links various circuits including one or more processors represented by processor 52 and memory represented by memory 55. Bus 51 can also link various other circuits such as peripherals, voltage regulators, and power management circuits together, which are all well known in the art, so this embodiment will not be further described. Bus interface 54 provides an interface between bus 51 and transceiver 53. Transceiver 53 can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. For example: transceiver 53 receives external data from other devices. Transceiver 53 is used to send data processed by processor 52 to other devices. Depending on the nature of the computing system, a user interface 56, such as a keypad, display, speaker, microphone, joystick, can also be provided.
[0105] The processor 52 is responsible for managing the bus 51 and general processing, such as running the general operating system 551 as mentioned above. The memory 55 can be used to store data used by the processor 52 when performing operations.
[0106] Optionally, the processor 52 may be, but is not limited to: a central processing unit, a single-chip microcomputer, a microprocessor or a programmable logic device.
[0107] It can be understood that the memory 55 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 55 of the system and method described in the present embodiment is intended to include, but is not limited to, these and any other suitable types of memory.
[0108] In some implementations, the memory 55 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system 551 and application programs 552 .
[0109] Among them, the operating system 551 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 552 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 552.
[0110] In summary, the present embodiment proposes a computer-readable storage medium and an electronic device, which obtain RGB video data and multiple inertial measurement unit data sequences respectively collected within a preset time period; process the multiple inertial measurement unit data sequences to obtain a grayscale image of each inertial measurement unit data sequence in the multiple inertial measurement unit data sequences; sample the RGB video data to obtain multiple sampling data frames; based on the grayscale image of each inertial measurement unit data sequence and the multiple sampling data frames, detect the user's daily activities; compared with the method of using only a single modality of data to detect the user's daily activities in the related art, the user's daily activities can be detected by combining multi-modal (multi-type) data such as each inertial measurement unit data sequence and RGB video data, which can greatly improve the detection precision and improve the accuracy of the detection.
[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for detecting user daily activities, characterized in that: include: Acquire RGB video data and multiple inertial measurement unit data sequences collected respectively within a preset time period; The inertial measurement unit data sequence includes: inertial measurement unit data respectively collected at multiple time points included in the preset time period; the inertial measurement unit data includes: acceleration, angular velocity and angular acceleration; Processing the plurality of inertial measurement unit data sequences to obtain a grayscale image of each of the plurality of inertial measurement unit data sequences; Sampling the RGB video data to obtain a plurality of sampling data frames; Based on the grayscale image of each of the inertial measurement unit data sequences and a plurality of sampling data frames, the user's daily activities are detected.
2. The method according to claim 1, characterized in that The processing of the plurality of inertial measurement unit data sequences to obtain a grayscale image of each of the plurality of inertial measurement unit data sequences comprises: Normalizing the inertial measurement unit data in each of the plurality of inertial measurement unit data sequences to obtain each of the inertial measurement unit data sequences after the normalization process; Performing polar coordinate conversion on each of the inertial measurement unit data sequences after normalization processing to obtain each of the inertial measurement unit data sequences under polar coordinates; Processing each of the inertial measurement unit data sequences in polar coordinates using a Gram angle field, projecting each of the inertial measurement unit data sequences into a two-dimensional space, and obtaining a two-dimensional matrix of each of the inertial measurement unit data sequences; The elements in the two-dimensional matrix of each of the inertial measurement unit data sequences are normalized to obtain a grayscale image of each of the inertial measurement unit data sequences.
3. The method according to claim 1, characterized in that: The step of sampling the RGB video data to obtain a plurality of sampling data frames includes: Dividing the RGB video data according to a preset duration to obtain a plurality of RGB video data segments; A video frame is respectively selected from each RGB video data segment in the multiple RGB video data segments as a sampling data frame of each RGB video data segment, thereby completing a sampling operation on the RGB video data and obtaining multiple sampling data frames.
4. The method according to claim 3, characterized in that The sampling data frames of each RGB video data segment respectively carry a timestamp; the grayscale images of each inertial measurement unit data sequence respectively carry multiple timestamps; The detecting of the user's daily activities based on the grayscale image of each inertial measurement unit data sequence and the plurality of sampling data frames comprises: Dividing the grayscale image of each of the inertial measurement unit data sequences according to the preset time length to obtain a plurality of grayscale sub-images of each of the inertial measurement unit data sequences; A data sampling time is obtained based on a timestamp carried in a sampling data frame of each RGB video data segment, and a partial image located within the data sampling time is extracted from different grayscale sub-images of each inertial measurement unit data sequence, and the extracted partial image from different grayscale sub-images of each inertial measurement unit data sequence is determined as a sampling image of different grayscale sub-images of each inertial measurement unit data sequence; wherein the sampling images of different grayscale sub-images in each inertial measurement unit data sequence respectively carry a timestamp; The user's daily activities are detected based on the sampled images of the different grayscale sub-images in each of the inertial measurement unit data sequences and the sampled data frames of each of the RGB video data segments.
5. The method according to claim 4, characterized in that Detecting the user's daily activities based on the sampled images of the different grayscale sub-images in the inertial measurement unit data sequences and the sampled data frames of the RGB video data segments, including: Inputting the sampled images of the different grayscale sub-images in each of the inertial measurement unit data sequences into a convolutional neural network capable of processing the different grayscale sub-images in each of the inertial measurement unit data sequences, respectively, to obtain the first feature vectors of the different grayscale sub-images in each of the inertial measurement unit data sequences; Inputting the sampled data frames of each of the RGB video data segments into a convolutional neural network capable of processing video data frames to obtain a second feature vector of the sampled data frames of each of the RGB video data segments; splicing first feature vectors obtained from sampling images of grayscale sub-images of the inertial measurement unit data sequences acquired at the same time in different grayscale sub-images in the inertial measurement unit data sequences and in the RGB video data segments and second feature vectors obtained from sampling data frames of the RGB video data segments to obtain a plurality of spliced feature vectors; Using an additive attention mechanism to process the multiple spliced feature vectors, respectively obtaining a weight value of each of the multiple spliced feature vectors; According to the weight values of the concatenated feature vectors, a weighted sum operation is performed on the concatenated feature vectors to obtain a recognition vector; The recognition vector is input into a classifier for detecting the user's daily activities to detect the user's daily activities.
6. A user daily activity detection device, characterized in that: include: An acquisition module, used to acquire RGB video data and multiple inertial measurement unit data sequences collected respectively within a preset time period; The inertial measurement unit data sequence includes: inertial measurement unit data respectively collected at multiple time points included in the preset time period; the inertial measurement unit data includes: acceleration, angular velocity and angular acceleration; A processing module, configured to process the plurality of inertial measurement unit data sequences to obtain a grayscale image of each of the plurality of inertial measurement unit data sequences; A sampling module, used for sampling the RGB video data to obtain a plurality of sampling data frames; The detection module is used to detect the user's daily activities based on the grayscale image of each inertial measurement unit data sequence and multiple sampling data frames.
7. The device according to claim 6, characterized in that The processing module is specifically used for: Normalizing the inertial measurement unit data in each of the plurality of inertial measurement unit data sequences to obtain each of the inertial measurement unit data sequences after the normalization process; Performing polar coordinate conversion on each of the inertial measurement unit data sequences after normalization processing to obtain each of the inertial measurement unit data sequences under polar coordinates; Processing each of the inertial measurement unit data sequences in polar coordinates using a Gram angle field, projecting each of the inertial measurement unit data sequences into a two-dimensional space, and obtaining a two-dimensional matrix of each of the inertial measurement unit data sequences; The elements in the two-dimensional matrix of each of the inertial measurement unit data sequences are normalized to obtain a grayscale image of each of the inertial measurement unit data sequences.
8. The device according to claim 6, characterized in that The sampling module is specifically used for: Dividing the RGB video data according to a preset duration to obtain a plurality of RGB video data segments; A video frame is respectively selected from each RGB video data segment in the multiple RGB video data segments as a sampling data frame of each RGB video data segment, thereby completing a sampling operation on the RGB video data and obtaining multiple sampling data frames.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are executed.
10. An electronic device, characterized in that: The electronic device includes a memory, a processor and one or more programs, wherein the one or more programs are stored in the memory and are configured so that the processor executes the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Living body detection method, electronic equipment, storage medium and computer program product
CN115841704A
Multi-modal gesture acquisition system and method
CN115904073A
