utils/dash_utils.py
def refresh_action(config: CfgNode) -> Tuple[List[str], List[float]]:
    """Collects all available images, both raw and predictions,
        end returns them together with corresponding coordinates.

    Args:
        config (CfgNode): App config

    Returns:
        Tuple[List[str], List[float]]: A Tuple containing
            * List of paths to downloaded image
            * List of corresponding coordinates, in format:
                [[south, west], [north, east]]
    """
    coords_all = load_json(os.path.join(config.DATA_DIR, config.POLYGON_JSON_NAME))
    paths = []
    coords = []
    for key, tile_coord in coords_all.items():
        if "tile" not in key:
            continue
        pred_path = key.replace(".png", "_pred.png")
        if os.path.isfile(pred_path):
            url = pred_path
        else:
            url = key
        converted_coords = convert_coords(tile_coord)

        paths.append(url)
        coords.append(converted_coords)

    return paths, coords
Collects all available images, both raw and predictions,
        end returns them together with corresponding coordinates.

    Args:
        config (CfgNode): App config

    Returns:
        Tuple[List[str], List[float]]: A Tuple containing
            * List of paths to downloaded image
            * List of corresponding coordinates, in format:
                [[south, west], [north, east]]
    
Collects all available images, both raw and predictions,
end returns them together with corresponding coordinates.
Collects all available images both raw and predictions end returns them together with corresponding coordinates .
def refresh_action(config: CfgNode) -> Tuple[List[str], List[float]]:
    coords_all = load_json(os.path.join(config.DATA_DIR, config.POLYGON_JSON_NAME))
    paths = []
    coords = []
    for key, tile_coord in coords_all.items():
        if "tile" not in key:
            continue
        pred_path = key.replace(".png", "_pred.png")
        if os.path.isfile(pred_path):
            url = pred_path
        else:
            url = key
        converted_coords = convert_coords(tile_coord)
        paths.append(url)
        coords.append(converted_coords)
    return paths, coords
def refresh_action ( config : CfgNode ) -> Tuple [ List [ str ] , List [ float ] ] : coords_all = load_json ( os . path . join ( config . DATA_DIR , config . POLYGON_JSON_NAME ) ) paths = [ ] coords = [ ] for key , tile_coord in coords_all . items ( ) : if "tile" not in key : continue pred_path = key . replace ( ".png" , "_pred.png" ) if os . path . isfile ( pred_path ) : url = pred_path else : url = key converted_coords = convert_coords ( tile_coord ) paths . append ( url ) coords . append ( converted_coords ) return paths , coords
Collects all available images, both raw and predictions,
end returns them together with corresponding coordinates.
Collects all available images both raw and predictions end returns them together with corresponding coordinates .
"""Collects all available images, both raw and predictions,
        end returns them together with corresponding coordinates.

    Args:
        config (CfgNode): App config

    Returns:
        Tuple[List[str], List[float]]: A Tuple containing
            * List of paths to downloaded image
            * List of corresponding coordinates, in format:
                [[south, west], [north, east]]
    """
A Tuple containing
List of paths to downloaded image
List of corresponding coordinates, in format:
[[south, west], [north, east]]
A Tuple containing List of paths to downloaded image List of corresponding coordinates in format : [[ south west ] [ north east ]]
Tuple[List[str], List[float]]
config
CfgNode
None