Ballfish
Image augmentation library
Installation
pip install ballfish
Documentation
https://ballfish.readthedocs.io/
Example
from ballfish import create_augmentation, Datum
from random import Random
augmentation = create_augmentation(
[
# First, augment the quadrangle (quad argument)
# with geometric transformations
{
"name": "rotate",
"angle_deg": {"name": "uniform", "a": 0, "b": 360},
},
# Second, apply the projective transformation to source argument
# After this step, no more quad transformations make sense
{"name": "rasterize"},
# Third, apply raster transformations
{
"name": "noise",
"std": {"name": "truncnorm", "a": 0, "b": 1 / 10},
},
]
)
random = Random(13)
# The source argument must be a `torch.tensor` in (N, C, H, W) format
# The quad argument should be provided in a clockwise order,
# starting from the top-left corner, in (x, y) format.
result = augmentation(Datum(
source=source, quad=quad, width=64, height=64
), random)
# Transformed image and quads
print(result.quads, result.image)
Metadata
Release files for ballfish 0.4.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 | Provenance | Actions |
|---|---|---|---|---|
| ballfish-0.4.1.tar.gz | 18.1 kB | Without provenance | Details for ballfish-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ballfish-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for ballfish-0.4.1-py3-none-any.whl |
Total release size: 32.8 kB
Release files / ballfish-0.4.1.tar.gz
| Download URL | ballfish-0.4.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc8ea10ad146a48a13eae2a865e6fc5571d3b35b968e39726342214ddd49dba7
|
|
BLAKE2b-256 checksum How to use checksums |
3c514b36395990d9d43d72ff64208a1cccf05168b94d9bc537bc5f483f499f77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / ballfish-0.4.1-py3-none-any.whl
| Download URL | ballfish-0.4.1-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccbb994f960d3b64147653160544448a26258c57a56ca82e3ac7e3554a71a20e
|
|
BLAKE2b-256 checksum How to use checksums |
bb6667dff227873809cc91899394698508e9845c32e480ff0c3f439cdbc8fca6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Security for ballfish 0.4.1
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.