wurenkai / UltraLight-VM-UNet

[arXiv] The official code for "UltraLight VM-UNet: Parallel Vision Mamba Significantly Reduces Parameters for Skin Lesion Segmentation".
235 stars 33 forks source link

dataset error #8

Open lacoboi opened 7 months ago

lacoboi commented 7 months ago

Download the PH2 dataset from this link and extract both training dataset and ground truth folders inside the /data/PH2/

the dataset download from https://www.dropbox.com/s/k88qukc20ljnbuo/PH2Dataset.rar does not contain any jpg image file while Prepare_PH2.py file read 'jpg' image list

wurenkai commented 7 months ago

Hi, the links we have provided are all official links and the PH2 datasets are all initially formatted as '.bmp'. You can use them by first organizing the appropriate file storage format through the 'Prepare your own dataset' step. Then, batch modify them to '.png' or '.jpg' format by the following code, and then perform data preprocessing.

import os

path = "images" # Enter the folder address
files = os.listdir(path)

i = 0
for file in files:
    old = path + os.sep + files[i]
    new = path + os.sep + file.replace('.bmp','.png') # Change the .bmp extension to a .png file extension.
    # replace the old with the new
    os.rename(old,new)
    i+=1