// This code is written at BigVision LLC. It is based on the OpenCV project. It is subject to the license terms in the LICENSE file found in this distribution and at http://opencv.org/license.html
// Runs the forward pass to get output of the output layers
vector<Mat>outs;
net.forward(outs,getOutputsNames(net));
// Remove the bounding boxes with low confidence
intnumDet=postprocess(frame,outs);
if(numDet==0&&parser.has("image")){
continue;
}
// Put efficiency information. The function getPerfProfile returns the overall time for inference(t) and the timings for each of the layers(in layersTimes)
autoret=postprocess(inFrame,outs);
// The function getPerfProfile returns the overall time for inference(t) and the timings for each of the layers(in layersTimes)
vector<double>layersTimes;
doublefreq=getTickFrequency()/1000;
doublet=net.getPerfProfile(layersTimes)/freq;
stringlabel=format("Inference time for a frame : %.2f ms",t);
// This code is written at BigVision LLC. It is based on the OpenCV project. It is subject to the license terms in the LICENSE file found in this distribution and at http://opencv.org/license.html
// Runs the forward pass to get output of the output layers
vector<Mat>outs;
net.forward(outs,getOutputsNames(net));
// Remove the bounding boxes with low confidence
intnumDet=postprocess(frame,outs);
if(numDet==0&&parser.has("image")){
continue;
}
// Put efficiency information. The function getPerfProfile returns the overall time for inference(t) and the timings for each of the layers(in layersTimes)
vector<double>layersTimes;
doublefreq=getTickFrequency()/1000;
doublet=net.getPerfProfile(layersTimes)/freq;
stringlabel=format("Inference time for a frame : %.2f ms",t);