nobrainer
nobrainer copied to clipboard
Excluding voxels with no labels
For transfer learning, jaccard loss decreases while dice scores remain relatively constant, and the resulting model spits out empty predictions. Blocks without labels may be interfering with training--per the AMS paper: "The cubes of the MRI scans that did not contain any meningioma voxels were excluded from the training set."
I would like to modify nobrainer.dataset.get_dataset to include a flag to discard blocks without associated labels. Does this seem reasonable? For example:
if(exclude_no_labels): dataset=dataset.filter(lambda x, y: tf.reduce_max(y) != 0)
@shmann - i think that would be a good addition. it would have to be limited to dataset generators that map to tensors that have segmentation information.