Open AprilT0621 opened 2 months ago
In cases with only one target in an image, the absence of negative samples in the contrast loss construction results in a constant 0 loss. We have used a method to treat the background as a special instance, and the code will be updated soon.
In cases with only one target in an image, the absence of negative samples in the contrast loss construction results in a constant 0 loss. We have used a method to treat the background as a special instance, and the code will be updated soon.
looking forward to this update since i can not get 80.01 miou on ISIC,i just get 76.1.
Hello! I am currently attempting to replicate the work presented in your paper and I am very grateful for the code you have provided. However, I have encountered an issue regarding the contrastive loss.
During my training process, the contrastive loss remains consistently at 0. After discovering this problem, I checked the inputs in the contrastive loss function (soft_image_embeds[i], anchor_image_embeds[i], soft_res_masks[i], anchor_res_masks[i]) and found that the values of soft_image_embeds[i] and anchor_image_embeds[i] are almost the same, the same goes for soft_res_masks[i] and anchor_res_masks[i].![20240417170340](https://github.com/zhang-haojie/wesam/assets/56342708/0ac28f79-6e27-4bad-bc17-ad2c3bd3aa9a)
loss_contra += contra_loss(soft_image_embeds[i], anchor_image_embeds[i], soft_res_masks[i].clone().detach(), anchor_res_masks[i].clone().detach())
Here is my tensorboard visualization of the contrastive loss using the ISIC dataset and 'box' prompt, the model is ViT-b:I was wondering if you could provide some insights into possible reasons for this occurrence or directions I could explore for troubleshooting? Perhaps I may have encountered some common pitfalls, but I am currently unable to ascertain them.
I look forward to your guidance and suggestions.