THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
def mx.io.im2rec(list_file, transforms, dataset_params, output_path): """ Convert image.list file containing the path to the raw images to binary files. Input Parameters - ---------- list_file - str object containing the path to the list file transforms - gluon.transforms.Compose object dataset_params - dict object whose description is given in the appendix output_path - string object containing the path to the output location Return type - ---------- rec_file_path - str object depicting the path of the output rec file """ return rec_file_path |
arr2rec API Specification
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
def mx.io.np2rec(data, labels, transforms, dataset_params):
"""
Convert numpy representation of images to binary files.
Input Parameters -
----------
data - numpy array holding all the image data.
Supported array shapes -
(N,H,W) - image with uint8 data
(N,3,H,W) - image with RGB values (float or uint8)
(N,4,H,W) - image with RGBA values.
N is the number of the images.
H and W are the rows and columns of the image.
The pixel values should be in the range of [0...1] for float data type and [0...255] for int data type. Values outside this range will be clipped.
labels - numpy array holding labels for each of the images. Should be of length N.
transforms - gluon.transforms.Compose object
dataset_params - dict object whose description is given in the appendix
output_path - string object containing the path to the output location
Return type -
----------
rec_file_path - str object depicting the path of the output rec file
"""
return rec_file_path |
Backward Compatibility
Post implementing the API the existing CLI tool will continue to exist, but users will also be directed to the new API and its accompanying documentation/tutorials.
...