ins_seg/datasets/bdd100k.py
def mask_merge_parallel(
    bitmask_base: str,
    img_names: List[str],
    scores_list: List[List[float]],
    segms_list: List[List[RLEType]],
    colors_list: List[List[List[int]]],
    nproc: int = 4,
) -> None:
    """Merge masks into a bitmask png file. Run parallely."""
    with Pool(nproc) as pool:
        print("\nMerging overlapped masks.")
        pool.starmap(
            partial(mask_merge, bitmask_base=bitmask_base),
            tqdm(
                zip(img_names, scores_list, segms_list, colors_list),
                total=len(img_names),
            ),
        )
Merge masks into a bitmask png file. Run parallely.
Merge masks into a bitmask png file. Run parallely.
Merge masks into a bitmask png file . Run parallely .
def mask_merge_parallel(
    bitmask_base: str,
    img_names: List[str],
    scores_list: List[List[float]],
    segms_list: List[List[RLEType]],
    colors_list: List[List[List[int]]],
    nproc: int = 4,
) -> None:
    with Pool(nproc) as pool:
        print("\nMerging overlapped masks.")
        pool.starmap(
            partial(mask_merge, bitmask_base=bitmask_base),
            tqdm(
                zip(img_names, scores_list, segms_list, colors_list),
                total=len(img_names),
            ),
        )
def mask_merge_parallel ( bitmask_base : str , img_names : List [ str ] , scores_list : List [ List [ float ] ] , segms_list : List [ List [ RLEType ] ] , colors_list : List [ List [ List [ int ] ] ] , nproc : int = 4 , ) -> None : with Pool ( nproc ) as pool : print ( "\nMerging overlapped masks." ) pool . starmap ( partial ( mask_merge , bitmask_base = bitmask_base ) , tqdm ( zip ( img_names , scores_list , segms_list , colors_list ) , total = len ( img_names ) , ) , )
Merge masks into a bitmask png file.
Merge masks into a bitmask png file .
"""Merge masks into a bitmask png file. Run parallely."""
bitmask_base
str
img_names
List[str]
scores_list
List[List[float]]
segms_list
List[List[RLEType]]
colors_list
List[List[List[int]]]
nproc
int