Deep learning video exercise classification

Sir, it is possible by using Matlab's deep learning model. We train through our desired video and later test it with another video. Please guide me on how it is possible.

6 Comments

Can you describe more what you wish to do? I'd start by looking at the deep learning in MATLAB page. There is also a page on deep learning with video. You have ThingSpeak tagged, but you cannot upload videos to ThingSpeak at present. Did you mean to involve ThingSpeak in your workflow?
Utpal Das
Utpal Das on 28 Sep 2022
Edited: Utpal Das on 28 Sep 2022
I want to check if the exercise is done correctly or not from my uploaded video. By applying some algorithm
Are you attempting to upload a video to ThingSpeak, or are you trying to use MATLAB in ThingSpeak to process your video?
Im trying to clarify if your question involves our IoT platform.
I am trying in MATLAB
Ok thanks, I rremoved the ThingSpeak tag to help other users. Good luck with your project.
Thank you for telling me about Thingspeak. Is there any possibilities to do with Thingspeak

Sign in to comment.

Answers (1)

There are variety of application you can do with deep learning. As per your question, the outcome that you want to achieve is not clear. I am assuming you want to classify by giving the video input as training. In supervised classification, I assume you have labeled video that you can use for training. You can extract the frames of a recorded video and then based on the extracted images, you can train your CNN model. Below is the code for how to extract frames from a recorded video file. The variable "all_frames" contains alll the frames present in a video. Use these frames to train your CNN model. The related documentation links are given below:
Once the training is complete, you can use the same code to extract images of a test video and predict your outcome using a trained model. Hope this helps.
P.S.: Use MATLAB R2016a or later.
vidObj = VideoReader('xylophone.mp4');
if contains(vidObj.VideoFormat, 'RGB')
% This is created if the video is of format RGB.
all_frames = zeros( vidObj.Height, vidObj.Width, 3, vidObj.NumFrames, 'uint8' );
else
% This is created if the video is of format grayscale.
all_frames = zeros( vidObj.Height, vidObj.Width, vidObj.NumFrames, 'uint8' );
end
ii = 1;
while( hasFrame( vidObj ) )
frame = readFrame( vidObj );
if length( size( all_frames ) ) == 4
all_frames(:, :, :, ii) = frame;
else
all_frames(:, :, ii) = frame;
end
ii = ii + 1;
end
imshow( all_frames( :, :, :, 1 ) ) % displaying 1st frame

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Products

Release

R2022a

Asked:

on 27 Sep 2022

Commented:

on 18 Oct 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!