pcorrado / DL-Vessel-Localization

Deep Learning for automatic vessel measurement plane placement on 4D flow MRI images.
MIT License
1 stars 0 forks source link

Data Augmentation - Labels #3

Open pedr0sorio opened 2 years ago

pedr0sorio commented 2 years ago

Hello Phil,

Sorry to bother once more, but in the paper it is mentioned that during the training process, data augmentation is used to increase the generalizability of the network. I understand that augmentation that consists of rotations, shifts and scaling will also affect the true label values which therefore need updating.

What I do not think is clear from the paper is in which reference frame are defined the labels used to train the model. Do they come defined with relation to the volume's center or are they defined in a global reference frame?

I am asking this because I was using your code to perform this augmentation on my dataset but it seems like the label update is not working for my case as, after reslicing and extracting the slice from the volume, I end up with a different slice than in the beginning. For reference I am applying the transform to the labels defined in a global reference frame.

Thank you in advance, All the best Pedro

pcorrado commented 2 years ago

Looking deeper back at the code I'm seeing that the plane centers were stored in voxel indices. Image volumes were 128x128x128 so a plane with center location 64x64x64 meant it was at the very center of the image volume. Data augmentation uses the plane centers in that same coordinate system. Then, during training, they are normalized by image size right before they are fed into the neural network (lines 177-179 of OneShotCnn/DataGenerator.py). Sorry if that conflicts with what i had said earlier. It was a while ago that I worked on this so it is hazy in my memory.