Image and video datasets and models for mxnet deep learning
Project description
MXbox: Simple, efficient and flexible vision toolbox for mxnet framework.
=====================================
MXbox is a toolbox aiming to provide a general and simple interface for vision tasks. This project is greatly inspired by PyTorch_ and torchvision_. Detailed copyright files will be attached later. Improvements and suggestions are welcome.
.. _PyTorch: https://github.com/pytorch/pytorch
.. _torchvision: https://github.com/pytorch/vision
Installation
============
.. code:: bash
pip install mxbox
Features
========
1) Define **preprocess** as a flow
.. code:: python
transform = transforms.Compose([
transforms.RandomSizedCrop(224),
transforms.RandomHorizontalFlip(),
transforms.mx.ToNdArray(),
transforms.mx.Normalize(mean = [ 0.485, 0.456, 0.406 ],
std = [ 0.229, 0.224, 0.225 ]),
])
PS: By default, mxbox use PIL to read and transform images. But it also supports other backends like skimage_and Numpy.
More examples can be found in XXX.
2) Build **DataLoader** in several lines
.. code:: python
feedin_shapes = {
'batch_size': 8,
'data': [mx.io.DataDesc(name='data', shape=(32, 3, 128, 128), layout='NCHW')],
'label': [mx.io.DataDesc(name='softmax_label', shape=(32,), layout='N')]
}
dst = TestDataset(root='../../data', transform=img_transform, label_transform=label_transform)
loader = BoxLoader(dst, feedin_shapes, collate_fn=mx_collate, num_workers=1)
3) Load popular model and pretrained weights
.. code:: python
vgg = mxbox.models.vgg(num_classes=10, pretrained=True)
resnet = mxbox.models.resnet152(num_classes=10, pretrained=True)
Documentation
=============
Under construction, coming soon.
TODO list
=========
1) Random shuffle
2) Efficient multi thread reading (Corountine wanted
3) Common Models
=====================================
MXbox is a toolbox aiming to provide a general and simple interface for vision tasks. This project is greatly inspired by PyTorch_ and torchvision_. Detailed copyright files will be attached later. Improvements and suggestions are welcome.
.. _PyTorch: https://github.com/pytorch/pytorch
.. _torchvision: https://github.com/pytorch/vision
Installation
============
.. code:: bash
pip install mxbox
Features
========
1) Define **preprocess** as a flow
.. code:: python
transform = transforms.Compose([
transforms.RandomSizedCrop(224),
transforms.RandomHorizontalFlip(),
transforms.mx.ToNdArray(),
transforms.mx.Normalize(mean = [ 0.485, 0.456, 0.406 ],
std = [ 0.229, 0.224, 0.225 ]),
])
PS: By default, mxbox use PIL to read and transform images. But it also supports other backends like skimage_and Numpy.
More examples can be found in XXX.
2) Build **DataLoader** in several lines
.. code:: python
feedin_shapes = {
'batch_size': 8,
'data': [mx.io.DataDesc(name='data', shape=(32, 3, 128, 128), layout='NCHW')],
'label': [mx.io.DataDesc(name='softmax_label', shape=(32,), layout='N')]
}
dst = TestDataset(root='../../data', transform=img_transform, label_transform=label_transform)
loader = BoxLoader(dst, feedin_shapes, collate_fn=mx_collate, num_workers=1)
3) Load popular model and pretrained weights
.. code:: python
vgg = mxbox.models.vgg(num_classes=10, pretrained=True)
resnet = mxbox.models.resnet152(num_classes=10, pretrained=True)
Documentation
=============
Under construction, coming soon.
TODO list
=========
1) Random shuffle
2) Efficient multi thread reading (Corountine wanted
3) Common Models
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
mxbox-0.0.21-py2.py3-none-any.whl
(22.0 kB
view hashes)
Close
Hashes for mxbox-0.0.21-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29d00a43108b1edcd6b3fdbbc9d3957566273abd976048dcadd25c09e8637c63 |
|
MD5 | eb7371d2f91ad8ff3cb070b776c0e626 |
|
BLAKE2b-256 | 5be922cf7aabda001ddd3177442075da44e2e5b4f3c5497a06de195724266bb6 |