简体   繁体   English

Conv2D 到 Conv3D

[英]Conv2D to Conv3D

I have 3D medical images and wanted to know if I have a CNN that uses Conv2D can I just change the Conv2D to a Conv3D ?我有 3D 医学图像,想知道我是否有使用Conv2D的 CNN,我可以将Conv2D更改为Conv3D吗? If not what would I need to change?如果不是,我需要改变什么?

Yes, you can, but there are a few things to change.是的,你可以,但有一些事情需要改变。

Your kernel will now need to be in 3D, so the argument kernel_size must be a 3 integer tuple.您的内核现在需要是 3D 的,因此参数kernel_size必须是一个 3 整数元组。 Same thing for strides . strides也是如此。 Note that the CNN you will modify will probably be in 3D already (eg, 60, 60, 3) if it's designed to train on colored images.请注意,如果您要修改的 CNN 设计用于在彩色图像上进行训练,则它可能已经是 3D 的(例如,60、60、3)。 The only difference is that you want the neural net to not only detect features in 3 separate 60x60 windows, but through the three windows.唯一的区别是您希望神经网络不仅要检测 3 个独立的 60x60 窗口中的特征,还要通过这三个窗口检测特征。 In other words, not 3 times 2D, but 3D.换句话说,不是 2D 的 3 倍,而是 3D。

tl;dr yes you can, just change kernel_size and strides . tl;dr是的,你可以,只需更改kernel_sizestrides The default values of the keras.layers.Conv3D are adjusted accordingly anyway. keras.layers.Conv3D的默认值无论如何都会相应调整。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM