Skip to main content

Waffle Utils 🥛

Project description

header

Waffle Utils

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


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.1.4.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

waffle_utils-0.1.4-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file waffle_utils-0.1.4.tar.gz.

File metadata

  • Download URL: waffle_utils-0.1.4.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for waffle_utils-0.1.4.tar.gz
Algorithm Hash digest
SHA256 25297909b83ae99708de2c8b98f65f073af9e9e9dfa7aa1e9fc72429d216528b
MD5 6772a8047f5c8a150d83ad5c4696935d
BLAKE2b-256 3ae982dee84c44859704b4117949d032a7af2c15f465f161bab1d3fb1816242a

See more details on using hashes here.

File details

Details for the file waffle_utils-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: waffle_utils-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for waffle_utils-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5deeebe69fefd611576e947261125f75824d791173589364cadb2a972eadfbd7
MD5 bd0b29c9a43daae7403e7efada71dcbe
BLAKE2b-256 edafbcb1902ec15426e3c823d6187ffcd831822e2732f4d47cca6681b57596ea

See more details on using hashes here.

Supported by

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