remove_texture_inspection_model_imageT_remove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_image (算子)

名称

remove_texture_inspection_model_imageT_remove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_image — 清除纹理检查模型的所有图像或用户定义的图像子集。

签名

remove_texture_inspection_model_image( : : TextureInspectionModel, Indices : RemainingIndices)

Herror T_remove_texture_inspection_model_image(const Htuple TextureInspectionModel, const Htuple Indices, Htuple* RemainingIndices)

void RemoveTextureInspectionModelImage(const HTuple& TextureInspectionModel, const HTuple& Indices, HTuple* RemainingIndices)

static HTuple HTextureInspectionModel::RemoveTextureInspectionModelImage(const HTextureInspectionModelArray& TextureInspectionModel, const HTuple& Indices)

HTuple HTextureInspectionModel::RemoveTextureInspectionModelImage(const HTuple& Indices) const

static void HOperatorSet.RemoveTextureInspectionModelImage(HTuple textureInspectionModel, HTuple indices, out HTuple remainingIndices)

static HTuple HTextureInspectionModel.RemoveTextureInspectionModelImage(HTextureInspectionModel[] textureInspectionModel, HTuple indices)

HTuple HTextureInspectionModel.RemoveTextureInspectionModelImage(HTuple indices)

def remove_texture_inspection_model_image(texture_inspection_model: MaybeSequence[HHandle], indices: Sequence[int]) -> Sequence[int]

描述

remove_texture_inspection_model_imageremove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_image clears all or certain selected images that have been stored in a texture inspection model TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModeltexture_inspection_model

On the one hand, the usage of remove_texture_inspection_model_imageremove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_image is recommended to reduce the storage space of a saved texture inspection model. This is especially of advantage if the texture inspection model has been trained in an offline process and written with write_texture_inspection_modelwrite_texture_inspection_modelWriteTextureInspectionModelWriteTextureInspectionModelWriteTextureInspectionModelwrite_texture_inspection_model。In this case, test images can still be classified using apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModelApplyTextureInspectionModelapply_texture_inspection_model, while the required storage space is reduced to a minimum. On the other hand, it offers a simple way to delete certain selected images of the texture inspection model that are not needed (anymore) for a subsequent classification process. This allows the user to proceed with an entirely configured model, while only the used image data has to be tuned to solve the underlying inspection problem. Please note that after removing images from the model a retraining is required.

In order to specifically delete images from the texture inspection model, the indices of the respective images have to be specified in the parameter IndicesIndicesIndicesIndicesindicesindices. A validation of all images that are still in the texture inspection model can be made using the value 'image_indices'"image_indices""image_indices""image_indices""image_indices""image_indices" in get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param。If the user still passes unassigned indices to delete images, these indices are ignored. Besides the above mentioned option, remove_texture_inspection_model_imageremove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_image also allows to set the parameter IndicesIndicesIndicesIndicesindicesindices to the value 'all'"all""all""all""all""all". In this case, all images of the texture inspection model are deleted.

It should be noted that after deleting all images, the model can only be (re)trained, if new images are added using add_texture_inspection_model_imageadd_texture_inspection_model_imageAddTextureInspectionModelImageAddTextureInspectionModelImageAddTextureInspectionModelImageadd_texture_inspection_model_image。In the case that only a subset of all images has been deleted, a call of train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModeltrain_texture_inspection_model requires all steps of the training to be executed, since potentially still available training data does not match the used data.

After calling remove_texture_inspection_model_imageremove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_image, the remaining indices of the images that are still in the texture inspection model are returned in the parameter RemainingIndicesRemainingIndicesRemainingIndicesRemainingIndicesremainingIndicesremaining_indices

有关纹理检查概念的说明,请参阅 检查 / 纹理检查 一章的引言。

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModeltexture_inspection_model (输入控制,状态被修改)  texture_inspection_model(-array) HTextureInspectionModel, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

纹理检查模型的句柄。

IndicesIndicesIndicesIndicesindicesindices (输入控制)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indices of the images to be deleted from the texture inspection model.

RemainingIndicesRemainingIndicesRemainingIndicesRemainingIndicesremainingIndicesremaining_indices (输出控制)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Indices of the images that remain in the texture inspection model.

示例(HDevelop)

* Create texture inspection model
create_texture_inspection_model ('basic', TextureInspectionModel)
* Read and add training images
read_image (TrainImage, 'carpet/carpet_01')
add_texture_inspection_model_image (TrainImage, TextureInspectionModel, \
                                    Indices)
* Get added training images
get_texture_inspection_model_image (TrainImageOut, TextureInspectionModel)
* Remove training images
remove_texture_inspection_model_image (TextureInspectionModel, Indices, \
                                       RemainingIndices)

结果

如果参数有效,算子 remove_texture_inspection_model_imageremove_texture_inspection_model_imageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageRemoveTextureInspectionModelImageremove_texture_inspection_model_image 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModeltrain_texture_inspection_model

另见

create_texture_inspection_modelcreate_texture_inspection_modelCreateTextureInspectionModelCreateTextureInspectionModelCreateTextureInspectionModelcreate_texture_inspection_model, clear_texture_inspection_modelclear_texture_inspection_modelClearTextureInspectionModelClearTextureInspectionModelClearTextureInspectionModelclear_texture_inspection_model, set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParamset_texture_inspection_model_param, get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param, add_texture_inspection_model_imageadd_texture_inspection_model_imageAddTextureInspectionModelImageAddTextureInspectionModelImageAddTextureInspectionModelImageadd_texture_inspection_model_image

模块

匹配