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.
Metadata
Release files for actseg 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| actseg-0.1.0.tar.gz | 8.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| actseg-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 kB
Release files / actseg-0.1.0.tar.gz
| Download URL | actseg-0.1.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
feb8981dc5edf6eeefbe7dad197ac860b391bc63228e754f4083bb6637f67d1d
|
|
BLAKE2b-256 checksum How to use checksums |
1be018a90f741b207242191e821694fa6225229cf7ab176e75afeaa39bb5af0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / actseg-0.1.0-py3-none-any.whl
| Download URL | actseg-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
471d95ae272bc4562a87f1a03e493327efa691fef29b2a685f0c23354fb1858d
|
|
BLAKE2b-256 checksum How to use checksums |
90e39c7f34466e5960b502427664275feb783d12243a8ae10c3fd0faa8d20655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|