[Python] Combine Multiple masks of same image

Discussão em 'Python' iniciado por Stack, Maio 28, 2025.

  1. Stack

    Stack Membro Participativo

    I am working on segmentation of BUSI dataset. The dataset contains 3 folders corresponding to benign and malignant classes. Each folder contains image and its corresponding masks. Some images have multiple masks. Isn't it convenient to combine the masks? what could be the best way to select and combine multiple masks in python. I am using glob.glob to find patterns in pathnames so that i can distinguish between images and masks. but stuck how to find if an image have multiple masks and combine them.The filename for images is Dataset_BUSI_with_GT\benign\benign (1).png and mask is Dataset_BUSI_with_GT\benign\benign (1)_mask.png, Dataset_BUSI_with_GT\benign\benign (1)_mask_2.png(if multiple masks exist)

    Continue reading...

Compartilhe esta Página