utils/dash_utils.py
def generate_alpha_for_tile(mask_file: str, mask_config: dict, alpha: float) -> None:
    """Generates alphablend for a single tile

    Args:
        mask_file (str): Path to the predicted tile mask
        mask_config (dict): Mask config, should have
                            "alpha", "class2label" and "colors" defined
        alpha (float): Alpha for alphablend
    """
    input_single_file = mask_file.replace("/mask_np", "")
    mask = np.load(mask_file)
    input_img = convert_sat_np_for_vis(input_single_file)

    name = os.path.splitext(os.path.split(mask_file)[1])[0]
    destination = os.path.split(os.path.split(mask_file)[0])[0]
    output_path = get_path_for_output("alphablend", destination, name)

    generate_save_alphablend(
        input_img,
        mask,
        mask_config,
        output_path,
        alpha,
    )
Generates alphablend for a single tile

    Args:
        mask_file (str): Path to the predicted tile mask
        mask_config (dict): Mask config, should have
                            "alpha", "class2label" and "colors" defined
        alpha (float): Alpha for alphablend
    
Generates alphablend for a single tile
Generates alphablend for a single tile
def generate_alpha_for_tile(mask_file: str, mask_config: dict, alpha: float) -> None:
    input_single_file = mask_file.replace("/mask_np", "")
    mask = np.load(mask_file)
    input_img = convert_sat_np_for_vis(input_single_file)
    name = os.path.splitext(os.path.split(mask_file)[1])[0]
    destination = os.path.split(os.path.split(mask_file)[0])[0]
    output_path = get_path_for_output("alphablend", destination, name)
    generate_save_alphablend(
        input_img,
        mask,
        mask_config,
        output_path,
        alpha,
    )
def generate_alpha_for_tile ( mask_file : str , mask_config : dict , alpha : float ) -> None : input_single_file = mask_file . replace ( "/mask_np" , "" ) mask = np . load ( mask_file ) input_img = convert_sat_np_for_vis ( input_single_file ) name = os . path . splitext ( os . path . split ( mask_file ) [ 1 ] ) [ 0 ] destination = os . path . split ( os . path . split ( mask_file ) [ 0 ] ) [ 0 ] output_path = get_path_for_output ( "alphablend" , destination , name ) generate_save_alphablend ( input_img , mask , mask_config , output_path , alpha , )
Generates alphablend for a single tile
Generates alphablend for a single tile
"""Generates alphablend for a single tile

    Args:
        mask_file (str): Path to the predicted tile mask
        mask_config (dict): Mask config, should have
                            "alpha", "class2label" and "colors" defined
        alpha (float): Alpha for alphablend
    """
mask_file
str
Path to the predicted tile mask
Path to the predicted tile mask
mask_config
dict
Mask config, should have
"alpha", "class2label" and "colors" defined
Mask config should have " alpha " " class2label " and " colors " defined
alpha
float
Alpha for alphablend
Alpha for alphablend