Vehicle-Detection icon indicating copy to clipboard operation
Vehicle-Detection copied to clipboard

OverflowError in boxes coordinates

Open 10zinten opened this issue 7 years ago • 1 comments

I am getting following error.


OverflowError                             Traceback (most recent call last)
<ipython-input-22-1b439cae604f> in <module>()
      1 boxes = remove_duplicates(boxes, test_image)
----> 2 img = draw_boxes(boxes, test_image)
      3 plt.figure(figsize=[10, 10])
      4 plt.imshow(img)

/content/utils.py in draw_boxes(boxes, img)
    170     for box in boxes:
    171 
--> 172         img = cv2.rectangle(img, (box.x1, box.y1), (box.x2, box.y2), (200, 0, 0), 6)
    173         img = cv2.rectangle(img, (box.x1 - 3, box.y1), (box.x1 + 135, box.y1 - 35), (200, 0, 0), -6)
    174         img = cv2.putText(img, 'Car %{0:.3}'.format(box.prob * 100), (box.x1, box.y1 - 10), font, 1.6, (255, 255, 255), 2,

OverflowError: signed integer is less than minimum

Output predicted coordinates of each bounding box:

for box in boxes:
    print(box.x1, box.y1, box.x2, box.y2)

here is the output:

3 3 -2135105553 -2386753269
3 391281486 -75968691 -1495137766
364679696 3 -71026053 -915057020
437295888 3 -488494049 -232770593
3 291584348 1277 -928265875
1040388982 3 -1074399017 -26151704
458842289 3 1277 717
179049741 962225348 -1168963383 -709505098
3 3 -504806633 717

10zinten avatar Apr 27 '18 13:04 10zinten

Getting same error @10zinten

ShehabAhmedSayem avatar Jul 12 '18 05:07 ShehabAhmedSayem