Classifying Validation Video Using Fine-Tuned Transfer Learning Network

2 vues (au cours des 30 derniers jours)
Matpar
Matpar le 23 Avr 2020
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);

Réponses (1)

Srivardhan Gadila
Srivardhan Gadila le 26 Avr 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.

Community Treasure Hunt

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

Start Hunting!

Translated by