yuxin commited on
Commit
44c38ef
1 Parent(s): 53b47bc
Files changed (1) hide show
  1. model_segvol_single.py +7 -2
model_segvol_single.py CHANGED
@@ -76,14 +76,19 @@ class SegVolProcessor():
76
  item['label'] = gt_voxel_ndarray.astype(np.int32)
77
 
78
  # transform
79
- return item
 
 
 
 
 
 
80
  item = self.transform(item)
81
  item_zoom_out = self.zoom_out_transform(item)
82
  item['zoom_out_image'] = item_zoom_out['image']
83
  item['zoom_out_label'] = item_zoom_out['label']
84
  return item
85
 
86
-
87
  def generate_box(self, pred_pre, bbox_shift=None):
88
  meaning_post_label = pred_pre # [h, w, d]
89
  ones_idx = (meaning_post_label > 0).nonzero(as_tuple=True)
 
76
  item['label'] = gt_voxel_ndarray.astype(np.int32)
77
 
78
  # transform
79
+ return item['image'], item['label']
80
+
81
+ def zoom_transform(self, ct_npy, gt_npy):
82
+ item = {
83
+ 'image': ct_npy,
84
+ 'label': gt_npy
85
+ }
86
  item = self.transform(item)
87
  item_zoom_out = self.zoom_out_transform(item)
88
  item['zoom_out_image'] = item_zoom_out['image']
89
  item['zoom_out_label'] = item_zoom_out['label']
90
  return item
91
 
 
92
  def generate_box(self, pred_pre, bbox_shift=None):
93
  meaning_post_label = pred_pre # [h, w, d]
94
  ones_idx = (meaning_post_label > 0).nonzero(as_tuple=True)