fr: add more casts

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-03-22 17:47:49 -07:00
parent e38d208067
commit 473eb0a17e
1 changed files with 4 additions and 4 deletions

View File

@ -54,10 +54,10 @@ class PeopleFaceRecognitionController extends GenericClusterController
{
// Convert to recognize format (percentage position-size)
foreach ($photos as &$p) {
$p['x'] = (float) $p['x'] / $p['image_width'];
$p['y'] = (float) $p['y'] / $p['image_height'];
$p['width'] = (float) $p['width'] / $p['image_width'];
$p['height'] = (float) $p['height'] / $p['image_height'];
$p['x'] = (float) $p['x'] / (float) $p['image_width'];
$p['y'] = (float) $p['y'] / (float) $p['image_height'];
$p['width'] = (float) $p['width'] / (float) $p['image_width'];
$p['height'] = (float) $p['height'] / (float) $p['image_height'];
}
$this->sortByScores($photos);