kaylode / theseus

General template for most Pytorch projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError: Expected x_max/y_max for bbox to be in the range [0.0, 1.0]

kaylode opened this issue · comments

If anyone has this kind of error, it is usually due to the annotations of the dataset. Please try following these steps:
Find the image that gives the error (Use python's try + except to catch the image id) then

  1. Check whether its bounding boxes format in .JSON file are in (x_topleft ,y_topleft ,width ,height)
  2. Check whether the image size match with the one in .JSON file
  3. Check whether its bounding boxes are fully inside the image. (Check x + w <= image_width, y +h <= image_height)

If None of the solutions above help, feel free to contact me. :>