Replies: 2 comments 3 replies
-
Can the problem be as simple that I have trained a 3D-model on 2D-images and that it does not manage to place the labels on the correct layer? Anyhow, I tried to make it a 2D model by chaning roi_size, target_spacing and spatial_dims:
which gave the following error in the cmd-window.
Do I need to change any other parameteres? Is the pipeline able to handle 2D-models at all? |
Beta Was this translation helpful? Give feedback.
-
Hi @ErlendAQK, Thanks for sharing your experience here.
You're correct. MONAI Label is designed for 3D image segmentation. Using the Radiology segmentation model for 2D images requires significant changes to pre-transforms, network architecture, and hyperparameters. For 2D segmentation, consider using MONAI Label's Endoscopy application, which works with the CVAT viewer. Hope this helps to clarity scope |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have some troubles with the Auto Segmentation of my 2D DICOM images of fish. Nothing happens when I click run Auto Segmentation.
Training my model
I started out with the radiology app, made a new copy (segmentation_fisk2.py) from the file segmentation.py in the config-folder. I edited the labels to (norwegian)
and set pretrain to false:
strtobool(self.conf.get("use_pretrained_model", "False"))
I have annotated and submitted labels for (only) 9 images similar to this image. The annotation work is not very precise. I just want to get some results. I have not used the annotation label 3 "Skade/damage". I ran "train" and the model was trained through 50 epochs as expected with decent results. Or is it something wrong already at this point?
From train_stats.json:
The problem
Now I have loaded a new image, but when I press run autosegmentation, nothing happens. And I don't know where to troubleshoot. I assume the problem lies in the AutoSegmentation and not the model itself? But I don't know where to look for the error. I hope you are able to help me out.
From monailabel error log:
log1
log2
log3
log4
Result Params for Segmentation: {'label_names': {'Fisk': 1, 'Ryggrad': 2, 'Skade': 3}, 'latencies': {'pre': 0.06, 'infer': 3.65, 'invert': 0.18, 'post': 0.3, 'write': 0.01, 'total': 4.19, 'transform': {'pre': {'LoadImaged': 0.0321, 'EnsureTyped': 0.0, 'EnsureChannelFirstd': 0.0, 'Orientationd': 0.004, 'Spacingd': 0.016, 'NormalizeIntensityd': 0.001, 'GaussianSmoothd': 0.002, 'ScaleIntensityd': 0.0}, 'post': {'EnsureTyped': 0.0, 'Activationsd': 0.009, 'AsDiscreted': 0.245, 'Restored': 0.001, 'GetCentroidsd': 0.0375}}}, 'centroids': {}}
log5
Update Segmentation Mask from: C:/Users/ErlendK/AppData/Local/Temp/Slicer/slicer-monai-label2024-08-28_12+38+02.553\tmpmngofc_n.nrrd
log6
log7
log8
Time consumed by segmentation: 4.3
Finally, the model is run with roi_size (96,96,96). Is that relevant? Could I have used (96,96,1) since I have 2D images? Will that increase the speed?
Beta Was this translation helpful? Give feedback.
All reactions