- Data Preprocessing: Load the video files using "VideoReader" to read the video files into MATLAB. You can use "dir" to get a list of files in the fast and break subfolders. You can label the videos as fast or break based on the folder they are in. You can use "imageDataStore" for this purpose.
- Feature Extraction: Preprocess the videos to a fixed size and format. You can use "imresize" to resize the frames, and "rgb2gray" to convert them to grayscale if needed. Extract relevant features from the video frames. You can use techniques like optical flow, frame differencing, or extracting statistical features from the frames.
- Model Building: Consider using a pre-trained model for feature extraction. You can use a pre-trained CNN model like ResNet or VGG and remove the fully connected layers to extract features. Build a model architecture suitable for video classification. You might consider using 3D convolutional neural networks (3D CNNs) which can handle spatiotemporal data.
- Training: Use data augmentation techniques to increase the diversity of your training data. MATLAB provides functions like "augmentedImageDatastore" for this purpose. Train your model using the preprocessed videos. You can use "trainNetwork" function to train your model.
- Evaluation: Evaluate the model's performance using a separate validation set. You can use the "classify" function to classify new videos and compare the results with ground truth labels.
How do I Input Videos into the Deep Network Designer
2 views (last 30 days)
Show older comments
I have a Deep Learning project for a class where I have to create a model that inputs 1.5 second videos (.mp4 files) of a baseball pitcher throwing pitches and it classifies wheather the pitch thrown is a fastball or a breaking ball. I have data stored in a folder with fast and break subfolders of those .mp4 files. Does anyone have any tips on where to start in creating the model mainly in starting to get a training session by inputiing these video files. Any help would be appretiated!
0 Comments
Accepted Answer
Pratyush
on 20 Nov 2023
Hi Roman,
I understand that you want to build a Deep Learning Model to classify the pitches into fastball or breaking ball.
You can use the following steps to create a model for classifying the pitches:
These are the general steps to get you started with your project. Hope it helps.
More Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!