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
- MoF (Accuracy)
- F1Score
- IoD
- IoU
Segment-wise Metrics
- 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file actseg-0.1.0.tar.gz.
File metadata
- Download URL: actseg-0.1.0.tar.gz
- Upload date:
- Size: 8.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feb8981dc5edf6eeefbe7dad197ac860b391bc63228e754f4083bb6637f67d1d
|
|
| MD5 |
52331895494c2e328454be07404480e4
|
|
| BLAKE2b-256 |
1be018a90f741b207242191e821694fa6225229cf7ab176e75afeaa39bb5af0b
|
File details
Details for the file actseg-0.1.0-py3-none-any.whl.
File metadata
- Download URL: actseg-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
471d95ae272bc4562a87f1a03e493327efa691fef29b2a685f0c23354fb1858d
|
|
| MD5 |
176ba13f4475697efdad5d337eea8007
|
|
| BLAKE2b-256 |
90e39c7f34466e5960b502427664275feb783d12243a8ae10c3fd0faa8d20655
|