public class SDImage extends SDOps
| Modifier and Type | Method and Description |
|---|---|
SDVariable |
cropAndResize(String name,
SDVariable image,
SDVariable cropBoxes,
SDVariable boxIndices,
SDVariable cropOutSize,
CropAndResize.Method method,
double extrapolationValue)
Given an input image and some crop boxes, extract out the image subsets and resize them to the specified size.
|
SDVariable |
extractImagePatches(String name,
SDVariable image,
int[] kSizes,
int[] strides,
int[] rates,
boolean sameMode)
Given an input image, extract out image patches (of size kSizes - h x w) and place them in the depth dimension.
|
SDVariable |
nonMaxSuppression(String name,
SDVariable boxes,
SDVariable scores,
SDVariable maxOutSize,
SDVariable iouThreshold,
SDVariable scoreThreshold) |
f, updateVariableNameAndReferencepublic SDImage(SameDiff sameDiff)
public SDVariable cropAndResize(String name, SDVariable image, SDVariable cropBoxes, SDVariable boxIndices, SDVariable cropOutSize, CropAndResize.Method method, double extrapolationValue)
name - May be null. Name for the output variable.image - Input image, with shape [batch, height, width, channels]cropBoxes - Float32 crop, shape [numBoxes, 4] with values in range 0 to 1boxIndices - Indices: which image (index to dimension 0) the cropBoxes belong to. Rank 1, shape [numBoxes]cropOutSize - Output size for the images - int32, rank 1 with values [outHeight, outWidth]method - Image resize methodextrapolationValue - Used for extrapolation, when applicable. 0.0 should be used for the defaultpublic SDVariable extractImagePatches(String name, SDVariable image, @NonNull int[] kSizes, @NonNull int[] strides, @NonNull int[] rates, boolean sameMode)
name - Map be null. Name for the output variableimage - Input image to extract image patches from - shape [batch, height, width, channels]kSizes - Kernel size - size of the image patches, [height, width]strides - Stride in the input dimension for extracting image patches, [stride_height, stride_width]rates - Usually [1,1]. Equivalent to dilation rate in dilated convolutions - how far apart the output pixels
in the patches should be, in the input. A dilation of [a,b] means every ath pixel is taken
along the height/rows dimension, and every bth pixel is take along the width/columns dimensionsameMode - Padding algorithm. If true: use Same paddingpublic SDVariable nonMaxSuppression(String name, @NonNull SDVariable boxes, @NonNull SDVariable scores, @NonNull SDVariable maxOutSize, @NonNull SDVariable iouThreshold, @NonNull SDVariable scoreThreshold)
Copyright © 2019. All rights reserved.