Open lacoboi opened 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
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