1

我正在尝试在 NiftyNet 中实现条件 GAN。

我有一组 Nifti 格式的 3D 图像,每个图像都有一个特定的类。该类应该是 GAN 的条件输入。

到目前为止,我已经设法让它工作,但它有点像 hack:我创建了一个对应于每个 3D 图像的 1x1x1 虚拟图像,其中包含作为其单个值的类。然后,在我的配置文件中(...代表遗漏):

[images]
csv_file = index.csv ; This contains the subject_id to path correspondence
...

[labels]
csv_file = labels.csv ; This contains the subject_id to path to the dummy image correspondence
interp_order = 0
spatial_window_size = (1)
...

[SYSTEM]
...
dataset_split_file = fold0.csv

...

[GAN]
image=images
conditioning=labels
...

虽然它在技术上有效,但它非常脆弱。我想使用带有列subject_id和.csv 文件的 CSV 文件指定类target

我尝试了以下方法,使用csv_data_file输入描述中的未记录参数:

[images]
csv_file = index.csv ; This contains the subject_id to path correspondence
...

[labels]
csv_data_file = ./modality_labels.csv
to_ohe = False
...

[SYSTEM]
...
dataset_split_file = fold0.csv

...

[GAN]
image=images
conditioning=labels
...

但我收到以下错误:

CRITICAL:niftynet: Reader required input section name [labels], 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 [labels] as a column name.
CRITICAL:niftynet: Reader requires section(s): ['images', 'labels']
CRITICAL:niftynet: Configuration input sections are: ['subject_id', 'images']

指定它的正确方法是什么?

4

0 回答 0