Draft: SSL-mean teacher on segmentation
Implement the mean teacher model on retinal image segmentation.
Merge request reports
Activity
assigned to @andre.anjos
added 1 commit
- b9e850cf - add dataloader when labeled data is too large for batchsize, fix some bugs
added 1 commit
- 1132e95d - found loss to be Nan during training, will check loss function later
added 1 commit
- c519660e - Add test data of labeled dataset to be valid data
Here is the result. I will increase the learning rate and train more epochs.mt-result.pdf
added 1 commit
- 4ed19a8e - add plot of consistency and segmentation loss
@andre.anjos , @mguenther , attached is the result of a new experiment. The result is not very good. I think one reason is that the validation set is the original test set of the labeled dataset. So in the end the model chooses the lowest loss according to the labeled dataset which does not achieve the best performance on the test data. If we want to add the unlabeled dataset images to the validation set, for example, the HRF dataset, the original training set of HRF has only 15 images, it will have too few images if we select some images to the validation set. If we select from the test set, it may affect the comparison of performances on supervised model and semi-supervised model. Looking forward to your advice! comparison.rst trainlog.pdf
Edited by Tan XiaoI changed the validation set to half of the original unlabeled test set, and used the other half data to be test set. And I also increased the adjust_contrast parameter. The result is better now. But I am not sure if I can use validation and test set this way.comparison.rsttrainlog.pdf
@Txiao: I must confess I don't have the details in my head regarding which loss goes where in this SSL setup. Can you attach a diagram indicating where each loss component is taken from? That would help evaluating why it doesn't work as expected.
I hope this image helps. The labeled data will have a combined loss which is a sum of segmentation loss and weighted consistency loss. The unlabeled data will have only the consistency loss. The validation loss is a segmentation loss computed on prediction from Teacher model(which is our final model) with input being non-data-augmented. I compared the results when setting the validation set to be labeled data with setting it to be unlabeled data. The unlabeled set has better performance which is 0.645, still worse than the baseline.
Edited by Tan Xiaoadded 2 commits