How do I make inference?
After training the model, I'm encountering difficulties when attempting to test the model and visualize the predictions. Specifically, after running inference on the data, Im not able to match the results you guys showed in your repository.
Hello, can you please give more detail on what you do during the prediction and what data you used for it ?
Sure! Im using Brats2017 that you guys uploaded in the repository. And after I pass one of the modalities.pt through the model I get the logits, but Im unsure to how obtain the final segmentation volume to visualize it.
Which code are you using ? Can you put it here ?
Sure! Its in my forked repo but this is how I extract the volumes from the logits inference.txt
@sergiocanar hello. Do you have the full test script?
Hello, I am currently working on the medical image segmentation field and have completed the model training process. Could you please provide a corresponding testing script? Thank you very much!
@microchila @lj-xh Hello! I had the same problem since there is no inference or test script. I made this one: https://github.com/sergiocanar/SegFormer3D_baseline/blob/main/experiments/brats2018/experiment5_final_sweep/inference.py that is on my forked repository of SegFormer3D. However I'm not sure if its the same that was used in the original implementation since I did not obtain similar metrics to the ones reported on the paper. Let me know if you guys figure it out or have any comments on my inference script
@sergiocanar Hello! I ran your script and noticed that the visualized images are indeed different from those shown in the original paper. I think the reason might be that your script performs inference on preprocessed data instead of the original raw data. Based on your script, I made some modifications — feel free to try it out and see if it helps:inference.txt Also, make sure to add the following line under dataset_parameters: in your config file: brats_raw_root: "../../../data/brats2017_seg/brats2017_raw_data"