1
$\begingroup$

I've just started with AI and CNN networks.

I have two NIFTI images dataset, one with (240, 240) dimensions and the other one with (256, 132). Each dataset is front a different hospital and machine.

If I want to use both to train my model. What do I have to do?

The model needs to have all the train data with the same shape. I've thought to reshape all the data to have the same shape, but I don't know if I'm going to lose information if I reshape the images.

By the way, I have also a third dataset with (232, 256).

$\endgroup$
2
  • 1
    $\begingroup$ I'm a beginner as well but I suppose you could resize all of the images to a specific dimension (e.g 200x200). As far as I know, resized images do not lose information. Again, I'm not a professional. $\endgroup$ Mar 1, 2020 at 8:49
  • $\begingroup$ Yes, the standard way of handling this is to simply resize the images. If you can still interpret the image yourself, it's normally safe to say your CNN will be ok as well $\endgroup$
    – Recessive
    Mar 2, 2020 at 5:50

1 Answer 1

0
$\begingroup$

Resizing the images will work.But if you significantly reduce the image dimensions information IS lost. Here is a simple example. Suppose you have a 500 X 500 image. That has 250,000 pixels. Assume in these images the object of interest( lets say a bird in a forest) only occupies 10% of the pixels in the image(25,000 pixels). Now assume you reduce the image to 100 X 100 and thus have 10,000 pixels. Your object of interest (the bird) now only occupies 1000 pixels. These are the pixels the neural net will learn from. Now a better way to do this is to first crop your original 500 X 500 images to maximize the percentage of bird pixels in the cropped image. For example assume the resulting cropped image comes out to be say a 200 X 200 image but in that image the subject of interest(the bird) occupies 50% of the pixels (20,000 pixels). Now if you reduce the cropped image down to a 100 X 100 the object of interest will occupy(5000 pixels). Cropping images is of course a hassle. For some types like images for example images of people, and you are just interested in the faces there are routines available that will automatically crop the image to just the face. In general you will have to crop the images yourself. If you want to build high accuracy classifiers you have to start with a "robust" data set. The larger the percentage the object of interest takes up in the images the better your classifier will perform.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .