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
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.
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)
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
Random shuffle
Efficient multi thread reading
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
Built Distribution
Hashes for mxbox-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a32f014478d50b0f54526ed876996c2a8e4538066dcf7047efc4c258f5fa02af |
|
MD5 | 11dfc4ab772e2040c26c68cd16d29381 |
|
BLAKE2b-256 | 0df51bca0c45e3e202699b0feb41e52e8f11cc2b2e0de851052fbc4543a77b69 |