nikhilroxtomar / Semantic-Segmentation-Architecture

A repository contains the code for various semantic segmentation in TensorFlow and PyTorch framework.
Apache License 2.0
144 stars 63 forks source link

UNETR #5

Open Jasneet1313 opened 7 months ago

Jasneet1313 commented 7 months ago

Hi Nikhil, I found your UNETR tutorial helpful on youtube. Thanks for it. I have been trying to implement unetr on my data for multiclass segmentation. i have modified the config values according to my model and i still get errors. I have created data generators which creates patches and makes sure that the input shape is same that is required by the model. It would be great if you can share any implementation if you have one for UNETR. Thanks in advance

nikhilroxtomar commented 7 months ago

Here is the code for Multiclass Segmentation using UNETR https://github.com/nikhilroxtomar/Multiclass-Image-Segmentation-using-UNETR-in-TensorFlow

Jasneet1313 commented 6 months ago

Hi NIkhil. Hope that you are doing well. I have followed your implementation as it is for my multi-class image segmentation. I was working with KiTS2023 dataset which is of nii.gz format. I have converted this to 2d jpg images for training and 2d masks using the one hot encoding as png files. My image size is 512x512 and I have 4 classes, background, kidney, tumor and cysts. While converting to 2d images, i removed the files which only had background in them, so all the images have at least 2 classes. Background class is not important to me and the focus should be on the other classes. I have tried training my model on around 15k images using 5 fold cross validation and used dice score as my metric. On training I have achieved about 0.9 as my dice score on validation data. I have around 5k images that I set aside for testing my model. When I test for my model the dice score that I get is around 0.87 but since I am interested in dice_score per class, the dice score for background is 0.99 and for kidney is 0.01 and zero for the other two classes. What can I do to get better dice scores for each class. Thanking you in advance

Marat3452 commented 5 months ago

What is the minimum version of tensorflow required?