Hi, How do I resize a video to satisfy google net's size input layer ?
3 次查看(过去 30 天)
显示 更早的评论
I am currently doing a project whereby I have to detect vehicles using googlenet but I need to resize the size of the video for that. Anyone is able to help?
4 个评论
Guillaume
2018-7-18
I have tried imresize but it still doesn't work
imresize works. So if it still doesn't work it's because you've done something wrong. However, since you haven't shown use what you've done we can't tell you what you've done wrong.
As far as I know the googlenet interface does not take videos anyway, so you'd have to pass it each frame of the video.
回答(2 个)
Diwakar Ravichandran
2018-7-18
Hi Syafiqah,
This is a question that was already answered on MATLAB answers. This should give you some headway for your problem. This is the link to the answer.
Hope this helps
Cheers!
0 个评论
Guillaume
2018-7-18
Are you willing to clarify about "pass it each frame of the video."
Your question is puzzling since at first glance you're doing the right thing in the 2nd half of your code. Yet, the first half of your code is nonsense.
The classification should be done similarly to the 2nd half. Something similar to:
trafficVid = VideoReader('C:\Users\syafiqah\Desktop\project\traffic.mp4');
for k = 1:trafficVid.NumberOfFrames %or use while trafficVid.HasFrame
label = classify(net, imresize(trafficis.readFrame, net.Layers(1).Inputsize)); %get image, resize and pass to classifier
%...
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!