"MXNet" Im2rec script use (to be continued)

Source: Internet
Author: User
Tags shuffle mxnet

First look at the documentation:

usage:im2rec.py [-h] [--list] [--exts exts [exts ...]                 [--chunks chunks] [--train-ratio Train_ratio]                 [--test-ratio Test_ratio] [--recursive] [--no-shuffle]                 [--pass-through] [--resize Resize] [--center-crop]                 [--quality Quality] [--num-thread Num_thread]                 [--color { -1,0,1}] [--encoding {. Jpg,.png}] [--pack-label] prefix rootcreate an image list or make a record database by reading from an image Listposi  tional arguments:prefix prefix of input/output LST and rec files. Root path to folder containing images.optional arguments:-H,--help show this help message a                        nd exitoptions for creating image lists:--list If The is set Im2rec would create image list (s) by                        Traversing root folder and output to <prefix>.lst.                  Otherwise Im2rec would read <prefix>.lst and create a      Database at <prefix>.rec (default:false)--exts exts [exts ...] List of acceptable image extensions. (Default: ['. jpeg ', '. jpg ', '. png '])--chunks chunks number of chunks. (default:1)--train-ratio train_ratio ratio of images to use for training. (default:1.0)--test-ratio test_ratio ratio of images to use for testing. (default:0)--recursive If true recursively walk through Subdirs and assign an unique L Abel to images in each folder. Otherwise only include images in the root folder and give them label 0. (default:false)--no-shuffle If This is passed, Im2rec would not randomize the image Orde R in <prefix>.lst (default:true) Options for creating database:--pass-through whether to skip Transformatio N and save image as is (Default:false)--resize Resize resize the shorter edge of image to the newsize, original IM Ages is packed by default.                        (default:0)--center-crop Specify whether to crop the center image to make it Rectangular. (default:false)--quality quality JPEG quality for encoding, 1-100;                        or PNG compression for encoding, 1-9 (default:95)--num-thread Num_thread Number of thread to use for encoding. Order of images is different from the input list if >1.                        The input list is modified to match the resulting order. (default:1)--color { -1,0,1} Specify the color mode of the loaded image. 1:loads a color image. Any transparency of image would be neglected. It is the default flag. 0:loads Image in grayscaleMode. -1:loads image as such including alpha channel. (default:1)--encoding {. Jpg,.png} Specify the encoding of the images. (default:. jpg)--pack-label Whether to also pack multi dimensional label in the record F Ile (Default:false)

The parameters that must be filled in are prefix, and root two path parameters,

Prefix: Generate file folder directory

You can specify the path to the . LST so that the makefile will be the same level as the. LST, and the binaries will be generated based on the entries in the. lst

Root: Picture file directory, the default is the category folder, the category name to do label, each folder to store images

If. LST is specified, each picture path changes to the path of each picture in the root path +.lst

--pack-label: Useful when a. LST is specified, allowing label to be a high dimension (mainly label can be set to an array)

As we have actually described before,. lst files are not required, Only. Rec and. IDX are available (tags are stored in. rec), which is an auxiliary (manually generated. LST guide. Rec generation) or as a result display (automatically generated. rec when you select both to generate. lst).

"MXNet" Im2rec script use (to be continued)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.