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
When empty ground truth or prediction boxes tensor are provided, MeanAveragePrecision crashes during the conversion to xyxy from other formats.
boxes
MeanAveragePrecision
xyxy
Steps to reproduce the behavior...
box_format='xywh'
update
import torch from torchmetrics.detection.mean_ap import MeanAveragePrecision gts = [ dict(boxes=torch.Tensor([[10, 20, 15, 25]]), labels=torch.IntTensor([0])), ] preds = [ dict(boxes=torch.Tensor([]), scores=torch.Tensor([]), labels=torch.IntTensor([])), ] metric = MeanAveragePrecision(box_format='xywh') metric.update(preds, gts)
torchmetrics should skip the conversion for empty boxes.
conda
pip
0.9.1
nix
The text was updated successfully, but these errors were encountered:
Hi! thanks for your contribution!, great first issue!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
🐛 Bug
When empty ground truth or prediction
boxes
tensor are provided,MeanAveragePrecision
crashes during the conversion toxyxy
from other formats.To Reproduce
Steps to reproduce the behavior...
boxes
tensor in ground truth or predictionMeanAveragePrecision
withbox_format='xywh'
update
with the ground truth and prediction boxesCode sample
Expected behavior
torchmetrics should skip the conversion for empty boxes.
Environment
conda
,pip
, build from source):0.9.1
fromnix
Additional context
The text was updated successfully, but these errors were encountered: