Hi, How do I resize a video to satisfy google net's size input layer ?
2 ビュー (過去 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!