Traditional human activity recognition (HAR) based on time series adopts sliding window analysis method. This method faces the multi-class window problem which mistakenly labels different classes of sampling points within a window as a class. In this paper, a HAR algorithm based on U-Net is proposed to perform activity labeling and prediction at each sampling point. The activity data of the triaxial accelerometer is mapped into an image with the single pixel column and multi-channel which is input into the U-Net network for training and recognition. Our proposal can complete the pixellevel gesture recognition function. The method does not need manual feature extraction and can effectively identify short-term behaviors in long-term activity sequences. We collected the Sanitation dataset and tested the proposed scheme with four open data sets. The experimental results show that compared with Support Vector Machine (SVM), k-Nearest Neighbor (kNN), Decision Tree(DT), Quadratic Discriminant Analysis (QDA), Convolutional Neural Network (CNN) and Fully Convolutional Networks (FCN) methods, our proposal has the highest accuracy and F1-socre in each dataset, and has stable performance and high robustness. At the same time, after the U-Net has finished training, our proposal can achieve fast enough recognition speed.
IntroductionHuman activity recognition (HAR) is the key technology of human-computer interaction and human activity analysis. The basic task of HAR is to select the appropriate sensor and deploy it to monitor and capture the user's activity [1] . HAR can be divided into two categories. The first one is video-based HAR, using video cameras to monitor the activity of the human body. Another is sensor-based HAR, which is based on time series data collected by sensors such as mobile phone built-in accelerometers [2][3][4] , wrist-worn accelerometers [5][6][7] , waist-mounted accelerometers [8][9] , gyroscopes and magnetometers [10] . Due to the wide use of portable and wearable sensors with low cost, low power consumption, high capacity and miniaturization, HAR based on sensor data has become a research hotspot. The HAR system can be used in human-computer interaction application [11] , behavior monitoring [12][13] , health monitoring [14] , smart home [15] , medical care [16][17] and so on.Data collected from portable and wearable sensors are usually time series data. Human activity recognition for time series is a complex process, which usually involves the following steps. First, preprocess the time series data such as smoothing, normalization [6] , and separating gravity component [18] from acceleration data. Then segment the