Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Details about the traning #49

Open
MendelXu opened this issue Sep 14, 2021 · 6 comments
Open

Details about the traning #49

MendelXu opened this issue Sep 14, 2021 · 6 comments

Comments

@MendelXu
Copy link

Nice job. I am trying to reproduce your work with mmdetection and before it could you help me to confirm some details?

  1. The input scale of the training images. Does line
    MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800)
    indicate the size of the input image is selected from those scales randomly?
  2. The total batch size for training. The batch size is 32 labeled images + 32 unlabeled images. And For each iteration, 96 images( 32 strong augmented labeled images + 32 weakly augmented labeled images + 32 strong augmented unlabeled images) are used for supervision, right?
@ycliu93
Copy link
Contributor

ycliu93 commented Sep 14, 2021

  1. We followed the original implementation in Detectron2. Here is their response for MIN_SIZE_TRAIN.
    MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) detectron2#2216

  2. We used 32 labeled images for computing the supervised loss and fed 32 unlabeled strongly augmented images into Student and 32 identical weakly augmented images into Teacher. In the SoftTeacher, you seem using 8 labeled data + 32 strongly augmented unlabeled data + 32 weakly augmented unlabeled data?

I am also trying to compare the implementation of Unbiased Teacher and SoftTeacher, and see where the improvement comes from.

I guess for a fair comparison (under the same batch size, same data augmentation technique, and other trivial implementation details), you could just change the background confidence loss to Focal loss and remove the unsupervised regression loss in the SoftTeacher codebase.

I didn't see the comparison between Focal loss and background confidence loss in your paper. Do you know how much improvement it contributes?

@MendelXu
Copy link
Author

MendelXu commented Sep 15, 2021

Thanks for your reply. I have tried native Focal loss but the result is quite weird. I will try to replace the roi head with yours directly.

@ycliu93
Copy link
Contributor

ycliu93 commented Sep 15, 2021

Hi @MendelXu ,

I'm tracing your SoftTeacher code and trying to understand the background confidence loss.
https://github.com/microsoft/SoftTeacher/blob/main/ssod/models/soft_teacher.py#L232-L243

Could I interpret as applying a Focal loss on the student's predicted background samples, while the confidence is from the Teacher rather than the Student?

@ycliu93 ycliu93 reopened this Sep 15, 2021
@MendelXu
Copy link
Author

MendelXu commented Sep 15, 2021

I think it is just a weighting mechanism that is opposite to focal loss (it intends to ignore some hard samples). And the confidence is evaluated on weak augmented samples, which is easier for recognition and might be more accurate.

@ycliu93
Copy link
Contributor

ycliu93 commented Sep 15, 2021

Got it. Did you try to apply the teacher's predicted weight to foreground samples before?

@MendelXu
Copy link
Author

Yes. We have tried to apply the weight to all samples but the improvement is marginal compared to only apply to the background part.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants