kanydao commited on
Commit
269adbb
·
verified ·
1 Parent(s): 4f65ab5

Resume direct backup: DiffAtlas-2shot

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. DiffAtlas-2shot/Dataset/MMWHS_Dataset.py +348 -0
  2. DiffAtlas-2shot/Dataset/TS_Dataset.py +149 -0
  3. DiffAtlas-2shot/Dataset/sdf.py +170 -0
  4. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-1.pt +3 -0
  5. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-10.pt +3 -0
  6. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-100.pt +3 -0
  7. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-101.pt +3 -0
  8. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-102.pt +3 -0
  9. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-103.pt +3 -0
  10. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-104.pt +3 -0
  11. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-105.pt +3 -0
  12. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-106.pt +3 -0
  13. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-107.pt +3 -0
  14. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-108.pt +3 -0
  15. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-109.pt +3 -0
  16. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-11.pt +3 -0
  17. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-110.pt +3 -0
  18. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-111.pt +3 -0
  19. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-112.pt +3 -0
  20. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-113.pt +3 -0
  21. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-114.pt +3 -0
  22. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-115.pt +3 -0
  23. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-116.pt +3 -0
  24. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-117.pt +3 -0
  25. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-118.pt +3 -0
  26. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-119.pt +3 -0
  27. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-12.pt +3 -0
  28. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-120.pt +3 -0
  29. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-121.pt +3 -0
  30. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-122.pt +3 -0
  31. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-123.pt +3 -0
  32. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-124.pt +3 -0
  33. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-125.pt +3 -0
  34. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-126.pt +3 -0
  35. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-127.pt +3 -0
  36. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-128.pt +3 -0
  37. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-129.pt +3 -0
  38. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-13.pt +3 -0
  39. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-130.pt +3 -0
  40. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-131.pt +3 -0
  41. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-132.pt +3 -0
  42. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-133.pt +3 -0
  43. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-134.pt +3 -0
  44. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-135.pt +3 -0
  45. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-136.pt +3 -0
  46. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-137.pt +3 -0
  47. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-138.pt +3 -0
  48. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-139.pt +3 -0
  49. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-14.pt +3 -0
  50. DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-140.pt +3 -0
DiffAtlas-2shot/Dataset/MMWHS_Dataset.py ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # from concurrent.futures import ThreadPoolExecutor
2
+
3
+ # import sys
4
+ # import os
5
+
6
+
7
+ # import numpy as np
8
+ # import torch
9
+ # from torch.utils.data.dataset import Dataset
10
+
11
+ # import glob
12
+ # import cv2
13
+ # import torchio as tio
14
+ # import matplotlib.pyplot as plt
15
+ # from torch.utils.data import DataLoader
16
+ # from sdf import compute_sdf
17
+
18
+
19
+ # PREPROCESSING_TRANSORMS_CT = tio.Compose([
20
+ # tio.Clamp(out_min=-250, out_max=800),
21
+ # tio.RescaleIntensity(in_min_max=(-250, 800),
22
+ # out_min_max=(-1.0, 1.0)),
23
+ # tio.CropOrPad(target_shape=(64, 64, 64))
24
+ # ])
25
+
26
+ # PREPROCESSING_TRANSORMS_MRI = tio.Compose([
27
+ # tio.Clamp(out_min=0, out_max=1000),
28
+ # tio.RescaleIntensity(in_min_max=(0, 1000),
29
+ # out_min_max=(-1.0, 1.0)),
30
+ # tio.CropOrPad(target_shape=(64, 64, 64))
31
+ # ])
32
+
33
+
34
+ # PREPROCESSING_MASK_TRANSORMS = tio.Compose([
35
+ # tio.CropOrPad(target_shape=(64, 64, 64))
36
+ # ])
37
+
38
+
39
+ # class MMWHS_Dataset(Dataset):
40
+ # def __init__(self, root_dir='', data_type='', mode = ''):
41
+ # self.root_dir = root_dir
42
+ # self.data_type = data_type
43
+ # self.mode = mode
44
+ # self.file_names = self.get_file_names()
45
+ # self.preprocessing_img_ct = PREPROCESSING_TRANSORMS_CT
46
+ # self.preprocessing_img_mri = PREPROCESSING_TRANSORMS_MRI
47
+ # self.preprocessing_mask = PREPROCESSING_MASK_TRANSORMS
48
+
49
+ # @staticmethod
50
+ # def create_mask(shape):
51
+ # return torch.zeros(shape, dtype=torch.uint8)
52
+
53
+ # @staticmethod
54
+ # def project_to_2d(mask):
55
+ # projection = torch.max(mask, dim=0)[0]
56
+ # return projection.numpy()
57
+
58
+ # @staticmethod
59
+ # def min_enclosing_circle(projection):
60
+
61
+ # points = np.column_stack(np.where(projection > 0))
62
+ # points = points.astype(np.float32)
63
+ # print(points.shape)
64
+ # (x, y), radius = cv2.minEnclosingCircle(points.astype(np.float32))
65
+ # center = (int(x), int(y))
66
+ # radius = int(radius)
67
+ # return center, radius
68
+
69
+ # @staticmethod
70
+ # def create_circle_mask_2d(shape, center, radius):
71
+ # mask = np.zeros(shape, dtype=np.uint8)
72
+ # cv2.circle(mask, center, radius, 1, thickness=-1)
73
+ # return mask
74
+
75
+ # @staticmethod
76
+ # def apply_circle_mask_to_3d(mask, circle_mask_2d):
77
+ # for i in range(mask.shape[0]):
78
+ # mask[i] = torch.from_numpy(circle_mask_2d)
79
+ # return mask
80
+
81
+ # def train_transform(self, image, label, p):
82
+ # TRAIN_TRANSFORMS = tio.Compose([
83
+ # tio.RandomFlip(axes=(1), flip_probability=p),
84
+ # ])
85
+ # image = TRAIN_TRANSFORMS(image)
86
+ # label = TRAIN_TRANSFORMS(label)
87
+ # return image, label
88
+
89
+ # def get_file_names(self):
90
+ # all_img_names = glob.glob(os.path.join(self.root_dir, './*image.nii.gz'), recursive=True)
91
+ # return all_img_names
92
+
93
+ # def __len__(self):
94
+ # return len(self.file_names)
95
+
96
+ # def __getitem__(self, index):
97
+ # img_path = self.file_names[index]
98
+ # mask_path = img_path.replace("image.nii.gz", "label.nii.gz")
99
+ # sdf_path = img_path.split()
100
+
101
+ # img = tio.ScalarImage(img_path)
102
+ # mask = tio.LabelMap(mask_path)
103
+ # name = img_path.split('/')[-1]
104
+ # name = name.split('.nii')[0]
105
+
106
+ # if self.data_type.upper() == 'CT':
107
+ # img = self.preprocessing_img_ct(img)
108
+ # elif self.data_type.upper() == 'MRI':
109
+ # img = self.preprocessing_img_mri(img)
110
+ # else:
111
+ # raise ValueError("Wrong Data Type!")
112
+ # mask = self.preprocessing_mask(mask)
113
+
114
+ # # p = np.random.choice([0, 1])
115
+ # # if self.mode == 'train':
116
+ # # img, mask = self.train_transform(img, mask, p)
117
+
118
+ # affine = img.affine
119
+ # mask = mask.data
120
+ # img = img.data
121
+
122
+ # label_1 = (mask == 1).float()
123
+ # label_1_sdf = compute_sdf(label_1)
124
+ # label_2 = (mask == 2).float()
125
+ # label_2_sdf = compute_sdf(label_2)
126
+ # label_3 = (mask == 3).float()
127
+ # label_3_sdf = compute_sdf(label_3)
128
+ # label_4 = (mask == 4).float()
129
+ # label_4_sdf = compute_sdf(label_4)
130
+ # label_5 = (mask == 5).float()
131
+ # label_5_sdf = compute_sdf(label_5)
132
+ # label = torch.cat((label_1, label_2, label_3, label_4, label_5), dim=0)
133
+ # label_sdf = torch.cat((torch.tensor(label_1_sdf), torch.tensor(label_2_sdf), torch.tensor(label_3_sdf), torch.tensor(label_4_sdf), torch.tensor(label_5_sdf)), dim=0)
134
+
135
+ # sdf_to_save = tio.ScalarImage(tensor=label_sdf, channels_last=False, affine=affine)
136
+ # os.makedirs(self.root_dir, exist_ok=True)
137
+ # sdf_to_save.save(os.path.join(self.root_dir, f"{name.replace('image', 'sdf')}.nii.gz"))
138
+
139
+ # return {
140
+ # 'name': name,
141
+ # 'img': img,
142
+ # 'mask_sdf': label_sdf,
143
+ # 'mask': label,
144
+ # 'affine': affine
145
+ # }
146
+
147
+ # def get_MMWHS_dataloader(root_dir, data_type, mode, batch_size=1, drop_last=False):
148
+ # dataset = MMWHS_Dataset(root_dir=root_dir, data_type=data_type, mode=mode)
149
+ # if mode == 'train':
150
+ # shuffle = True
151
+ # return dataset
152
+ # elif mode == 'test':
153
+ # shuffle = False
154
+ # else:
155
+ # raise ValueError('No Such Mode')
156
+ # loader = DataLoader(
157
+ # dataset, batch_size=batch_size, shuffle=shuffle, num_workers=20, pin_memory=True, drop_last=drop_last
158
+ # )
159
+ # return loader
160
+
161
+ # def test_dataset():
162
+
163
+ # dl = get_MMWHS_dataloader(root_dir='/mnt/data2/data/store/MSN/data_v2/MMWHS-CT/MMWHS-CT-resize-try-tiny-train', data_type='CT', mode='test')
164
+
165
+ # for batch in iter(dl):
166
+ # print(batch['name'])
167
+
168
+ # print(len(dl))
169
+
170
+ # if __name__ == '__main__':
171
+ # test_dataset()
172
+
173
+
174
+
175
+ from concurrent.futures import ThreadPoolExecutor
176
+
177
+ import sys
178
+ import os
179
+
180
+
181
+ import numpy as np
182
+ import torch
183
+ from torch.utils.data.dataset import Dataset
184
+
185
+ import glob
186
+ import cv2
187
+ import torchio as tio
188
+ import matplotlib.pyplot as plt
189
+ from torch.utils.data import DataLoader
190
+ from sdf import compute_sdf
191
+
192
+
193
+ PREPROCESSING_TRANSORMS_CT = tio.Compose([
194
+ tio.Clamp(out_min=-250, out_max=800),
195
+ tio.RescaleIntensity(in_min_max=(-250, 800),
196
+ out_min_max=(-1.0, 1.0)),
197
+ tio.CropOrPad(target_shape=(64, 64, 64))
198
+ ])
199
+
200
+ PREPROCESSING_TRANSORMS_MRI = tio.Compose([
201
+ tio.Clamp(out_min=0, out_max=1800),
202
+ tio.RescaleIntensity(in_min_max=(0, 1800),
203
+ out_min_max=(-1.0, 1.0)),
204
+ tio.CropOrPad(target_shape=(64, 64, 64))
205
+ ])
206
+
207
+
208
+ PREPROCESSING_MASK_TRANSORMS = tio.Compose([
209
+ tio.CropOrPad(target_shape=(64, 64, 64))
210
+ ])
211
+
212
+
213
+ class MMWHS_Dataset(Dataset):
214
+ def __init__(self, root_dir='', data_type='', mode = ''):
215
+ self.root_dir = root_dir
216
+ self.data_type = data_type
217
+ self.mode = mode
218
+ self.file_names = self.get_file_names()
219
+ self.preprocessing_img_ct = PREPROCESSING_TRANSORMS_CT
220
+ self.preprocessing_img_mri = PREPROCESSING_TRANSORMS_MRI
221
+ self.preprocessing_mask = PREPROCESSING_MASK_TRANSORMS
222
+
223
+ @staticmethod
224
+ def create_mask(shape):
225
+ return torch.zeros(shape, dtype=torch.uint8)
226
+
227
+ @staticmethod
228
+ def project_to_2d(mask):
229
+ projection = torch.max(mask, dim=0)[0]
230
+ return projection.numpy()
231
+
232
+ @staticmethod
233
+ def min_enclosing_circle(projection):
234
+
235
+ points = np.column_stack(np.where(projection > 0))
236
+ points = points.astype(np.float32)
237
+ print(points.shape)
238
+ (x, y), radius = cv2.minEnclosingCircle(points.astype(np.float32))
239
+ center = (int(x), int(y))
240
+ radius = int(radius)
241
+ return center, radius
242
+
243
+ @staticmethod
244
+ def create_circle_mask_2d(shape, center, radius):
245
+ mask = np.zeros(shape, dtype=np.uint8)
246
+ cv2.circle(mask, center, radius, 1, thickness=-1)
247
+ return mask
248
+
249
+ @staticmethod
250
+ def apply_circle_mask_to_3d(mask, circle_mask_2d):
251
+ for i in range(mask.shape[0]):
252
+ mask[i] = torch.from_numpy(circle_mask_2d)
253
+ return mask
254
+
255
+ def train_transform(self, image, label, sdf, p):
256
+ TRAIN_TRANSFORMS = tio.Compose([
257
+ tio.RandomFlip(axes=(1), flip_probability=p),
258
+ ])
259
+ image = TRAIN_TRANSFORMS(image)
260
+ label = TRAIN_TRANSFORMS(label)
261
+ sdf = TRAIN_TRANSFORMS(sdf)
262
+ return image, label, sdf
263
+
264
+ def get_file_names(self):
265
+ all_img_names = glob.glob(os.path.join(self.root_dir, './*image.nii.gz'), recursive=True)
266
+ return all_img_names
267
+
268
+ def __len__(self):
269
+ return len(self.file_names)
270
+
271
+ def __getitem__(self, index):
272
+ img_path = self.file_names[index]
273
+ mask_path = img_path.replace("image.nii.gz", "label.nii.gz")
274
+ sdf_path = img_path.replace("image.nii.gz", "sdf.nii.gz")
275
+
276
+ img = tio.ScalarImage(img_path)
277
+ mask = tio.LabelMap(mask_path)
278
+ sdf = tio.ScalarImage(sdf_path)
279
+ name = img_path.split('/')[-1]
280
+ name = name.split('.nii')[0]
281
+
282
+ if self.data_type.upper() == 'CT':
283
+ img = self.preprocessing_img_ct(img)
284
+ elif self.data_type.upper() == 'MRI':
285
+ img = self.preprocessing_img_mri(img)
286
+ else:
287
+ raise ValueError("Wrong Data Type!")
288
+ mask = self.preprocessing_mask(mask)
289
+
290
+ p = np.random.choice([0, 1])
291
+ if self.mode == 'train':
292
+ img, mask, sdf = self.train_transform(img, mask, sdf, p)
293
+
294
+ affine = img.affine
295
+ mask = mask.data
296
+ img = img.data
297
+ sdf = sdf.data
298
+
299
+ label_1 = (mask == 1).float()
300
+ # label_1_sdf = compute_sdf(label_1)
301
+ label_2 = (mask == 2).float()
302
+ # label_2_sdf = compute_sdf(label_2)
303
+ label_3 = (mask == 3).float()
304
+ # label_3_sdf = compute_sdf(label_3)
305
+ label_4 = (mask == 4).float()
306
+ # label_4_sdf = compute_sdf(label_4)
307
+ label_5 = (mask == 5).float()
308
+ # label_5_sdf = compute_sdf(label_5)
309
+ label = torch.cat((label_1, label_2, label_3, label_4, label_5), dim=0)
310
+ # label_sdf = torch.cat((torch.tensor(label_1_sdf), torch.tensor(label_2_sdf), torch.tensor(label_3_sdf), torch.tensor(label_4_sdf), torch.tensor(label_5_sdf)), dim=0)
311
+ label_sdf = sdf
312
+ # sdf_to_save = tio.LabelMap(tensor=label_sdf, channels_last=False, affine=affine)
313
+ # os.makedirs(self.root_dir, exist_ok=True)
314
+ # sdf_to_save.save(os.path.join(self.root_dir, f"{name.replace('image', 'sdf')}.nii.gz"))
315
+
316
+ return {
317
+ 'name': name,
318
+ 'img': img,
319
+ 'mask_sdf': label_sdf,
320
+ 'mask': label,
321
+ 'affine': affine
322
+ }
323
+
324
+ def get_MMWHS_dataloader(root_dir, data_type, mode, batch_size=1, drop_last=False):
325
+ dataset = MMWHS_Dataset(root_dir=root_dir, data_type=data_type, mode=mode)
326
+ if mode == 'train':
327
+ shuffle = True
328
+ return dataset
329
+ elif mode == 'test':
330
+ shuffle = False
331
+ else:
332
+ raise ValueError('No Such Mode')
333
+ loader = DataLoader(
334
+ dataset, batch_size=batch_size, shuffle=shuffle, num_workers=20, pin_memory=True, drop_last=drop_last
335
+ )
336
+ return loader
337
+
338
+ # def test_dataset():
339
+
340
+ # dl = get_MMWHS_dataloader(root_dir='/mnt/data2/data/store/MSN/data/MMWHS-MRI/mr_train_clean_resize_to_64_train_10percent', data_type='MRI', mode='test')
341
+
342
+ # for batch in iter(dl):
343
+ # print(batch['name'])
344
+
345
+ # print(len(dl))
346
+
347
+ # if __name__ == '__main__':
348
+ # test_dataset()
DiffAtlas-2shot/Dataset/TS_Dataset.py ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import torch
3
+ from torch.utils.data.dataset import Dataset
4
+ import os
5
+ import glob
6
+ import cv2
7
+ import torchio as tio
8
+ from torch.utils.data import DataLoader
9
+ from sdf import compute_sdf
10
+
11
+ PREPROCESSING_TRANSORMS = tio.Compose([
12
+ tio.Clamp(out_min=-250, out_max=450),
13
+ tio.RescaleIntensity(in_min_max=(-250, 450),
14
+ out_min_max=(-1.0, 1.0)),
15
+ tio.CropOrPad(target_shape=(64, 64, 64))
16
+ ])
17
+
18
+ PREPROCESSING_MASK_TRANSORMS = tio.Compose([
19
+ tio.CropOrPad(target_shape=(64, 64, 64))
20
+ ])
21
+
22
+ TRAIN_TRANSFORMS = tio.Compose([
23
+ tio.RandomFlip(axes=(1), flip_probability=0.5),
24
+ ])
25
+
26
+
27
+ class TS_Dataset(Dataset):
28
+ def __init__(self, root_dir='', mode = ''):
29
+ self.root_dir = root_dir
30
+ self.file_names = self.get_file_names()
31
+ self.preprocessing_img = PREPROCESSING_TRANSORMS
32
+ self.preprocessing_mask = PREPROCESSING_MASK_TRANSORMS
33
+ self.mode = mode
34
+
35
+ @staticmethod
36
+ def create_mask(shape):
37
+ return torch.zeros(shape, dtype=torch.uint8)
38
+
39
+ @staticmethod
40
+ def project_to_2d(mask):
41
+ projection = torch.max(mask, dim=0)[0]
42
+ return projection.numpy()
43
+
44
+ @staticmethod
45
+ def min_enclosing_circle(projection):
46
+
47
+ points = np.column_stack(np.where(projection > 0))
48
+ points = points.astype(np.float32)
49
+ print(points.shape)
50
+ (x, y), radius = cv2.minEnclosingCircle(points.astype(np.float32))
51
+ center = (int(x), int(y))
52
+ radius = int(radius)
53
+ return center, radius
54
+
55
+ @staticmethod
56
+ def create_circle_mask_2d(shape, center, radius):
57
+ mask = np.zeros(shape, dtype=np.uint8)
58
+ cv2.circle(mask, center, radius, 1, thickness=-1)
59
+ return mask
60
+
61
+ @staticmethod
62
+ def apply_circle_mask_to_3d(mask, circle_mask_2d):
63
+ for i in range(mask.shape[0]):
64
+ mask[i] = torch.from_numpy(circle_mask_2d)
65
+ return mask
66
+
67
+
68
+ def train_transform(self, image, label, p):
69
+ TRAIN_TRANSFORMS = tio.Compose([
70
+ tio.RandomFlip(axes=(1), flip_probability=p),
71
+ ])
72
+ image = TRAIN_TRANSFORMS(image)
73
+ label = TRAIN_TRANSFORMS(label)
74
+ return image, label
75
+
76
+ def get_file_names(self):
77
+ all_img_names = glob.glob(os.path.join(self.root_dir, '**/*image.nii.gz'), recursive=True)
78
+ return all_img_names
79
+
80
+ def __len__(self):
81
+ return len(self.file_names)
82
+
83
+ def __getitem__(self, index):
84
+ img_path = self.file_names[index]
85
+ mask_path = img_path.replace("image.nii.gz", "label.nii.gz")
86
+
87
+ img = tio.ScalarImage(img_path)
88
+ mask = tio.LabelMap(mask_path)
89
+ name = img_path.split('/')[-1]
90
+ name = name.split('.nii')[0]
91
+
92
+ img = self.preprocessing_img(img)
93
+ mask = self.preprocessing_mask(mask)
94
+
95
+ p = np.random.choice([0, 1])
96
+
97
+ if self.mode == 'train':
98
+ img, mask = self.train_transform(img, mask, p)
99
+
100
+ affine = img.affine
101
+ mask = mask.data
102
+ img = img.data
103
+
104
+ # print("Mask Sum: ", mask.sum())
105
+
106
+ # img = (img - img_old.min())/(img_old.max()-img_old.min())*2 -1
107
+
108
+ # label = (mask != 0).float()
109
+ # label_sdf = compute_sdf(label)
110
+
111
+ # label_0 = (mask == 0).float()
112
+ # label_0_sdf = compute_sdf(label_0)
113
+ label_1 = (mask == 1).float()
114
+ label_1_sdf = compute_sdf(label_1)
115
+ label_2 = (mask == 2).float()
116
+ label_2_sdf = compute_sdf(label_2)
117
+ label_3 = (mask == 3).float()
118
+ label_3_sdf = compute_sdf(label_3)
119
+ label_4 = (mask == 4).float()
120
+ label_4_sdf = compute_sdf(label_4)
121
+ label_5 = (mask == 5).float()
122
+ label_5_sdf = compute_sdf(label_5)
123
+ label = torch.cat((label_1, label_2, label_3, label_4, label_5), dim=0)
124
+ label_sdf = torch.cat((torch.tensor(label_1_sdf), torch.tensor(label_2_sdf), torch.tensor(label_3_sdf), torch.tensor(label_4_sdf), torch.tensor(label_5_sdf)), dim=0)
125
+
126
+
127
+ # mask = torch.cat((background, label_1, label_2, label_3, label_4, label_5, label_6, label_7), dim=0)
128
+ # print(mask.size())
129
+ return {
130
+ 'name': name,
131
+ 'img': img,
132
+ 'mask_sdf': label_sdf,
133
+ 'mask': label,
134
+ 'affine': affine
135
+ }
136
+
137
+ def get_TS_dataloader(root_dir, mode, batch_size=1, drop_last=False):
138
+ dataset = TS_Dataset(root_dir=root_dir, mode=mode)
139
+ if mode == 'train':
140
+ shuffle = True
141
+ return dataset
142
+ elif mode == 'test':
143
+ shuffle = False
144
+ else:
145
+ raise ValueError('NO SUCH MODE')
146
+ loader = DataLoader(
147
+ dataset, batch_size=batch_size, shuffle=shuffle, num_workers=20, pin_memory=True, drop_last=drop_last
148
+ )
149
+ return loader
DiffAtlas-2shot/Dataset/sdf.py ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ from scipy.ndimage import distance_transform_edt, gaussian_filter, zoom, median_filter
3
+ import matplotlib.pyplot as plt
4
+ from skimage.measure import marching_cubes
5
+ from scipy.ndimage import binary_fill_holes, label
6
+ from mpl_toolkits.mplot3d.art3d import Poly3DCollection
7
+ from scipy.spatial import Delaunay
8
+ import open3d as o3d
9
+ import pyvista as pv
10
+ from scipy.interpolate import griddata
11
+ # import trimesh
12
+
13
+ def compute_sdf(voxel_matrix):
14
+ inside_dist = distance_transform_edt(voxel_matrix)
15
+ outside_dist = distance_transform_edt(1 - voxel_matrix)
16
+ sdf = outside_dist - inside_dist
17
+ # sdf = gaussian_filter(sdf, sigma=3.0)
18
+ sdf = sdf / 32.0
19
+ sdf = sdf.clip(-0.2, 0.2)
20
+ return sdf
21
+
22
+ def visualize_sdf(voxel_matrix, sdf, slice_index, prefix='slice'):
23
+ plt.figure(figsize=(12, 6))
24
+ plt.subplot(1, 2, 1)
25
+ plt.title("Voxel Matrix Slice")
26
+ plt.imshow(voxel_matrix[slice_index], cmap='gray')
27
+ plt.subplot(1, 2, 2)
28
+ plt.title("SDF Slice")
29
+ plt.imshow(sdf[slice_index], cmap='jet')
30
+ plt.colorbar()
31
+ plt.show()
32
+ plt.savefig(f'{prefix}_{slice_index}.png')
33
+ plt.close()
34
+
35
+
36
+ def extract_surface(sdf):
37
+ vertices, faces, normals, values = marching_cubes(sdf, level=0)
38
+ return vertices, faces
39
+
40
+
41
+ def visualize_surface(vertices, faces):
42
+ fig = plt.figure()
43
+ ax = fig.add_subplot(111, projection='3d')
44
+ mesh = Poly3DCollection(vertices[faces])
45
+ mesh.set_edgecolor('k')
46
+ ax.add_collection3d(mesh)
47
+ ax.set_xlim(0, 32)
48
+ ax.set_ylim(0, 32)
49
+ ax.set_zlim(0, 32)
50
+ plt.show()
51
+ plt.savefig('surface.png')
52
+ plt.close()
53
+
54
+
55
+ def create_3d_mask(vertices, faces, shape):
56
+ mask = np.zeros(shape, dtype=np.uint8)
57
+
58
+ # Create a Delaunay triangulation for the vertices
59
+ delaunay = Delaunay(vertices)
60
+
61
+ # Generate grid points
62
+ x = np.arange(0, shape[0])
63
+ y = np.arange(0, shape[1])
64
+ z = np.arange(0, shape[2])
65
+ grid = np.array(np.meshgrid(x, y, z)).T.reshape(-1, 3)
66
+
67
+ # Find grid points that are inside the convex hull
68
+ inside = delaunay.find_simplex(grid) >= 0
69
+
70
+ # Convert the grid points back to 3D index
71
+ grid_points = grid[inside]
72
+
73
+ # Set the mask values to 1 where points are inside the convex hull
74
+ mask[grid_points[:, 0], grid_points[:, 1], grid_points[:, 2]] = 1
75
+
76
+ return mask
77
+
78
+
79
+ def fill_holes_along_axis(volume, axis):
80
+ filled_volume = np.copy(volume)
81
+ for i in range(volume.shape[axis]):
82
+ if axis == 0:
83
+ slice_2d = volume[i, :, :]
84
+ elif axis == 1:
85
+ slice_2d = volume[:, i, :]
86
+ else:
87
+ slice_2d = volume[:, :, i]
88
+
89
+ filled_slice = binary_fill_holes(slice_2d)
90
+
91
+ # 确保单连通性
92
+ labeled_array, num_features = label(filled_slice)
93
+ if num_features > 1:
94
+ max_label = max(range(1, num_features + 1), key=lambda x: np.sum(labeled_array == x))
95
+ filled_slice = labeled_array == max_label
96
+
97
+ if axis == 0:
98
+ filled_volume[i, :, :] = filled_slice
99
+ elif axis == 1:
100
+ filled_volume[:, i, :] = filled_slice
101
+ else:
102
+ filled_volume[:, :, i] = filled_slice
103
+
104
+ return filled_volume
105
+
106
+
107
+ def mesh_to_voxel(vertices, faces):
108
+
109
+ shape = [64, 64, 64]
110
+ faces = np.hstack([[3] + list(face) for face in faces])
111
+ mesh = pv.PolyData(vertices, faces)
112
+ grid = pv.voxelize(mesh, density=1.0)
113
+ voxel_points = np.array(grid.points)
114
+ filled_voxel = np.zeros(shape)
115
+
116
+ for voxel in voxel_points:
117
+ x, y, z = voxel
118
+ x, y, z = int(np.round(x)), int(np.round(y)), int(np.round(z)) # 将顶点坐标转换为整数索引
119
+ if 0 <= x < shape[0] and 0 <= y < shape[1] and 0 <= z < shape[2]:
120
+ filled_voxel[x, y, z] = 1 # 设置为1表示该位置有网格顶点
121
+ return filled_voxel
122
+
123
+
124
+ def sdf_to_filled_mesh(sdf, level=0.02):
125
+ # vertices, faces, _, _ = marching_cubes(sdf, level=level)
126
+ # filled_voxel = mesh_to_voxel(vertices, faces)
127
+
128
+ # for _ in range(1):
129
+ # filled_voxel = fill_holes_along_axis(filled_voxel, 0)
130
+ # filled_voxel = fill_holes_along_axis(filled_voxel, 1)
131
+ # filled_voxel = fill_holes_along_axis(filled_voxel, 2)
132
+
133
+ # while True:
134
+ # prev_filled_voxel = filled_voxel.copy()
135
+ # filled_voxel = fill_holes_along_axis(filled_voxel, 0)
136
+ # filled_voxel = fill_holes_along_axis(filled_voxel, 1)
137
+ # filled_voxel = fill_holes_along_axis(filled_voxel, 2)
138
+
139
+ # if np.array_equal(filled_voxel, prev_filled_voxel):
140
+ # break
141
+
142
+ vertices_filled, faces_filled, normals_filled, values_filled = marching_cubes(sdf, level=level)
143
+
144
+ # 将网格转换为 Open3D 的三角网格对象
145
+ mesh = o3d.geometry.TriangleMesh()
146
+ mesh.vertices = o3d.utility.Vector3dVector(vertices_filled)
147
+ mesh.triangles = o3d.utility.Vector3iVector(faces_filled)
148
+ mesh.compute_vertex_normals()
149
+
150
+ # 拉普拉斯平滑
151
+ mesh = mesh.filter_smooth_simple(number_of_iterations=20)
152
+ mesh.compute_vertex_normals()
153
+
154
+ return np.asarray(mesh.vertices), np.asarray(mesh.triangles)
155
+
156
+
157
+ def sdf_to_voxel(sdf, level=0.02):
158
+
159
+ sdf_smoothed = gaussian_filter(sdf, sigma=0.5)
160
+ binary_mask = binary_fill_holes(sdf_smoothed <= level).astype(np.uint8)
161
+ # structuring_element = ball(radius=1)
162
+ # binary_mask_opened = binary_opening(binary_mask, footprint=structuring_element)
163
+ # binary_mask_closed = binary_closing(binary_mask_opened, footprint=structuring_element)
164
+ # binary_mask_eroded = binary_erosion(binary_mask_closed, structure=structuring_element)
165
+ # binary_mask_dilated = binary_dilation(binary_mask_eroded, structure=structuring_element)
166
+ # filled_voxel = gaussian_filter(binary_mask_dilated.astype(np.float32), sigma=1.0)
167
+ # filled_voxel = filled_voxel > 0.5
168
+ filled_voxel = binary_mask
169
+
170
+ return filled_voxel
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-1.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77e5b7fd6cc590cfa17f1fa15140010ed9adf902ee5cd565e937bc12d9b06095
3
+ size 574143105
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-10.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da150c35ddd22d1cd0196db678bef9e547c712dce5c6a3bd86d4f728780529e3
3
+ size 574145038
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-100.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7257b8864abf91cdefe7a20b33068f535d920734a00e5f74e25b7d26936a7f0
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-101.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fcf5e63f749c4bdb821b90041e9ea20931e0a51b5bf83052f3918525198648b
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-102.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64f1b93eaf859b41a76943913f3ebd963f0955ab82ff9bf348f12b3a8bb234f7
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-103.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb0ece3107181cd547994106b5d80f363a313ffe77f654095ae62930aa988f51
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-104.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bf6e60e4f6ab9d1f29abc0bdf134957e68725ae4c5189485d96fe6888a33b02
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-105.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7299c62c5a212ffb3ab33de9735ae7ca3af75238c90c2a03a10b9e2ff4f38f03
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-106.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf0a5458aab6a40d30f27a933af4216cbc6dbf5a520b29880fe42e39a9263a06
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-107.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fb6538aeda4a3a63d8212fa460715a767cbbab218e3d7a181dc071c97ad0d76
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-108.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e30b69e9d9c8c9b462bfc0e883ca63c0ff104a02c2b41d087fb6d992353815c
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-109.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b07c5abaa8e6769f367f34761d6e308cbdfeb90dfc1f771c370fb7b1ff88b30
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-11.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53fdb0e1b959e94ad1109b52484d776ea82ca6a26985a0d931c45ece8e66ab4b
3
+ size 574145038
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-110.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:730be856d62f4fe3c37ae9d018ea7269cb9962510eb5f03419c5afe6bad2a422
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-111.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b243291a6dabad431a453e40a2e31fe7756c83200100a1d21a372775fc150a72
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-112.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b455fa539944fdb04199b523da1bf7981e25cea544dd7cb9baddf0fbbc88c0ef
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-113.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:adb004a38d6199ef486297b76d4bf4e2656c58fd9c525500a03bded9ef11f51f
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-114.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:722d9f127a8b32bcfba59dba6195ac2678122932883a9e1ef7ec49549183a7ce
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-115.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d05b2ee33b6bede2d3c0c69ad2d5740c77195e0bcd01d1568f236cc81fffe813
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-116.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06a2e06d6b733483ded153a138ce4c8140d639f42b915ecb9a627f4ba7e72047
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-117.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:719f3dcacdbf6053c0bcccdb447ba416360b569597504f84340be16b2f9dc8f2
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-118.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73ff7ff0b104639226ce6e47b4bfc9376e489add34f16d61a7eba0659c6d8c00
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-119.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5179bf7f73c2ea39671ec8f9646fe709bb5033aefefc915c07abe0a59c73ff8
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-12.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6db48a9563b52408dd3296c9865a862c2af107acb80b3af881f26abe11f320fe
3
+ size 574145038
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-120.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:149c700b98588bc22964ffdb00354b7b799069d1d53d3eafc5d6e545105fcc82
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-121.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:faf05866998eacbadd188a6bb89396036f0398d17bb929ce5cfb30c515727192
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-122.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:919073f17cc4ca7d3fa05c0f300a0d27a96252815d9c5d507db795ec1e0bbe06
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-123.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9bc4d8f40efead16d7e3a6e955f3949c5291cb2dec3ac937589787422fd597c
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-124.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf05c52155da0f5e415c17ecf02a9345995521ed94709cef80b1a6d6e8c2cef0
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-125.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e5c804d2283f71a1ba67cdff82b3014dccec06b98aa009c62594ed28c98ac2c
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-126.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d73651fab2a1b760576ec04c8f6d67a280c61c38716d5e54d5f9c27117cb6f23
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-127.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3be25025407dcd633a2e1d73ea05415a5833a28745f7ed5fe9312affcb61f02
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-128.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d7b397b832c2848150ddd19e17b2c62edf886d4ea91a7fe66d451910b2ea007
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-129.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b28ecc48da633834060dec1129676e0da16262a58966986f8fcfab80661d3996
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-13.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:259edf46984156537b31ca5ace090f2b5700e728a6d0981661590b56a1be329b
3
+ size 574145038
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-130.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:774cfd75b5f421bbe2f8f0fb561eae5a7db5cea495e6deb46ee94318bded3d4c
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-131.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64fabc750fba3d63cbbd1d7332a50410faf490bf898c0836c27c21a6db2de430
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-132.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12a6d9e7c3549cbaf34b895432d8282e3265a75d4c038e5d05d94dc392fc5f6d
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-133.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37763464fae90b575f6da70d3912dbdb417330208f957622ae5deebe2dae0f57
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-134.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1422d1e972bb8fcd6ac2c8bc2bdfad0b043fb16c67a7dc9beba586966e07bc2d
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-135.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66a595712f762e37739588c2705ff08e423d3d0ee51039c0954fe96ed1d552f5
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-136.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7c5db973a9ce2c7cdb87c1d1ce2f5cbe6af35f5a375e3738bb2f27e4bf49ead
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-137.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86395123782f145a3224cf40c6e639491d689f3ffac282df530d4865ece8a375
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-138.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a227bf15dd2e8b40b4b8f1657bdd83b7fb8fccc2040f8243f28b33861f504b15
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-139.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c41baf73ea162836dc41e355f6d2045df00ffb19f711b3a559f30a9e21a35b3c
3
+ size 574146523
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-14.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:780e8a9cc555df2ea1239c88ecdc09b71e46119f1b0a6c313a670fa8e8e0216a
3
+ size 574145038
DiffAtlas-2shot/Model/train_MMWHSCT_tiny/model-140.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7652fde98b3733d85e4797019b1d725073f48dac6852c961131b2845f0fc3c02
3
+ size 574146523