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.2.tar.gz
(19.0 kB
view details)
Built Distribution
File details
Details for the file waffle_utils-0.2.2.tar.gz
.
File metadata
- Download URL: waffle_utils-0.2.2.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82c1baf4df32bce395cd4356e56a01eba3b19e2cc35260acf90df131392e7411 |
|
MD5 | a0bda2e33d7d21977a6a669297d5ef3e |
|
BLAKE2b-256 | 160ed5a967ada31804948415f44910d7e992c85721e66f25add59cf0439bf606 |
File details
Details for the file waffle_utils-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: waffle_utils-0.2.2-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 | 6f88f1a9f9844655ce1fbd9e1a81b52f1caeef950af3d80ea61a173ef3de7c37 |
|
MD5 | 11e493f30dddc966c7cca8dc6591642e |
|
BLAKE2b-256 | 7af8c48251239614d7d9fb2fca76cce2eaa017123011de5d439b253b6708446c |