MATLAB Answers

Measuring the power consumption and memory usage of cpu

조회 수: 11(최근 30일)
Abdussalam Elhanashi
Abdussalam Elhanashi 11 Dec 2019
Hi Guys
I am looking if it possible to measure the power consumption and memory usage of cpu by usiung this code for R-CNN detector in Matlab
clear
clc
load('Detector.mat');
vidReader = VideoReader('vs_014_00.avi');
vidPlayer = vision.DeployableVideoPlayer;
i = 1;
results = struct('Boxes',[],'Scores',[]);
while(hasFrame(vidReader))
% GET DATA
I = readFrame(vidReader);
% PROCESS
[bboxes, scores] = detect(detector,I,'Threshold',1);
% Select strongest detection
[~,idx] = max(scores);
results(i).Boxes = bboxes;
results(i).Scores = scores;
% VISUALIZE
annotation = sprintf('%s , (Confidence = %f)',detector.ModelName,scores(idx));
I = insertObjectAnnotation(I,'rectangle',bboxes(idx,:),annotation);
step(vidPlayer,I);
i = i+1;
end
results = struct2table(results);
release(vidPlayer);

답변(0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by