Thanks again for sharing all your work. I was previously able to run your segmentation code with no issues. But recently I've been encountering this problem when I try to create a databunch:
TypeError Traceback (most recent call last)
in ()
----> 1 data = (fastai_scans.fastai_scans.SegmentationItemList.from_paths(x_path, y_path)
2 .no_split()#.random_split_by_pct(0.2, seed=7)
3 .label_from_bcolz()
4 .transform(fastai_scans.fastai_scans.get_transforms(), tfm_y=True)
5 .databunch(bs=bs)
/usr/local/lib/python3.6/dist-packages/fastai/data_block.py in _inner(*args, **kwargs)
434 assert isinstance(fv, Callable)
435 def _inner(*args, **kwargs):
--> 436 self.train = ft(*args, from_item_lists=True, **kwargs)
437 assert isinstance(self.train, LabelList)
438 kwargs['label_cls'] = self.train.y.class
/content/fastai_scans/fastai_scans/data.py in label_from_bcolz(self, **kwargs)
149 def label_from_bcolz(self, **kwargs):
150 y = self._label_cls.from_carray(self.bcolz_array_masks, self.metadata, self.tfm_params,
--> 151 items=self.items, path=self.path, **kwargs)
152 res = self._label_list(x=self, y=y)
153 return res
/content/fastai_scans/fastai_scans/data.py in from_carray(cls, bcolz_array, metadata, tfm_params, items, **kwargs)
52 def from_carray(cls, bcolz_array, metadata, tfm_params=None, items=None, **kwargs):
53 if items is None: items = range(len(bcolz_array))
---> 54 return cls(items, bcolz_array, metadata, tfm_params=tfm_params, **kwargs)
55
56 @classmethod
/content/fastai_scans/fastai_scans/data.py in init(self, items, bcolz_array, metadata, tfm_params, **kwargs)
112 _item_cls = VolumeSegment
113 def init(self, items, bcolz_array:bcolz.carray, metadata:pd.DataFrame, tfm_params=None, **kwargs):
--> 114 super().init(items, bcolz_array, metadata, tfm_params, **kwargs)
115 self.loss_func = SegCrossEntropy()
116
/content/fastai_scans/fastai_scans/data.py in init(self, items, bcolz_array, metadata, tfm_params, **kwargs)
38 self.metadata = metadata
39 self.tfm_params = tfm_params
---> 40 super().init(items, **kwargs)
41
42 def new(self, items, **kwargs):
TypeError: init() got an unexpected keyword argument 'from_item_lists'
My inexperienced self is not too sure how to correct this 'from_item_lists' argument problem. Any ideas?