Skip to main content

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

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)

Uploaded Python 2 Python 3

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