Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got a ValueError when using the pretrained model to segment images #10

Open
YaoZhang93 opened this issue Feb 7, 2022 · 1 comment
Open

Comments

@YaoZhang93
Copy link

Hi Reuben,

Thanks for your code.
I am trying to use the pretrained model you provided to reproduce the results.
However, when I run:
python inference.py -n u_hemis -t1 ./data/BRATS2018/HGG3_T1.nii.gz -t2 ./data/BRATS2018/HGG3_T2.nii.gz -t1c ./data/BRATS2018/HGG3_T1c.nii.gz -fl ./data/BRATS2018/HGG3_Flair.nii.gz

I got an error that said:


Number of subjects 2, input section names: ['T1', 'subject_id', 'T1c', 'Flair', 'T2']
Dataset partitioning:
-- training 190 cases (9500.00%),
-- validation 95 cases (4750.00%),
-- inference 0 cases (0.00%).

CRITICAL:niftynet: Reader required input section name [T1], but in the filename list the column is empty.
CRITICAL:niftynet: file_list parameter should be a pandas.DataFrame instance and has input section name [T1] as a column name.
CRITICAL:niftynet: Reader requires section(s): ['T1', 'T1c', 'T2', 'Flair']
CRITICAL:niftynet: Configuration input sections are: ['T1', 'subject_id', 'T1c', 'Flair', 'T2']
Traceback (most recent call last):
File "/apdcephfs/share_1290796/medzhang_data/Task/missing_modal/U-HVED/uhved_python/bin/net_run", line 8, in
sys.exit(main())
File "/apdcephfs/share_1290796/medzhang_data/Task/missing_modal/U-HVED/uhved_python/lib/python3.6/site-packages/niftynet/init.py", line 141, in main
app_driver.initialise_application(system_param, input_data_param)
File "/apdcephfs/share_1290796/medzhang_data/Task/missing_modal/U-HVED/uhved_python/lib/python3.6/site-packages/niftynet/engine/application_driver.py", line 167, in initialise_application
data_param, app_param, self.data_partitioner)
File "/apdcephfs/share_1290796/medzhang_data/Task/missing_modal/U-HVED/extensions/multi_modal_application.py", line 97, in initialise_dataset_loader
data_param, task_param, file_list) for file_list in file_lists]
File "/apdcephfs/share_1290796/medzhang_data/Task/missing_modal/U-HVED/extensions/multi_modal_application.py", line 97, in
data_param, task_param, file_list) for file_list in file_lists]
File "/apdcephfs/share_1290796/medzhang_data/Task/missing_modal/U-HVED/uhved_python/lib/python3.6/site-packages/niftynet/io/image_reader.py", line 158, in initialise
raise ValueError
ValueError

I have checked the version of tensorflow and niftynet.
Do you have any idea about what is wrong here?

Best,
Yao

@LightA2
Copy link

LightA2 commented Oct 19, 2023

Hello, I run the code and you have the same reaction to the above problem, how do you solve the above problem, specifically where there is a problem, how to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants