weijun-arc / SANet

Codes for MICCAI2021 paper "Shallow Attention Network for Polyp Segmentation"
MIT License
56 stars 7 forks source link

About the PCS #1

Closed GuoQingqing closed 2 years ago

GuoQingqing commented 3 years ago

Hi, you have done a splendid work for Polyp Segmentation, and I have a question about PCS. In section 3.3, you proposed a Probability Correction Strategy to explicitly correct the predicted probability through logit reweighting. However, the logit of positive samples(i.e., logit > 0) is still greater than 0 after the normalization, and the result after sigmoid is greater than 0.5, so it is still recognized as a positive sample. I cannot understand your intention to use the PCS.

It would be very kind of you to answer my question. Thanks.

weijun-arc commented 3 years ago

Hello, PCS is not designed for transforming postive sample to negtive sample or vice versa. PCS devotes to enhance the prediction from low confidence to high confidence. For example, a positve sample , logit equal to 0.01, corresponds to 0.5 after sigmoid. However, PCS could make the corresponding value equal to 1. So the boundary will be clearer. That's goal of PCS.

GuoQingqing commented 3 years ago

Thank you very much! I understand. The final prediction in in the code is generated using np.round(pred), so I thought the final prediction was converted to the label '0 and1'. May I ask wheather the calculation of mDice and mIoU adopts the predicted probability or the predicted label ?

weijun-arc commented 3 years ago

The evaluation codes are borrowed from the PraNet for a fair comparison. I think if the authors want to transform the predicted probability into the binary mask, they need to determine the threshold first and this will bring a hyper-parameter. Though 0 may be the a good threshold, but they could not be sure until they did the experiment. So directly using the predcited probability is the easiest way.

GuoQingqing commented 3 years ago

The evaluation codes are borrowed from the PraNet for a fair comparison. I think if the authors want to transform the predicted probability into the binary mask, they need to determine the threshold first and this will bring a hyper-parameter. Though 0 may be the a good threshold, but they could not be sure until they did the experiment. So directly using the predcited probability is the easiest way.

I got it. Thanks a lot!

nguyenlecong commented 2 years ago

Thank you very much! I understand. The final prediction in in the code is generated using np.round(pred), so I thought the final prediction was converted to the label '0 and1'. May I ask wheather the calculation of mDice and mIoU adopts the predicted probability or the predicted label ?

The final prediction is generated using np.round(pred) after multiplied by 255. So it is still grayscale.