Here’s how to normalize bounding box coordinates for TFLite object detection input:
Normalization:
Normalization scales coordinates to values between 0 and 1, making them independent of image dimensions. Bounding boxes are typically represented as [xmin, ymin, xmax, ymax], where:
xmin: Top-left corner’s x-coordinate
ymin: Top-left corner’s y-coordinate
xmax: Bottom-right corner’s x-coordinate
ymax: Bottom-right corner’s y-coordinate
Formula:
Divide each absolute coordinate by the corresponding image dimension: normalized_x = x_coordinate / image_width normalized_y = y_coordinate / image_height