Skip to content
New issue

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

Custom metrics that depends on image_path? #2009

Open
Anton-Cherepkov opened this issue May 29, 2024 · 0 comments
Open

Custom metrics that depends on image_path? #2009

Anton-Cherepkov opened this issue May 29, 2024 · 0 comments

Comments

@Anton-Cherepkov
Copy link

💡 Your Question

Hello, community

Problem description:
I want to create a custom class PrecisionRecallROIMetrics(DetectionMetrics).

The class PrecisionRecallMetrics will contain logic for calculating detection metrics (e.g. precision, recall) for some Region of Interest (arbitrary region of image defined by polygon). The Region of Interest will be unique for each image in the dataset and can be somehow retrieved by the path to the image.

My current problem with implementing such a class is the following:

  • the update method of DetectionMetrics has fixed inputs which do not include the img_paths:
def update(
  self,
  preds,
  target: torch.Tensor,
  device: str,
  inputs: torch.tensor,
  crowd_targets: Optional[torch.Tensor] = None) -> None:

Question:
Is there any easy way to populate the img_path to the DetectionMetrics object?

Versions

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant