Waffle Utils 🥛
Project description
Waffle Utils
- waffle util tools
- Waffle Data Convention
Install
- python >= 3.9
pip install waffle_utils
Examples
Create Dataset from coco format
both example below will result same output
Python Code
from waffle_utils.dataset import Dataset
from waffle_utils.dataset.format import Format
url = "https://github.com/snuailab/waffle_utils/raw/main/mnist.zip"
dummy_zip_file = "mnist.zip"
dummy_dataset_name = "mnist"
dummy_extract_dir = "tmp/extract"
dummy_coco_root_dir = "tmp/extract/raw"
dummy_coco_file = "tmp/extract/exports/coco.json"
network.get_file_from_url(url, dummy_zip_file, create_directory=True)
io.unzip(dummy_zip_file, dummy_extract_dir, create_directory=True)
ds = Dataset.from_coco(
dummy_dataset_name,
dummy_coco_file,
dummy_coco_root_dir,
)
ds = Dataset.from_directory(dummy_dataset_name, dummy_data_root_dir)
ds.split_train_val(train_split_ratio=0.8)
ds.export(Format.YOLO_DETECTION)
CLI
wu get_file_from_url --url https://github.com/snuailab/waffle_utils/raw/main/mnist.zip --file-path tmp/mnist.zip
wu unzip --url tmp/mnist.zip --output-dir tmp/extract
wu from_coco --name mnist --coco-file tmp/extract/exports/coco.json --coco-root-dir tmp/extract/raw
wu split_train_val --name mnist --train-split-ratio 0.8
wu export --name mnist --export-format yolo_detection
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
waffle_utils-0.2.3.tar.gz
(19.1 kB
view details)
Built Distribution
File details
Details for the file waffle_utils-0.2.3.tar.gz
.
File metadata
- Download URL: waffle_utils-0.2.3.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a38856741793098c1e0d5abf51b3e15c77eec14ef0c4f5419836bbde64de2cc6 |
|
MD5 | ba5dd833fd984c1085922d7569ed619c |
|
BLAKE2b-256 | a07b05bcbb0d8e98ef043f365477f93c7f93cb94c9028959e26cbc6b72161d87 |
File details
Details for the file waffle_utils-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: waffle_utils-0.2.3-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0562848ea2c21cffe58e5512d17f4c3eccedbc6cfe271710ee292fff649f6bd2 |
|
MD5 | 65dbd902c4cc1f69e4258380110aa235 |
|
BLAKE2b-256 | 5e1d13fc345732ef8ab6341254a3d0537648a09e87221f7ba061caa2cd00409b |