How to deal with inputs of different sizes for a deep learning model like 3D U-Net and V-Net?

13 views (last 30 days)
My aim is to segment the cells in 3D and calculate its volume.
i have a datatset of cell stacks. No.of slices in each stack varies, like few cells have 19 slices and few has 29 slices. And also, The distance between the slices are 0.2 micro. The size of the stacks are (19*499*599), (23*83*96).
I have used resize function and made the width and length to be same i.e 250
so, the output is (19*250*250), (23*250*250)
Can someone help me how to deal with this issue?

Answers (1)

Mahesh Taparia
Mahesh Taparia on 16 Sep 2020
Hi
Input size of a CNN is required to be same because the network architecture depends upon the dimension of input. As your dataset is having different size, you can try with the following approach to make it same size:
  • Try to increase the input dimension of the data which is having low dimension. You can append some mask channel or zeros. But this may not be a good approach.
  • You can reduce the dimension of the input to fix size. For example, you can use PCA (Principal Component Analysis) to reduce the dimension and takes first N principal component. For more information, you can refer to this documentation of PCA.
Hope it will helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!