Skip to main content

image and video datasets and models for mxnet deep learning

Project description

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.

Installation

pip install mxbox

Features

  1. Define preprocess as a flow

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.

  1. Build DataLoader in several lines

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)
  1. Load popular model and pretrained weights

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

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.3-py2.py3-none-any.whl (26.3 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