3D Data-Augmentation Using tf.data and Volumentations-3D Library 글에서 나와 있듯이
- NiftyNet is a TensorFlow-based open-source convolutional neural networks platform for research in medical image analysis and image-guided therapy.
- DLTK is an open-source library that makes deep learning on medical images easier, build on Tensorflow.
- MONAI framework is the open-source foundation being created by Project MONAI. MONAI is a freely available, community-supported, PyTorch-based framework for deep learning in healthcare imaging.
- MedicalTorch is an open-source framework for PyTorch, implementing an extensive set of loaders, pre-processors, and datasets for medical imaging.
- SimpleITK is an abstraction layer and wrapper around the Insight Segmentation and Registration Toolkit (ITK). It is available in the following programming languages: C++, Python, R, Java, C#, Lua, Tcl, and Ruby. [http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/Python_html/70_Data_Augmentation.html ]
이러한 방법이 있고, 이 중 나는 MONAI가 offline방식으로 augmentation을 진행하기 가장 쉬웠다.
https://github.com/Project-MONAI/tutorials/blob/master/modules/3d_image_transforms.ipynb
그리고 Augmentation using intensity modifications을 하는 경우에는 landmark 좌표가 변하는 issue가 없기 때문에 online으로 진행 할 수 있을 것 같고, 그 때는 data read와 resample등에 사용하고 있는 simpleITK를 사용하여 data read 할 때 바로 online으로 augmentation을 진행해도 좋을 것 같다.
offline으로 nifti파일 불러와서, 이미지 프로세싱하고 저장하는 것은 아래의 코드를 참고했다.
https://nipy.org/nibabel/nibabel_images.html
import nibabel as nib
mri = nib.load('p1_mri_t1.nii.gz')
img = mri.get_fdata()
# image processing
imgd = img + img
mri_new = nib.Nifti1Image(imgd, mri.affine, mri.header)
nib.save(mri_new,'p1_mri_t1_new.nii.gz')
'Project > [Landmark Detection] RL' 카테고리의 다른 글
Data preprocessing and augmentation using TorchIO (0) | 2021.05.20 |
---|---|
[Medical Image] FOV와 Spacing Resolution (0) | 2021.01.21 |
[Medical Image] DICOM(Digital Imaging and Communications in Medicine) (0) | 2021.01.19 |
[Reinforcement Learning] Deep Q-network: Experience replay (0) | 2021.01.15 |
[Reinforcement Learning] Modeling RL Problems: Epsilon-greedy Strategy (0) | 2021.01.02 |