Skip to content

One problem came when I was using SwinUNETR to train my own data #350

@wangbaoyuanGUET

Description

@wangbaoyuanGUET

I'm a graduate student from China interested in deep learning. Recently I'm using MONAI framework on my project, I think it't very high-efficient and convenient. But I faced a problem bothering me for a long time when I use SwinUNTER to train my own data.Next I will explain how I did it.
Firstly, I know that SwinUNETR can be trained directly on BTCV which has 13 classes, but my data contains 2 classes, background and liver tumor, so I change the out_channels to 2.
And the size of my data is 512x512, the size of the z-axis is probably between 40 and 60, so I change the roi_size to (64, 64, 64 ). I don't know what will happened if the z-axis of roi_size is larger than my data, but it doesn't raise any mistake so I keep it.
The above modifications allowed me to train with SwinUNETR and my own successfully.
To compute the loss of the output and ground truth, I modify some code in the test.py which is shown in the figure below.
image
And I turned on save_checkpoint to save the .pt files so that I can test SwinUNETR and my own net on the test set.
But something strange happened on the image after the prediction.
image
A rectangular prediction box appears around the predicted image, but this part is blank in the original image and does not have any labels.I think maybe it's caused by the size of Roi_size and feature_size...Because the z-axis of my own data doesn't equal to the BTCV data set.
Such a situation does't appear on my own net.
The figure below shows my own network prediction, I still use the SwinUNETR training framework, but I replaced the network with my own, so I guess some of the parameters of Swin UNETR are wrong.
image
I don't know what's wrong. I changed a lot of Swin UNETR's hyperparameters, but the problem wasn't solved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions