v]c@@sGdZddlmZmZddlZddlZddlZddlZddlZddl Z ddl Z yddl Z Wne k rdZ nXddlmZddlmZddlmZddlmZdd lmZd Zd Zd Zd ZdZd=dZddZdddZddZddZ ddZ!ddZ"de#fdYZ$de$fdYZ%de$fdYZ&de$fdYZ'de$fdYZ(d e$fd!YZ)d"e$fd#YZ*d$e$fd%YZ+d&e$fd'YZ,d(e$fd)YZ-d*e$fd+YZ.d,e$fd-YZ/d.e+fd/YZ0d0e$fd1YZ1d2e$fd3YZ2d4e$fd5YZ3d6e$fd7YZ4d8e$fd9YZ5de6e6e6dddddddddd: Z7d;ej8fd<YZ9dS(>s6Read individual image files and perform augmentations.i(tabsolute_importtprint_functionNi(t numeric_types(tndarray(t _internal(tio(trecordiocO@stj|||S(s&Read and decode an image to an NDArray. .. note:: `imread` uses OpenCV (not the CV2 Python library). MXNet must have been built with USE_OPENCV=1 for `imdecode` to work. Parameters ---------- filename : str Name of the image file to be loaded. flag : {0, 1}, default 1 1 for three channel color output. 0 for grayscale output. to_rgb : bool, default True True for RGB formatted output (MXNet default). False for BGR formatted output (OpenCV default). out : NDArray, optional Output buffer. Use `None` for automatic allocation. Returns ------- NDArray An `NDArray` containing the image. Example ------- >>> mx.img.imread("flower.jpg") Set `flag` parameter to 0 to get grayscale output >>> mx.img.imread("flower.jpg", flag=0) Set `to_rgb` parameter to 0 to get output in OpenCV format (BGR) >>> mx.img.imread("flower.jpg", to_rgb=0) (Rt _cvimread(tfilenametargstkwargs((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytimread-s&cO@stj|||||S(sResize image with OpenCV. .. note:: `imresize` uses OpenCV (not the CV2 Python library). MXNet must have been built with USE_OPENCV=1 for `imresize` to work. Parameters ---------- src : NDArray source image w : int, required Width of resized image. h : int, required Height of resized image. interp : int, optional, default=1 Interpolation method (default=cv2.INTER_LINEAR). Possible values: 0: Nearest Neighbors Interpolation. 1: Bilinear interpolation. 2: Bicubic interpolation over 4x4 pixel neighborhood. 3: Area-based (resampling using pixel area relation). It may be a preferred method for image decimation, as it gives moire-free results. But when the image is zoomed, it is similar to the Nearest Neighbors method. (used by default). 4: Lanczos interpolation over 8x8 pixel neighborhood. 9: Cubic for enlarge, area for shrink, bilinear for others 10: Random select from interpolation method metioned above. Note: When shrinking an image, it will generally look best with AREA-based interpolation, whereas, when enlarging an image, it will generally look best with Bicubic (slow) or Bilinear (faster but still looks OK). More details can be found in the documentation of OpenCV, please refer to http://docs.opencv.org/master/da/d54/group__imgproc__transform.html. out : NDArray, optional The output NDArray to hold the result. Returns ------- out : NDArray or list of NDArrays The output of this function. Example ------- >>> with open("flower.jpeg", 'rb') as fp: ... str_image = fp.read() ... >>> image = mx.img.imdecode(str_image) >>> image >>> new_image = mx.img.resize(image, 240, 360) >>> new_image (Rt _cvimresize(tsrctwthR R ((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytimresizeVs6cO@st|tjs}tjddkrPt|tttjf rPt dntj tj |dtj dtj }nt j|||S(sDecode an image to an NDArray. .. note:: `imdecode` uses OpenCV (not the CV2 Python library). MXNet must have been built with USE_OPENCV=1 for `imdecode` to work. Parameters ---------- buf : str/bytes/bytearray or numpy.ndarray Binary image data as string or numpy ndarray. flag : int, optional, default=1 1 for three channel color output. 0 for grayscale output. to_rgb : int, optional, default=1 1 for RGB formatted output (MXNet default). 0 for BGR formatted output (OpenCV default). out : NDArray, optional Output buffer. Use `None` for automatic allocation. Returns ------- NDArray An `NDArray` containing the image. Example ------- >>> with open("flower.jpg", 'rb') as fp: ... str_image = fp.read() ... >>> image = mx.img.imdecode(str_image) >>> image Set `flag` parameter to 0 to get grayscale output >>> with open("flower.jpg", 'rb') as fp: ... str_image = fp.read() ... >>> image = mx.img.imdecode(str_image, flag=0) >>> image Set `to_rgb` parameter to 0 to get output in OpenCV format (BGR) >>> with open("flower.jpg", 'rb') as fp: ... str_image = fp.read() ... >>> image = mx.img.imdecode(str_image, to_rgb=0) >>> image iisrbuf must be of type bytes, bytearray or numpy.ndarray,if you would like to input type str, please convert to bytestdtype(t isinstancetndtNDArraytsyst version_infotbytest bytearraytnpRt ValueErrortarrayt frombuffertuint8Rt _cvimdecode(tbufR R ((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytimdecodes 1/-cC@s|\}}|\}}||krBt||||}}n||krl|t|||}}nt|t|fS(sScales down crop size if it's larger than image size. If width/height of the crop is larger than the width/height of the image, sets the width/height to the width/height of the image. Parameters ---------- src_size : tuple of int Size of the image in (width, height) format. size : tuple of int Size of the crop in (width, height) format. Returns ------- tuple of int A tuple containing the scaled crop size in (width, height) format. Example -------- >>> src_size = (640,480) >>> size = (720,120) >>> new_size = mx.img.scale_down(src_size, size) >>> new_size (640,106) (tfloattint(tsrc_sizetsizeRRtswtsh((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt scale_downs    cO@stj|||||||S(syPad image border with OpenCV. Parameters ---------- src : NDArray source image top : int, required Top margin. bot : int, required Bottom margin. left : int, required Left margin. right : int, required Right margin. type : int, optional, default='0' Filling type (default=cv2.BORDER_CONSTANT). 0 - cv2.BORDER_CONSTANT - Adds a constant colored border. 1 - cv2.BORDER_REFLECT - Border will be mirror reflection of the border elements, like this : fedcba|abcdefgh|hgfedcb 2 - cv2.BORDER_REFLECT_101 or cv.BORDER_DEFAULT - Same as above, but with a slight change, like this : gfedcb|abcdefgh|gfedcba 3 - cv2.BORDER_REPLICATE - Last element is replicated throughout, like this: aaaaaa|abcdefgh|hhhhhhh 4 - cv2.BORDER_WRAP - it will look like this : cdefgh|abcdefgh|abcdefg value : double, optional, default=0 (Deprecated! Use ``values`` instead.) Fill with single value. values : tuple of , optional, default=[] Fill with value(RGB[A] or gray), up to 4 channels. out : NDArray, optional The output NDArray to hold the result. Returns ------- out : NDArray or list of NDArrays The output of this function. Example -------- >>> with open("flower.jpeg", 'rb') as fp: ... str_image = fp.read() ... >>> image = mx.img.imdecode(str_image) >>> image >>> new_image = mx_border = mx.image.copyMakeBorder(mx_img, 1, 2, 3, 4, type=0) >>> new_image (Rt_cvcopyMakeBorder(R ttoptbottlefttrightR R ((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytcopyMakeBorders2cC@s|dkr|r{t|dks*t|\}}}}||krX||krXdS||krt||krtdSdSqdSn|dkrtjddS|d krtd|n|S( sGet the interpolation method for resize functions. The major purpose of this function is to wrap a random interp method selection and a auto-estimation method. Parameters ---------- interp : int interpolation method for all resizing operations Possible values: 0: Nearest Neighbors Interpolation. 1: Bilinear interpolation. 2: Area-based (resampling using pixel area relation). It may be a preferred method for image decimation, as it gives moire-free results. But when the image is zoomed, it is similar to the Nearest Neighbors method. (used by default). 3: Bicubic interpolation over 4x4 pixel neighborhood. 4: Lanczos interpolation over 8x8 pixel neighborhood. 9: Cubic for enlarge, area for shrink, bilinear for others 10: Random select from interpolation method metioned above. Note: When shrinking an image, it will generally look best with AREA-based interpolation, whereas, when enlarging an image, it will generally look best with Bicubic (slow) or Bilinear (faster but still looks OK). More details can be found in the documentation of OpenCV, please refer to http://docs.opencv.org/master/da/d54/group__imgproc__transform.html. sizes : tuple of int (old_height, old_width, new_height, new_width), if None provided, auto(9) will return Area(2) anyway. Returns ------- int interp method from 0 to 4 i iiiii isUnknown interp method %d(iiiii(tlentAssertionErrortrandomtrandintR(tinterptsizestohtowtnhtnw((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt_get_interp_method!s$   c C@sv|j\}}}||kr6||||}}n||||}}t|||dt|||||fS(sResizes shorter edge to size. .. note:: `resize_short` uses OpenCV (not the CV2 Python library). MXNet must have been built with OpenCV for `resize_short` to work. Resizes the original image by setting the shorter edge to size and setting the longer edge accordingly. Resizing function is called from OpenCV. Parameters ---------- src : NDArray The original image. size : int The length to be set for the shorter edge. interp : int, optional, default=2 Interpolation method used for resizing the image. Possible values: 0: Nearest Neighbors Interpolation. 1: Bilinear interpolation. 2: Area-based (resampling using pixel area relation). It may be a preferred method for image decimation, as it gives moire-free results. But when the image is zoomed, it is similar to the Nearest Neighbors method. (used by default). 3: Bicubic interpolation over 4x4 pixel neighborhood. 4: Lanczos interpolation over 8x8 pixel neighborhood. 9: Cubic for enlarge, area for shrink, bilinear for others 10: Random select from interpolation method metioned above. Note: When shrinking an image, it will generally look best with AREA-based interpolation, whereas, when enlarging an image, it will generally look best with Bicubic (slow) or Bilinear (faster but still looks OK). More details can be found in the documentation of OpenCV, please refer to http://docs.opencv.org/master/da/d54/group__imgproc__transform.html. Returns ------- NDArray An 'NDArray' containing the resized image. Example ------- >>> with open("flower.jpeg", 'rb') as fp: ... str_image = fp.read() ... >>> image = mx.img.imdecode(str_image) >>> image >>> size = 640 >>> new_image = mx.img.resize_short(image, size) >>> new_image R2(tshapeRR8(R R$R2RRt_tnew_htnew_w((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt resize_shortXs 6 c C@stj|d||dfd||||t|jdf}|dk r||f|kr|||d|df}t|dt|||}n|S(s`Crop src at fixed location, and (optionally) resize it to size. Parameters ---------- src : NDArray Input image x0 : int Left boundary of the cropping area y0 : int Top boundary of the cropping area w : int Width of the cropping area h : int Height of the cropping area size : tuple of (w, h) Optional, resize to new size after cropping interp : int, optional, default=2 Interpolation method. See resize_short for details. Returns ------- NDArray An `NDArray` containing the cropped image. tbeginitendiiR2N(RtsliceR"R9tNoneRR8( R tx0ty0RRR$R2toutR3((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt fixed_crops B!c C@s|j\}}}t||f|\}}tjd||}tjd||} t||| ||||} | || ||ffS(sRandomly crop `src` with `size` (width, height). Upsample result if `src` is smaller than `size`. Parameters ---------- src: Source image `NDArray` size: Size of the crop formatted as (width, height). If the `size` is larger than the image, then the source image is upsampled to `size` and returned. interp: int, optional, default=2 Interpolation method. See resize_short for details. Returns ------- NDArray An `NDArray` containing the cropped image. Tuple A tuple (x, y, width, height) where (x, y) is top-left position of the crop in the original image and (width, height) are the dimensions of the cropped image. Example ------- >>> im = mx.nd.array(cv2.imread("flower.jpg")) >>> cropped_im, rect = mx.image.random_crop(im, (100, 100)) >>> print cropped_im >>> print rect (20, 21, 100, 100) i(R9R'R0R1RE( R R$R2RRR:R<R;RBRCRD((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt random_crops c C@s|j\}}}t||f|\}}t||d}t||d} t||| ||||} | || ||ffS(sVCrops the image `src` to the given `size` by trimming on all four sides and preserving the center of the image. Upsamples if `src` is smaller than `size`. .. note:: This requires MXNet to be compiled with USE_OPENCV. Parameters ---------- src : NDArray Binary source image data. size : list or tuple of int The desired output image size. interp : int, optional, default=2 Interpolation method. See resize_short for details. Returns ------- NDArray The cropped image. Tuple (x, y, width, height) where x, y are the positions of the crop in the original image and width, height the dimensions of the crop. Example ------- >>> with open("flower.jpg", 'rb') as fp: ... str_image = fp.read() ... >>> image = mx.image.imdecode(str_image) >>> image >>> cropped_image, (x, y, width, height) = mx.image.center_crop(image, (1000, 500)) >>> cropped_image >>> x, y, width, height (1241, 910, 1000, 500) i(R9R'R"RE( R R$R2RRR:R<R;RBRCRD((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt center_crops 'cC@s6|dk r||8}n|dk r2||:}n|S(s9Normalize src with mean and std. Parameters ---------- src : NDArray Input image mean : NDArray RGB mean to be subtracted std : NDArray RGB standard deviation to be divided Returns ------- NDArray An `NDArray` containing the normalized image. N(RA(R tmeantstd((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytcolor_normalizes     c K@s|j\}}}||} d|krJtjdt|jd}n| s]tdt|tr{|df}nx&tdD]}t j |d|d| } t j |dt j |df} t j t j | } ttt j| | } ttt j| | }| |kr||krt jd|| }t jd||}t|||| |||}|||| |ffSqWt|||S(sRandomly crop src with size. Randomize area and aspect ratio. Parameters ---------- src : NDArray Input image size : tuple of (int, int) Size of the crop formatted as (width, height). area : float in (0, 1] or tuple of (float, float) If tuple, minimum area and maximum area to be maintained after cropping If float, minimum area to be maintained after cropping, maximum area is set to 1.0 ratio : tuple of (float, float) Aspect ratio range as (min_aspect_ratio, max_aspect_ratio) interp: int, optional, default=2 Interpolation method. See resize_short for details. Returns ------- NDArray An `NDArray` containing the cropped image. Tuple A tuple (x, y, width, height) where (x, y) is top-left position of the crop in the original image and (width, height) are the dimensions of the cropped image. tmin_areas4`min_area` is deprecated. Please use `area` instead.s4unexpected keyword arguments for `random_size_crop`.g?i ii(R9twarningstwarntDeprecationWarningtpopR/RRtrangeR0tuniformRtlogtexpR"troundtsqrtR1RERG(R R$tareatratioR2R RRR:tsrc_areat target_areat log_ratiot new_ratioR<R;RBRCRD((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytrandom_size_crop&s*   &t AugmentercB@s)eZdZdZdZdZRS(sImage Augmenter base classcK@s|||_xl|jjD][\}}t|tjrF|j}nt|tjr|j}||j|>> # An example of creating multiple augmenters >>> augs = mx.image.CreateAugmenter(data_shape=(3, 300, 300), rand_mirror=True, ... mean=True, brightness=0.125, contrast=0.125, rand_gray=0.05, ... saturation=0.125, pca_noise=0.05, inter_method=10) >>> # dump the details >>> for aug in augs: ... aug.dumps() iiig{Gz?g@g@g?g{GK@gV-@g|?5^?g)\(g鷯?g=yX?gg;Onrg?5^I g[B>٬gyX5;g.1?gQ^@gR]@gRY@ig(\2M@g(\L@gL@N(ii(ii(RRtR/RwRvRxRRRRRRRRRRRARRRR9R(t data_shapetresizet rand_cropt rand_resizet rand_mirrorRHRIR}RRRt pca_noiset rand_grayt inter_methodtauglistt crop_sizeRR((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytCreateAugmentersH?  -     7  7t ImageItercB@seZdZdddddedddddddddZdZd Zd Zdd Z d Z d Z dZ dZ dZdZdZRS(sImage data iterator with a large number of augmentation choices. This iterator supports reading from both .rec files and raw image files. To load input images from .rec files, use `path_imgrec` parameter and to load from raw image files, use `path_imglist` and `path_root` parameters. To use data partition (for distributed training) or shuffling, specify `path_imgidx` parameter. Parameters ---------- batch_size : int Number of examples per batch. data_shape : tuple Data shape in (channels, height, width) format. For now, only RGB image with 3 channels is supported. label_width : int, optional Number of labels per example. The default label width is 1. path_imgrec : str Path to image record file (.rec). Created with tools/im2rec.py or bin/im2rec. path_imglist : str Path to image list (.lst). Created with tools/im2rec.py or with custom script. Format: Tab separated record of index, one or more labels and relative_path_from_root. imglist: list A list of images with the label(s). Each item is a list [imagelabel: float or list of float, imgpath]. path_root : str Root folder of image files. path_imgidx : str Path to image index file. Needed for partition and shuffling when using .rec source. shuffle : bool Whether to shuffle all images at the start of each iteration or not. Can be slow for HDD. part_index : int Partition index. num_parts : int Total number of partitions. data_name : str Data name for provided symbols. label_name : str Label name for provided symbols. dtype : str Label data type. Default: float32. Other options: int32, int64, float64 last_batch_handle : str, optional How to handle the last batch. This parameter can be 'pad'(default), 'discard' or 'roll_over'. If 'pad', the last batch will be padded with data starting from the begining If 'discard', the last batch will be discarded If 'roll_over', the remaining elements will be rolled over to the next iteration kwargs : ... More arguments for creating augmenter. See mx.image.CreateAugmenter. iitdatat softmax_labelRtpadc K@stt|j|s4|s4t| ts4t|dksPt|dtjjdd}t j dt |t j d |j j }|rt j d |||rtj||d |_t|jj|_q tj|d |_d|_n d|_|rt j d ||t|}i} g}x|t|jd D]h}|jjd}tj|dd!d|}t|d}||df| |<|j|qTW| |_WdQXn t| trt j d|i}g}d}x| D]}t |}|d7}t|dkrTtj|d d|}nKt|dt rtj|dgd|}ntj|dd|}||df||<|jt |q W||_n d|_||_!|j"|| |f|fg|_#|dkr5|||ffg|_$n||ffg|_$||_%||_&||_'||_(|jdkr||_)nE|s| dks|r|jdk st|j|_)n d|_)| dkr'| | kstt|j)}|| }|j)| || d|!|_)n| dkrHt*|||_+n | |_+d|_,t-|_.||_/|j)dk rt|j)nd|_0d|_1d|_2d|_3|j4dS(Ntint32Rtint64tfloat64s label not supportedtMXNET_CPU_WORKER_NTHREADSis Using %s threads for decoding...sYSet enviroment variable MXNET_CPU_WORKER_NTHREADS to a larger number to use more threads.s%s: loading recordio %s...trs%s: loading image list %s...ts iRis%s: loading image list...i(RRRR(5RpRReRtlistR/tostenvirontgettloggingtinfotstrRhRiRtMXIndexedRecordIOtimgrectkeystimgidxt MXRecordIORAtopentitertreadlinetstriptsplitRRR"RtimglistR.Rt path_roottcheck_data_shapet provide_datat provide_labelt batch_sizeRt label_widthRztseqRRtcurRt _allow_readtlast_batch_handlet num_imaget _cache_datat _cache_labelt _cache_idxtreset(RbRRRt path_imgrect path_imglistRt path_imgidxRzt part_indext num_partstaug_listRt data_namet label_nameRRR t num_threadst class_nametfintimgkeystlinetlabeltkeytresulttindextimgtNtC((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyRes!                      "     '   cC@s|jdk r+|jr+tj|jn|jdksI|jdkr|jdk rh|jjnd|_|j t krt |_ qndS(s1Resets the iterator to the beginning of the data.t roll_overiN( RRARzR0RRRRRRtFalseR(Rb((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyRs cC@s{|jdk r+|jr+tj|jn|jdk rJ|jjnd|_t|_d|_ d|_ d|_ dS(s-Resets the iterator and ignore roll over dataiN( RRARzR0RRRRRRRR(Rb((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt hard_reset s    cC@sx|jtkrtn|jdk r|j|jkrL|j|j}n!|jdkrgd|_nt|jd7_|jdk r|jj |}t j |\}}|j dkr|j |fS|j |d|fSqt|j |\}}||j|fSne|jj}|dkrR|jdkrI|jjntnt j |\}}|j |fSdS(s+Helper function for reading in next sample.tdiscardiiN(RRt StopIterationRRARRRRtread_idxRtunpackRRt read_imagetreadR(RbtidxtstheaderRRtfname((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt next_samples0     c C@s|}|j}yx||kr|j\}}|j|}y|j|Wn,tk r} tjdt| qnX|j|}||kst d|j |||<|||<|d7}qWWn t k r|st qnX|S(s$Helper function for batchifying datasInvalid image, skipping: %ss7Batch size must be multiples of augmenter output lengthi( RRR tcheck_valid_imaget RuntimeErrorRtdebugRtaugmentation_transformR/tpostprocess_dataR( Rbt batch_datat batch_labeltstarttiRRRRte((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyt _batchify5s(    c C@s|j}|j\}}}|jdk r~|jdk sEtd|jdk s`td|j}|j}|j}nGtj||||f}tj |j dd}|j ||}||}|dkr|j dkrt q|j dkr5|jdkr5||_||_||_t q|j |||} |j dkret|_qd|_d|_d|_ntj|g|gd|S( sReturns the next batch of data.s_cache_label didn't have valuess_cache_idx didn't have valuesiiRRRN(RRRRARR/RRtzerostemptyRR RRRRRt DataBatch( RbRtcRRRRRRR:((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytnextLs8               cC@sDt|dks!tdn|ddks@tdndS(s'Checks if the input data shape is validis6data_shape should have length 3, with dimensions CxHxWis0This iterator expects inputs to have 3 channels.N(R.R(RbR((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyRuscC@s,t|djdkr(tdndS(s!Checks if the input data is validisData shape is wrongN(R.R9R(RbR((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyR|sc@sTfd}yt|}Wn.tk rO}tdj||nX|S(s\Decodes a string or byte string to an NDArray. See mx.img.imdecode for more details.c@sjdk r-jjjd}njjd}jdk ruj|\}}dj|}ndj|}d|S(s,Locate the image file/index if decode fails.is filename: {}s index: {}s Broken image N(RRARRRtformat(RR:Rtmsg(Rb(s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytlocatess{}, {}(R t ExceptionRR(RbRRRR((Rbs2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyR s  cC@s:ttjj|j|d}|j}WdQX|S(sReads an input image `fname` and returns the decoded raw bytes. Examples -------- >>> dataIter.read_image('Face.jpg') # returns decoded raw bytes. trbN(RRtpathtjoinRR(RbRRR((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyRs$cC@s$x|jD]}||}q W|S(s2Transforms input data with specified augmentation.(R(RbRRs((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyRscC@stj|ddS(s@Final postprocessing step before image is loaded into the batch.taxesiii(iii(Rt transpose(Rbtdatum((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyRsN(RiRmRnRARReRRRR RRRR RRR(((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pyRis"5   Z   )    ((:Rnt __future__RRRRR0RRfRLtnumpyRtcv2t ImportErrorRAtbaseRRRRRRRR RR R'R-R8R=RERFRGRJR\tobjectR]RoRtRuRvRwRxRyR|RRRRRRRRRRRtDataIterR(((s2/tmp/pip-install-Qvdv_2/mxnet/mxnet/image/image.pytsf          ) 9 : # 5 7 > ' 1  7"" p