Erase
- group Erase
Unnamed Group
-
NVCVStatus cvcudaEraseSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorHandle in, NVCVTensorHandle out, NVCVTensorHandle anchor, NVCVTensorHandle erasing, NVCVTensorHandle values, NVCVTensorHandle imgIdx, int8_t random, uint32_t seed)
Executes the erase operation on the given cuda stream. This operation does not wait for completion.
Limitations:
Input: Data Layout: [kNHWC, kHWC] Channels: [1, 2, 3, 4]
Data Type
Allowed
8bit Unsigned
Yes
8bit Signed
No
16bit Unsigned
Yes
16bit Signed
Yes
32bit Unsigned
No
32bit Signed
Yes
32bit Float
Yes
64bit Float
No
Output: Data Layout: [kNHWC, kHWC] Channels: [1, 2, 3, 4]
Data Type
Allowed
8bit Unsigned
Yes
8bit Signed
No
16bit Unsigned
Yes
16bit Signed
Yes
32bit Unsigned
No
32bit Signed
Yes
32bit Float
Yes
64bit Float
No
Input/Output dependency
anchor TensorProperty | Input == Output -------------- | ------------- Data Layout | Yes Data Type | Yes Number | Yes Channels | Yes Width | Yes Height | Yes
erasing TensorMust be 'N' (dim = 1) with N = number of erasing area. Data Type must be 32bit Signed. DataType must be TYPE_2S32.
imgIdx TensorMust be 'N' (dim = 1) with N = number of erasing area. Data Type must be 32bit Signed. DataType must be TYPE_3S32.
values TensorMust be 'N' (dim = 1) with N = number of erasing area. Data Type must be 32bit Signed. DataType must be TYPE_S32.
Must be 'N' (dim = 1) with W = number of erasing area * 4. Data Type must be 32bit Float. DataType must be TYPE_F32.
- Parameters:
handle – [in] Handle to the operator.
Must not be NULL.
stream – [in] Handle to a valid CUDA stream.
in – [in] input tensor / image batch.
out – [out] output tensor / image batch.
anchor – [in] an array of size num_erasing_area that gives the x coordinate and y coordinate of the top left point in the erasing areas.
erasing – [in] an array of size num_erasing_area that gives the widths of the erasing areas, the heights of the erasing areas and integers in range 0-15, each of whose bits indicates whether or not the corresponding channel need to be erased.
values – [in] an array of size num_erasing_area*4 that gives the filling value for each erase area.
imgIdx – [in] an array of size num_erasing_area that maps a erase area idx to img idx in the batch.
random – [in] an boolean for random op.
seed – [in] random seed for random filling erase area.
inplace – [in] for perform inplace op.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.
NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.
NVCV_SUCCESS – Operation executed successfully.
-
NVCVStatus cvcudaEraseVarShapeSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVImageBatchHandle in, NVCVImageBatchHandle out, NVCVTensorHandle anchor, NVCVTensorHandle erasing, NVCVTensorHandle values, NVCVTensorHandle imgIdx, int8_t random, uint32_t seed)
Functions
-
NVCVStatus cvcudaEraseCreate(NVCVOperatorHandle *handle, int32_t max_num_erasing_area)
Constructs and an instance of the erase operator.
- Parameters:
handle – [out] Where the image instance handle will be written to.
Must not be NULL.
max_num_erasing_area – [in] the maximum number of areas that will be erased.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Handle is null.
NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.
NVCV_SUCCESS – Operation executed successfully.
-
NVCVStatus cvcudaEraseSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorHandle in, NVCVTensorHandle out, NVCVTensorHandle anchor, NVCVTensorHandle erasing, NVCVTensorHandle values, NVCVTensorHandle imgIdx, int8_t random, uint32_t seed)