Custom Detection Error

I was running the custom detection code, and i got an error :

boxes[i].xmin = int((boxes[i].xmin - x_offset) / x_scale * image_w)

OverflowError: cannot convert float infinity to integer

What could I do to fix this?