How to video classification using feature extraction

3 Ansichten (letzte 30 Tage)
Kong
Kong am 27 Mär. 2020
Kommentiert: Ramesh M am 25 Mär. 2021
Hello. I want to classify videos using several feature extraction.
I used HOG(histogram of oriented gradients), optical flow as feature extraction.
However, the accuracy of classification is not good. just 60% accuracy.
Could you give some ideas to improve accuracy?
This code is using HOG.
clear all
close all
%// read the video:
list = dir('*.avi')
% loop through the filenames in the list
for k = 1:length(list)
reader = VideoReader(list(k).name);
vid = {};
while hasFrame(reader)
vid{end+1} = readFrame(reader);
end
for i=1:25
fIdx(i) = i; %// do it for frame 1 ~ 60
frameGray{i} = rgb2gray(vid{fIdx(i)});
[featureVector{i},hogVisualization{i}] = extractHOGFeatures(frameGray{i});
end
end
X = cell2mat(featureVector');
  2 Kommentare
Kenta
Kenta am 28 Mär. 2020
related to your question, a video classification with CNN and LSTM would be very effective.
Pls find the example code below.
Ramesh M
Ramesh M am 25 Mär. 2021
But in this above document with CNN and LSTM have error on activation function.
Kindly giev me solution

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Shishir Singhal
Shishir Singhal am 9 Apr. 2020
For video classification, you can use CNN for extracting spatial features. CNN is capable to extract deep features that HOG and other handcrafted feature extraction techniques might not be albe to. Use LSTM for capturing temporal features beacause you also need to have some sequential information between frames in a video.
You can read about CNN and LSTM in links here :

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by