create_dl_transform_random_cropT_create_dl_transform_random_cropCreateDlTransformRandomCropCreateDlTransformRandomCropcreate_dl_transform_random_crop (Operator)

Name

create_dl_transform_random_cropT_create_dl_transform_random_cropCreateDlTransformRandomCropCreateDlTransformRandomCropcreate_dl_transform_random_crop — Create a random crop transform.

Signature

create_dl_transform_random_crop( : : TransformName, Probability, Width, Height, GenParamName, GenParamValue : RandomCrop)

Herror T_create_dl_transform_random_crop(const Htuple TransformName, const Htuple Probability, const Htuple Width, const Htuple Height, const Htuple GenParamName, const Htuple GenParamValue, Htuple* RandomCrop)

void CreateDlTransformRandomCrop(const HTuple& TransformName, const HTuple& Probability, const HTuple& Width, const HTuple& Height, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* RandomCrop)

void HDlTransform::HDlTransform(const HString& TransformName, double Probability, Hlong Width, Hlong Height, const HTuple& GenParamName, const HTuple& GenParamValue)

void HDlTransform::HDlTransform(const char* TransformName, double Probability, Hlong Width, Hlong Height, const HTuple& GenParamName, const HTuple& GenParamValue)

void HDlTransform::HDlTransform(const wchar_t* TransformName, double Probability, Hlong Width, Hlong Height, const HTuple& GenParamName, const HTuple& GenParamValue)   ( Windows only)

void HDlTransform::CreateDlTransformRandomCrop(const HString& TransformName, double Probability, Hlong Width, Hlong Height, const HTuple& GenParamName, const HTuple& GenParamValue)

void HDlTransform::CreateDlTransformRandomCrop(const char* TransformName, double Probability, Hlong Width, Hlong Height, const HTuple& GenParamName, const HTuple& GenParamValue)

void HDlTransform::CreateDlTransformRandomCrop(const wchar_t* TransformName, double Probability, Hlong Width, Hlong Height, const HTuple& GenParamName, const HTuple& GenParamValue)   ( Windows only)

static void HOperatorSet.CreateDlTransformRandomCrop(HTuple transformName, HTuple probability, HTuple width, HTuple height, HTuple genParamName, HTuple genParamValue, out HTuple randomCrop)

public HDlTransform(string transformName, double probability, int width, int height, HTuple genParamName, HTuple genParamValue)

void HDlTransform.CreateDlTransformRandomCrop(string transformName, double probability, int width, int height, HTuple genParamName, HTuple genParamValue)

def create_dl_transform_random_crop(transform_name: str, probability: float, width: int, height: int, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[str, float, int]]) -> HHandle

Description

The operator create_dl_transform_random_cropcreate_dl_transform_random_cropCreateDlTransformRandomCropCreateDlTransformRandomCropcreate_dl_transform_random_crop creates a random crop transform and returns the transform handle in RandomCropRandomCropRandomCroprandomCroprandom_crop. The transform creates a crop of size WidthWidthWidthwidthwidth x HeightHeightHeightheightheight at a random position on the input image.

The parameter TransformNameTransformNameTransformNametransformNametransform_name specifies a unique, non-empty name for the transform. Note that when creating a transform pipeline using create_dl_transform_pipelinecreate_dl_transform_pipelineCreateDlTransformPipelineCreateDlTransformPipelinecreate_dl_transform_pipeline, each transform within the pipeline must have a unique name.

The parameter ProbabilityProbabilityProbabilityprobabilityprobability specifies the probability with which the transform is executed in the pipeline. The probability must be between 0.0 and 1.0. A value of 0.0 disables execution, while a value of 1.0 guarantees that the operation is executed.

The parameters WidthWidthWidthwidthwidth and HeightHeightHeightheightheight specify the dimensions of the crop.

No generic parameters GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value are supported for this transform. Only the value [] can be set.

The following parameters are specific to the transforms of type 'random_crop'"random_crop""random_crop""random_crop""random_crop". They can respectively be get or set using the operators get_dl_transform_pipeline_paramget_dl_transform_pipeline_paramGetDlTransformPipelineParamGetDlTransformPipelineParamget_dl_transform_pipeline_param and set_dl_transform_pipeline_paramset_dl_transform_pipeline_paramSetDlTransformPipelineParamSetDlTransformPipelineParamset_dl_transform_pipeline_param:

ParamName set get
'width'"width""width""width""width" x x
'height'"height""height""height""height" x x

Execution Information

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

TransformNameTransformNameTransformNametransformNametransform_name (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the output transform.

Default: 'random_crop' "random_crop" "random_crop" "random_crop" "random_crop"

ProbabilityProbabilityProbabilityprobabilityprobability (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Probability to execute the transform

Default: 1.0

WidthWidthWidthwidthwidth (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Crop width

Default: 64

HeightHeightHeightheightheight (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Crop height

Default: 64

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Generic input parameter names.

Default: []

List of values: []

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value-array HTupleSequence[Union[str, float, int]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Generic input parameter values.

Default: []

Suggested values: []

RandomCropRandomCropRandomCroprandomCroprandom_crop (output_control)  dl_transform HDlTransform, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Random crop transform

Possible Successors

create_dl_transform_pipelinecreate_dl_transform_pipelineCreateDlTransformPipelineCreateDlTransformPipelinecreate_dl_transform_pipeline

See also

create_dl_transform_blurcreate_dl_transform_blurCreateDlTransformBlurCreateDlTransformBlurcreate_dl_transform_blur, create_dl_transform_normalizecreate_dl_transform_normalizeCreateDlTransformNormalizeCreateDlTransformNormalizecreate_dl_transform_normalize, create_dl_transform_random_hsvcreate_dl_transform_random_hsvCreateDlTransformRandomHsvCreateDlTransformRandomHsvcreate_dl_transform_random_hsv, create_dl_transform_resizecreate_dl_transform_resizeCreateDlTransformResizeCreateDlTransformResizecreate_dl_transform_resize

Module

Foundation