Advice from medical experts needed on transformations

When we do deep learning on images we do various transforms like saturation, hue, zoom, crop, mixup.

I wanted to know what transformations to do on medical images like MRI scans or something. Can you list all the transformations that we can do and also can we do any test time data augmentation also?

Hey Kushajveer.

I used to work as a physiotherapist so I might be able to shed some light on this one.

  1. It depends heavily on what type of medical image. MRI’s are likely to be presented in all different orientations and so rotating the image and mirroring the image is probably a good idea. The same is true for x-ray and US images.
  2. Cropping is probably not a good idea for MRI because the image is a total slice of a part of the body. Because of this, it is unlikely that the problem area that we want to identify will be in the middle of the image. It can be anywhere and everywhere. This is then probably true also of zooming. X-ray is more likely to have a centered image and so is US, but it may not always be the case.
  3. Changes in perspective like tilt probably wont make a difference for medical images either.

Hope that helps.
What are you working on?

1 Like

Saw this competition by Stanford I thought I had learned quite some techniques for training CNNs on regular images, so why not try medical data. Also, there a new alternative to traditional convolutions has shown up octave convolutions and I have to say that the results they achieve are quite crazy. I have yet to benchmark them, so won’t comment much on them now.

Also, I have yet to finish downloading the images (1.5GB/day limit), so can you give some advice seeing the description of the competition.

1 Like

I’ll check it out when I get some time. Looks really cool.

1 Like


Hey @kushaj. Looking at state of the art, most common approaches are regular augmentations including shifting, flipping, rotating, scaling or cropping and they have been found to be beneficial. However, as @mcclomitz mentioned, cropping (and flipping) aren’t in my opinion that beneficial since they have no clinical equivalents. Personally, I have found great results with applying elastic transformations. They are used surprisingly rare but can generate realistic clinically unique images. There are also attempts to use i.e. random contrast normalization.

Since you’re asking about “transformations” and not just augmentations you should probably look into preprocessing that goes into medical imaging as well, with clipping Hounsfield units being the most basic one


Thanks, enough to keep me busy for a while. Just some doubts, by shifting, you mean shift the image left by 5 pixels and pad the right side pixels (if this is true which padding to use).

Elastic transformation are a new one for me, as from the name. Can you help give some examples or resources, as searching on net is not providing me the right thing.

And thanks for giving some insight into the preprocessing as well. Will explore it also.

I personally found elastic transformations on this Kaggle competition:

Example implementation: