tfds_defect_detection.utils#

Module Contents#

Functions#

blend_merge(foreground, background, mask)

combine_binary_masks(mask_1, mask_2)

copy_to_folder(src, target)

mask_by_color(→ tensorflow.Tensor)

masking(→ tensorflow.Tensor)

onehot_to_rgb(onehot, color_dict)

random_slice(np_img, width[, height])

rgb_to_onehot(rgb_arr)

sample_more_likely_in_the_middle(range_length)

validate_images(path)

tfds_defect_detection.utils.blend_merge(foreground, background, mask)[source]#
tfds_defect_detection.utils.combine_binary_masks(mask_1, mask_2)[source]#
tfds_defect_detection.utils.copy_to_folder(src: pathlib.Path, target)[source]#
tfds_defect_detection.utils.mask_by_color(img: tensorflow.Tensor, col: Tuple[int, int, int]) tensorflow.Tensor[source]#
tfds_defect_detection.utils.masking(img: tensorflow.Tensor, class_colors: List[Tuple[int, int, int]], stack_axis=-1) tensorflow.Tensor[source]#
tfds_defect_detection.utils.onehot_to_rgb(onehot, color_dict)[source]#
tfds_defect_detection.utils.random_slice(np_img, width, height=None)[source]#
tfds_defect_detection.utils.rgb_to_onehot(rgb_arr)[source]#
tfds_defect_detection.utils.sample_more_likely_in_the_middle(range_length)[source]#
tfds_defect_detection.utils.validate_images(path: pathlib.Path)[source]#