Magic Scissors ✂️
Generate synthetic data for computer vision using copy-paste context augmentation.
Magic Scissors is available as a Python package and a web application.
Installation
To install Magic Scissors, run the following command:
pip install magicscissors
Quickstart 🚀
To use Magic Scissors, you need two datasets:
- A dataset with object of interest;
- A dataset with backgrounds on which objects of interest can be pasted.
Both datasets should be formatted as COCO JSON. You can convert data between formats using Roboflow.
from magic_scissors import MagicScissors
data = MagicScissors(
dataset_size=100,
min_objects_per_image=1,
max_objects_per_image=3,
min_size_variance=2,
max_size_variance=5,
annotate_occlusion=0,
working_dir="./",
upload_to_roboflow=False,
roboflow_api_key="",
roboflow_workspace="",
roboflow_project="",
)
# load data from COCO JSON files
data.load_backgrounds_from_coco()
data.load_objects_of_interest_from_coco()
# load data from Roboflow
data.download_objects_of_interest_from_roboflow(
dataset_url=""
)
data.download_backgrounds_from_roboflow(
dataset_url=""
)
# generate dataset and save to directory
data.generate_dataset()
Contributing 🏆
We would love your help improving Magic Scissors! Please see our contributing guide to get started. Thank you 🙏 to all our contributors!
License
This project is licensed under an MIT license.
Metadata
Release files for magic-scissors 0.1.0
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 |
|---|---|---|---|---|
| magic-scissors-0.1.0.tar.gz | 8.1 kB | Without provenance | Details for magic-scissors-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magic_scissors-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for magic_scissors-0.1.0-py3-none-any.whl |
Total release size: 15.8 kB
Release files / magic-scissors-0.1.0.tar.gz
| Download URL | magic-scissors-0.1.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0864be26e0165bf381481768084606957c616478b13500d298c55c2664cbbe32
|
|
BLAKE2b-256 checksum How to use checksums |
fd6a0a779f57ca992795ea5cff59028f2aa7ed176dedb7274cf9197740b21001
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Release files / magic_scissors-0.1.0-py3-none-any.whl
| Download URL | magic_scissors-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bba3cae1bec89345a82152df8a058fb187cdfad1112e06407483cd0b5c1909e3
|
|
BLAKE2b-256 checksum How to use checksums |
c98b3c23bc7d04e8c482653c16fb0af323be9fff058127b3315e3c132af62a98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Security for magic-scissors 0.1.0
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.