Skip to main content

sp



Sinapsis Data Writers

Package to write data of all formats, from the DataContainer in a specified location

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

🐍 Installation

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

Example with uv:

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

or with raw pip:

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

[!IMPORTANT] Templates in each package may require extra dependencies. For development, we recommend installing the package with all the optional dependencies:

with uv:

  uv pip install sinapsis-data-writers[all] --extra-index-url https://pypi.sinapsis.tech

or with raw pip:

  pip install sinapsis-data-writers[all] --extra-index-url https://pypi.sinapsis.tech

[!NOTE] Some templates also need system dependencies (e.g., ffmpeg). The installation depends on your OS. For Linux:

apt-get install -y ffmpeg

🚀 Features

  • Sinapsis Data Writers
    Write data to many kinds of files.
    • Annotation Writers
      Save text annotations to JSON, geometries to polygons, etc.
    • Audio Writers
      Save to audio files using Soundfile, among others.
    • Image Writers Save to image files using CV2, among others.
    • Video Writers
      Save to video files using CV2 or FFMPEG, among others.
  • Sinapsis Generic Data Tools
    Wide range of miscellaneous tools to manipulate your data.

[!TIP] Use CLI command sinapsis info --all-template-names to show a list with all the available Template names installed with Sinapsis Data Tools.

[!TIP] Use CLI command sinapsis info --example-template-config TEMPLATE_NAME to produce an example Agent config for the Template specified in TEMPLATE_NAME.

For example, for ImageSaver use sinapsis info --example-template-config ImageSaver to produce the following example config:

agent:
  name: my_test_agent
  description: agent to save image locally
templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}
- template_name: ImageSaver
  class_name: ImageSaver
  template_input: InputTemplate
  attributes:
    save_dir: /path/to/save/dir
    extension: jpg
    root_dir: '/path/to/sinapsis/cache'
    save_full_image: true
    save_bbox_crops: false
    save_mask_crops: false
    min_bbox_dim: 5

📚 Usage example

Example agent config You can copy and paste the following config and run it using the sinapsis cli, changing the data_dir attribute in the FolderImageDatasetCV2 and the root_dir attribute in the ImageSaver template
agent:
  name: my_test_agent
  description: agent to save image locally
templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}
- template_name: FolderImageDatasetCV2
  class_name: FolderImageDatasetCV2
  attributes:
    data_dir: /path/to/image
    pattern: '**/*'
    batch_size: 1
    load_on_init: true
    label_path_index: 0
    is_ground_truth: false

- template_name: ImageSaver
  class_name: ImageSaver
  template_input: FolderImageDatasetCV2
  attributes:
    save_dir: /path/to/save/dir
    extension: jpg
    root_dir: '/path/to/sinapsis/cache'
    save_full_image: true
    save_bbox_crops: false
    save_mask_crops: false
    min_bbox_dim: 5
To run, simply use:
sinapsis run name_of_the_config.yml

NOTE: Make sure to update the data_dir attribute in the FolderImageDatasetCV2, and the save_dir and root_dir attributes in the ImageSaver templates to actual directories

📙 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-data-writers 0.1.18

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-data-writers 0.1.18
File Size Uploaded
sinapsis_data_writers-0.1.18.tar.gz 29.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-data-writers 0.1.18
File Interpreter ABI Platform
sinapsis_data_writers-0.1.18-py3-none-any.whl Python 3 none any Details

Total release size: 64.7 kB

Release files / sinapsis_data_writers-0.1.18.tar.gz

Download URL sinapsis_data_writers-0.1.18.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2bbc1749e756c97ebd3df6682cdc717dfd5cbe567d4257071131357c26fe848b
BLAKE2b-256 checksum
How to use checksums
1d1b99c56838d6351228e9f2521affa8f761bf78f4fa5a8c82611e9e821eba7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Release files / sinapsis_data_writers-0.1.18-py3-none-any.whl

Download URL sinapsis_data_writers-0.1.18-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ee503b1296a318dd0ee6ed9d792d6d76a656cfc3897863fb84b39676d0cf327
BLAKE2b-256 checksum
How to use checksums
aa4b2fbc9427049df999129ee801c7cddf36870be8c80b314db4742c44d82f21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Release history Release notifications | RSS feed

This release

0.1.18 This release

2 release files

0.1.17

2 release files

0.1.15

2 release files

0.1.13

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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