Classifying Validation Video Using Fine-Tuned Transfer Learning Network
显示 更早的评论
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);
回答(1 个)
Srivardhan Gadila
2020-4-26
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!