• Tidak ada hasil yang ditemukan

Human Activity Recognition Using Smartphone

N/A
N/A
Protected

Academic year: 2023

Membagikan "Human Activity Recognition Using Smartphone"

Copied!
51
0
0

Teks penuh

Shahriar Tasjid ID No. and Singnuching Marma, ID No. of the Department of Computer Science and Engineering, Daffodil International University, have been accepted as satisfactory in partial fulfillment of the requirements for the degree of B.Sc. Department of Computer Science and Engineering Faculty of Natural Sciences and Information Technology Påskelilje International University. We hereby declare that this project has been carried out by us under the supervision of Mr.

We also declare that neither this project nor any part of this project has been submitted elsewhere for the award of any degree or diploma. This project could be completed with his patience, scholarly guidance, relentless motivation, persistent and energetic supervision, constructive criticism, helpful advice, reading many inferior drafts and correcting them at every moment. Thus, we have shown that with a larger number of sensors and data collection points, it is possible to recognize a wide range of activities and increase accuracy.

Then finally we showed that by combining all the sensors and the data of the pocket, the wrist, we can recognize those activities accurately and thus, a wide range of activities can be recognized accurately.

INTRODUCTION

  • INTRODUCTION
  • MOTIVATION
  • RATIONALE OF THE STUDY
  • RESEARCH QUESTION
  • EXPECTED OUTPUT
  • PROJECT MANAGEMENT AND FINANCE
  • REPORT LAYOUT

Our main focus is to develop a model that can accurately detect human activities and prove that by using multiple data collection points from different parts of the body, we can increase the accuracy and a wide range of activities with similarities in body movements can be accurately recognized. In our work, we claimed that we can recognize more activities that are complex and similar in action if we increase the data collection points from the human body. But our claim is more the data collection point for example hand, pocket, leg, neck etc.

We used Wrist and Pocket as data collection point and used accelerometer and gyroscope data in both devices to collect data. In this research project, our expected result is a model with higher accuracy, although some of them are very similar in function and body movement. Then, the next chapter contains terminologies, related works, benchmarking and summary, problem scope and challenges.

Fifth chapter consists of Societal Impact, Environmental Impact, Ethical Aspects, Sustainability Plan, and the last chapter includes Summary of the Study, Conclusions and Implication for Further Study.

BACKGROUND

  • TERMINOLOGIES
  • RELATED WORKS
  • COMPARATIVE ANALYSIS AND SUMMARY
  • SCOPE OF THE PROBLEM
  • CHALLENGES

Data can be images, videos within an observed space or data can be collected from sensors such as accelerometer, gyroscope, GPS etc. By combining the three axes, an accelerometer can also measure the angle of inclination that a device has with respect to the ground. The more data given, the better the machine learns in most cases.

Most work has been done on accelerometer data taken from the waist or wrist. They reduced the complexity of the data set by merging the data collected from the leg and waist. In this way they overcame the problem of needing strong displacement of the sensors for the HMM model to work well.

What we did is that instead of analyzing the data from the accelerometer and gyroscope separately, we treated both sensors as features and trained our model from that data. To make the data more meaningful to our model, we added gyroscope data to the accelerometer. We have come to a conclusion from the previous works that adding gyroscope data to the accelerometer increases the accuracy of models built from the data collected from the center.

And when another device is added to the wrist and its data is added along with the data from the waist, the model can detect a wide range of activities because the machine learning models get more features that interpret the activities very well. Our work also proves this: when gyroscope data is added, the models perform better than the accelerometer data alone. We encountered many problems while annotating the data because the sampling rate of the sensors is very fast and we had to label the data without errors.

We had to be careful when joining the data for wrists and waists that match the same rows, as they appear for specific tasks like riding a bike or driving a car. Another challenge was to match the frequency of the two devices placed at the waist and wrist.

Table 2: Comparative Analysis and Summary of different approaches made to detect human activity
Table 2: Comparative Analysis and Summary of different approaches made to detect human activity

RESEARCH METHODOLOGY

  • RESEARCH SUBJECT AND INSTRUMENT
  • DATA COLLECTION PROCEDURE
  • STATISTICAL ANALYSIS
  • PROPOSED METHODOLOGY
  • IMPLEMENTATION REQUIREMENTS

Then we merged all the csv files into one to get our complete data set. After partitioning the dataset, we have implemented feature scaling on our dataset to bring all data points into a specific range. Since we have time series data, we had to create a window also known as filter size from the dataset to implement deep learning algorithms.

Using this algorithm we have trained our training data where the coefficient associated with the input value is learned from the training data. After that we calculated the Euclidean distance between the test point and our trained nearest neighbor K. Then we calculated the distance for all data points and selected the closest example based on the minimum distance.

We also have our own confusion matrix where we can measure the performance of our KNN model. After completing ensemble learning from the training dataset, we applied our Random Forest Tree model to the test dataset where we achieved 95.8% accuracy. Here, we have the confusion matrix to measure the performance of our trained model on the test dataset.

Using this algorithm we found several possible hyperplanes with different margins between data points. We then maximized the margin between the support vector and the hyperplane to get a maximum plane. This is the last supervised traditional machine learning algorithm we implemented to recognize the activities.

We trained our CNN model on the training database and then applied this model to the test data. We have implemented our latest algorithm called Long Short Term Memory, which is a type of recurrent neural network. Since we have sequential data, this algorithm has performed better than other algorithms we have implemented.

By implementing two-way LSTM, we achieved 99.3% accuracy on our test data set, which is the highest accuracy among all our implemented algorithms.

Figure 1: Comparative visualization of Accelerometer and Gyroscope data points in different activities
Figure 1: Comparative visualization of Accelerometer and Gyroscope data points in different activities

EXPERIMENTAL RESULTS AND DISCUSSION

EXPERIMENTAL SETUP

EXPERIMENTAL RESULTS AND ANALYSIS

When we try to recognize human activities from accelerometer and gyroscope sensor data from the device placed on the wrist, the models do not perform very well. So it is clear that although some activity was detected quite accurately, as the upper bound f1 score is 0.99, but to detect some activities, CNN struggled. When using the accelerometer and gyroscope data from a device placed in the pocket, we can see in Table 4, most of the algorithms perform well and reach 96% to 97% accuracy.

To accurately predict different activities, data from the wallet alone is not sufficient here. Using only accelerometer data (Table 5) from two devices placed in the pocket and wrist does not improve the models at all. But what we want is to detect all activities with the least margin of error.

Table 5: Using only accelerometer data. Device Location: Wrist and pocket
Table 5: Using only accelerometer data. Device Location: Wrist and pocket

DISCUSSION

After completing all possible analysis, we realized that there can be different results depending on how data is collected, sensors are chosen and methods are implemented. It has been proven that increasing the number of sensor devices can increase the likelihood of better results. On the other hand, we implemented both machine learning and deep learning models in our experiment.

We have seen that deep learning models, specifically, bidirectional long short-term memory (LSTM) have the highest accuracy of 99.3%. But only Support Vector Machine (SVM) has given the best accuracy of 96.7% among all machine learning algorithms.

IMPACT ON SOCIETY, ENVIRONMENT AND SUSTAINABILITY

  • IMPACT ON SOCIETY
  • IMPACT ON ENVIRONMENT
  • ETHICAL ASPECTS
  • SUSTAINABILITY PLAN

We can integrate this model with IoT based devices and also be able to monitor toddlers. It is also possible to monitor the members' activity in a home and analyze their lifestyle pattern. In this way, we can find out a lot of useful information about their health and behavior.

But as technology improves, sensors become more efficient in terms of energy consumption and smart devices become bigger and more efficient every day. So we hope that this problem will be solved in the future and that our project will have its full impact. We need to let them know how much information and what kind of information we collect and why.

Recognizing human activity is a very important task that has many important implications for the health care system and safety for the elderly and young children. It is not yet revealed how this will benefit us with the advancement of technology. Our goal is to detect a wide range of activities with the help of two data points which are wrist and pocket.

From these two data collection points, we can discover almost all activities that will benefit us greatly.

SUMMARY, CONCLUSION, RECOMMENDATION, AND IMPLICATION FOR FUTURE RESEARCH

SUMMARY OF THE STUDY

So we have put two smartphones with accelerometer and gyroscope, one in the wrist and another in the pocket. Logistic Regression, K-Nearest Neighbors, Random Forest Tree, Support Vector Machine (SVM), 2D Convolutional Neural Networks (CNN) and Bi-Directional Short-Term Memory (Bi-LSTM) were applied to our dataset . We will add more activities and also try to explore more deep learning algorithms or CNN architecture to increase the performance of our model.

CONCLUSION

IMPLICATION FOR FURTHER STUDY

Gambar

Table 1: Project Management and Timeline
Table 2: Comparative Analysis and Summary of different approaches made to detect human activity
Figure 1: Comparative visualization of Accelerometer and Gyroscope data points in different activities
Figure  2:  Views  from  different  angles  of  Accelerometer  data  recorded  from  the  waist  (pocket)  of  8  activities together
+7

Referensi

Dokumen terkait

Transposon Systems two major classes of mobile DNA elements: Retrotransposons and DNA transposons  have been used for gene therapy transposons for gene therapy: mostly