From db90446eb089e1a03c0a15b3e7615d1edda72440 Mon Sep 17 00:00:00 2001 From: Laurent Fainsin Date: Wed, 7 Sep 2022 10:43:22 +0200 Subject: [PATCH] chore: remove unused file Former-commit-id: bf466229627337e31bff835bd7615b764ab982ac [formerly 919ecf8585bd9910ffd9722ff390e16d265dc2fa] Former-commit-id: 2e4531522077a9191c55b5952f05bd0c4f2346f4 --- src/notebooks/test.py | 70 ------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 src/notebooks/test.py diff --git a/src/notebooks/test.py b/src/notebooks/test.py deleted file mode 100644 index 0121ce8..0000000 --- a/src/notebooks/test.py +++ /dev/null @@ -1,70 +0,0 @@ -import torch -from torchmetrics.detection.mean_ap import MeanAveragePrecision - -preds = [ - dict( - boxes=torch.tensor( - [ - [880.0560, 41.7845, 966.9839, 131.3355], - [1421.0029, 682.4420, 1512.7570, 765.2380], - [132.0775, 818.5026, 216.0825, 1020.8573], - ] - ), - scores=torch.tensor( - [0.9989, 0.9936, 0.0932], - ), - labels=torch.tensor( - [1, 1, 1], - ), - ) -] -target = [ - dict( - boxes=torch.tensor( - [[879, 39, 1513, 766]], - ), - labels=torch.tensor( - [1], - ), - ) -] -metric = MeanAveragePrecision() -metric.update(preds, target) - -from pprint import pprint - -pprint(metric.compute()) - -# -------------------------------------------------------------------------- - -preds = [ - dict( - boxes=torch.tensor( - [ - [880.0560, 41.7845, 1500, 700.3355], - ] - ), - scores=torch.tensor( - [0.9989], - ), - labels=torch.tensor( - [1], - ), - ) -] -target = [ - dict( - boxes=torch.tensor( - [[879, 39, 1513, 766]], - ), - labels=torch.tensor( - [1], - ), - ) -] -metric = MeanAveragePrecision() -metric.update(preds, target) - -from pprint import pprint - -pprint(metric.compute())