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
Metadata
Release files for activity-plots 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| activity_plots-0.0.1.tar.gz | 80.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| activity_plots-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 85.7 kB
Release files / activity_plots-0.0.1.tar.gz
| Download URL | activity_plots-0.0.1.tar.gz |
|---|---|
| Size | 80.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
994e97d4b4f2afc564990502f09832a4745d69d4ab6baa03ad302ac131c32f01
|
|
BLAKE2b-256 checksum How to use checksums |
313e3fcb44faf483ac0eff6fc67e4f58f9bc3edb2c8548820a5a9080d9564e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 2, 2025.
Transparency logRelease files / activity_plots-0.0.1-py3-none-any.whl
| Download URL | activity_plots-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
faad42e00e21d66fabd1558cc4830e9001377dd3726a3762b381bbe0a59c0499
|
|
BLAKE2b-256 checksum How to use checksums |
6255746aa4e27ebed13fe276ab138333d6fb96e2511064c65794e049eea5d76f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 2, 2025.
Transparency log