To transfer the learnable parameters from pre-trained 2D ResNet-18 (ImageNet) to 3D one, we duplicated 2D filters (copying them repeatedly) through the third dimension. This is possible since a video or a 3D image can be converted into a sequence of image slices. In the training process, we expect that the 3D ResNet-18 learns patterns in each frame. This model has 34 million learnable parameters.
simply, call "resnet18TL3Dfunction()" function.
Ebrahimi, Amir, et al. “Introducing Transfer Learning to 3D ResNet-18 for Alzheimer’s Disease Detection on MRI Images.” 2020 35th International Conference on Image and Vision Computing New Zealand (IVCNZ), IEEE, 2020, doi:10.1109/ivcnz51579.2020.9290616.
I used spm12 and MNI template in it too.
That sounds great! I'll try to be on the lookout. Which MNI template by the way did you use in your research? I was thinking of using the MNI152 for registration and normalization of the OASIS3 volumes with the spm12.
Hi, definitely! I am uploading my codes one by one. Could you allow me 2-3 weeks and then check my profile? However, you can easily apply my models in MATLAB file exchange.
Hi, could you share the model trained with the ADNI data perhaps? I would want to test it on OASIS data.
Use "groupNormalizationLayer" instead or simply remove "crossChannelNormalizationLayer" because it does not affect network performance.
@cui, nice job. How did you replace cross channel normalisation layer?
Refer to your program, I rewrote the general 3d cnn!
Sorry for the inconvenience. Since I connected the project to GitHub, the whole file is gone. I contacted MathWorks support to fix the issue. Anyway, you can download the file in "version history". Please tell me if you still have any issue.
hi, where is "resnet18TL3Dfunction()" function ? Don't see any code?
@cui Yes, definitely. You just need to adjust the first and the last layers.
Can video behavior analysis be done?
@Esra, no worries
The output argument of ResNet-18 3d function is a layergraph itself. so you do not need to use layerGraph function. Use the output argument of resnet18TL3Dfunction() directly for training.
Thanks for sharing but I get this error using it
"Error using trainNetwork (line 170)
Layers argument must be an array of layers or a layer graph."
How can I fix it?
@LS The paper is about 2D CNN+ LSTM. You can simply extract features from CNNs with "activations" function and then train an LSTM model. More info: https://au.mathworks.com/help/deeplearning/ug/long-short-term-memory-networks.html
Would you have plan to share the model for combination 3D Resnet-18 and LSTM as used on your paper?
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!