ultralytics 8.2.46 fix OBB Results xyxy attribute (#14020)

This commit is contained in:
Glenn Jocher 2024-06-28 18:28:10 +02:00 committed by GitHub
parent 69cfc8aa22
commit 5f7d76e2eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 9 deletions

View file

@ -236,13 +236,14 @@ def test_results(model):
results = YOLO(WEIGHTS_DIR / model)([SOURCE, SOURCE], imgsz=160)
for r in results:
r = r.cpu().numpy()
print(r, len(r), r.path) # print numpy attributes
r = r.to(device="cpu", dtype=torch.float32)
r.save_txt(txt_file=TMP / "runs/tests/label.txt", save_conf=True)
r.save_crop(save_dir=TMP / "runs/tests/crops/")
r.tojson(normalize=True)
r.plot(pil=True)
r.plot(conf=True, boxes=True)
print(r, len(r), r.path)
print(r, len(r), r.path) # print after methods
def test_labels_and_crops():