Data augmentation to increase the number of dataset in monai label #1602
Replies: 1 comment
-
Hi @ArpanGyawali, You don't need to create and save the augmented files. By training the model for more epochs, MONAI Label augments the number of images to train the model. I mean, augmentation happens while training the model. You only need to worry about defining the random transformations. Exactly as you did.
That's correct. It randomly takes patches from the volume considering each label type. Here is more information: https://docs.monai.io/en/stable/transforms.html#randcropbyposneglabeld
This is what the transforms do. They cropped the image in patches and then this class trained the model in patches: https://github.com/Project-MONAI/MONAILabel/blob/main/sample-apps/radiology/lib/trainers/segmentation.py#L131 This is called patch-based model training. Hope this helps, |
Beta Was this translation helpful? Give feedback.
-
I am using these pre transform mentioned below for training my brain extraction from CTA scan model.
I wanted to increase my dataset from the existing data by few augmentation methods. For now i have 56 data, and i want to double the dataset by augmenting them. How can i do that using monai label, best without saving the augmented dataset in device.
Also in the pretransform above, Does RandCropByLabeld create 4 patches of (96,96,96) from the whole image? How are patches created in segmentation method of monai label?
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions