mahfuzmohammad / HealthyGAN

Official PyTorch implementation of HealthyGAN - SASHIMI 2022
MIT License
10 stars 2 forks source link

understanding the paper #7

Closed ytz123456 closed 1 year ago

ytz123456 commented 1 year ago

Dear @mahfuzmohammad ,

Thanks so much for your prompt replies to my previous issues! I still have some difficulty understanding the idea. May I know how to explain this sentence:

To be specific, if the input image is a healthy image, the generator is expected to behave like an autoencoder. If the input is a diseased image, the generator should remove anomalous parts and produce a healthy image in the output.

Since the model itself doesn't know its input here (which comes from the mixed dataset), how is the model supposed to do so?

Also from my own experiments, it seems that the masks are outputting only 1s (in the plots, they look completely white) for anomalies, so essentially the mask might not only activate on anomaly regions. However, the method is still effective at detecting anomalies. May I know how to explain this effectiveness?

I greatly appreciate your response!

mahfuzmohammad commented 1 year ago

Thank you, @ytz123456, for your query.

To be specific, if the input image is a healthy image, the generator is expected to behave like an autoencoder. If the input is a diseased image, the generator should remove anomalous parts and produce a healthy image in the output.

This is the expected behavior. Our training method is designed to achieve this behavior.

the masks are outputting only 1s (in the plots, they look completely white) for anomalies

Again, the masks are expected to activate the anomalous region; however, it is not guaranteed. The objective of our method is to train on mixed datasets without annotation to improve detection, not localization. From our experiments, we found the masks are very finicky and heavily hyper-parameter dependant. It can change in every iteration; however, it helps.

We have developed a better anomaly detection method recently accepted in WACV 2024. The preprint is available here: https://arxiv.org/pdf/2302.09200.pdf, and the code is available here: https://github.com/mahfuzmohammad/Brainomaly

Though we designed it for brain MRI, we found it working well in CXR datasets (in our experiments, it achieved SOTA results on the VinBigCXR dataset. The results are not in the paper, I am planning to release the numbers in the GitHub later).

I hope it helps.

ytz123456 commented 1 year ago

Thank you so much for the reply!