Skip to content

Commit

Permalink
bugfix: Clamp object detection bounding percentages between 0 and 1
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithKyrian committed Apr 10, 2024
1 parent 55d004a commit 1b70c0b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Processors/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public static function postProcessObjectDetection(ObjectDetectionOutput $outputs

// convert to [x0, y0, x1, y1] format
$box = self::centerToCornersFormat($box);
dump($box);

if ($targetSize !== null) {
$box = array_map(fn($x, $i) => $x * $targetSize[($i + 1) % 2], $box, array_keys($box));
Expand All @@ -103,8 +102,6 @@ public static function postProcessObjectDetection(ObjectDetectionOutput $outputs
}

}
dd('eait');

$toReturn[] = $info;
}
return $toReturn;
Expand Down

0 comments on commit 1b70c0b

Please sign in to comment.