convertToDetection function

Detection convertToDetection(
  1. double boxYMin,
  2. double boxXMin,
  3. double boxYMax,
  4. double boxXMax,
  5. double score,
  6. int classID,
  7. bool flipVertically,
)

Implementation

Detection convertToDetection(
  double boxYMin,
  double boxXMin,
  double boxYMax,
  double boxXMax,
  double score,
  int classID,
  bool flipVertically,
) {
  var _yMin = flipVertically ? 1.0 - boxYMax : boxYMin;
  var width = boxXMax;
  var height = boxYMax;

  return Detection(
    score,
    classID,
    boxXMin,
    _yMin,
    width,
    height,
  );
}