Closed CGC1031 closed 3 years ago
What does your segmentation map look like? Is the range in [0, 1] or [0, 255]? Are there multiple anatomical structures in the segmentation map such that each structure corresponds to a different value?
1.I'm using your data sets. For example,the following is the label for the dataset LSPIG . It should be a binary image, not a grayscale image?
2.The segmentation diagram shows that there is only one anatomical structure.
3.So, I want to pass
seg_fixed
and warped_seg_moving_0/1/2/...
in dice_loss.
I can't figure out the reason for dice_loss=0.
It seems that the segmentations are in range [0, 255], but the images are in [0, 1]. Maybe you can check it again.
Thank you for your reply sincerely.
1.I re-read it and found it was grayscale in range [0,255].There is no problem with the images, they match the code.
2.I tested the code for the Dice_loss section separately, and it was no problem.
So I guess it was the warped_seg_moving_0/1/2/...
I passed in that had a problem.
Can you find where I went wrong? Or how can i pass in the warped moving lable?
What training datasets are you using? Is there segmentation information in the training datasets?
I'm using your data sets. When training, is there no input of segmented information?
In our training datasets, there is no segmentation information.
OK,thank you very much.
Hi, I have been studying dice index and loss function recently.I have some questions for a long time. I want to add dice_loss to the loss. It is defined as follows.
def dice_loss(self, seg1, wraped_seg2):
function refers to your codedef mask_metrics(seg1, seg2):
Firstly, I passed in
In order to verify whether I wrote the loss function code has problems.
seg1
andWarped_seg2
. ### line 474 We find that thedice_loss
does not converge.dice_loss=1
means thatdice_score=0
.Secondly, I passed in![QQ图片20200711135959](https://user-images.githubusercontent.com/53649087/87217765-6e7a6780-c37f-11ea-8116-c12670edae21.png)
img1
andWarped_img2.
### line 475 It's ok.dice_loss
converges. This means my code has no problems.Through comparative experiments, it is found that the input data is different. test1:
seg1
、self.reconstruction([seg2, stem_result['agg_flow']]
---------------failure test2:img1
、stem_result['warped']
---------------------------------------------succeedI think
seg1
is fine.self.reconstruction([seg2, stem_result['agg_flow']]
occures wrong. In fact,self.reconstruction([seg2, stem_result['agg_flow']]
equals towarped_seg_moving
.Is it not in the back propagation at all ? All the input refers to thewarped_moving
, the loss function converges. All of thewarped_seg_moving
involved do not converge. The above is my experiment. Could you give me some Suggestions? Is there something wrong withwarped_seg_moving
?Looking forward to your reply. Thank you!