Good Old Utilities for Data Analysis!
Project description
GOUDA
Good Old Utilities for Data Analysis
This is my Python toolkit of reusable utilities built up over years of data analysis and computer vision research. GOUDA covers the tasks that come up repeatedly across projects: navigating file systems, loading and processing images, visualizing results, and computing statistics.
Features
Path Management
GoudaPath— a chainable, callablePathLikethat makes working with research directory structures concise. Resolves multiple subdirectories at once, integrates with file/image discovery, and works anywhere a path is expected.
Image Processing
- Mask operations: semi-transparent overlays, border extraction, positive/negative colorization, image/mask/overlay lineups
- Segmentation utilities: GrabCut with probability thresholds, multi-threshold hysteresis-style binarization
- Spatial transforms: aspect-ratio-preserving resize, rotation with correct bounding-box handling, polar-to-Cartesian unrolling
- Cropping: bounding box extraction, crop-to-mask, crop-to-content
- Sharpness metrics: Laplacian variance, Sobel variance
- RGB-corrected
imread/imwrite(OpenCV defaults to BGR)
Visualization
print_grid— display any collection of images as a grid. Accepts flat lists, nested lists, dicts with per-image titles/labels, or NumPy arrays of 2–5 dimensions. Layout is automatic.
Data Utilities
to_uint8— smart normalization that infers the input range ([0,1],[-1,1],[0,255], or auto-rescale)rescale,arr_sample,iter_batch,flip_dict, and other NumPy/Python helpersParallelStats— numerically stable online mean/variance (Welford algorithm) with support for aggregating across separate datasets
More
...And plenty of other utility methods for everything from general data structures to specific hypothesis testing algorithms.
Usage
Navigating a project directory
from gouda import GoudaPath
data = GoudaPath("data/experiments")
# Get multiple child paths at once
train, val, test = data("train", "val", "test")
# Chain into subdirectories — works anywhere a path is expected
weights_dir = data("outputs")("weights")
weights_dir.ensure_dir() # create if it doesn't exist
# Find all images under a directory
image_paths = data("train").find_images(recursive=True)
Displaying images during exploratory analysis
from gouda.display import print_grid
# Flat list — grid layout is automatic
print_grid(images)
# Per-image titles and colormaps using dicts
print_grid([
{"image": original, "title": "Input"},
{"image": pred_mask, "title": "Prediction", "cmap": "hot"},
{"image": ground_truth,"title": "Ground Truth"},
])
# Automatically arrange N images into a square grid
print_grid(images, do_squarify=True, figsize=(12, 12))
Image processing
from gouda.image import add_mask, padded_resize, mask_by_triplet
# Overlay a probability map on an image as a semi-transparent colored mask
overlay = add_mask(image, prob_map, color="red", opacity=0.5)
# Resize to a target shape, padding to preserve aspect ratio instead of squeezing
resized = padded_resize(image, size=(512, 512))
# Convert a continuous probability map to a binary mask using dual thresholds
# (only keeps foreground regions where the peak signal exceeds upper_thresh)
binary = mask_by_triplet(prob_map, lower_thresh=0.3, upper_thresh=0.75)
Installation
pip install gouda
conda install gouda -c smullan
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 gouda-0.7.0.tar.gz.
File metadata
- Download URL: gouda-0.7.0.tar.gz
- Upload date:
- Size: 281.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b92390fdc2920231534ac829f2c6ff0d4fb0ab446c7be069551752c8ab252e60
|
|
| MD5 |
c16963a3de6fc137449803eb451abed6
|
|
| BLAKE2b-256 |
04aca6d8417c334ae5377f66de487a83f2f1dc8af4dea0678d812633a0ce4cfb
|
Provenance
The following attestation bundles were made for gouda-0.7.0.tar.gz:
Publisher:
package.yml on Mullans/GOUDA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gouda-0.7.0.tar.gz -
Subject digest:
b92390fdc2920231534ac829f2c6ff0d4fb0ab446c7be069551752c8ab252e60 - Sigstore transparency entry: 1194669722
- Sigstore integration time:
-
Permalink:
Mullans/GOUDA@fd24435f04f8ed6776cbe661d0d6d5a3b89405bd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/Mullans
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@fd24435f04f8ed6776cbe661d0d6d5a3b89405bd -
Trigger Event:
push
-
Statement type:
File details
Details for the file gouda-0.7.0-py3-none-any.whl.
File metadata
- Download URL: gouda-0.7.0-py3-none-any.whl
- Upload date:
- Size: 80.8 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 |
a7f8640ff3d0641b23eccc465849a7b323b094cebd66f167782c384ccbf0c7d5
|
|
| MD5 |
1215c56a92d74c4d9fff2f68984d479b
|
|
| BLAKE2b-256 |
8bdf41c07f07bcef3901ec5bbe0ad744bf8d3cd85a7a9300753a63e82b18bbeb
|
Provenance
The following attestation bundles were made for gouda-0.7.0-py3-none-any.whl:
Publisher:
package.yml on Mullans/GOUDA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gouda-0.7.0-py3-none-any.whl -
Subject digest:
a7f8640ff3d0641b23eccc465849a7b323b094cebd66f167782c384ccbf0c7d5 - Sigstore transparency entry: 1194669748
- Sigstore integration time:
-
Permalink:
Mullans/GOUDA@fd24435f04f8ed6776cbe661d0d6d5a3b89405bd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/Mullans
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@fd24435f04f8ed6776cbe661d0d6d5a3b89405bd -
Trigger Event:
push
-
Statement type: