Skip to content

Instantly share code, notes, and snippets.

@microcoder-py
Created March 7, 2022 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save microcoder-py/a088d5840e0ab55a1ecc2cc9062953b0 to your computer and use it in GitHub Desktop.
Save microcoder-py/a088d5840e0ab55a1ecc2cc9062953b0 to your computer and use it in GitHub Desktop.
def normalize_bbox(bbox, width, height):
return [
int(1000 * (bbox[0] / width)),
int(1000 * (bbox[1] / height)),
int(1000 * (bbox[2] / width)),
int(1000 * (bbox[3] / height)),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment