Skip to content

Instantly share code, notes, and snippets.

@xellDart
Created August 16, 2020 21:53
Show Gist options
  • Save xellDart/e511994c6b05f5bbe922cc00e58e23cb to your computer and use it in GitHub Desktop.
Save xellDart/e511994c6b05f5bbe922cc00e58e23cb to your computer and use it in GitHub Desktop.
Detection convertToDetection(double boxYMin, double boxXMin, double boxYMax,
double boxXMax, double score, int classID, bool flipVertically) {
double _yMin;
if (flipVertically)
_yMin = 1.0 - boxYMax;
else
_yMin = boxYMin;
return new Detection(score, classID, boxXMin, _yMin, (boxXMax - boxXMin),
(boxXMax - boxYMin));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment