Skip to main content

A utility for action segmentation research: evaluation and others

Project description

Reference Action Segmentation Evaluation Code

This repository contains the reference code for action segmentation evaluation.

If you have a bug-fix/improvement or if you want to add a new features please send a pull request or open an issue.

Installation

The actseg library is available on PyPI.

pip install actseg

Development

make init
make test

Example Usage

All the metrics have the same api.

from actseg.eval import MoFAccuracy, Edit

pred1 = [0, 0, 0, 1, 0, 1, 1, 1, 0]
pred2 = [1, 2, 3, 0, 0, 1, 2, 3, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0]

target1 = [0, 0, 1, 1, 2, 1, 1, 0, 0]
target2 = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3]

metrics = [MoFAccuracy(), Edit()]
for p, t in zip([pred1, pred2], [target1, target2]):
    for m in metrics:
        m(targets=t, predictions=p)

for m in metrics:
    print(m)

# MoF: 0.3333333333333333
# Edit: 52.5

Metrics

Frame-wise Metrics

  1. MoF (Accuracy)
  2. F1Score
  3. IoD
  4. IoU

Segment-wise Metrics

  1. Edit (Edit distance or matching score)

Specifying Ignore Class

For some Metrics it is possible to specify the indices of classes to ignore (e.g. Background) by passing ignore_ids parameter to the constructor.

Acknowledgement

Please see src/actseg/external for external sources used in this project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

actseg-0.0.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

actseg-0.0.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file actseg-0.0.1.tar.gz.

File metadata

  • Download URL: actseg-0.0.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for actseg-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ebfa44d4bdf5b324d0d4d89225fecb394c6032bf3b0ccd13808921da78aa311d
MD5 5fdb4c96ac7be54f52da392099ef7a65
BLAKE2b-256 274224910c79596d2225de8e41855d387303bbc3627085632b72d1ef33bee08a

See more details on using hashes here.

File details

Details for the file actseg-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: actseg-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for actseg-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6c84df2b5e3e0c7abdabf607bf51dafebcf20c8badcfc1ce46a37cac7af7660
MD5 e3912a9e6756dfe3bb24442678a2ce55
BLAKE2b-256 114de41b46f95231b19264da2c86145c9c9cc3957509a2896747d2ae75dc2372

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page