Skip to main content

fastai-datasets

Docs

See https://irad-zehavi.github.io/fastai-datasets/

Install

pip install fastai_datasets

How to use

As an nbdev library, fatai_datasets supports import * (without importing unwanted symbols):

from fastai_datasets.all import *

Here are a few usage examles:

Easily load a dataset

mnist = MNIST()
mnist.dls().show_batch()

Show the class distribution

mnist.plot_class_distribution()

Sample a subset

Whole datasets:

mnist
[(#60000) [(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7))...]
(#10000) [(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(7))...]]

Subset:

mnist.random_sub_dsets(1000)
[(#861) [(PILImageBW mode=L size=28x28, TensorCategory(3)),(PILImageBW mode=L size=28x28, TensorCategory(6)),(PILImageBW mode=L size=28x28, TensorCategory(7)),(PILImageBW mode=L size=28x28, TensorCategory(3)),(PILImageBW mode=L size=28x28, TensorCategory(3)),(PILImageBW mode=L size=28x28, TensorCategory(3)),(PILImageBW mode=L size=28x28, TensorCategory(4)),(PILImageBW mode=L size=28x28, TensorCategory(1)),(PILImageBW mode=L size=28x28, TensorCategory(5)),(PILImageBW mode=L size=28x28, TensorCategory(1))...]
(#139) [(PILImageBW mode=L size=28x28, TensorCategory(0)),(PILImageBW mode=L size=28x28, TensorCategory(0)),(PILImageBW mode=L size=28x28, TensorCategory(1)),(PILImageBW mode=L size=28x28, TensorCategory(2)),(PILImageBW mode=L size=28x28, TensorCategory(8)),(PILImageBW mode=L size=28x28, TensorCategory(4)),(PILImageBW mode=L size=28x28, TensorCategory(2)),(PILImageBW mode=L size=28x28, TensorCategory(8)),(PILImageBW mode=L size=28x28, TensorCategory(1)),(PILImageBW mode=L size=28x28, TensorCategory(9))...]]

Construct a subset based on classes

cifar10 = CIFAR10()
dig_frog_bird = cifar10.by_target['dog'] + cifar10.by_target['frog'] + cifar10.by_target['bird']
dig_frog_bird.dls().show_batch()

Construct a dataset of similarity pairs

Pairs(cifar10, .01).dls().show_batch()

Metadata

Release files for fastai-datasets 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastai-datasets 0.0.8
File Size Uploaded Provenance Actions
fastai-datasets-0.0.8.tar.gz 24.7 kB Without provenance Details for fastai-datasets-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastai-datasets 0.0.8
File Interpreter ABI Platform Actions
fastai_datasets-0.0.8-py3-none-any.whl Python 3 none any Details for fastai_datasets-0.0.8-py3-none-any.whl

Total release size: 50.5 kB

Release files / fastai-datasets-0.0.8.tar.gz

Download URL fastai-datasets-0.0.8.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d6bc7476474cc842a1e20ab2645af681c569c063dc37ae1f3c910c519b7d7ac5
BLAKE2b-256 checksum
How to use checksums
a3dedd6bad069b82d20db4fc46f6c809d3e0208f214e4533bff792e4e2caf1c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / fastai_datasets-0.0.8-py3-none-any.whl

Download URL fastai_datasets-0.0.8-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8fa18badd6ec4424f694f0a21feb384a4babbe2ab8801726068f08e01284859
BLAKE2b-256 checksum
How to use checksums
4f711c414fef82a7627d3f85d8aaf98d3cf8306a0787e7dd434a2aeaf65e3cbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for fastai-datasets 0.0.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page