Skip to main content

sp



Sinapsis Albumentations

Templates for applying image transformations using Albumentations.

🐍 Installation • 🚀 Features • 📚 Usage example • 📙 Documentation • 🔍 License

The Sinapsis albumentations module provides an extensive collection of templates powered by the Albumentations library. These templates allow users to apply a wide range of augmentations, from simple operations like flipping and resizing to more advanced transformations such as elastic distortions and geometric warping.

🐍 Installation

Install using your package manager of choice. We encourage the use of uv

Example with uv:

  uv pip install sinapsis-albumentations --extra-index-url https://pypi.sinapsis.tech

or with raw pip:

  pip install sinapsis-albumentations --extra-index-url https://pypi.sinapsis.tech

🚀 Features

Templates Supported

🌍 General Attributes

agent:
  name: my_test_agent
templates:
- template_name: InputTemplate
  class_name: InputTemplate
- template_name: RotateWrapper
  class_name: RotateWrapper
  template_input: InputTemplate
  attributes:
    apply_to_annotations: false
    bbox_params: null
    keypoints_params: null
    additional_targets:
      mask: mask
    rotate_init:
      limit: [-45, 45]
      interpolation: 1
      border_mode: 4
      value: [0, 0, 0]
      mask_value: null
      rotate_method: "largest_box"
      crop_border: false
      fill_value: 0
      mask_fill_value: 0
      deterministic: true
      p: 1.0

📚 Usage example

The following example demonstrates how to use Sinapsis Albumentations to apply multiple image augmentations. This setup loads a dataset of images, applies horizontal flipping and elastic transformation, and saves the results. Below is the full YAML configuration, followed by a breakdown of each component.

Example configuration
agent:
  name: transforms_agent
  description: "Agent to apply an horizontal-flip and an elastic-transformation to a set of images loaded from a directory."

templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}

- template_name: FolderImageDatasetCV2
  class_name: FolderImageDatasetCV2
  template_input: InputTemplate
  attributes:
    data_dir: my_dataset

- template_name: HorizontalFlip
  class_name: HorizontalFlipWrapper
  template_input: FolderImageDatasetCV2
  attributes:
    horizontalflip_init:
      p: 1.0

- template_name: ElasticTransform
  class_name: ElasticTransformWrapper
  template_input: HorizontalFlip
  attributes:
    elastictransform_init:
      mask_value: 150
      p: 1.0
      alpha: 100
      sigma: 50

- template_name: ImageSaver
  class_name: ImageSaver
  template_input: ElasticTransform
  attributes:
    save_dir: results
    extension: jpg

This configuration defines an agent and a sequence of templates to apply image transformations.

To run the config, use the CLI:

sinapsis run name_of_config.yml

📙 Documentation

Documentation for this and other sinapsis packages is available on the sinapsis website

Tutorials for different projects within sinapsis are available at sinapsis tutorials page

🔍 License

This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.

For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.

Metadata

Release files for sinapsis-albumentations 0.1.9

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

Source distribution (sdist)

Source distribution for sinapsis-albumentations 0.1.9
File Size Uploaded Provenance Actions
sinapsis_albumentations-0.1.9.tar.gz 22.0 kB Without provenance Details for sinapsis_albumentations-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-albumentations 0.1.9
File Interpreter ABI Platform Actions
sinapsis_albumentations-0.1.9-py3-none-any.whl Python 3 none any Details for sinapsis_albumentations-0.1.9-py3-none-any.whl

Total release size: 42.7 kB

Release files / sinapsis_albumentations-0.1.9.tar.gz

Download URL sinapsis_albumentations-0.1.9.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b10d382e346a11632130914994c4445454656a7638102580eac71db3fdcef789
BLAKE2b-256 checksum
How to use checksums
7e5f6dfaf49c7ce298365f549dbbfda151e4d8ca3eeb725709ab259b53da7383
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Release files / sinapsis_albumentations-0.1.9-py3-none-any.whl

Download URL sinapsis_albumentations-0.1.9-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6268ca158c731297281e5794fa6f4e2667e7cf473f0e056d8a09fc7a1063a41
BLAKE2b-256 checksum
How to use checksums
6add4195b22bf5c7f73f5771d231f2c0e95a5e9768ad260d47cf60106d8ae114
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Security for sinapsis-albumentations 0.1.9

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.

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