Тёмный

TensorFlow 2.0 Tutorial for Beginners 14 - Human Activity Recognition using Accelerometer and CNN 

KGP Talkie
Подписаться 53 тыс.
Просмотров 68 тыс.
50% 1

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 142   
@timojeverett
@timojeverett 3 года назад
Thanks for putting this together, excellent clear introduction. I spent a little more time on the preprocessing of data and split the lines that had a missing newline so that there were two samples on each line and dealt with another couple of problems with the raw data. This resulted in about 3 times as much data over all (just over a million samples) and using your training model got an accuracy of 94% on test set after 13 epochs. Thank you again for the time you have put into making everything so clear.
@IgorAherne
@IgorAherne 5 лет назад
Thank you for these tutorials. Quite hard to find tf 2.0 videos right now, you are doing a great contribution
@KGPTalkie
@KGPTalkie 5 лет назад
Thank you so much for watching. Please watch other videos and share those. Thank you.
@Lucifer-en3xc
@Lucifer-en3xc 4 года назад
You mentioned to get the links from the description but they are not here!
@muhammadzubairbaloch3224
@muhammadzubairbaloch3224 5 лет назад
Sir the great. you are highly appreciate-able. I have no words to say thanks. Great lectures.
@nirranjanrasaratnam2996
@nirranjanrasaratnam2996 3 года назад
Brother Could you plz tell me how to use this trained model in real time?? I'm looking forward to hear from you. Thanks
@michalpesko5598
@michalpesko5598 8 месяцев назад
Great video, really helpful, thanks!
@Rikimkigsck
@Rikimkigsck 2 года назад
This video helped me a lot can't thank enough!
@chrisogonas
@chrisogonas 3 года назад
Great stuff, and thanks for putting this together.
@damilareadeyoyin4083
@damilareadeyoyin4083 Год назад
Great Video, how can we make predictions considering the train data has been reshaped
@khushboosoni19
@khushboosoni19 Год назад
Hello, thanks for this video. Would you suggest any videos on instance selection not feature selection?
@fahadraza7152
@fahadraza7152 3 года назад
Thank you for these tutorials.
@akashpawar9058
@akashpawar9058 5 лет назад
Another video has completed sir I saw cleaning and understanding data very typical Training data is very easy
@KGPTalkie
@KGPTalkie 5 лет назад
Happy to know 😊
@arunaslipnickas4405
@arunaslipnickas4405 5 лет назад
you should finish the code with lines to release the GPU memory. For instance: from numba import cuda cuda.select_device(0) cuda.close()
@KGPTalkie
@KGPTalkie 5 лет назад
Thanks for pointing it out.
@ishitagupta6369
@ishitagupta6369 4 года назад
Please share the architecture of the CNN model you have used
@YasinShah1
@YasinShah1 5 лет назад
great work. I really appreciate. very detailed and informative tutorial.
@KGPTalkie
@KGPTalkie 5 лет назад
Thank you so much Yasin ❤️
@riti1217
@riti1217 2 года назад
Can you please provide blog link The link that you provided is not working
@hammadalitariq7027
@hammadalitariq7027 3 года назад
Thankyou Sir, Can you instruct how to use this model to make predictions?
@ayoige7937
@ayoige7937 2 года назад
The frame segmentation method used, is that a sliding window or a fixed window technique.
@tyreesefranks6322
@tyreesefranks6322 4 года назад
Great video. Is there any chance you could explain in more detail your steps for input 50 (under the 2D CNN model heading). I can’t quite understand it
@akhaled4990
@akhaled4990 3 года назад
Brilliant video!
@Pxmuchim
@Pxmuchim Год назад
Hi! Thanks for the great video! Is there a way to integrate Gyroscope data together with Accelerometer data into the CNN in this video for Human Activity Recognition?
@bhaumikchaudhari1495
@bhaumikchaudhari1495 3 года назад
Sir after data preprocessing and train model then next how we detect human activity can you give code for demonstration of activity from video
@flamming_arrow
@flamming_arrow Год назад
It's very huge model. Reducing the size of x_train and x_test having no impact. What you suggest I do?
@Rikimkigsck
@Rikimkigsck 2 года назад
How can we fix "class_names = label.classes" in plot_confusion_matrix at 51:08 "labels = label.classes" doesn't work either
@muhammadhuzaifaasif7756
@muhammadhuzaifaasif7756 4 года назад
a veryyyyyyyyyyyyyyyyyy awesome tutorial
@chiduralalakshmigayathri5782
@chiduralalakshmigayathri5782 4 года назад
but your github link is showing page not found error
@gourabasis
@gourabasis 3 года назад
Nice video bro, are you able to integrate the model into android as tflite? And how do you handle the input size for the model in android studio?
@rarryabatol6196
@rarryabatol6196 4 года назад
Really good tutorial! How can I add gyroscope and magnetometer data into the training data set? should I add them as if they are additional "channels" like RGB channels for images?
@rasachin8592
@rasachin8592 3 года назад
Hey I'm trying to do the same too. I've two accelerometer data reading and not sure for to train the model.
@sodiqrafiu9072
@sodiqrafiu9072 4 года назад
Hello KGP Talkie, Thanks for always being there for us. Please, I need the dataset use in this project. I checked the link and I was unable to download it and it is also not available on your Github account. Thanks and Appreciate.
@KGPTalkie
@KGPTalkie 4 года назад
Dataset Link: www.cis.fordham.edu/wisdm/dataset.php
@mehdihazrati7731
@mehdihazrati7731 2 года назад
Thank you, it was great, but the link to your code doesn't work.
@mohammedshoeb1151
@mohammedshoeb1151 4 года назад
Great work.
@arunaslipnickas4405
@arunaslipnickas4405 5 лет назад
Good job.
@saicharankukudala2357
@saicharankukudala2357 4 года назад
Sir, is it Possible to get Good accuracy using Machine learning Models instead of Deep learning
@alphalimit8
@alphalimit8 5 лет назад
Maybe you can make a tutorial to test your model that is it exactly works in real implementation or not, maybe using android device to get accelero data, btw nice video keep it up!
@KGPTalkie
@KGPTalkie 5 лет назад
Thank you.
@muhammadzubairbaloch3224
@muhammadzubairbaloch3224 5 лет назад
Sir please make a video on brain tumor detection by using CNN
@KGPTalkie
@KGPTalkie 5 лет назад
I will try it sure 😊😊😊
@xuliu2010
@xuliu2010 2 года назад
Dear sir, Have you published any papers on this subject? I'd like to learn from it.
@Rikimkigsck
@Rikimkigsck 2 года назад
Why did you use 2D CNN but not 1D?
@sound2810
@sound2810 3 года назад
Thanks for the informative video. I tried to view your blog and code. But it's showing 503 error for past few days. Could u reupload the link.
@sohaibjawad3307
@sohaibjawad3307 4 года назад
Why is len(processedList) equals 343,416, when originally the number of examples is 1,098,207?
@shubhamgugale7691
@shubhamgugale7691 4 года назад
Can you please share the code for inference?
@RajaKumar-fz6jo
@RajaKumar-fz6jo 2 года назад
Where we can find code? Link given in discription is not opening
@jalaludinzakaria2949
@jalaludinzakaria2949 3 года назад
Hello sir, I would like to ask a few questions regarding this coding. def get_frames(df, frame_size, hop_size): N_FEATURES = 3 frames = [] labels = [] for i in range(0, len(df) - frame_size, hop_size): x = df['x'].values[i: i + frame_size] y = df['y'].values[i: i + frame_size] z = df['z'].values[i: i + frame_size] # Retrieve the most often used label in this segment label = stats.mode(df['label'][i: i + frame_size])[0][0] frames.append([x, y, z]) labels.append(label) # Bring the segments into a better shape frames = np.asarray(frames).reshape(-1, frame_size, N_FEATURES) labels = np.asarray(labels) return frames, labels X, y = get_frames(scaled_X, frame_size, hop_size) X.shape, y.shape ((532, 80, 3), (532,)) 1. The first thing I would like to ask is, is the value 532 means that it groups the data to read the first 532 samples ? I am a bit lost at your explanation there. Let say if I want the code to read the first 356 lines of my data ? My sampling rate is 0.1Hz and each data is 10second. How would I code that ? 2. What if my sampling rate, Fs is a floating number ? (0.1Hz) I would get an error that says "'float' object cannot be interpreted as an integer". How do i fix that ?
@subhamsabud5723
@subhamsabud5723 3 года назад
@ KGP talkie -- Can you please mention the IEEE reference paper related to this video.
@aninditasaha0307
@aninditasaha0307 3 года назад
Hi...can you help me to do the same CNN in UCIHAR dataset?
@陳廷威-m3c
@陳廷威-m3c 3 года назад
Very helpful
@mdjahidhasan513
@mdjahidhasan513 3 года назад
how can I test my custom data in this model?
@ashwaniprasad3613
@ashwaniprasad3613 3 года назад
the confusion matrix doesn't get printed in my case :(
@rushabhdayannavar3675
@rushabhdayannavar3675 2 года назад
I think there is no spatial relation in data, so why CNN ( convolution nn) ? You could have used fully connected nn. Plz anyone answer.
@KGPTalkie
@KGPTalkie 2 года назад
Hi, there are papers published on this topic which shows how effective it is. you can read this for better understanding of HAR mdpi-res.com/d_attachment/electronics/electronics-11-00322/article_deploy/electronics-11-00322-v2.pdf ieeexplore.ieee.org/document/7881728 iopscience.iop.org/article/10.1088/1757-899X/1031/1/012062/pdf
@maxwelllearning4923
@maxwelllearning4923 4 месяца назад
can you provide github link of this project?
@messaoudbessa5292
@messaoudbessa5292 4 года назад
Good evening, thank you for your amazing video, i want to ask you how shoudl i do to predict new data!?, it seems that i have problem. thank you
@kalppanwala6439
@kalppanwala6439 4 года назад
save the standard scaler and label encoder objects into .pickle file or in .json and when u have new data get new instance from the saved file and preprocess the data and predict it . Hope it helps !
@KGPTalkie
@KGPTalkie 4 года назад
Thanks for watching
@rohitsingh-wm1gv
@rohitsingh-wm1gv 4 года назад
@@kalppanwala6439 I dont understand, im getting errors when i import new data and apply get_frames functions
@kalppanwala6439
@kalppanwala6439 4 года назад
@@rohitsingh-wm1gv first get new data then call get frames func and use the returned data as ur feed data n if u r getting errors than check the shape of input data u r providing to the get frames func
@rohitsingh-wm1gv
@rohitsingh-wm1gv 4 года назад
@@kalppanwala6439 I have trained the model with my own data shape The test data has the same number of coloums except for the label I expect the trained model to tell me what the test data is Thats why i havent included it in the testdata
@ramanjaneyuluthanniru1428
@ramanjaneyuluthanniru1428 4 года назад
please provide the data set of WISDM..... we are unable to download it from original website
@fahadraza7152
@fahadraza7152 3 года назад
sir, please make tutorials on detect accelerometer data using an android device
@nafisatabassum227
@nafisatabassum227 3 года назад
I can't fine out data set link please give me data set link or say how to fine out data set ???
@tessa10001
@tessa10001 2 года назад
Please share the notebook link.
@mohammedtaherhabeeb3049
@mohammedtaherhabeeb3049 3 года назад
Hi can you help me to start this project ?!!
@icarofreitas6523
@icarofreitas6523 2 года назад
Thanks
@brownsquare77
@brownsquare77 11 месяцев назад
I failed to predict a label with trained model file. And I found an error. You seem to train [x1, x2, x3], [x4,x5,x6]... instead of training [x1, y1, z1], [x2,y2,z2]... Now I get 89% of prediction of random data. I can give you error-corrected code if you want.
@merzouklyza8800
@merzouklyza8800 6 месяцев назад
Pls can u share it with me
@jaehochoi8062
@jaehochoi8062 6 месяцев назад
@@merzouklyza8800 # start of original code in youtube def get_frames(df, frame_size, hop_size): N_FEATURES = 3 frames = [] labels = [] for i in range(0, len(df) - frame_size, hop_size): x = df['x'].values[i: i+frame_size] y = df['y'].values[i: i+frame_size] z = df['z'].values[i: i+frame_size] label = stats.mode(df['label'][i: i+frame_size])[0][0] frames.append([x,y,z]) labels.append(label) print('before reshape ', frames[0:10]) frames = np.asarray(frames).reshape(-1, frame_size, N_FEATURES) print('after reshape ', frames[0:10]) labels = np.asarray(labels) return frames, labels # end of original code in youtube # start of revised code def get_frames(df, frame_size, hop_size): N_FEATURES = 3 frames = [] labels = [] for i in range(0, len(df) - frame_size, hop_size): x = df['x'].values[i: i+frame_size] y = df['y'].values[i: i+frame_size] z = df['z'].values[i: i+frame_size] label = stats.mode(df['label'][i: i+frame_size])[0][0] frames.append([x,y,z]) labels.append(label) # hereafter added code newframes = [] k = 0 m = 0 for k in range(532): for m in range(80): newframes.append([frames[k][0][m], frames[k][1][m], frames[k][2][m]]) print(len(newframes)) # end of added code frames = np.asarray(newframes).reshape(-1, frame_size, N_FEATURES) labels = np.asarray(labels) return frames, labels # end of revised code
@jfabian
@jfabian 5 лет назад
Shouldnt this be done using OneHotEncoding instead of Label Encoding?
@KGPTalkie
@KGPTalkie 5 лет назад
Hi, this can be done in several ways. It is just a matter of preference. So this is just another way to do this. I am sure this lesson might have helped you. Thanks for watching ❤️.
@jfabian
@jfabian 5 лет назад
@@KGPTalkie yup. But for accuracy using the OHE instead of label encoding Is better. models tends to believe than a 2 or 3 is better than a 1.
@rohitsingh-wm1gv
@rohitsingh-wm1gv 4 года назад
@@jfabian bro im trying to using OHE but im getting error
@yashagarwal2486
@yashagarwal2486 4 года назад
output -variable are label encoded in multi-class classification and one hot encoded in multi-label classification. And always one hot encoded if it is input feature .
@MrSpiderboy7
@MrSpiderboy7 4 года назад
Only if they were input variables.
@maheshmishra9454
@maheshmishra9454 4 года назад
Can this be used to show a live demo of falling ???
@KGPTalkie
@KGPTalkie 4 года назад
Yes this can be used.
@khemant7067
@khemant7067 3 года назад
Can anyone pls tell me now how to use this build model. I have build this model successfully but how to give video input and how it will give output by predicting the Han action? Pls help
@sohamkatkar4535
@sohamkatkar4535 3 года назад
what if the dataset is in CSV format?
@abhijeet6989
@abhijeet6989 3 года назад
Dear Sir, Greetings!! Thank you very much for outstanding implementation. I implemented same model on hospital data and getting 98%training accuracy but validation accuracy is very low 54%. I am requesting your guidance for same. Should I run 1 D CNN model over it? Or you suggest anything to achieve high validation accuracy using same model? . Thank you very much!
@emna_belhaj
@emna_belhaj 2 года назад
Why have you used CNN and not RNN ?
@avastone9968
@avastone9968 4 года назад
How to test an unmarked data on your model?
@sonalyadav2487
@sonalyadav2487 4 года назад
Hello, In this tutorial after frame preparation if I want to extract features like mean or standard deviation on this dataset then how will I proceed .please help me in this.
@KGPTalkie
@KGPTalkie 4 года назад
use np.mean()
@sonalyadav2487
@sonalyadav2487 4 года назад
@@KGPTalkie thanks for the reply
@polassingha447
@polassingha447 4 года назад
what output show in this project
@abhijeet6989
@abhijeet6989 3 года назад
Dear Sir, Greetings!! Thank you very much for useful information. Can you please help me to know how to computer center of mass using left and right hand wrist gait data?
@vikaskumar-nk2yu
@vikaskumar-nk2yu 5 лет назад
make video on flowers recognigation
@KGPTalkie
@KGPTalkie 5 лет назад
I am really excited to make one on flower plant recognition. I will make one soon. Thanks for watching.
@Ceglasty9
@Ceglasty9 4 года назад
Where do i find the notebook link?
@rohitsingh-wm1gv
@rohitsingh-wm1gv 4 года назад
Hey sir Can I test with my own personal data I dont want it to predict I want it to classify
@KGPTalkie
@KGPTalkie 4 года назад
Thanks for watching. Yes you can test it with your data. Use preexisting data for training then use your data for prediction.
@rohitsingh-wm1gv
@rohitsingh-wm1gv 4 года назад
KGP Talkie I’ll do that thanks
@KGPTalkie
@KGPTalkie 4 года назад
Thanks ❤️
@filbertdaniel3276
@filbertdaniel3276 3 года назад
Link code is broken buddy may u renew the link for code?
@jaspreetkaur-yh1ve
@jaspreetkaur-yh1ve 4 года назад
sir, loads of respect to you. u r a lifesaver. is it possible to contact you regarding my project on human activity recognition using Rnn, lstm and gru?
@KGPTalkie
@KGPTalkie 4 года назад
Thanks for watching ❤️ 😍. Currently I am on leave.
@jenilgandhi9941
@jenilgandhi9941 4 года назад
bhai aapka github pe jo link hai vo khul hi nahi rahi hai repos delete kar diye hai kya??
@ankitkeshri6830
@ankitkeshri6830 4 года назад
Sir can I deploy this project in my smartphone or any device ? Is it possible to link this code to any device for further data integrations. How to do it sir????
@KGPTalkie
@KGPTalkie 4 года назад
Yes you can deploy it. Integrate it with Android Apps.
@ankitkeshri6830
@ankitkeshri6830 4 года назад
@@KGPTalkieUsing Android Studio ? How to do it sir any video link or website help??? This Is my final yr project and I don't know how to do it
@KGPTalkie
@KGPTalkie 4 года назад
Well. Of course you need to first make some Android Apps. Search on RU-vid you will get lots of good resources.
@ankitkeshri6830
@ankitkeshri6830 4 года назад
@@KGPTalkieThankyou so much sir !!!
@karthikkumar3878
@karthikkumar3878 4 года назад
I need base paper for u explained.
@nakulamate3558
@nakulamate3558 4 года назад
u used fit_transform but u mention previously it needs to be done for training u are doing it for full dataset why?
@nakulamate3558
@nakulamate3558 4 года назад
sorry i got it but why did u used 2d instead of 1d when data was not image
@MrSpiderboy7
@MrSpiderboy7 4 года назад
@@nakulamate3558 Data is 2D.. It has components in x, y and z. Its why he applied a reshape
@xuhans9748
@xuhans9748 4 года назад
Sir, May I know why do you need to reshape the X_train to (425, 80, 3, 1) at 40:40 ? I'm confused about the '1' added there. Thanks!
@md.hafizurrahman5590
@md.hafizurrahman5590 3 года назад
Bcz of Conv2D needs 3dims data to its input.
@uddhavn
@uddhavn 11 месяцев назад
how to fix error on line 38
@merzouklyza8800
@merzouklyza8800 6 месяцев назад
Are find a solution to fixe that plz ?
@Milan_Zavada
@Milan_Zavada 5 месяцев назад
@@merzouklyza8800 Hi, I've managed to fix a code. Here's a solution: def get_frames(df, frame_size, hop_size): N_FEATURES = 3 # Number of features (x, y, z) frames = [] labels = [] for i in range(0, len(df) - frame_size, hop_size): x = df['x'].values[i: i + frame_size] y = df['y'].values[i: i + frame_size] z = df['z'].values[i: i + frame_size] # Retrieve the most often used label in this segment window_labels = df['label'][i: i + frame_size] if len(window_labels) > 0: mode_label = stats.mode(window_labels) try: label = mode_label.mode[0] except IndexError: label = df['label'][i] # Fallback to the first label in the frame if mode is empty or invalid else: label = df['label'][i] # Fallback if window_labels is empty frames.append([x, y, z]) labels.append(label) # Reshape frames into the desired shape frames = np.asarray(frames).reshape(-1, frame_size, N_FEATURES) labels = np.asarray(labels) return frames, labels X, y = get_frames(scaled_X, frame_size, hop_size) # Check the shapes print(X.shape, y.shape)
@neerajvarshney9275
@neerajvarshney9275 4 года назад
Your github link is not working. please check once
@garvrathi6470
@garvrathi6470 Год назад
Brother can you share your github link for your code
@PratapO7O1
@PratapO7O1 3 года назад
video starts at 2:00
@ankur31100
@ankur31100 4 года назад
Sir GitHub link for downloading file is not working please provide.
@KGPTalkie
@KGPTalkie 4 года назад
Hi, This is in regard to the code file which you requested for different topics.I request you to please get enrolled yourself and show your support and love to KGP Talkie. All the code files and video lectures have lifetime access with 30 Days money back Guarantee. Code and question-answer support are also available at Udemy. Code files of RU-vid lectures will be also available once you register in this course. Please send an email to udemy@kgptalkie.com with your registration details of this course and a list of other code files that you want. I promise you to give FREE COUPONS for the next course on Deep Learning and ML. You can click on the link mentioned below and can get yourself enrolled!! bit.ly/udemy95off_kgptalkie New content is added at Udemy: 1. Animation Plot [2 lectures] 2. Python Coding in Mobile [5 lectures] 3. Complete EDA of Boston Dataset [20 lectures] What else we promise in this course 1. Kaggle data EDA 2. Text data EDA 3. More Animation Plot 4. More 3D plots 5. Figure Aesthetics and Decoration 6. Free coupons for next course 7. And so much more. Hurry up!!! Only for a limited time. Please email your details at udemy@kgptalkie.com for the FREE COUPONS of the next course.
@arjuns8072
@arjuns8072 4 года назад
Code is missing in github
@Lucifer-en3xc
@Lucifer-en3xc 4 года назад
Where are the code links?
@KGPTalkie
@KGPTalkie 4 года назад
Please follow along the video. Due to some technical issue codes are not available.
@Lucifer-en3xc
@Lucifer-en3xc 4 года назад
@@KGPTalkie Okay. It's a nice way to analyse this type of data without understanding about signal processing
@karthikkumar3878
@karthikkumar3878 4 года назад
mam i have error
@karthikkumar3878
@karthikkumar3878 4 года назад
I HAVE SOLVED MAM
@Sum-np9gk
@Sum-np9gk 5 месяцев назад
--------------------------------------------------------------------------- IndexError Traceback (most recent call last) Cell In[147], line 23 19 labels = np.asarray(labels) 21 return frames, labels ---> 23 X, y = get_frames(scaled_X, frame_size, hop_size) 25 X.shape, y.shape Cell In[147], line 13, in get_frames(df, frame_size, hop_size) 10 z = df['z'].values[i: i + frame_size] 12 # Retrieve the most often used label in this segment ---> 13 label = stats.mode(df['label'][i: i + frame_size])[0][0] 14 frames.append([x, y, z]) 15 labels.append(label) IndexError: invalid index to scalar variable. sir I am getting this error,help me sir
@ankitaparashar2816
@ankitaparashar2816 3 года назад
Hi, very nice article. Explained very clearly. Can you share the notebook link or the blog link. This link - kgptalkie.com/human-activity-recognition-using-accelerometer-data/ is not working
@shivanigiri4308
@shivanigiri4308 3 года назад
Thank you so much . Doing great work . Keep it up
Далее
Paint Projects
00:17
Просмотров 2,3 млн
Ребенок по калькуляции 😂
00:32
Кольцо Всевластия от Samsung
01:00
Просмотров 377 тыс.
Solving real world data science tasks with Python Pandas!
1:26:07
ML Was Hard Until I Learned These 5 Secrets!
13:11
Просмотров 327 тыс.
Paint Projects
00:17
Просмотров 2,3 млн