facebookresearch / unbiased-teacher

PyTorch code for ICLR 2021 paper Unbiased Teacher for Semi-Supervised Object Detection
https://arxiv.org/abs/2102.09480
MIT License
409 stars 84 forks source link

Supervised Loss for Student #72

Closed michaelku1 closed 2 years ago

michaelku1 commented 2 years ago

Hello @ycliu93, Thanks for your work.

I'd just like to confirm whether the student model actually uses the labelled data as part of training along with the pseudo-labelled data. This is because in the paper the diagram only shows strongly augmented data passed into the student model, but in the code there is a forward pass for the student model that also takes labelled data with both weak and strong augmentations. For your references:

This shows that weakly augmented unlabelled data is for the teacher branch.

Screenshot 2022-03-04 at 00 06 47

This shows that Lsup is from burn-in, and Lunsup is from the supervision of pseudo-labels.

Screenshot 2022-03-04 at 00 07 46

This shows that student model has a forward pass given the labelled data (in which the forward pass is not for the burn-in)

Screenshot 2022-03-04 at 00 05 56

Thanks very much.

ycliu93 commented 2 years ago

Thanks for asking. Yes, we input both weak and strong into the student model in the code. And we also tried to only use strong-augmented images, and we got similar results.

michaelku1 commented 2 years ago

Thanks, that answered my question.