DISCOver PATterns (DISCOPAT)
Project description
DISCOver PATterns (DISCOPAT)
Welcome to discopat, the pattern discovery library!
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 discopat by doing the following:
pip install discopat
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 discopat.core import Box, Frame, Model, Movie, Tracker
from discopat.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)
Project details
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 discopat-0.4.1.tar.gz.
File metadata
- Download URL: discopat-0.4.1.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ebcee507f7b033cc83570cc53b3cfbf259430ab78e8d6c24e0fe9bc11a9313c
|
|
| MD5 |
2bd1decfd7a75ed4a15546b0de4b671e
|
|
| BLAKE2b-256 |
0d86d0bdb919d5378fe4a7b055d8c65b29a0358994f50b57c5e376fc77327213
|
Provenance
The following attestation bundles were made for discopat-0.4.1.tar.gz:
Publisher:
pypi_upload.yaml on mansour-b/discopat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
discopat-0.4.1.tar.gz -
Subject digest:
1ebcee507f7b033cc83570cc53b3cfbf259430ab78e8d6c24e0fe9bc11a9313c - Sigstore transparency entry: 648318966
- Sigstore integration time:
-
Permalink:
mansour-b/discopat@c33b1e444efffb68f20dac77f07d392f436908b2 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/mansour-b
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_upload.yaml@c33b1e444efffb68f20dac77f07d392f436908b2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file discopat-0.4.1-py3-none-any.whl.
File metadata
- Download URL: discopat-0.4.1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daa50db1fbc95c20ca3b4bebf12e2a0acfe71d9d91c62947b2df4729d8fc9bdf
|
|
| MD5 |
be7c4137e84c2afcbfbd01648ee9213a
|
|
| BLAKE2b-256 |
097a010263c0ec7724ce519e7fd6a8ea66649eee9c10c882e0c18db7441b74af
|
Provenance
The following attestation bundles were made for discopat-0.4.1-py3-none-any.whl:
Publisher:
pypi_upload.yaml on mansour-b/discopat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
discopat-0.4.1-py3-none-any.whl -
Subject digest:
daa50db1fbc95c20ca3b4bebf12e2a0acfe71d9d91c62947b2df4729d8fc9bdf - Sigstore transparency entry: 648318971
- Sigstore integration time:
-
Permalink:
mansour-b/discopat@c33b1e444efffb68f20dac77f07d392f436908b2 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/mansour-b
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_upload.yaml@c33b1e444efffb68f20dac77f07d392f436908b2 -
Trigger Event:
push
-
Statement type: