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.0.tar.gz (7.0 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.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snapstitch-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.19.1 CPython/3.8.19 Darwin/23.4.0

File hashes

Hashes for snapstitch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dc31a8d26ed041fbe091e1879fc04e1341becdc12f5dfc890c7559a18b3eb34d
MD5 56c9db8510ae4c33ce7ea3112d7fc972
BLAKE2b-256 82d923480c512083818312f3d9236123b538ec111eea189ae1217f44b547cef8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snapstitch-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.19.1 CPython/3.8.19 Darwin/23.4.0

File hashes

Hashes for snapstitch-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cd7a0363084e8c1cfc2ac98d79fe30381682d3ebd01f5565ea5060c32ebf5e7
MD5 3971b80aaa428b9ed01c562306863a89
BLAKE2b-256 614d01d4a18daea45abf3dd13d71049f576e8a106b3d0df29cb15ebb80a1483b

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