Skip to main content

An open-source python library to generate synthetic datasets for computer vision tasks

Project description

SnapStitch

An open-source Python library for generating synthetic datasets for computer vision tasks. SnapStitch aims to simplify the process of creating realistic synthetic images to help improve computer vision model training.

Class Diagram

Features

Current Focus:

  • Support YOLO model training by generating synthetic images by superimposing smaller objects onto a background and creating YOLO dataset

Future Plans:

  • Supports various image transformations and augmentations to be applied on synthetic data.
  • Support other computer vision tasks such as Segmentation and Pose Estimation
  • Easy integration with existing computer vision pipelines.

Current Status

This library is currently under development. Key features and functionalities are being implemented step-by-step. Below is the planned architecture and the class diagram representing the intended design.

Class Diagram

Class Diagram

Note: The above class diagram illustrates the core components and their relationships within the library. It is a work in progress and will evolve as development continues.

Getting Started

Prerequisites

pdm install

Usage

The library is envisioned to be used in this way.

from snapstitch import Stitcher, PartsLoader, BackgroundLoader, YOLOv8Generator

# Initialise path to backgrounds
background = BackgroundLoader("examples/supermarket/background")

# Initialise all your classes
bread = PartsLoader("examples/supermarket/parts/bread")
canned_beans = PartsLoader("examples/supermarket/parts/canned_beans")
jam = PartsLoader("examples/supermarket/parts/jam")

# Generate YOLOv8 data 
generator = YOLOv8Generator()

# Main class that handles generation
stitcher = Stitcher(generator, background, {"bread": bread, "canned_beans": canned_beans, "jam":jam}, 30, ["bread", "canned_beans", "jam"])

# Generate as many times as needed
stitcher.execute(10, "examples/supermarket/output", "train_data1")
stitcher.execute(10, "examples/supermarket/output", "train_data2")
stitcher.execute(10, "examples/supermarket/output", "train_data3")

Contributing

Contributions are welcome! If you'd like to contribute to SnapStitch, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a pull request.

Please make sure to update the documentation and tests as needed.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspiration and guidance from the open-source community.
  • Tools and libraries that facilitate synthetic data generation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapstitch-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snapstitch-0.1.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file snapstitch-0.1.1.tar.gz.

File metadata

  • Download URL: snapstitch-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.19.1 CPython/3.10.12 Linux/6.8.0-1014-azure

File hashes

Hashes for snapstitch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d81022d9ea927fd2136f8f5c7e10453794586ad0679ec0855d0c511fc6b9f5db
MD5 a366f4f59c5475f4d6f655492bb04e3a
BLAKE2b-256 8d8d1fc575a6b09692ebd2b797361846e6ebe67cd4a024979a8ab2b7c7844668

See more details on using hashes here.

File details

Details for the file snapstitch-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: snapstitch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.19.1 CPython/3.10.12 Linux/6.8.0-1014-azure

File hashes

Hashes for snapstitch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b926345cb108bd8c39321f461655d304a5761aa146654b59266dc62f392ba215
MD5 ac7259b72b34d01ff95e9bc664fdaef6
BLAKE2b-256 a312f0355e74dbfebc9fedcfdae345a143a20b8c26dd9a328ae86922ca71d042

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page