Classifying Validation Video Using Fine-Tuned Transfer Learning Network

1 visualizzazione (ultimi 30 giorni)
Hi All,
I am trying to Validate my network using the code below but the centerCrop variable is not being recognised!
Can someone guide me here, please? And thank you in advance for your guidance!
Is there another function that is required instead of the centerCrop? Please guide me! and thank you!
filename1 = "Shoot2.avi";
video = readVideo(filename1);
numFrames = size(video,4);
figure
for i = 1:numFrames
frame = video(:,:,:,i);
imshow(frame/255);
drawnow
end
%% Classifying Validation Images Using Fine-Tuned Transfer Learning Network.
video = centerCrop(video,inputSize);
YPred = classify(net,{video})
%%%%%%%%%%%%%%%%%%%%%% ERROR %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Unrecognized function or variable 'centerCrop'.
Error in Test6 (line 223)
video = centerCrop(video,inputSize);

Risposte (1)

Srivardhan Gadila
Srivardhan Gadila il 26 Apr 2020
I think the function centerCrop you are using is an helper function from the example Classify Videos Using Deep Learning.
Since the helper function would be in the example directory where the example Classify Videos Using Deep Learning is present, I would suggest you to create the function with name centerCrop with the code used in the helper function from the above examlpe in your current working directory or copy the helper function file to your current working directory.

Categorie

Scopri di più su Image Data Workflows in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by