FengheTan9 / Multi-Level-Global-Context-Cross-Consistency

Official Pytorch Code base for "Multi-Level Global Context Cross Consistency Model for Semi-Supervised Ultrasound Image Segmentation with Diffusion Model"
MIT License
31 stars 1 forks source link

Setting --semi_percent=1 cause error #4

Closed NUS-Tim closed 1 year ago

NUS-Tim commented 1 year ago

assert len(self.secondary_indices) >= self.secondary_batch_size > 0 AssertionError

FengheTan9 commented 1 year ago

Thanks for using our code. TwoStreamBatchSampler(primary_indices, secondary_indices, batch_size, secondary_batch_size) The TwoStreamBatchSampler function divides the total batch into labeled batch (batch_size - secondary_batch_size), and unlabeled batch (secondary_batch_size). In addition, primary_indices is a set of labeled sample divisions, and secondary_indices is a set of unlabel sample divisions. The above error shows that the unlabeled sample divisions set is smaller than the unlabeled batch.

NUS-Tim commented 1 year ago

Thanks for the clarification. So basically the code currently does not support the fully-supervised case or did I miss anything?

FengheTan9 commented 1 year ago

You can follow our fully-supervised benchmarks.