An extension of torchmetrics package.
Project description
TorchMetrics Extension
Installation
Simple installation from PyPI
pip install torchmetrics-ext
What is TorchMetrics Extension
It is an extension of torchmetrics containing more metrics for machine learning tasks. Currently, it offers metrics for:
- 3D Visual Grounding
Using TorchMetrics Extension
Here are examples for using the metrics in TorchMetrics Extension:
ScanRefer
It measures the thresholded accuracy Acc@kIoU, where the positive predictions have higher intersection over union (IoU) with the ground truths than the thresholds. The metric is based on the ScanRefer.
import torch
from torchmetrics_ext.visual_grounding import ScanReferMetric
metric = ScanReferMetric()
pred_aabbs = torch.tensor([[[0., 0., 0.], [1., 1., 1.]], [[0., 0., 0.], [2., 2., 2.]]], dtype=torch.float32)
gt_aabbs = torch.tensor([[[0., 0., 0.], [1., 1., 1.]], [[0., 0., 0.], [1.5, 1.5, 1.5]]], dtype=torch.float32)
gt_eval_types = ("unique", "multiple")
results = metric(pred_aabbs, gt_aabbs, gt_eval_types)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
torchmetrics_ext-0.1.1.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for torchmetrics_ext-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 307f6b614f7e0663ff31f1a984387cef9add8d1051811dcc142feb5b4c6e293a |
|
MD5 | 28f5bf7ae4bdd63cdc300e31a24e1d8b |
|
BLAKE2b-256 | 797ce8bcf89f11e525417cd2f3cdb922418e912b5e6d0fd55a8e8daf46c5b4ee |