Skip to content

Library that provides a QuickDraw dataset using the Pytorch API.

License

Notifications You must be signed in to change notification settings

framunoz/quick-torch

Repository files navigation

Quick, Torch!

Quick, Torch! is a simple package that provides a "Quick, Draw!" dataset using the abstract class VisionDataset, provided by torchvision API. This package mirrors the MNIST dataset provided in torchvision.

You can install this package with

pip install quick-torch --upgrade

Example

Here are a simple example of usage:

from quick_torch import QuickDraw
import torchvision.transforms as T


ds = QuickDraw(
    root="dataset", 
    categories="face", 
    download=True, 
    transform=T.Resize((128, 128))
)
print(f"{len(ds) = }")
first_data = ds[0]
first_data

>>> Downloading https://storage.googleapis.com/quickdraw_dataset/full/numpy_bitmap/face.npy
>>> 
>>> len(ds) = 161666
>>> (<PIL.Image.Image image mode=L size=128x128>, 108)

For more examples, please refer to the notebook example.ipynb

How to cite?

If you use this code in your work, please reference it as follows:

@software{munoz2023quicktorch,
  author  = {Mu\~{n}oz, Francisco},
  license = {MIT},
  month   = {10},
  title   = {{quick-torch}},
  url     = {https://github.com/framunoz/quick-torch},
  version = {1.0.4},
  year    = {2023}
}

References

This work was mainly inspired by the following repositories:

About

Library that provides a QuickDraw dataset using the Pytorch API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published