Skip to main content
https://raw.githubusercontent.com/mansour-b/discopat/main/assets/discopat_hollywood.png

DISCOver PATterns (DISCOPAT)

Build Status Code Coverage PyPI Version Python Versions License Downloads Docs

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:

  1. Time series,

  2. Images,

  3. Movies,

  4. 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)

Metadata

Release files for discopat 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discopat 0.4.3
File Size Uploaded
discopat-0.4.3.tar.gz 46.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for discopat 0.4.3
File Interpreter ABI Platform
discopat-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 107.1 kB

Release files / discopat-0.4.3.tar.gz

Download URL discopat-0.4.3.tar.gz
Size 46.6 kB
Tags Source
SHA-256 checksum
How to use checksums
64490653796c1cf0f64a72514963b9eb895b4e4d9a4bedd97a007af23e9d822a
BLAKE2b-256 checksum
How to use checksums
a1bae500f617f3d7eb82a293e640b52be0523ab0814c67fdd512491681fcb21f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 17, 2025.

Transparency log

Release files / discopat-0.4.3-py3-none-any.whl

Download URL discopat-0.4.3-py3-none-any.whl
Size 60.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e38172aedda194634e44b826fde9e21412c4ec6fdc6ffd3bfcef263000cde411
BLAKE2b-256 checksum
How to use checksums
f7718870744dc2373e776e7b4d1502d146bb092d4a7b4b617fa5ea7822090709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 17, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page