convertToDetections function
Implementation
List<Detection> convertToDetections(
List<double> rawBoxes,
List<Anchor> anchors,
List<double> detectionScores,
List<int> detectionClasses,
OptionsFace options) {
var _outputDetections = <Detection>[];
for (var i = 0; i < options.numBoxes; i++) {
if (detectionScores[i] < options.minScoreThresh) continue;
var boxOffset = 0;
var boxData = decodeBox(rawBoxes, i, anchors, options);
var detection = convertToDetection(
boxData[boxOffset + 0],
boxData[boxOffset + 1],
boxData[boxOffset + 2],
boxData[boxOffset + 3],
detectionScores[i],
detectionClasses[i],
options.flipVertically);
_outputDetections.add(detection);
}
return _outputDetections;
}