Yanfeng-Zhou / XNet

[ICCV2023] XNet: Wavelet-Based Low and High Frequency Merging Networks for Semi- and Supervised Semantic Segmentation of Biomedical Images
MIT License
190 stars 9 forks source link

About wavelet3D.py #6

Closed Seconight closed 10 months ago

Seconight commented 1 year ago

Hi! Thank you for your great work! 🤗 And I have a few questions:

image

it looks like the type of LLL int line 49 is not Image, and I add LLL = sitk.GetImageFromArray(LLL) before line 49, is that OK?

Thank you for your reply!

Yanfeng-Zhou commented 1 year ago
  1. You are right. First, you need to download the dataset, then preprocess (preprocess.py), and finally generate L and H (wavelet3D.py) based on the preprocessing results.
  2. As in line 69, LLL = sitk.GetImageFromArray(LLL) should be added before line 49. This was an oversight on my part, thank you for your correction.
Seconight commented 1 year ago

I got it. Thank you very much!

Seconight commented 10 months ago

Hello, I have one more question. I tried to run the model on the LA dataset(3D), however, the result was not good...

image

For data processing, I run the preprocessing.py and then use wavelet3D.py to get L and H of the images. For data postprocessing, I run the test_3dxnet.py and then postprocess.py and then tools/eval.py. Is there anything wrong? Or is there anything I was not paying attention to? Thank you for your reply and patience!

Yanfeng-Zhou commented 10 months ago

This may be caused by inconsistent settings of some hyperparameters between training and testing. As stated in our paper, patch size=(96,96,80) for training and inference, patch_overlap=(48, 48, 40) for testing, threshold is determined by the best results obtained from training.

In addition, please note that the current best_Jc_model is saved with a bug. Please do not use the finally generated best_Jc_model for inference. Instead, use the model generated in the training process for inference.

Seconight commented 10 months ago

It works!!!🥰Thank you again! By the way, where can I get the threshold? It didn't appear in the file.

Yanfeng-Zhou commented 10 months ago

Threshold will only appear in two-category segmentation, and it will be printed out during the training process. If you forget to record the corresponding threshold, you can use threshold=0.5 for inference.

Seconight commented 10 months ago

OK. I got it. Wishing you success in your research.