Hi
when I try this code function the deployment processed successfully
function yolo2detectobject()
%#codegen
%Copyright 2019 - 2019 The MathWorks, Inc.
%Load the pre-trained Fire and Smoke detection network
persistent yolov2Obj;
if isempty(yolov2Obj)
yolov2Obj = coder.loadDeepLearningNetwork(âdetectorYolo2.matâ);
end
hwobj = jetson;
w = camera(hwobj,âvi-output, imx219 6-0010â,[1280 720]);
d = imageDisplay(hwobj);
for k = 1:1800
% Capture the image from the webcam on hardware.
I = snapshot(w);
I=imresize(I,[640 480]);
% Run the detector on the input test image
[bboxes, scores, ~] = detect(yolov2Obj, I,'Threshold',0.5);
% Insert bounding box to test image
I = insertObjectAnnotation(I, 'rectangle', bboxes, scores);
% Display output on the target monitor
image(d, I);
end
end
But when I made this code by adding functions for frame per second measurement I got deployment failed
function yolo2detectobject()
%#codegen
%Copyright 2019 - 2019 The MathWorks, Inc.
%Load the pre-trained Fire and Smoke detection network
persistent yolov2Obj;
if isempty(yolov2Obj)
yolov2Obj = coder.loadDeepLearningNetwork(âdetectorYolo2.matâ);
end
hwobj = jetson;
w = camera(hwobj,âvi-output, imx219 6-0010â,[1280 720]);
d = imageDisplay(hwobj);
for k = 1:1800
% Capture the image from the webcam on hardware.
I = snapshot(w);
I=imresize(I,[640 480]);
fps = 0;
avgfps = ;
tic;
% Run the detector on the input test image
[bboxes, scores, ~] = detect(yolov2Obj, I,âThresholdâ,0.5);
newt = toc;
% fps
fps = .9fps + .1(1/newt);
avgfps = [avgfps, fps]; %#ok<NASGU,AGROW>
% Insert bounding box to test image
if isempty(scores) == 0
I = insertObjectAnnotation(I, 'rectangle', bboxes, scores);
I = insertText(I , [1, 1], sprintf('FPS %2.2f', fps));
end
% Display output on the target monitor
I = insertText(I , [1, 1], sprintf('FPS %2.2f', fps));
image(d, I);
I am looking that when I run this command and file yolo2detectobject.elf which streaming from raspi camera I want to way how to measure the frame rate
jetsonnano3@jetsonnano3-desktop:~/remoteBuildTest/MATLAB_ws/R2019b/C/Users/Abdussalam/Desktop/Train_R-CNN_SmokeDetector10$ ./yolo2detectobject.elf