ultralytics 8.2.96 new results[0].to_df Pandas, XML and CSV methods (#16267)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
MatthewNoyce 2024-09-18 10:53:33 +01:00 committed by GitHub
parent 225e6e2b25
commit 2173c37238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 92 additions and 5 deletions

View file

@ -269,7 +269,10 @@ def test_results(model):
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.to_json(normalize=True)
r.to_df(decimals=3)
r.to_csv()
r.to_xml()
r.plot(pil=True)
r.plot(conf=True, boxes=True)
print(r, len(r), r.path) # print after methods