Metadata-Version: 2.0
Name: mxbox
Version: 0.0.3
Summary: image and video datasets and models for mxnet deep learning
Home-page: https://github.com/lyken17/mxbox
Author: Lyken from TuSimple
Author-email: lykensyu+github@gmail.com
License: BSD
Platform: UNKNOWN
Requires-Dist: numpy
Requires-Dist: pillow
Requires-Dist: six

MXbox: The missing toolbox for mxnet.
=====================================

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

    img_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.resnet50(num_classes=10, pretrained=True)


Documentation
=============
Under construction, coming soon.


TODO list
=========

1) Random shuffle

2) Efficient multi thread reading

3) Common Models

