fastai-datasets-0.0.4
توضیحات
Leveraging fastai to easily load and handle datasets
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fastai-datasets-0.0.4 |
| نام | fastai-datasets |
| نسخه کتابخانه | 0.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | iradz |
| ایمیل نویسنده | irad.zehavi@outlook.com |
| آدرس صفحه اصلی | https://github.com/Irad-Zehavi/fastai-datasets |
| آدرس اینترنتی | https://pypi.org/project/fastai-datasets/ |
| مجوز | Apache Software License 2.0 |
fastai-datasets
================
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
# Docs
See https://irad-zehavi.github.io/fastai-datasets/
## Install
``` sh
pip install fastai_datasets
```
## How to use
As an nbdev library, `fatai_datasets` supports `import *` (without
importing unwanted symbols):
``` python
from fastai_datasets.all import *
```
Here are a few usage examles:
### Easily load a dataset
``` python
mnist = MNIST()
mnist.dls().show_batch()
```

### Show the class distribution
``` python
mnist.plot_class_distribution()
```
<div>
<progress value='10' class='' max='10' style='width:300px; height:20px; vertical-align: middle;'></progress>
100.00% [10/10 00:00<00:00 Class map: partitioning]
</div>

### Sample a subset
Whole datasets:
``` python
mnist
```
[(#60000) [(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7))...]
(#10000) [(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7)),(PILImage mode=RGB size=28x28, TensorCategory(7))...]]
Subset:
``` python
mnist.random_sub_dsets(1000)
```
[(#865) [(PILImage mode=RGB size=28x28, TensorCategory(3)),(PILImage mode=RGB size=28x28, TensorCategory(1)),(PILImage mode=RGB size=28x28, TensorCategory(3)),(PILImage mode=RGB size=28x28, TensorCategory(0)),(PILImage mode=RGB size=28x28, TensorCategory(9)),(PILImage mode=RGB size=28x28, TensorCategory(8)),(PILImage mode=RGB size=28x28, TensorCategory(9)),(PILImage mode=RGB size=28x28, TensorCategory(1)),(PILImage mode=RGB size=28x28, TensorCategory(8)),(PILImage mode=RGB size=28x28, TensorCategory(1))...]
(#135) [(PILImage mode=RGB size=28x28, TensorCategory(3)),(PILImage mode=RGB size=28x28, TensorCategory(9)),(PILImage mode=RGB size=28x28, TensorCategory(4)),(PILImage mode=RGB size=28x28, TensorCategory(1)),(PILImage mode=RGB size=28x28, TensorCategory(4)),(PILImage mode=RGB size=28x28, TensorCategory(5)),(PILImage mode=RGB size=28x28, TensorCategory(0)),(PILImage mode=RGB size=28x28, TensorCategory(4)),(PILImage mode=RGB size=28x28, TensorCategory(1)),(PILImage mode=RGB size=28x28, TensorCategory(9))...]]
### Construct a subset based on classes
``` python
cifar10 = CIFAR10()
dig_frog_bird = cifar10.by_target['dog'] + cifar10.by_target['frog'] + cifar10.by_target['bird']
dig_frog_bird.dls().show_batch()
```
<div>
<progress value='10' class='' max='10' style='width:300px; height:20px; vertical-align: middle;'></progress>
100.00% [10/10 00:00<00:00 Class map: partitioning]
</div>

### Construct a dataset of similarity pairs
``` python
Pairs(cifar10, .01).dls().show_batch()
```
<div>
<progress value='50' class='' max='50' style='width:300px; height:20px; vertical-align: middle;'></progress>
100.00% [50/50 00:00<00:00 Generating negative pairs]
</div>

نیازمندی
| مقدار | نام |
|---|---|
| - | facenet-pytorch |
| - | fastai |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl fastai-datasets-0.0.4:
pip install fastai-datasets-0.0.4.whl
نصب پکیج tar.gz fastai-datasets-0.0.4:
pip install fastai-datasets-0.0.4.tar.gz