【发布时间】:2019-06-24 20:40:57
【问题描述】:
我正在尝试使用 keras 的 ImageDataGenerator 类加载我的数据,但我遇到了麻烦,因为图像文件不是标准的 jpeg/png 图像文件,而是 nii.gz 文件。我找到了这个 github repo https://github.com/sremedios/nifti_image_generator/blob/master/utils/nifti_image.py 但输出的尺寸不匹配并且
train_generator.next()
抛出一个错误
ValueError: could not broadcast input array from shape (233,189) into shape (197,233,189,1)
【问题讨论】:
-
当你读入你的 nifti 数据时,数据是什么形状的?
print(data.shape) -
197x233x189
标签: image keras computer-vision nifti mri