AiEson / CrossMatch

CrossMatch: Enhance Semi-Supervised Medical Image Segmentation with Perturbation Strategies and Knowledge Distillation
MIT License
19 stars 0 forks source link

Why is the number of both labeled and unlabeled 80-LABELED_ID_NUM #3

Closed yang12138std closed 3 months ago

yang12138std commented 3 months ago

image image

AiEson commented 3 months ago

This is because we need to ensure that the lengths of trainset_u and trainset_l are consistent, so that they can be merged into a dataloader using zip(). What really plays a role in data isolation is the incoming id_path. Used in trainset_l

if num is not None:
    self.image_list = self.image_list * 21
    self.image_list = self.image_list[:num]

to ensure that the same length as trainset_u is obtained.

image