updates
This commit is contained in:
parent
4e5a00fb72
commit
7c2623dd4f
2
test.py
2
test.py
|
@ -89,7 +89,7 @@ def test(
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Clip boxes to image bounds
|
# Clip boxes to image bounds
|
||||||
clip_coords(pred, shapes[si])
|
# clip_coords(pred, shapes[si])
|
||||||
|
|
||||||
# Append to text file
|
# Append to text file
|
||||||
# with open('test.txt', 'a') as file:
|
# with open('test.txt', 'a') as file:
|
||||||
|
|
|
@ -130,7 +130,7 @@ def scale_coords(img1_shape, coords, img0_shape):
|
||||||
coords[:, [0, 2]] -= (img1_shape[1] - img0_shape[1] * gain) / 2 # x padding
|
coords[:, [0, 2]] -= (img1_shape[1] - img0_shape[1] * gain) / 2 # x padding
|
||||||
coords[:, [1, 3]] -= (img1_shape[0] - img0_shape[0] * gain) / 2 # y padding
|
coords[:, [1, 3]] -= (img1_shape[0] - img0_shape[0] * gain) / 2 # y padding
|
||||||
coords[:, :4] /= gain
|
coords[:, :4] /= gain
|
||||||
clip_coords(coords, img0_shape)
|
# clip_coords(coords, img0_shape)
|
||||||
return coords
|
return coords
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue