MIAnalyzer / MIA

Microsopic Image Analyzer (MIA)
https://mianalyzer.github.io/
29 stars 1 forks source link

Error when training a network for object detection #9

Open SebastienTs opened 12 months ago

SebastienTs commented 12 months ago

<class 'AttributeError'>: 'DeepLearning' object has no attribute 'od_kernel_stdev'

File "E:\conda\envs\mia_environment\lib\site-packages\mia\dl\DeepLearning.py", line 219, in initData_StartTraining self.train_generator = datagenerator.TrainingDataGenerator(self) File "E:\conda\envs\mia_environment\lib\site-packages\mia\dl\training\datagenerator.py", line 26, in init self.images,self.labels = parent.data.loadTrainingDataSet(validation = self.validation) File "E:\conda\envs\mia_environment\lib\site-packages\mia\dl\data\imagedata.py", line 277, in loadTrainingDataSet for counter, pair in enumerate(x): File "E:\conda\envs\mia_environment\lib\concurrent\futures_base.py", line 598, in result_iterator yield fs.pop().result() File "E:\conda\envs\mia_environment\lib\concurrent\futures_base.py", line 428, in result return self.get_result() File "E:\conda\envs\mia_environment\lib\concurrent\futures_base.py", line 384, in get_result raise self._exception File "E:\conda\envs\mia_environment\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(*self.args, *self.kwargs) File "E:\conda\envs\mia_environment\lib\site-packages\mia\dl\data\imagedata.py", line 206, in createImageLabelPair self.classValues += self.parent.Mode.countLabelWeight(train_mask) File "E:\conda\envs\mia_environment\lib\site-packages\mia\dl\method\objectcounting.py", line 136, in countLabelWeight classValues[i] = self.parent.od_kernel_stdevnp.count_nonzero((label == i))

nkoerb commented 12 months ago

There was a small bug in the auto weighting, caused by a removed variable. Fixed it.