torchmetrics-ext


Nametorchmetrics-ext JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/eamonn-zh/torchmetrics_ext
SummaryAn extension of torchmetrics package.
upload_time2024-04-17 05:01:29
maintainerNone
docs_urlNone
authorYiming Zhang
requires_python>=3.8
licenseNone
keywords deep learning machine learning pytorch metrics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TorchMetrics Extension
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/torchmetrics)](https://pypi.org/project/torchmetrics-ext/)
[![PyPI version](https://badge.fury.io/py/torchmetrics-ext.svg)](https://badge.fury.io/py/torchmetrics-ext)
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/eamonn-zh/torchmetrics_ext/blob/master/LICENSE)

## Installation
Simple installation from PyPI
```bash
pip install torchmetrics-ext
```

## What is TorchMetrics Extension
It is an extension of [torchmetrics](https://lightning.ai/docs/torchmetrics/) containing more metrics for machine learning tasks. Currently, it offers metrics for:
- 3D Visual Grounding
  - [ScanRefer](https://daveredrum.github.io/ScanRefer/)

## 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](https://daveredrum.github.io/ScanRefer/).
```python
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)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eamonn-zh/torchmetrics_ext",
    "name": "torchmetrics-ext",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "deep learning, machine learning, pytorch, metrics",
    "author": "Yiming Zhang",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/60/09/7c70dea258c10f5ab2e18006eff72375251ecd348f5ad875f04d329c77df/torchmetrics_ext-0.1.1.tar.gz",
    "platform": null,
    "description": "# TorchMetrics Extension\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/torchmetrics)](https://pypi.org/project/torchmetrics-ext/)\n[![PyPI version](https://badge.fury.io/py/torchmetrics-ext.svg)](https://badge.fury.io/py/torchmetrics-ext)\n[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/eamonn-zh/torchmetrics_ext/blob/master/LICENSE)\n\n## Installation\nSimple installation from PyPI\n```bash\npip install torchmetrics-ext\n```\n\n## What is TorchMetrics Extension\nIt is an extension of [torchmetrics](https://lightning.ai/docs/torchmetrics/) containing more metrics for machine learning tasks. Currently, it offers metrics for:\n- 3D Visual Grounding\n  - [ScanRefer](https://daveredrum.github.io/ScanRefer/)\n\n## Using TorchMetrics Extension\nHere are examples for using the metrics in TorchMetrics Extension:\n\n### ScanRefer\nIt 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](https://daveredrum.github.io/ScanRefer/).\n```python\nimport torch\nfrom torchmetrics_ext.visual_grounding import ScanReferMetric\nmetric = ScanReferMetric()\npred_aabbs = torch.tensor([[[0., 0., 0.], [1., 1., 1.]], [[0., 0., 0.], [2., 2., 2.]]], dtype=torch.float32)\ngt_aabbs = torch.tensor([[[0., 0., 0.], [1., 1., 1.]], [[0., 0., 0.], [1.5, 1.5, 1.5]]], dtype=torch.float32)\ngt_eval_types = (\"unique\", \"multiple\")\nresults = metric(pred_aabbs, gt_aabbs, gt_eval_types)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An extension of torchmetrics package.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/eamonn-zh/torchmetrics_ext"
    },
    "split_keywords": [
        "deep learning",
        " machine learning",
        " pytorch",
        " metrics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "797ce8bcf89f11e525417cd2f3cdb922418e912b5e6d0fd55a8e8daf46c5b4ee",
                "md5": "28f5bf7ae4bdd63cdc300e31a24e1d8b",
                "sha256": "307f6b614f7e0663ff31f1a984387cef9add8d1051811dcc142feb5b4c6e293a"
            },
            "downloads": -1,
            "filename": "torchmetrics_ext-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "28f5bf7ae4bdd63cdc300e31a24e1d8b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8581,
            "upload_time": "2024-04-17T05:01:27",
            "upload_time_iso_8601": "2024-04-17T05:01:27.553798Z",
            "url": "https://files.pythonhosted.org/packages/79/7c/e8bcf89f11e525417cd2f3cdb922418e912b5e6d0fd55a8e8daf46c5b4ee/torchmetrics_ext-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60097c70dea258c10f5ab2e18006eff72375251ecd348f5ad875f04d329c77df",
                "md5": "594ec064663e1accbcba8ee5721ce742",
                "sha256": "a1a95282fed5689d4b1fee0cc0210b74724a91787c036147f168e3cd313c0a64"
            },
            "downloads": -1,
            "filename": "torchmetrics_ext-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "594ec064663e1accbcba8ee5721ce742",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7856,
            "upload_time": "2024-04-17T05:01:29",
            "upload_time_iso_8601": "2024-04-17T05:01:29.755606Z",
            "url": "https://files.pythonhosted.org/packages/60/09/7c70dea258c10f5ab2e18006eff72375251ecd348f5ad875f04d329c77df/torchmetrics_ext-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-17 05:01:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eamonn-zh",
    "github_project": "torchmetrics_ext",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "torchmetrics-ext"
}
        
Elapsed time: 0.23683s