lloongx / SFDA-CBMT

Pytorch implementation of MICCAI'23 pape: Source-Free Domain Adaptive Fundus Image Segmentation with Class-Balanced Mean Teacher.
19 stars 0 forks source link

About calculating η. #1

Closed 59-lmq closed 1 year ago

59-lmq commented 1 year ago

Hello!Thanks for coming up with such a novel approach to solving SFDA. I have some questions about the concrete implementation of your method.

First, about calculating η. In your paper, η is used for k classes. But I found that only work for class 0 in your code. I guess this may be used only for cup class, which is 1.32% while disc and background are 10.16% and 89.84% respectively. So I have a questions about η. Why can't it used for all classes (include 0: background, 1: disc, 2: cup), not only for class 0?Does any unexpected results will happen in this way? Second, about how to store all the predictions of all images efficiently. I found that GPU memory usage is very high during the predictions bank initialization before training. There are only hundreds of images usage in your experiments. But while I implement in my task, about thousands of images, it always out of memory during initialization. Could you have any idea to fix this problem? Looking forward to your response!

lloongx commented 1 year ago
  1. In the implementation details section, we said that we implement $\eta$ on the class cup. There are two reasons: (i) the base fundus segmentation model we use produces 2-channel output, (ii) based on our observation, cup class always suffers from imbalance problem. To keep our method simplification, we only perform it on class cup. You can try other implementations and datasets. Thanks for following up.
  2. You can move the memory bank to cpu. Additionally, you can try updating the value of mean loss by using EMA to avoid saving cumbersome memory bank.
59-lmq commented 1 year ago

Thans for your response and suggestions!

  1. I thought that "For a fundas image, the foreground object (e.g., cup) is usually quite small and most pixel will the background." in section 2, was just an example. It misled me truly.🤣
  2. Still about the memmory questions. Has your team tried experimenting on 3D Medical image datasets? I implement your method on a 3D Medical dataset and it didn't work very well.😶‍🌫️
lloongx commented 1 year ago

Sorry, we haven't tried any 3D medical image datasets. I think only maintaining a mean loss value by EMA, like what ProDA has done on prototypes, may help, instead of saving all predictions and then computing the average in our implementation.

59-lmq commented 1 year ago

OK👌! Let me have a try, thansk for your advice! 👍