Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*__pycache__*
__pycache__*
Binary file removed __pycache__/cfg.cpython-311.pyc
Binary file not shown.
Binary file removed __pycache__/dataset.cpython-311.pyc
Binary file not shown.
Binary file removed __pycache__/function.cpython-311.pyc
Binary file not shown.
Binary file removed __pycache__/utils.cpython-311.pyc
Binary file not shown.
Binary file removed conf/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed conf/__pycache__/global_settings.cpython-311.pyc
Binary file not shown.
12 changes: 5 additions & 7 deletions dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class ISIC2016(Dataset):
def __init__(self, args, data_path , transform = None, transform_msk = None, mode = 'Training',prompt = 'click', plane = False):

df = pd.read_csv(os.path.join(data_path, 'ISBI2016_ISIC_Part3B_' + mode + '_GroundTruth.csv'), encoding='gbk')
self.name_list = df.iloc[:,1].tolist()
self.label_list = df.iloc[:,2].tolist()
self.data_path = data_path
self.name_list = df.iloc[:,0].tolist()
self.label_list = df.iloc[:,1].tolist()
self.data_path = os.path.join(data_path, 'ISBI2016_ISIC_Part3B_' + mode + "_Data")
self.mode = mode
self.prompt = prompt
self.img_size = args.image_size
Expand All @@ -40,10 +40,10 @@ def __getitem__(self, index):
point_label = 1

"""Get the images"""
name = self.name_list[index]
name = self.name_list[index] + ".jpg"
img_path = os.path.join(self.data_path, name)

mask_name = self.label_list[index]
mask_name = self.name_list[index] + "_Segmentation.png"
msk_path = os.path.join(self.data_path, mask_name)

img = Image.open(img_path).convert('RGB')
Expand All @@ -60,11 +60,9 @@ def __getitem__(self, index):
img = self.transform(img)
torch.set_rng_state(state)


if self.transform_msk:
mask = self.transform_msk(mask)


name = name.split('/')[-1].split(".jpg")[0]
image_meta_dict = {'filename_or_obj':name}
return {
Expand Down
Binary file removed models/__pycache__/discriminator.cpython-311.pyc
Binary file not shown.
Binary file removed models/oneprompt/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed pytorch_ssim/__pycache__/__init__.cpython-311.pyc
Binary file not shown.