:py:mod:`tfds_defect_detection.utils` ===================================== .. py:module:: tfds_defect_detection.utils Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: tfds_defect_detection.utils.blend_merge tfds_defect_detection.utils.combine_binary_masks tfds_defect_detection.utils.copy_to_folder tfds_defect_detection.utils.mask_by_color tfds_defect_detection.utils.masking tfds_defect_detection.utils.onehot_to_rgb tfds_defect_detection.utils.random_slice tfds_defect_detection.utils.rgb_to_onehot tfds_defect_detection.utils.sample_more_likely_in_the_middle tfds_defect_detection.utils.validate_images .. py:function:: blend_merge(foreground, background, mask) .. py:function:: combine_binary_masks(mask_1, mask_2) .. py:function:: copy_to_folder(src: pathlib.Path, target) .. py:function:: mask_by_color(img: tensorflow.Tensor, col: Tuple[int, int, int]) -> tensorflow.Tensor .. py:function:: masking(img: tensorflow.Tensor, class_colors: List[Tuple[int, int, int]], stack_axis=-1) -> tensorflow.Tensor .. py:function:: onehot_to_rgb(onehot, color_dict) .. py:function:: random_slice(np_img, width, height=None) .. py:function:: rgb_to_onehot(rgb_arr) .. py:function:: sample_more_likely_in_the_middle(range_length) .. py:function:: validate_images(path: pathlib.Path)