gaozhitong / ATTA

Code for "ATTA: Anomaly-aware Test-Time Adaptation for Out-of-Distribution Detection in Segmentation"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The code of AST loss.

ZelongZeng opened this issue · comments

Hi,
Thank you very much for your nice paper and shared code.

I found that the following code seems to be inconsistent with Eq.11 in the paper:
https://github.com/gaozhitong/ATTA/blob/f0769504d63e2aa0095b80f3ca35be36d78a30a1/lib/loss.py#L37-L38
https://github.com/gaozhitong/ATTA/blob/f0769504d63e2aa0095b80f3ca35be36d78a30a1/lib/loss.py#L49
In your paper, $t=0$ when $G_i<\tau_1$ and $t=1$ when $G_i>\tau_2$. However, it seems not to be the case in the code.
In your code, $t=0$ when $G_i<\tau_1$ and $t=1$ when $G_i>\tau_1$ and $G_i<\tau_2$ and $G_i>0.5$ .

I'd like to confirm if I've misunderstood something related to this part.
Thank you very much.

Hi Zelong, thank you for your interest!

It seems there might be some misunderstanding. In the code, we indeed set t = 1 when G_i > tau_2. The line pseudo_labels[(anomaly_prob > self.tau1) & (anomaly_prob < self.tau2)] = -1 is intended to identify unlabeled data, where '-1' signifies that we do not calculate the relevant area in subsequent operations.

Please don't hesitate to reach out if you have any more questions.

Hi Zhitong,
Thank you very much for your reply.
My issue is perfectly solved.
I will close this issue.