PATteRn dIsCovery Kit (PATRICK)
Welcome to the Pattern Discovery Kit!
This library provides tools to discover, detect, and track meaningful patterns in physical signals. These signals can be of various forms:
Time series,
Images,
Movies,
Any other type of n-dimensional data.
Installation
You can install the pattern-discovery-kit from the source code by doing the following:
pip install pattern-discovery-kit
You can then try running this notebook on your computer to verify that the installation was succesful.
Quickstart
Here is an example to briefly present the API:
import numpy as np
from patrick.core import Box, Frame, Model, Movie, Tracker
from patrick.display import plot_frame
# Define the dimensions of the problem
frame_width = 5
frame_height = 5
movie_length = 3
gif_frames_per_second = 2
# Define a concrete model class, just for the example
class DumbModel(Model):
def predict(self, frame: Frame) -> Frame:
frame_id = int(frame.name)
frame.annotations.append(
Box(label="noise_in_a_square", x=frame_id, y=frame_id, width=1, height=1)
)
return frame
model = DumbModel()
# Our data for this short tutorial
frames = [
Frame(
name=str(10 * i),
width=frame_width,
height=frame_height,
annotations=[],
image_array=np.random.random(frame_height, frame_width),
)
for i in range(movie_length)
]
movie = Movie(name="some_noise", frames=frames, tracks=[])
# Run the detection model on individual frames
analysed_frames = [model(frame) for frame in movie.frames]
analysed_movie = Movie(
name="some_noise_with_boxes", frames=analysed_frames, tracks=[]
)
# TBD: run tracker on detections
analysed_movie = tracker.make_tracks(analysed_movie)
analysed_movie.name = "some_noise_with_boxes_and_tracks"
# Plot individual frames with detections
for frame in analysed_movie:
plot_frame(frame)
# TBD: make a GIF to show the tracks
export_to_gif(analysed_movie, fps=gif_frames_per_seconds)
Metadata
Release files for pattern-discovery-kit 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pattern_discovery_kit-0.2.3.tar.gz | 14.7 kB | Without provenance | Details for pattern_discovery_kit-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pattern_discovery_kit-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for pattern_discovery_kit-0.2.3-py3-none-any.whl |
Total release size: 32.8 kB
Release files / pattern_discovery_kit-0.2.3.tar.gz
| Download URL | pattern_discovery_kit-0.2.3.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
808563646b49ffd5f2c018b54c3add172a60c24ba77a9124e245ebfff904f41e
|
|
BLAKE2b-256 checksum How to use checksums |
13d02545af68dc00f00f569dcc7da405360f7d12df22c9c5329c5bfa8521b3e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.0
|
Release files / pattern_discovery_kit-0.2.3-py3-none-any.whl
| Download URL | pattern_discovery_kit-0.2.3-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8709052f5c2cd9e9ca57dfeb49d5affa742d35afed746f0b2ee08c274b153948
|
|
BLAKE2b-256 checksum How to use checksums |
89faa4ad84933735e2603d22814a7ba6240ebb03cd0f7ec2bcebdc27370e8e16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.0
|
Security for pattern-discovery-kit 0.2.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.