Video Classification with a CNN-RNN Architecture | Human Activity Recognition

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Video Classification is the task of predicting a label that is relevant to the video.
    Github: github.com/Aar...
    Topics which I will cover in this Video Classification Tutorial are:
    Overview of Video Classification
    Steps to build our own Video Classification model
    Exploring the Video Classification dataset
    Training our Video Classification Model
    Evaluating our Video Classification Model
    #############################################
    In case of any query, You can comment or you can contact me at aarohisingla1987@gmail.com
    ############################################
    What are videos?
    Videos are a collection of images(frames) arranged in a specific order.
    In Image classification: we take images, use feature extractors (like convolutional neural networks or CNNs) to extract features from images, and then classify that image based on these extracted features. Video classification involves just one extra step.
    While performing Video classification:
    1- We first extract frames from the given video.
    2- use feature extractors (like convolutional neural networks or CNNs) to extract features from all the frames,
    3- Classify every frame based on these extracted features.
    Before we talk about Video Classification, let us first understand what is Human Activity Recognition?.
    The task of classifying or predicting the activity/action performed by someone is called Activity recognition.
    With the help of Video Classification models we can solve the problem of Human Activity Recognition.
    #VideoClassifier #VideoClassification #HumanActivityRecognition #CNN #RNN #AI #ComputerVision #DeepLearning #ArtificialIntelligence
    Join this channel to get access to perks:
    / @codewithaarohi

Комментарии • 136

  • @shekharkumar1902
    @shekharkumar1902 2 года назад +1

    Glad to see your video after many days. Thanks for uploading it Aarohi ji

  • @muhammadfahadmunir4428
    @muhammadfahadmunir4428 9 месяцев назад

    Thank you so much for creating such a clear and detailed video! Your effort and dedication truly shine through, and your content made our day. The way you presented the information was not only informative but also engaging. We appreciate the time and hard work you put into making this video, and it has undoubtedly added value to our understanding. Keep up the fantastic work, and we look forward to more insightful content from you in the future! 🌟

    • @CodeWithAarohi
      @CodeWithAarohi  9 месяцев назад

      Thank you for appreciating my work:) Glad my content is helpful! Keep watching 😊

  • @varagantimanjula3135
    @varagantimanjula3135 2 года назад +1

    Very informative mam...helpful video for video classification

  • @AishaGh
    @AishaGh 7 месяцев назад

    Thank you for this amazing video, very helpful♥♥

  • @Electro_words_with_sandhya
    @Electro_words_with_sandhya 6 месяцев назад +1

    nice explanation, will it work for deepfake videos ?

    • @CodeWithAarohi
      @CodeWithAarohi  6 месяцев назад +1

      Yes, video classification algorithms can be employed as part of a deepfake detection system. While deepfake generation typically involves the synthesis of realistic-looking videos, deepfake detection aims to distinguish between authentic and manipulated videos. Video classification algorithms can play a crucial role in this process by analyzing various characteristics and features of videos to determine their authenticity.

    • @Electro_words_with_sandhya
      @Electro_words_with_sandhya 6 месяцев назад

      @@CodeWithAarohi Thank you, I tried this, and it is giving better accuracy. Can you please help with get the accuracy and loss plot for the trained model, i am not able to get it.

  • @insharaaj8259
    @insharaaj8259 2 года назад

    Really Ma'am you are gem. Plz make video on real time pest detection.
    It will be a great project definitely.

  • @st-wh8wc
    @st-wh8wc 11 месяцев назад

    Than you for the video,To classify between sitting and walking, should we simply include videos within the respective classes?

  • @leonidas1983
    @leonidas1983 Год назад

    great explanation! thanks from online community

  • @patrycjabiryo1143
    @patrycjabiryo1143 2 года назад

    maam i know more from your YT than they taught me in 2years of CS

    • @CodeWithAarohi
      @CodeWithAarohi  2 года назад +1

      Glad to hear that. Keep watching and learning 😊

  • @sanjuchinni2164
    @sanjuchinni2164 2 месяца назад

    Aarohi i am working on ffcresnet with lstm for video classification i extracted features from train and test using ffcresnet but i struct at lstm getting error tensor mismatch between sequences and targets

  • @leonidas1983
    @leonidas1983 Год назад +1

    Your code is 100% functionally ¿How can I predict a specifically video instead of random one as you do on last line code "test_video = np.random.choice(test_df["video_name"].values.tolist())" ? Thanks

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +2

      specific_video_name = "YOUR_SPECIFIC_VIDEO_NAME"
      # Locate the specific video in the test_df dataframe
      video_row = test_df.loc[test_df["video_name"] == specific_video_name]
      # Extract the features for the specific video
      video_features = video_row.drop(columns=["video_name"]).values
      # Reshape the features (if needed) to match the model input shape
      video_features = video_features.reshape(1, -1) # Assuming the model expects a 2D array
      # Make predictions using the trained model
      predictions = model.predict(video_features)
      # Print or use the predictions as needed
      print(predictions)

  • @Red-dg9ed
    @Red-dg9ed 2 года назад

    perfect and thanks for share this

  • @hemasreejonnalagadda
    @hemasreejonnalagadda Год назад +1

    Mam I am getting error like "AttributeError: 'function' object has no attribute 'predict'..
    Please suggest me what to do..?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      The "AttributeError: 'function' object has no attribute 'predict'" error typically occurs when you are trying to call the "predict" method on a Python function object, rather than on a machine learning model.
      In Python, the "predict" method is a common method that is used by many machine learning models to make predictions based on input data. However, this method is not a built-in attribute of the Python function object, and it cannot be called on a function in the same way that it can be called on a machine learning model.
      To fix this error, you will need to make sure that you are calling the "predict" method on a machine learning model, rather than on a Python function. For example, if you have defined a machine learning model using the scikit-learn library, you can call the "predict" method on the model object, like this:
      Copy code
      from sklearn.linear_model import LinearRegression
      # Define the model
      model = LinearRegression()
      # Train the model on some data
      model.fit(X, y)
      # Make predictions using the model
      predictions = model.predict(X_new)
      In this code, the "predict" method is called on the "model" object, which is an instance of the LinearRegression class. This is the correct way to make predictions using a machine learning model in scikit-learn.
      If you are still getting the "AttributeError: 'function' object has no attribute 'predict'" error, it may be because you are trying to call the "predict" method on a Python function object, rather than on a machine learning model. In this case, you will need to make sure that you are calling the "predict" method on the correct object.

  • @user-qv4es6ks2h
    @user-qv4es6ks2h 9 месяцев назад

    mam can i classifier vibrational data from unvibrational in video using deep learning??

  • @jansirani6024
    @jansirani6024 Год назад

    thank you mam, can u pls tell how to load sensor data and image as input for human activity recognition

  • @iKnowThatSong
    @iKnowThatSong 4 месяца назад

    hello mam,
    how can i increase the accuracy?

  • @tareqbinahammed4047
    @tareqbinahammed4047 2 года назад

    Great lesson!
    Thanks a lot.

  • @NeerajSingh-ek5zi
    @NeerajSingh-ek5zi 2 года назад

    thanks for this very important topic

  • @chronologyofai672
    @chronologyofai672 2 года назад

    Thanks mam for uploading 👏👏👏👏 it is really helpfull if possible make an video on oversampling in deep learning best channel on yt

    • @CodeWithAarohi
      @CodeWithAarohi  2 года назад

      Noted. Will try to cover in my upcoming videos.

  • @pvtgcn8752
    @pvtgcn8752 Год назад

    Very Good

  • @noidentity3011
    @noidentity3011 2 года назад +1

    Mam, what is the time performance of such classifier?Suppose I want to predict dancing video segments for a 10 minute video (predicting time stamps from x second to y second as dancing),how long will model take to predict?

  • @Rajuyadav-vt1rd
    @Rajuyadav-vt1rd 2 года назад

    very nice explanation mam

  • @pengyuyang4789
    @pengyuyang4789 5 месяцев назад

    hi, what is this filepath = "./tmp/video_classifier" looks like? Thank you

  • @rakeshrb9103
    @rakeshrb9103 2 года назад

    Madam how to identify particular video what code is to be changed in inference module

  • @haze.8208
    @haze.8208 Год назад

    Amazing Mam,
    can you share your video datasets?
    or you using a open dataset ?
    thanks before

  • @patis.IA-AI
    @patis.IA-AI 14 дней назад

    Thanks

  • @codendesigning1197
    @codendesigning1197 2 года назад

    Great

  • @julia_in_tech
    @julia_in_tech Год назад

    Hi! thank you very much! I was wondering where can I download the dataset you used for this?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      You can prepare the dataset by downloading videos.

  • @vepamanintiraj3222
    @vepamanintiraj3222 6 месяцев назад

    ma'am where can we find the dataset for it

  • @akhilsharma392
    @akhilsharma392 2 месяца назад

    Mam can we do video classification using the image dataset

    • @CodeWithAarohi
      @CodeWithAarohi  2 месяца назад +1

      Image datasets lack temporal information, which is crucial for video classification. Videos are more than just a collection of frames; the order and timing of frames convey important information.

    • @akhilsharma392
      @akhilsharma392 2 месяца назад

      @@CodeWithAarohi thanks you mam

  • @mohanaph.d.csscholar3989
    @mohanaph.d.csscholar3989 2 года назад

    Thank you so much for uploading this amazing video mam. Could you pls guide me on how to recognize emotions from videos mam? I also checked your website link but the, unfortunately, the site has been blocked. Thank you so much mam

  • @diegobrito8048
    @diegobrito8048 2 года назад

    Thank for the video very intuitive explanation, I have a doubt I hope you can help me, In the first part with the CNN, the features vector has a size of 2048 for each image, and I understood that this represent the output of the CNN, so it means that each point of this vector represent a class of some object , for example a dog, cat, etcetera, if this work in that way, the size of the output must be 1000, because the InceptionV3 model is able to

    • @sanjuchinni2164
      @sanjuchinni2164 2 месяца назад

      No we remove classification layers of cnn and output of pool layer output as features to lstm for training

  • @kuldeepaher4937
    @kuldeepaher4937 2 года назад

    How do i provide custom weights in here??

  • @Kishi1969
    @Kishi1969 2 года назад

    Also where do you usually getting all the videos as well madam?

  • @mdabdullahalhasib2920
    @mdabdullahalhasib2920 Год назад

    Nice teaching. Could you tell me how you collect the dataset?

  • @DebugLifeTogether
    @DebugLifeTogether Год назад

    Hello mam, Thankyou for amazing video. Can you please guide me on how can I do activity detection for multiple person in a video. E.g. in a sports different players do different activities so how can I detect activity of each player's. Activity like defend, pass, save in football sports

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +2

      Activity recognition for multiple people in a video is a challenging task in computer vision. One approach to achieve this goal is to use a combination of deep learning and computer vision techniques.
      Here is a high-level overview of the steps you can take to implement activity recognition for multiple people in a video:
      Data collection: Gather a large dataset of annotated videos that contain multiple people performing different activities. The annotations should include the activity labels and the bounding boxes for each person in the video.
      Data preprocessing: Preprocess the data by extracting the frames from the videos, resizing them to a fixed size, and normalizing them.
      Object detection: Use an object detection algorithm to detect the people in each frame of the video. This can be achieved using popular algorithms such as YOLO, Faster R-CNN, or SSD.
      Person tracking: Use a person tracking algorithm to track each person across frames. This is necessary to keep track of each person's activities throughout the video.
      Activity recognition: Use a deep learning algorithm to classify the activities performed by each person. You can use popular deep learning models such as CNNs or RNNs, or a combination of both.
      Evaluation: Evaluate the performance of the model on a test dataset using metrics such as accuracy, precision, recall, and F1-score.

  • @sanjay_dutta
    @sanjay_dutta 3 месяца назад

    Hi Arohi, could you please provide me the dataset link here?

  • @PoojaKumari-ic7zh
    @PoojaKumari-ic7zh 2 года назад

    Thank you Mam for such amazing videos. Is there any possibility that we can connect your 2 works in one? You taught: How to do custom keypoint detection using detectron2. Is there any possibility that I can detect the action of a person using the output of detectron2 keypoint detection and LSTM?

  • @fadelazidan7731
    @fadelazidan7731 2 месяца назад

    ❤❤

  • @mellowdrag
    @mellowdrag 8 месяцев назад

    The model is unable to predict correct output with higher accuracy, it's always equal probabilities, that means the model is not really working. why? and how to fix?

    • @ghassanahwach1015
      @ghassanahwach1015 6 месяцев назад

      I asked myself the same question. Even in the video if you notice at the end, probabilities are very close to each other.

  • @kunaldeshmukh3378
    @kunaldeshmukh3378 Год назад

    .TF is not getting defined how should I resolved it

  • @sajibkhan6693
    @sajibkhan6693 2 года назад

    Thanks you maam...😍😍

  • @minhkhanhnguyen9123
    @minhkhanhnguyen9123 Год назад

    hi, May I ask what is the effect of such low accuracy?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Dataset is small. And trained it for very less epochs.

  • @serkanbcakc1289
    @serkanbcakc1289 Год назад

    Thanks for this great video. I have learnt a lot from the videos but ı have a problem. I cant download tensorflow, somehow. Is there a way that ı need to follow?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Create a separate environment of python and then install tensorflow

    • @serkanbcakc1289
      @serkanbcakc1289 Год назад

      @@CodeWithAarohi yes ı managed to come to a stage where ı can see the training were complete and ı saw the test accuracy which showed me 35 % yoga prediction. I had just downloaded like 20-30 videos at that time, so this percantage must be a healthy one. However, ı started to get some errors like "data_train is not defined" etc. I play with some unimportant numbers and ı saw it healed itself somehow. But right now when ı increased the number of videos to 180 it says "didnt improve" with this epoch thing. I deleted the videos but nothing has changed is it because it had already saved the results to weights or sth? I am sorry for my ignorance in python. This is the first time ı am using it but ı need to learn this activity recognition very soon.
      Let me clearly state my question here once more. When ı am in sequence model part it starts feeding.(ı suppose it is doing that) . İn epoch 1/30 it says val_loss improved from inf to 1.09728 but in 2/30 didnt improve. What is the possible reason for that?

  • @hukumsaini9864
    @hukumsaini9864 Год назад

    It is using body key points?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      In this video we are not working on keypoints

  • @nitinsharma8856
    @nitinsharma8856 2 года назад

    Ma'am can you please give me link for videos from where you have downloaded it .... Yoga excercise

  • @malshasamarakoon5337
    @malshasamarakoon5337 Год назад

    ❤💫

  • @saras1105
    @saras1105 2 года назад

    thank you so much..can we somehow have your dataset, I mean the videos that you used because in the github are only the csv files? thank you in advance

    • @CodeWithAarohi
      @CodeWithAarohi  2 года назад +1

      No, this dataset is not available. You can download videos from internet and put them in a folder as I explained in a video.

    • @saras1105
      @saras1105 2 года назад

      @@CodeWithAarohi Thank you very much for the response

  • @abudalahchambaga184
    @abudalahchambaga184 2 года назад

    thank you madam for such wonderful videos I used this I used the same code as yours at GitHub but i have accounts an error at a point of The sequence model "
    OverflowError: cannot convert float infinity to integer" error please if possible you can help me how to solve it please thanks

  • @sibelozlemgul2572
    @sibelozlemgul2572 9 месяцев назад

    Videos do not appear in the data set, how can I access them?

    • @CodeWithAarohi
      @CodeWithAarohi  9 месяцев назад

      Download the videos from internet.

    • @sibelozlemgul2572
      @sibelozlemgul2572 9 месяцев назад

      Can you tell me the links where I can download the videos?@@CodeWithAarohi

  • @AlyaaAhmedselim
    @AlyaaAhmedselim Год назад

    Thank you 👏👏👏

  • @missamiry9709
    @missamiry9709 Год назад

    Hi Mam, would you please share the link or give information about the dataset how could I find the dataset?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      You can prepare your dataset by downloading the small video clips related to your dataset. I have downloaded the clips form pixabay.com

  • @shaminemacwan1426
    @shaminemacwan1426 2 года назад

    Thankyou for the video. Can you please guide on how can we do activity detection for multiple people in a video. E.g. in a classroom different students do different activities so how can we detect activity of each student. This would be really helpful if one can help me here.

    • @CodeWithAarohi
      @CodeWithAarohi  2 года назад +1

      You need to prepare dataset for all the activities you want to detect and then can use this algorithm or you can use Object detection algorithms. For this you need to annotate the images of your dataset as per the chosen algorithm

    • @shaminemacwan1426
      @shaminemacwan1426 2 года назад

      @@CodeWithAarohi According to you which model will be better to go with. I want to do activity recognition on a video and for e.g. video can be of a classroom of students.

    • @masimmaqsood12
      @masimmaqsood12 Год назад

      @@shaminemacwan1426 Have you done that? If you done that I need your help.

    • @amelhawwal1906
      @amelhawwal1906 Год назад

      may I ask question ?

  • @viratfansforlife760
    @viratfansforlife760 7 месяцев назад

    OpenCV: Couldn't read video stream from file "test/dataset/test/yoga/production_id_3760884 (2160p).mp4". how to over come this problem

    • @booky6149
      @booky6149 7 месяцев назад

      If you are human, just read the error message then you will understand how to solve it.

  • @ivoryAlpaca
    @ivoryAlpaca Год назад

    Ma'am in my dataset of 700 videos on train and 800 on test why is it taking more than 20 minutes to predict?

  • @kashishvarshney2225
    @kashishvarshney2225 Год назад

    Can i build this model with image data
    Please anyone reply

  • @NeerajSingh-ek5zi
    @NeerajSingh-ek5zi 2 года назад

    i have an problem in prepare all videos() function .
    there is showing
    ValueError: could not broadcast input array from shape (2048,) into shape (30,)

    • @CodeWithAarohi
      @CodeWithAarohi  2 года назад

      This error is related to your output classes. Check if have mentioned the number of classes correctly.

    • @chethanningappa
      @chethanningappa 2 года назад

      @@CodeWithAarohi can you share this dataset?

  • @RAZZKIRAN
    @RAZZKIRAN 2 года назад

    thank you madam

  • @hukumsaini9864
    @hukumsaini9864 Год назад

    Hello, can u help me for my research work implementation of yoga estimation model . I m looking for a Deep learning expert like u.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Please mail me at aarohisingla1987@gmail.com to discuss further

  • @STST822
    @STST822 9 месяцев назад

    Would you help me in fake news detection project. i mailed to you.plz reply me ma'am. I am from Pakistan.

  • @squadgang1678
    @squadgang1678 2 года назад

    Can you make a same video on yolo + rnn please 🥺

    • @CodeWithAarohi
      @CodeWithAarohi  2 года назад

      Will try to do after finishing my pipelined videos

  • @fazluddinsaleh8377
    @fazluddinsaleh8377 11 месяцев назад

    miss how can get the dataset

    • @CodeWithAarohi
      @CodeWithAarohi  11 месяцев назад

      I have collected the videos from pixabay website

  • @chronovortex6495
    @chronovortex6495 Год назад

    Hello, can I get your tensorflow, CUDA and cuDNN versions? I'm getting an error saying that I don't have a kernel for some reason which is "Graph execution error: No OpKernel was registered to support Op 'CudunRNNV3'"

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      My tensorflow version is 2.6.0, cuda 11.2 and cudnn 8.1

  • @wasi17100
    @wasi17100 Год назад

    need slides

  • @serkanbcakc1289
    @serkanbcakc1289 Год назад

    the more ı learn about installing tensorflow the more ı understand it s a real pain in the ass.

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Try to setup a new python environment and then install the required packages. Otherwise you will mess up your other codes working

    • @serkanbcakc1289
      @serkanbcakc1289 Год назад

      Well ı solved this problem by working on a new computer. Somehow creating new environment doesnt work. It always happens to me when ı start to learn sth new. An error that noone would ever see in their life and ı start to think ı did sth wrong but no it was like because there was an impossible to solve error in an unrelated you would never ever think place.

  • @hubertyou0
    @hubertyou0 Год назад

    Imagine just reading out loud the simplest names of variables to define its action as its name and skip trough code reading out also some comments with no further explanations and throw some random not existing words to cast some confusion spells XD comedy park

    • @booky6149
      @booky6149 7 месяцев назад

      Who are you and what you have done?!

  • @cometolearn8598
    @cometolearn8598 Год назад

    JUST MAKE A ZIP OF UR VIDEOS THAT U HAVE AND GIVE IT IN THE DESCRIPTION IT IS NOT THE HARD LIKE I HAVE WASTED 5 HOURS FINDING A DATASET. LIKE WHENEVER SOME1 ASKS U UR LIKE: I DOWNLOADED IT FOR PEXA.WHATEVER JUST MAKE A ZIP

  • @Sumonms
    @Sumonms 2 года назад

    how can i improve accuracy madam?

    • @CodeWithAarohi
      @CodeWithAarohi  2 года назад

      There are various parameters to consider eg: 1) Your dataset quality 2) The hyper parameters you are using 3) Type of Model 4) Dataset Preprocessing etc.

    • @Sumonms
      @Sumonms 2 года назад

      @@CodeWithAarohi madam can i use pure cnn instead of rnn?