Activity/event timeline visualization for action localization (or detection) labels and predictions.
Project description
activity-plots
Plotting tools for temporal action localization (or per-frame classification) labels and predictions.
Install
pip install activity-plots
Usage
Create a data container then pass it into one of the plotting functions.
import activity_plots
import matplotlib.pyplot as plt
data = activity_plots.ActivitySegments(
starts=[5, 13, 29], ends=[15, 17, 45], label_ids=[0, 1, 0],
label_set=["Activity A", "Activity B"]
)
fig, ax = plt.subplots()
ax = activity_plots.multi_bar(ax, data, title="Test Plot", xlabel="Frame #")
plt.show()
Plot Types
multi_bar
continuous_shaded- Use to visualize probabilities (model output)
single_bar- Use when there can only be one label per frame
- Useful to visualize multiple videos/instances
Data Containers
ActivitySegments
- Build from a set of variable-length segments
ActivityProbabilities
- Used for visualizing predictions (per-frame distributions over all activities)
segments_from_sequence
- Helper function to build ActivitySegments from a sequence of label IDs.
- Example:
seq = [1, 1, 1, 0, 2, 3, 3, 3, 4, -1, -1, 5] # -1 is ignored ("background")
data = activity_plots.segments_from_sequence(seq)
TODO
- Github action to publish on pypi
- Stackplot
- Check different options for "baseline"
- Ridge plot
- Fill color with same colormap as multi-bar
- Better handling of overlapping segments
- Could use additional offset
- Might need to increase the y-axis range too
- Create tests
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 activity_plots-0.0.1.tar.gz.
File metadata
- Download URL: activity_plots-0.0.1.tar.gz
- Upload date:
- Size: 80.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
994e97d4b4f2afc564990502f09832a4745d69d4ab6baa03ad302ac131c32f01
|
|
| MD5 |
21b5c90633ece87d5f3a23d5b49b8332
|
|
| BLAKE2b-256 |
313e3fcb44faf483ac0eff6fc67e4f58f9bc3edb2c8548820a5a9080d9564e21
|
Provenance
The following attestation bundles were made for activity_plots-0.0.1.tar.gz:
Publisher:
python-publish.yml on mpeven/activity-plots
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
activity_plots-0.0.1.tar.gz -
Subject digest:
994e97d4b4f2afc564990502f09832a4745d69d4ab6baa03ad302ac131c32f01 - Sigstore transparency entry: 206261859
- Sigstore integration time:
-
Permalink:
mpeven/activity-plots@fa4cd66b7603f52f8be86dcf902d31438122d3a0 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/mpeven
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fa4cd66b7603f52f8be86dcf902d31438122d3a0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file activity_plots-0.0.1-py3-none-any.whl.
File metadata
- Download URL: activity_plots-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faad42e00e21d66fabd1558cc4830e9001377dd3726a3762b381bbe0a59c0499
|
|
| MD5 |
8b9128bb3ad176be2c7cfaaa16f9129d
|
|
| BLAKE2b-256 |
6255746aa4e27ebed13fe276ab138333d6fb96e2511064c65794e049eea5d76f
|
Provenance
The following attestation bundles were made for activity_plots-0.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on mpeven/activity-plots
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
activity_plots-0.0.1-py3-none-any.whl -
Subject digest:
faad42e00e21d66fabd1558cc4830e9001377dd3726a3762b381bbe0a59c0499 - Sigstore transparency entry: 206261860
- Sigstore integration time:
-
Permalink:
mpeven/activity-plots@fa4cd66b7603f52f8be86dcf902d31438122d3a0 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/mpeven
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fa4cd66b7603f52f8be86dcf902d31438122d3a0 -
Trigger Event:
release
-
Statement type: