We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where is the semantic segmentation mIou?
The text was updated successfully, but these errors were encountered:
Hi! thanks for your contribution!, great first issue!
Sorry, something went wrong.
You can find the segm key here: https://github.com/Lightning-AI/metrics/blob/fbdd1465efff06b2119b30a4dbf90cf83e4e620d/src/torchmetrics/detection/mean_ap.py#L227
I think it is ok to use jaccard_index to calculate mIoU and IoU over each class in segmentation task.
My code for 5-classes segmentation is as below.
import torch import torchmetrics preds = torch.randn(2, 5, 128, 256) target = torch.randint(5, (2, 128, 256)) miou = torchmetrics.functional.jaccard_index(preds, target, num_classes=5) print(miou) ious = torchmetrics.functional.jaccard_index(preds, target, num_classes=5, average=None) print(ious)
Successfully merging a pull request may close this issue.
Where is the semantic segmentation mIou?
The text was updated successfully, but these errors were encountered: